/* =========================================
   Sweetooth Pastry - Main Design System
   ========================================= */

:root {
    /* Color Palette */
    --color-pink-soft: #ffdde1;
    --color-pink-light: #fff0f3;
    --color-cream: #fffdf7;
    --color-cream-dark: #fcf6eb;
    --color-brown-light: #a67b5b;
    --color-brown-dark: #6b4423;
    --color-white: #ffffff;
    --color-text: #4a3b32;
    --color-text-light: #7a6353;
    
    /* Typography */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Outfit', sans-serif;
    
    /* Layout */
    --border-radius: 16px;
    --border-radius-lg: 24px;
    --shadow-soft: 0 10px 30px rgba(107, 68, 35, 0.08);
    --shadow-hover: 0 15px 35px rgba(107, 68, 35, 0.12);
    
    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* =========================================
   Resets & Base Styles
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-cream);
    color: var(--color-text);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--color-brown-dark);
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* =========================================
   Typography
   ========================================= */
.section-title {
    font-size: 2.5rem;
    text-align: center;
    position: relative;
    padding-bottom: 15px;
    margin-bottom: 0.5rem;
}
.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--color-brown-light);
    border-radius: 2px;
}
.section-desc {
    text-align: center;
    color: var(--color-text-light);
    margin-bottom: 3rem;
    font-size: 1.1rem;
}

/* =========================================
   Buttons
   ========================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.8rem 1.8rem;
    border-radius: 50px;
    font-weight: 600;
    font-family: var(--font-body);
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-size: 1rem;
}
.btn-primary {
    background-color: var(--color-brown-light);
    color: var(--color-white);
    box-shadow: 0 4px 15px rgba(166, 123, 91, 0.3);
}
.btn-primary:hover {
    background-color: var(--color-brown-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(107, 68, 35, 0.4);
}
.btn-secondary {
    background-color: var(--color-white);
    color: var(--color-brown-dark);
    box-shadow: var(--shadow-soft);
}
.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}
.btn-large {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
}

/* =========================================
   Header & Navigation
   ========================================= */
.header {
    background-color: rgba(255, 253, 247, 0.9);
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1rem 0;
    transition: var(--transition);
    border-bottom: 1px solid rgba(166, 123, 91, 0.1);
}
.header.scrolled {
    padding: 0.8rem 0;
    box-shadow: var(--shadow-soft);
}
.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}
.logo-img {
    height: 48px;
    width: auto;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(107, 68, 35, 0.15);
}
.logo-text {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--color-brown-dark);
}
.nav {
    display: flex;
    gap: 2rem;
}
.nav-link {
    font-weight: 500;
    color: var(--color-text);
    transition: color 0.3s ease;
    position: relative;
}
.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--color-brown-light);
    transition: width 0.3s ease;
}
.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}
.nav-link:hover {
    color: var(--color-brown-light);
}

@media (max-width: 768px) {
    .nav {
        display: none; /* simple mobile nav approach for brevity */
    }
}

/* =========================================
   Hero Section
   ========================================= */
.hero {
    min-height: 100vh;
    padding-top: 120px;
    padding-bottom: 80px;
    background: linear-gradient(135deg, 
        rgba(255, 246, 230, 1) 0%,
        rgba(240, 250, 240, 1) 50%,
        rgba(255, 238, 235, 1) 100%
    );
    position: relative;
    display: flex;
    align-items: center;
    overflow: hidden;
}
.hero-content {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 2;
}
.hero-pill {
    display: inline-block;
    background-color: var(--color-pink-soft);
    color: var(--color-pink-dark);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 6px 16px;
    border-radius: 20px;
    margin-bottom: 1.5rem;
}
.hero-title {
    font-family: var(--font-heading);
    font-size: 4.5rem;
    line-height: 1.1;
    color: var(--color-brown-dark);
    margin-bottom: 1rem;
    font-weight: 800;
}
.hero-title .highlight-pink {
    font-family: var(--font-body);
    font-weight: 800;
    font-style: italic;
    color: var(--color-pink-dark);
    display: inline-block;
}
.hero-description {
    font-size: 1.15rem;
    color: var(--color-text);
    margin-bottom: 2rem;
    max-width: 480px;
    line-height: 1.6;
}
.hero-actions {
    display: flex;
    gap: 15px;
    margin-top: 2rem;
}
.hero-actions .btn {
    border-radius: 30px;
    padding: 0.8rem 2rem;
    font-weight: 600;
    transition: transform 0.3s ease;
}
.hero-actions .btn:hover {
    transform: translateY(-3px);
}
.hero-secondary-btn {
    background: #ffffff;
    color: var(--color-brown-dark);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    border: none;
}
.hero-secondary-btn:hover {
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}
.hero-image-box {
    position: relative;
    display: flex;
    justify-content: center;
}
.hero-image-wrapper {
    position: relative;
    width: 100%;
    max-width: 500px;
    transform: rotate(3deg);
    border-radius: 20px;
    box-shadow: -15px 15px 30px rgba(0,0,0,0.1);
    transition: transform 0.5s ease;
}
.hero-image-wrapper:hover {
    transform: rotate(0deg) scale(1.02);
}
.hero-image-wrapper img {
    width: 100%;
    height: auto;
    border-radius: 20px;
    display: block;
    object-fit: cover;
    aspect-ratio: 4/5;
}
.hero-badge {
    position: absolute;
    bottom: -15px;
    left: -20px;
    background-color: #6edcb3;
    color: var(--color-brown-dark);
    padding: 10px 20px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1.1rem;
    border-radius: 6px;
    transform: rotate(-5deg);
    box-shadow: 0 5px 15px rgba(110, 220, 179, 0.4);
}

@media (max-width: 900px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        padding-top: 2rem;
        gap: 2rem;
    }
    .hero-title {
        font-size: 3rem;
    }
    .hero-description {
        margin: 0 auto 2rem;
    }
    .hero-actions {
        justify-content: center;
    }
    .hero-image-box {
        max-width: 400px;
        margin: 0 auto;
    }
    .hero-badge {
        left: -10px;
        bottom: -10px;
    }
}

/* =========================================
   Sections Base
   ========================================= */
.section {
    padding: 6rem 0;
    background-color: var(--color-cream);
}
.section:nth-of-type(even) {
    background-color: var(--color-white);
}

/* =========================================
   Menu Grid Section
   ========================================= */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}
.menu-item {
    background: var(--color-white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: var(--transition);
    cursor: zoom-in;
    position: relative;
    aspect-ratio: 1;
}
.menu-item:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}
.menu-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.menu-item:hover img {
    transform: scale(1.05);
}

/* =========================================
   Unified Menu Grids & Tabs
   ========================================= */

/* Category Tabs */
.category-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 2.5rem;
}
.tab-btn {
    background: var(--color-white);
    border: 2px solid var(--color-brown-light);
    color: var(--color-brown-dark);
    padding: 0.5rem 1.5rem;
    border-radius: 30px;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}
.tab-btn:hover {
    background: var(--color-pink-light);
    border-color: var(--color-pink-light);
}
.tab-btn.active {
    background: var(--color-brown-dark);
    color: var(--color-white);
    border-color: var(--color-brown-dark);
}

/* Items Grid */
.menu-items-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

@media (max-width: 900px) {
    .menu-items-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
@media (max-width: 650px) {
    .menu-items-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    .card-item-img {
        height: 160px;
    }
    .card-item-content {
        padding: 1rem;
    }
    .whatsapp-order-btn {
        padding: 0.5rem;
        font-size: 0.9rem;
    }
    .category-tabs {
        gap: 5px;
    }
    .tab-btn {
        padding: 0.4rem 1rem;
        font-size: 0.9rem;
    }
}
@media (max-width: 400px) {
    .menu-items-grid {
        grid-template-columns: 1fr;
    }
}
.card-item {
    background: var(--color-white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    transition: var(--transition);
}
.card-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}
.card-item-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}
.card-img-wrapper {
    position: relative;
    width: 100%;
}
.best-seller-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #FFD700;
    color: #333;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    box-shadow: var(--shadow-soft);
    z-index: 2;
}
.item-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-brown-dark);
    margin: 0.5rem 0;
}
.whatsapp-order-btn {
    margin-top: 1rem;
    width: 100%;
    text-align: center;
    border-radius: 5px;
}
.card-item-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}
.card-item h3 {
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}
.card-item p {
    color: var(--color-text-light);
    font-size: 0.95rem;
}

/* =========================================
   Reviews Section
   ========================================= */
.reviews-carousel-wrapper {
    position: relative;
    max-width: 100%;
}
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--color-white);
    color: var(--color-brown-dark);
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}
.carousel-btn:hover {
    background: var(--color-brown-dark);
    color: var(--color-white);
}
.carousel-btn.prev-btn {
    left: -20px;
}
.carousel-btn.next-btn {
    right: -20px;
}
.reviews-slider {
    display: flex;
    overflow-x: auto;
    gap: 2rem;
    padding: 1rem 0 2rem;
    scrollbar-width: none; /* Firefox */
    scroll-behavior: smooth;
}
.reviews-slider::-webkit-scrollbar {
    display: none; /* Chrome */
}
.review-card {
    min-width: 320px;
    background: var(--color-white);
    padding: 2rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-soft);
    position: relative;
    border: 1px solid var(--color-pink-soft);
}
.review-card i.quote {
    color: var(--color-pink-soft);
    font-size: 2rem;
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    opacity: 0.5;
}
.review-stars {
    color: #ffc107;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}
.review-text {
    font-style: italic;
    margin-bottom: 1.5rem;
}
.review-author {
    font-weight: 600;
    color: var(--color-brown-dark);
    font-family: var(--font-heading);
    font-size: 1.1rem;
}

/* =========================================
   WhatsApp CTA Banner
   ========================================= */
.cta-section {
    background: linear-gradient(135deg, var(--color-brown-light), var(--color-brown-dark));
    padding: 5rem 0;
    text-align: center;
    color: var(--color-white);
}
.cta-container {
    max-width: 800px;
}
.cta-content h2 {
    color: var(--color-cream);
    font-size: 2.5rem;
    margin-bottom: 1rem;
}
.cta-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* =========================================
   Footer
   ========================================= */
.footer {
    background-color: var(--color-text);
    color: var(--color-cream);
    padding: 2rem 0;
    text-align: center;
}
.footer-socials {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1rem;
}
.footer-social-link {
    color: var(--color-cream);
    font-size: 1.8rem;
    display: inline-block;
    transition: var(--transition);
}
.footer-social-link:hover {
    color: var(--color-pink-soft);
    transform: translateY(-3px);
}

/* =========================================
   Floating WhatsApp
   ========================================= */
.floating-whatsapp {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #25d366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    z-index: 1000;
    transition: var(--transition);
}
.floating-whatsapp:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
}

/* =========================================
   Lightbox
   ========================================= */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.lightbox.show {
    display: flex;
    opacity: 1;
}
.lightbox-img {
    max-width: 90%;
    max-height: 90vh;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    transform: scale(0.95);
    transition: transform 0.3s ease;
}
.lightbox.show .lightbox-img {
    transform: scale(1);
}
.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 30px;
    cursor: pointer;
    transition: color 0.3s;
}
.lightbox-close:hover {
    color: var(--color-pink-soft);
}

/* =========================================
   Animations (Intersection Observer Classes)
   ========================================= */
.fade-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}
.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}
.fade-in {
    opacity: 0;
    transition: opacity 1s ease;
}
.fade-in.visible {
    opacity: 1;
}


@keyframes slideUpFade {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.show-card {
    opacity: 0;
    animation: slideUpFade 0.4s ease-out forwards;
}

/* =========================================
   Preloader
   ========================================= */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--color-cream);
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}
.preloader-logo {
    width: 150px;
    height: auto;
    border-radius: 50%;
    animation: pulseLoader 1.2s infinite ease-in-out alternate;
}
@keyframes pulseLoader {
    0% { transform: scale(0.9); box-shadow: 0 0 10px rgba(107, 68, 35, 0.1); }
    100% { transform: scale(1.1); box-shadow: 0 0 30px rgba(107, 68, 35, 0.4); }
}
