/* ==========================================================================
   CSS Variables & Theming
   ========================================================================== */
:root {
    /* Primary Colors */
    --primary: #5D4037;      /* Chocolate Brown */
    --secondary: #FFF8F0;    /* Soft Cream */
    --accent: #FF6F91;       /* Pink */
    --highlight: #F4C542;    /* Golden */
    
    /* Backgrounds & Text */
    --bg-main: #FFFFFF;
    --text-main: #333333;
    --text-muted: #666666;
    
    /* Fonts */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Poppins', sans-serif;
    --font-btn: 'Montserrat', sans-serif;
    
    /* Utilities */
    --shadow-soft: 0 10px 30px rgba(93, 64, 55, 0.1);
    --shadow-hover: 0 15px 40px rgba(93, 64, 55, 0.2);
    --radius: 12px;
    --transition: all 0.3s ease;
}

[data-theme="dark"] {
    --bg-main: #1a1514;
    --secondary: #2d2422;
    --text-main: #f5f5f5;
    --text-muted: #bbbbbb;
    --primary: #8d6255; 
    --shadow-soft: 0 10px 30px rgba(0,0,0,0.5);
}

/* ==========================================================================
   Base & Reset
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    color: var(--primary);
    margin-bottom: 1rem;
}

[data-theme="dark"] h1, [data-theme="dark"] h2, [data-theme="dark"] h3 {
    color: var(--highlight);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.section-padding {
    padding: 5rem 0;
}

.bg-secondary { background-color: var(--secondary); }
.bg-primary { background-color: var(--primary); }
.text-white { color: #fff; }
.text-accent { color: var(--accent); }

/* ==========================================================================
   Typography & Utilities
   ========================================================================== */
.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 1rem;
}

.section-header p {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 3rem;
}

.glass-card {
    background: rgba(255, 248, 240, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
}

[data-theme="dark"] .glass-card {
    background: rgba(45, 36, 34, 0.6);
    border-color: rgba(255,255,255,0.1);
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
    display: inline-block;
    padding: 0.8rem 1.8rem;
    font-family: var(--font-btn);
    font-size: 0.9rem;
    border-radius: 50px;
    cursor: pointer;
    border: none;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), #ff477e);
    color: #fff;
    box-shadow: 0 4px 15px rgba(255, 111, 145, 0.4);
}

.btn-primary:hover {
    background: var(--primary);
    box-shadow: 0 4px 15px rgba(93, 64, 55, 0.4);
}

.btn-secondary {
    background: var(--secondary);
    color: var(--primary);
}

.btn-secondary:hover {
    background: var(--highlight);
    color: #fff;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--accent);
    color: var(--accent);
}

.btn-outline:hover {
    background: var(--accent);
    color: #fff;
}

.w-100 { width: 100%; }

/* ==========================================================================
   Animations & Effects
   ========================================================================== */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
    100% { transform: translateY(0px); }
}

.floating { animation: float 3s ease-in-out infinite; }

/* Ripple Effect */
.ripple::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
}
.ripple:active::after {
    width: 200px;
    height: 200px;
    opacity: 1;
    transition: width 0.4s ease, height 0.4s ease, opacity 0.4s ease;
}

/* ==========================================================================
   Loader & Scroll Progress
   ========================================================================== */
#loader {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: var(--bg-main);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease;
}
.loader-content { text-align: center; color: var(--primary); }
.loader-content i { font-size: 4rem; color: var(--accent); margin-bottom: 1rem; }

.scroll-progress {
    position: fixed;
    top: 0; left: 0; height: 4px;
    background: var(--accent);
    z-index: 10000;
    width: 0%;
}

/* ==========================================================================
   Navigation
   ========================================================================== */
header {
    position: fixed;
    top: 0; left: 0; width: 100%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: var(--transition);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

[data-theme="dark"] header {
    background: rgba(26, 21, 20, 0.9);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--primary);
    font-weight: 700;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
}

.nav-links a {
    font-size: 0.95rem;
    font-weight: 500;
}

.nav-links a:hover {
    color: var(--accent);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.icon-btn {
    background: none; border: none;
    font-size: 1.2rem; cursor: pointer;
    color: var(--text-main);
}
.mobile-only { display: none; }

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    height: 100vh;
    background: url('https://images.unsplash.com/photo-1578985545062-69928b1d9587?auto=format&fit=crop&w=1920&q=80') center/cover no-repeat;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hero-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(93, 64, 55, 0.6); /* Chocolate overlay */
}

.hero-content {
    position: relative;
    z-index: 2;
    color: #fff;
    max-width: 800px;
}

.hero h1 {
    font-size: 4rem;
    color: #fff;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.floating-icons {
    position: absolute; width: 100%; height: 100%;
    top: 0; left: 0; pointer-events: none; z-index: 1;
}
.floating-icons i {
    position: absolute;
    color: rgba(255,255,255,0.3);
    font-size: 3rem;
    animation: float 4s infinite ease-in-out;
}
.icon-1 { top: 20%; left: 10%; animation-delay: 0s; }
.icon-2 { top: 60%; right: 15%; animation-delay: 1s; }
.icon-3 { bottom: 15%; left: 20%; animation-delay: 2s; }

/* ==========================================================================
   About Section
   ========================================================================== */
.about-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text h2 { text-align: left; }
.feature-list { margin-top: 1.5rem; }
.feature-list li { margin-bottom: 0.8rem; font-weight: 500; }
.about-image {
    border-radius: var(--radius);
    overflow: hidden;
    padding: 1rem;
}
.about-image img { border-radius: calc(var(--radius) - 4px); }

/* ==========================================================================
   Categories (Cards)
   ========================================================================== */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.cake-card {
    transition: var(--transition);
    overflow: hidden;
    text-align: center;
}

.cake-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.cake-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-top-left-radius: var(--radius);
    border-top-right-radius: var(--radius);
}

.card-content { padding: 1.5rem; }
.card-content h3 { font-size: 1.3rem; margin-bottom: 0.5rem; }
.card-content .price { color: var(--accent); font-weight: 600; font-size: 1.1rem; margin-bottom: 0.5rem; }
.card-content .desc { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 1.5rem; }

/* ==========================================================================
   Delivery & Why Choose Us
   ========================================================================== */
.delivery-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 3rem;
    align-items: center;
}

.delivery-info { padding: 2rem; }
.delivery-info h2 { font-size: 1.8rem; margin-bottom: 1rem; }
.delivery-rates { margin-top: 2rem; display: flex; flex-direction: column; gap: 1rem; }
.rate-card {
    display: flex; justify-content: space-between; align-items: center;
    background: var(--bg-main); padding: 1rem; border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}
.price-badge { background: var(--accent); color: #fff; padding: 0.3rem 0.8rem; border-radius: 20px; font-weight: 600; }

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}
.feature-item {
    background: var(--secondary); padding: 1rem; border-radius: 8px; text-align: center;
    font-weight: 500; font-size: 0.9rem; color: var(--primary);
    transition: var(--transition);
}
.feature-item:hover { background: var(--highlight); color: #fff; }
.feature-item i { display: block; font-size: 1.5rem; margin-bottom: 0.5rem; color: var(--accent); }
.feature-item:hover i { color: #fff; }

/* ==========================================================================
   Statistics
   ========================================================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    text-align: center;
    gap: 2rem;
}
.stat-item h3 { font-size: 3rem; color: #fff; margin-bottom: 0.5rem; }
[data-theme="dark"] .stat-item h3 { color: var(--highlight); }
.stat-item p { font-size: 1.1rem; opacity: 0.9; }

/* ==========================================================================
   Gallery (Masonry)
   ========================================================================== */
.masonry-gallery {
    column-count: 3;
    column-gap: 1rem;
}
.gallery-item {
    break-inside: avoid;
    margin-bottom: 1rem;
    border-radius: var(--radius);
    overflow: hidden;
    position: relative;
    cursor: pointer;
}
.gallery-item img {
    width: 100%;
    transition: transform 0.5s ease;
}
.gallery-item:hover img {
    transform: scale(1.05);
}

/* ==========================================================================
   Reviews Slider
   ========================================================================== */
.review-slider { position: relative; overflow: hidden; padding: 2rem 0; text-align: center; min-height: 250px;}
.review-card {
    position: absolute; top: 0; left: 50%; transform: translateX(-50%);
    width: 100%; max-width: 600px;
    opacity: 0; transition: opacity 0.5s ease; pointer-events: none;
}
.review-card.active { opacity: 1; pointer-events: all; position: relative; }
.stars { color: var(--highlight); margin-bottom: 1rem; font-size: 1.2rem; }
.review-card p { font-size: 1.2rem; font-style: italic; margin-bottom: 1.5rem; }
.review-card h4 { color: var(--accent); }
.slider-controls { text-align: center; margin-top: 1rem; }
.slider-controls button {
    background: var(--secondary); border: none; color: var(--primary);
    width: 40px; height: 40px; border-radius: 50%; cursor: pointer;
    margin: 0 0.5rem; transition: var(--transition);
}
.slider-controls button:hover { background: var(--accent); color: #fff; }

/* ==========================================================================
   FAQ Accordion
   ========================================================================== */
.accordion { max-width: 800px; margin: 0 auto; }
.accordion-item { margin-bottom: 1rem; background: var(--bg-main); border-radius: 8px; overflow: hidden; box-shadow: 0 2px 5px rgba(0,0,0,0.05); }
.accordion-header {
    width: 100%; padding: 1.2rem; border: none; background: transparent;
    text-align: left; font-weight: 600; font-family: var(--font-body);
    font-size: 1rem; color: var(--text-main); cursor: pointer;
    display: flex; justify-content: space-between; align-items: center;
    transition: var(--transition);
}
.accordion-header:hover { color: var(--accent); }
.accordion-body {
    max-height: 0; overflow: hidden; transition: max-height 0.3s ease;
    padding: 0 1.2rem; color: var(--text-muted);
}

/* ==========================================================================
   Contact Form & Map
   ========================================================================== */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; }
.info-item { display: flex; gap: 1rem; margin-bottom: 1.5rem; }
.info-item i { font-size: 1.5rem; color: var(--accent); margin-top: 0.2rem; }
.contact-form { padding: 2rem; }
.form-group { margin-bottom: 1.5rem; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%; padding: 1rem; border: 1px solid rgba(0,0,0,0.1);
    border-radius: 8px; font-family: var(--font-body);
    background: var(--bg-main); color: var(--text-main);
    transition: var(--transition);
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
    outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255,111,145,0.2);
}
.form-message { margin-top: 1rem; text-align: center; font-weight: 500; }
.form-message.success { color: #28a745; }
.form-message.error { color: #dc3545; }

/* ==========================================================================
   Footer
   ========================================================================== */
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 3rem; margin-bottom: 2rem; }
.footer-brand h2 { color: #fff; margin-bottom: 1rem; }
.social-links a {
    display: inline-block; width: 40px; height: 40px; background: rgba(255,255,255,0.1);
    color: #fff; text-align: center; line-height: 40px; border-radius: 50%;
    margin-right: 0.5rem; transition: var(--transition);
}
.social-links a:hover { background: var(--accent); transform: translateY(-3px); }
.footer-links h3 { color: var(--highlight); margin-bottom: 1.5rem; }
.footer-links li { margin-bottom: 0.8rem; }
.footer-links a:hover { color: var(--accent); padding-left: 5px; }
.footer-bottom { text-align: center; padding-top: 2rem; border-top: 1px solid rgba(255,255,255,0.1); font-size: 0.9rem; }

/* ==========================================================================
   Floating Buttons
   ========================================================================== */
.floating-btn {
    position: fixed; right: 20px; width: 50px; height: 50px;
    border-radius: 50%; color: #fff; display: flex; justify-content: center; align-items: center;
    font-size: 1.5rem; box-shadow: 0 4px 15px rgba(0,0,0,0.2); z-index: 999;
    transition: var(--transition); border: none; cursor: pointer;
}
.whatsapp { bottom: 20px; background: #25D366; }
.whatsapp:hover { background: #128C7E; transform: scale(1.1); }
.back-top { bottom: 80px; background: var(--primary); opacity: 0; pointer-events: none; }
.back-top.show { opacity: 1; pointer-events: all; }
.back-top:hover { background: var(--accent); transform: translateY(-3px); }

/* ==========================================================================
   Media Queries
   ========================================================================== */
@media (max-width: 992px) {
    .about-container, .delivery-grid, .contact-grid { grid-template-columns: 1fr; gap: 2rem; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .masonry-gallery { column-count: 2; }
    .footer-grid { grid-template-columns: 1fr; text-align: center; }
    .hero h1 { font-size: 3rem; }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed; top: 80px; left: -100%; width: 100%; height: calc(100vh - 80px);
        background: var(--bg-main); flex-direction: column; align-items: center;
        justify-content: center; transition: var(--transition); gap: 2rem;
    }
    .nav-links.active { left: 0; }
    .mobile-only { display: block; }
    .hero-buttons { flex-direction: column; padding: 0 2rem; }
    .stats-grid { grid-template-columns: 1fr; }
    .masonry-gallery { column-count: 1; }
    .nav-actions .btn { display: none; } /* Hide order button in nav on mobile to save space */
}