/* สไตล์หลักสำหรับเว็บไซต์ร้านขนมหวาน ไท่ปิ่น */
:root {
    --primary-color: #FF6B6B;
    --secondary-color: #4ECDC4;
    --accent-color: #FFE66D;
    --text-color: #333333;
    --light-bg: #F7F7F7;
    --dark-bg: #292F36;
    --font-main: 'Kanit', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    color: var(--text-color);
    background-color: var(--light-bg);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: var(--primary-color);
}

a:hover {
    color: var(--accent-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* ส่วนหัว */
header {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo a {
    display: block;
    color: inherit;
}

.logo-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-img {
    height: 70px;
    width: 70px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.logo-img:hover {
    transform: scale(1.05);
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo h1 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 5px;
    font-weight: 700;
    line-height: 1.2;
}

.logo .tagline {
    color: var(--text-color);
    font-size: 0.9rem;
    font-weight: 300;
    opacity: 0.8;
}

.nav-menu {
    display: flex;
    list-style: none;
}

.nav-menu li {
    margin-left: 20px;
}

.nav-menu a {
    color: var(--text-color);
    font-weight: 500;
    padding: 5px 10px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.nav-menu a:hover, .nav-menu a.active {
    background-color: var(--primary-color);
    color: white;
}

/* ปุ่มเมนูมือถือ */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: var(--primary-color);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.menu-toggle.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* ส่วนแบนเนอร์ */
.banner {
    height: 600px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
    position: relative;
}

.banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
}

.banner-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    text-align: center;
    color: white;
    padding: 20px;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 10px;
}

.banner h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.banner p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.banner-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.btn-service {
    background-color: rgba(255, 255, 255, 0.2);
    border: 1px solid white;
}

.btn-service:hover {
    background-color: white;
    color: var(--primary-color);
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 5px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background-color: var(--accent-color);
    color: var(--text-color);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

@media (max-width: 768px) {
    .banner-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .banner-buttons .btn {
        margin-bottom: 10px;
        width: 80%;
    }
}

/* ส่วนเมนูขนมยอดนิยม */
.popular-menu {
    padding: 80px 0;
    background-color: white;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--accent-color);
}

.section-title p {
    color: var(--text-color);
    max-width: 700px;
    margin: 0 auto;
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.menu-card {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.menu-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.menu-img {
    height: 200px;
    overflow: hidden;
}

.menu-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.menu-card:hover .menu-img img {
    transform: scale(1.1);
}

.menu-content {
    padding: 20px;
}

.menu-content h3 {
    margin-bottom: 10px;
    font-size: 1.5rem;
    color: var(--text-color);
}

.menu-content p {
    color: #666;
    margin-bottom: 15px;
}

.menu-price {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--primary-color);
}

/* ส่วนเกี่ยวกับเรา */
.about-us {
    padding: 80px 0;
    background-color: var(--light-bg);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.about-content h2 {
    color: var(--primary-color);
    font-size: 2.2rem;
    margin-bottom: 25px;
    position: relative;
}

.about-content h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 3px;
    background-color: var(--accent-color);
}

.about-content p {
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.about-slider {
    position: relative;
    width: 100%;
    height: 400px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.about-slider .slide {
    display: none;
    width: 100%;
    height: 100%;
}

.about-slider .slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.about-slider:hover .slide img {
    transform: scale(1.05);
}

.about-slider .prev,
.about-slider .next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.7);
    color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
}

.about-slider .prev {
    left: 10px;
}

.about-slider .next {
    right: 10px;
}

.about-slider .prev:hover,
.about-slider .next:hover {
    background-color: white;
    color: var(--accent-color);
}

.about-slider .dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.about-slider .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.about-slider .dot.active {
    background-color: white;
    transform: scale(1.2);
}

/* ส่วนรีวิวจากลูกค้า */
.testimonials {
    padding: 80px 0 120px;
    background-color: white;
    position: relative;
}

.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.testimonial-card {
    background-color: var(--light-bg);
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.testimonial-text {
    font-style: italic;
    margin-bottom: 20px;
    color: var(--text-color);
}

.testimonial-author {
    display: flex;
    align-items: center;
}

.testimonial-author img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-right: 15px;
    object-fit: cover;
}

.author-info h4 {
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.author-info p {
    color: #666;
    font-size: 0.9rem;
}

.testimonial-slider {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: 30px 0;
}

.testimonial-slide {
    display: none;
    text-align: center;
    padding: 30px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    margin: 0 20px;
}

.testimonial-text {
    font-size: 1.2rem;
    line-height: 1.8;
    color: var(--text-color);
    font-style: italic;
    margin-bottom: 20px;
    position: relative;
}

.testimonial-text::before,
.testimonial-text::after {
    content: '"';
    font-size: 2.5rem;
    color: var(--primary-color);
    opacity: 0.3;
    position: absolute;
}

.testimonial-text::before {
    top: -20px;
    left: -10px;
}

.testimonial-text::after {
    bottom: -40px;
    right: -10px;
}

.testimonial-author {
    margin-top: 30px;
}

.author-name {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.author-title {
    font-size: 0.9rem;
    color: #777;
}

.testimonial-slider .prev,
.testimonial-slider .next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
}

.testimonial-slider .prev {
    left: -20px;
}

.testimonial-slider .next {
    right: -20px;
}

.testimonial-slider .prev:hover,
.testimonial-slider .next:hover {
    background-color: var(--accent-color);
    color: var(--text-color);
}

.testimonial-slider .dots {
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.testimonial-slider .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
}

.testimonial-slider .dot.active {
    background-color: var(--primary-color);
    transform: scale(1.2);
}

/* ส่วนติดต่อเรา */
.contact {
    padding: 80px 0;
    background-color: var(--light-bg);
    margin-top: 30px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.contact-info h3 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.contact-details {
    margin-bottom: 30px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
}

.contact-icon {
    margin-right: 15px;
    font-size: 1.2rem;
    color: var(--primary-color);
}

.contact-text h4 {
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.contact-text p {
    color: #666;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background-color: var(--accent-color);
    transform: translateY(-3px);
}

.contact-form h3 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    font-size: 1rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(255, 107, 107, 0.2);
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

/* ส่วนท้าย */
footer {
    background-color: var(--primary-color);
    color: white;
    padding: 60px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.footer-col h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-col h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background-color: var(--accent-color);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
}

.footer-links a:hover {
    color: var(--accent-color);
    padding-left: 5px;
}

.footer-contact-item {
    display: flex;
    margin-bottom: 15px;
}

.footer-contact-icon {
    margin-right: 10px;
    color: var(--accent-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    font-size: 0.9rem;
    color: #aaa;
}

/* รองรับหน้าจอมือถือ */
@media (max-width: 768px) {
    .header-container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 15px 20px;
    }
    
    .logo-img {
        height: 60px;
        width: 60px;
    }
    
    .logo h1 {
        font-size: 1.5rem;
    }
    
    .logo .tagline {
        font-size: 0.8rem;
    }
    
    .menu-toggle {
        display: flex;
        z-index: 1001;
        margin-right: 5px;
    }
    
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 250px;
        height: 100vh;
        background-color: white;
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        padding: 80px 20px 30px;
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
        transition: all 0.3s ease;
        z-index: 1000;
        margin-top: 0;
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .nav-menu li {
        margin: 0 0 15px 0;
        width: 100%;
    }
    
    .nav-menu a {
        display: block;
        padding: 10px;
        width: 100%;
    }
    
    .banner {
        height: 400px;
    }
    
    .banner h1 {
        font-size: 2.5rem;
    }
    
    .about-grid, .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .about-img {
        order: -1;
    }
    
    .menu-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .menu-content h3 {
        font-size: 1.2rem;
    }
    
    .menu-content p {
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .testimonial-grid {
        grid-template-columns: 1fr;
    }
    
    .banner h1 {
        font-size: 2rem;
    }
    
    .section-title h2 {
        font-size: 2rem;
    }
    
    .menu-img {
        height: 150px;
    }
}

@media (max-width: 480px) {
    .menu-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .menu-content {
        padding: 10px;
    }
    
    .menu-content h3 {
        font-size: 1rem;
        margin-bottom: 5px;
    }
    
    .menu-content p {
        font-size: 0.8rem;
        margin-bottom: 8px;
    }
    
    .menu-price {
        font-size: 1rem;
    }
}
