/* ========================================
   Sourdough by Trí Minh - v3 (Design System)
   ======================================== */

:root {
    /* Color Palette */
    --color-primary: #2C4F54;
    /* Dark Teal */
    --color-primary-dark: #1f3a3d;

    --color-accent-brown: #90553C;
    /* Warm Brown (Cinnamon, typo corrected 90S -> 905) */
    --color-accent-beige: #F5F5DC;
    /* Beige (from Clothes) */
    --color-accent-light: #D2691E;
    /* Light Brown (from Bread) */

    --color-background: #FAF8F5;
    /* Off-white/Cream base */
    --color-surface: #FFFFFF;

    --color-text: #333333;
    --color-text-light: #666666;
    --color-white: #FFFFFF;

    /* Typography */
    --font-heading: 'Libre Baskerville', Georgia, serif;
    --font-body: 'Open Sans', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 4rem;

    /* UI Elements */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    --radius-full: 50%;

    --shadow-sm: 4px 4px 6px -1px rgba(0, 0, 0, 0.33);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);

    --transition: all 0.3s ease;
}

/* ========================================
   Base & Reset
   ======================================== */

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

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

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

body.page-with-header-spacing {
    padding-top: 80px;
}

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

ul {
    list-style: none;
}

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

h1,
h2,
h3 {
    font-family: var(--font-heading);
    color: var(--color-primary);
    line-height: 1.2;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

/* ========================================
   Buttons
   ======================================== */

.btn {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 30px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-size: 0.875rem;
}

.btn-primary {
    background-color: var(--color-accent-light);
    color: var(--color-white);
    /* "Float" shadow */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.btn-primary:hover {
    background-color: var(--color-accent-brown);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background-color: var(--color-primary);
    color: var(--color-white);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.btn-secondary:hover {
    background-color: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-menu-cta {
    background-color: var(--color-accent-brown);
    color: var(--color-white);
    border: 2px solid var(--color-primary);
    /* Increased shadow for "lifting off" effect */
    box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.66);
}

.btn-menu-cta:hover {
    background-color: var(--color-accent-light);
    border-color: var(--color-primary);
    transform: translateY(-4px);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.5);
}

/* ========================================
   Header
   ======================================== */

.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 9999;
    padding: var(--spacing-sm) 0;
    background-color: var(--color-primary);
    /* Ensure header is opaque */
    /* Deep Y-axis shadow, 75% opacity float effect, reduced blur */
    box-shadow: 0 15px 17.5px -5px rgba(0, 0, 0, 0.75);
    transform: translateZ(0);
    /* Force stacking context */
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-header {
    height: 50px;
    width: auto;
    filter: drop-shadow(3px 3px 3px rgba(0, 0, 0, 0.75));
    transition: transform 0.3s ease;
    cursor: pointer;
}

.logo-header:hover {
    transform: scale(1.25);
}

.main-nav ul {
    display: flex;
    gap: var(--spacing-md);
}

.mobile-only-nav {
    display: none;
}

.main-nav a {
    color: var(--color-white);
    /* Text is white on dark hero */
    font-family: var(--font-heading);
    /* Libre Baskerville */
    /* font-weight: 700; Removed as requested */
    font-size: 1rem;
    letter-spacing: 0.5px;
    opacity: 0.9;
    padding-bottom: 4px;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.main-nav a:hover {
    opacity: 1;
    color: var(--color-background);
    border-bottom: 1px solid rgba(234, 206, 170, 0.5);
}

.main-nav a.active {
    opacity: 1;
    color: var(--color-background);
    border-bottom: 2px solid #EACEAA;
}

/* Icons & Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    color: var(--color-white);
}

/* Language Slider */
.lang-toggle {
    display: flex;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: 15px;
    padding: 3px;
    position: relative;
    cursor: pointer;
    width: 64px;
    height: 28px;
    justify-content: space-between;
    box-sizing: content-box;
}

.lang-option {
    padding: 0 6px;
    font-weight: 700;
    font-size: 0.65rem;
    z-index: 1;
    transition: color 0.3s ease;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1;
}

.lang-slider {
    position: absolute;
    width: 32px;
    height: 28px;
    /* Matches container height */
    top: 3px;
    left: 3px;
    background-color: var(--color-accent-light);
    border-radius: 12px;
    transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    z-index: 0;
}

/* Slider States */
.lang-toggle[data-lang="vi"] .lang-slider {
    transform: translateX(36px);
    /* Width + Gap approx */
}

/* Active Text Color */
.lang-toggle[data-lang="en"] .lang-option:first-of-type,
.lang-toggle[data-lang="vi"] .lang-option:last-of-type {
    color: var(--color-white);
}

.cart-icon {
    position: relative;
    cursor: pointer;
}

.cart-icon.cart-bounce {
    animation: cartBounce 0.6s ease;
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -8px;
    background-color: var(--color-accent-light);
    color: var(--color-white);
    font-size: 0.7rem;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Mobile Toggle */
.mobile-menu-toggle {
    display: none;
    color: var(--color-white);
    font-size: 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
}

/* ========================================
   Hero Section
   ======================================== */

/* Hero Section */
.hero {
    position: relative;
    background-color: var(--color-primary);
    /* Textured Overlay: Dark Teal Gradient */
    background-image: linear-gradient(rgba(44, 79, 84, 0.85), rgba(44, 79, 84, 0.88));
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center;
    /* Centered visually */
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    padding-top: 80px;
    padding-bottom: var(--spacing-xl);
    animation: heroHeightLock 5.5s forwards;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('images/hero/handheld-loaf-crop.webp');
    background-size: 675px auto;
    background-repeat: no-repeat;
    background-position: center bottom;
    opacity: 1;
    animation: fadeToBackground 4s ease-out forwards 1.0s;
    z-index: 0;
}

/* Curved Bottom replaced with Torn Paper Effect */


.hero-content {
    color: var(--color-white);
    max-width: 800px;
    z-index: 5;
    position: relative;
}

.hero-logo-large {
    /* Initial state set by animation start */
    height: 225px;
    /* Restored to large size as requested */
    width: auto;
    margin: 0 auto var(--spacing-md);
    transform-origin: center center;
    /* Door knob rotation pivot */
    /* Animation: 4.0s Intro + Float loop after (Start delayed to 1.0s) */
    animation: logoIntro 4.0s cubic-bezier(0.2, 0.8, 0.2, 1) 1.0s both, float 6s ease-in-out infinite 5.0s;
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: var(--spacing-sm);
    color: var(--color-background);
}

/* Hero Typography */
.hero-tagline {
    font-family: var(--font-heading);
    /* Libre Baskerville */
    font-style: italic;
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--color-background);
    /* Match heading color */
    opacity: 0.95;
    margin-bottom: var(--spacing-xs);
}

.hero-divider {
    width: 180px;
    height: 2px;
    /* Kept 2px per request */
    background-color: var(--color-accent-light);
    margin: var(--spacing-sm) auto;
    opacity: 1;
    /* Increased from 0.8 for visibility */
    position: relative;
    z-index: 10;
}

.hero-description {
    font-family: var(--font-body);
    /* Open Sans */
    font-size: 1.25rem;
    font-weight: bold;
    font-style: italic;
    color: rgba(255, 255, 255, 0.95);
    max-width: 700px;
    margin: 0 auto var(--spacing-md);
    line-height: 1.4;
}

/* Animations */
@keyframes logoIntro {
    0% {
        height: 70vh;
        transform: translateY(5vh) rotate(0deg);
        opacity: 0;
    }

    /* Long Fade In Phase (0 - 1.5s approx) */
    35% {
        height: 70vh;
        transform: translateY(5vh) rotate(0deg);
        opacity: 1;
    }

    /* Fast Decay Oscillation (Compressed 35-70%) */
    40% {
        transform: translateY(5vh) rotate(-10deg);
    }

    45% {
        transform: translateY(5vh) rotate(8deg);
    }

    50% {
        transform: translateY(5vh) rotate(-6deg);
    }

    55% {
        transform: translateY(5vh) rotate(4deg);
    }

    60% {
        transform: translateY(5vh) rotate(-2deg);
    }

    65% {
        transform: translateY(5vh) rotate(1deg);
    }

    70% {
        height: 70vh;
        transform: translateY(5vh) rotate(0deg);
    }

    100% {
        /* Shrink to Final */
        height: 225px;
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        /* Removed transform to prevent conflict */
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeToBackground {
    from {
        opacity: 1;
    }

    to {
        opacity: 0.25;
    }
}

@keyframes heroHeightLock {

    0%,
    99% {
        height: 100vh;
    }

    100% {
        height: auto;
    }
}

/* heroTextReveal deprecated */

@keyframes cartBounce {

    0%,
    100% {
        transform: translateY(0) scale(1);
    }

    15% {
        transform: translateY(-12px) scale(1.15);
    }

    30% {
        transform: translateY(0) scale(1);
    }

    45% {
        transform: translateY(-6px) scale(1.1);
    }

    60% {
        transform: translateY(0) scale(1);
    }
}

@keyframes countPulse {

    0%,
    100% {
        transform: scale(1);
        background-color: var(--color-accent-light);
    }

    50% {
        transform: scale(1.4);
        background-color: #ff6b35;
    }
}

.hero-content>* {
    /* Base fade in for generic items */
    opacity: 0;
}

/* Staggered delays - waiting for logo to shrink (approx 3.0s mark) */


@keyframes slideContentUp {
    0% {
        transform: translateY(12vh);
    }

    100% {
        transform: translateY(0);
    }
}

/* Increased delays again (+0.5s) to match delayed logo start (1.0s start + 4s duration = 5.0s finish visually) */
/* Actually logo finishes main movement earlier, but let's sync with 4.5s mark */
.hero-content {
    animation: slideContentUp 1.0s cubic-bezier(0.2, 0.8, 0.2, 1) both 4.5s;
}

.hero-title {
    animation: fadeIn 0.8s ease-out forwards 4.7s;
}

.hero-tagline {
    animation: fadeIn 0.8s ease-out forwards 4.9s;
}

.hero-divider {
    animation: fadeIn 0.8s ease-out forwards 4.8s;
}

.hero-description {
    animation: fadeIn 0.8s ease-out forwards 5.1s;
}

.hero-actions {
    animation: fadeIn 0.8s ease-out forwards 5.3s;
}

/* Scroll hint - hidden on desktop */
.scroll-hint {
    display: none;
}

/* Menu flyout - hidden on desktop */
.menu-flyout {
    display: none;
}



/* ========================================
   Component: Sections & Grids
   ======================================== */

/* Sections */
.banded-section {
    padding: var(--spacing-xl) 0;
}

.bg-beige {
    background-color: var(--color-background);
    color: var(--color-text);
}

.bg-brown {
    background-color: var(--color-accent-brown);
    /* Dark Brown */
    color: var(--color-white);
}

/* Update text color for brown header section title */
.bg-brown .section-title {
    color: var(--color-white);
}

.bg-wheat {
    background-color: #EACEAA;
    color: var(--color-text);
}

.bg-white {
    background-color: var(--color-surface);
}

.section-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    color: var(--color-primary);
    text-align: center;
    margin-bottom: var(--spacing-md);
    position: relative;
    padding-bottom: var(--spacing-sm);
}

.section-title.no-line::after {
    display: none;
}

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

.shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.product-card {
    background: var(--color-surface);
    color: var(--color-text);
    /* Reset color inheritance from dark sections */
    border: 2px solid var(--color-primary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    /* 5px, 5px, 5px @ 50% */
    box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.5);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
    /* 7px, 7px, 7px, 66% */
    box-shadow: 7px 7px 7px rgba(0, 0, 0, 0.66);
}

.card-image-wrapper {
    position: relative;
    padding-top: 75%;
    /* 4:3 Aspect Ratio */
    overflow: hidden;
    background-color: #f0f0f0;
}

.card-image-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .card-image-wrapper img {
    transform: scale(1.05);
}

.card-content {
    /* Reduced top/bottom padding to tighten spacing */
    padding: var(--spacing-sm) var(--spacing-md);
    text-align: center;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--color-primary);
    margin-bottom: var(--spacing-xs);
}

.card-price {
    font-weight: 700;
    color: var(--color-accent-brown);
    font-size: 1.1rem;
    margin-top: var(--spacing-sm);
    display: block;
}

.card-desc {
    font-size: 0.9rem;
    color: var(--color-text-light);
    /* Removed bottom margin to reduce dead space */
    margin-bottom: 0;
    flex-grow: 1;
}

.btn-card {
    width: 100%;
    background-color: var(--color-primary);
    color: var(--color-white);
    padding: 0.8rem;
    border-radius: 4px;
    /* Slightly sharper than pill */
    font-size: 0.8rem;
    margin-top: var(--spacing-sm);
}

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

/* Shop Grid Responsive */
@media (max-width: 600px) {
    .mixin-grid {
        grid-template-columns: 1fr;
    }
}

/* Mobile: Shop cards — 3-col grid (image | content | button) × 3 rows */
@media (max-width: 768px) {
    .shop-grid {
        grid-template-columns: 1fr;
        gap: 0.65rem;
    }

    /*
     * Grid layout:
     *   col 1 (100px) | col 2 (1fr) | col 3 (52px)
     *   row 1: image  | title        | button (spans 3)
     *   row 2: desc spans cols 1-2   |
     *   row 3: price spans cols 1-2  |
     *
     * display:contents on .card-content "unwraps" it so its
     * children (title, desc, btn, price) join the outer grid directly.
     */
    .product-card {
        display: grid;
        grid-template-columns: 28vw 1fr 52px;
        grid-template-rows: 28vw auto auto;
        gap: 0;
        height: auto;
        /* override desktop flex */
        flex-direction: unset;
        position: static;
        border-radius: 4px;
        /* iOS Safari: force overflow:hidden to actually clip grid children */
        -webkit-mask-image: -webkit-radial-gradient(white, black);
    }

    .product-card:hover {
        transform: none;
        box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.5);
    }

    .product-card:hover .card-image-wrapper img {
        transform: none;
    }

    /* Col 1, Row 1 — image */
    .card-image-wrapper {
        grid-column: 1;
        grid-row: 1;
        padding-top: 0;
        height: 100%;
        width: 100%;
        border-right: 2px solid var(--color-primary);
        border-bottom: 2px solid var(--color-primary);
    }

    /* Unwrap card-content — children become grid items */
    .card-content {
        display: contents;
    }

    /* Col 2, Row 1 — title */
    .card-title {
        grid-column: 2;
        grid-row: 1;
        font-size: clamp(1.7rem, 6.5vw, 2.1rem) !important;
        line-height: 1.3;
        margin: 0;
        padding: 0;
        align-self: stretch;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        border-bottom: 1px solid rgba(44, 79, 84, 0.15);
    }

    /* Cols 1–2, Row 2 — description */
    .card-desc {
        grid-column: 1 / 3;
        grid-row: 2;
        font-size: 0.72rem;
        line-height: 1.4;
        margin: 0;
        padding: 0.4rem 0.375rem;
        display: block;
        overflow: visible;
        color: var(--color-text-light);
        border-bottom: 1px solid rgba(44, 79, 84, 0.15);
    }

    /* Cols 1–3, Row 3 — price spans full width */
    .card-price {
        grid-column: 1 / 4;
        grid-row: 3;
        font-size: 1.1rem;
        font-weight: 700;
        margin: 0;
        padding: 0.5rem 0.75rem;
        display: block;
        text-align: center;
    }

    /* Col 3, Rows 1–2 — button (no longer spans price row) */
    .btn-card {
        grid-column: 3;
        grid-row: 1 / 3;
        align-self: stretch;
        justify-self: stretch;
        width: auto;
        height: auto;
        border-radius: 0 !important;
        writing-mode: vertical-rl;
        font-size: 0.62rem;
        letter-spacing: 0.06em;
        text-transform: uppercase;
        padding: 0;
        margin: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        /* reset absolute positioning from previous iteration */
        position: static;
    }

}

/* ========================================
   Component: Gallery Marquee
   ======================================== */

/* ========================================
   Component: Bio Section (Replacing Gallery Marquee)
   ======================================== */

.bio-section {
    padding: var(--spacing-xl) 0;
    background-color: var(--color-accent-brown);
    color: var(--color-white);
}

.bio-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
    align-items: stretch;
    /* Stretch to match height */
}

.bio-image {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    /* No rotation */
    transition: var(--transition);
    height: 100%;
    /* Match height of container/text */
    display: flex;
    flex-direction: column;
}



.bio-image img {
    width: 100%;
    flex-grow: 1;
    /* Fill remaining space */
    object-fit: cover;
    display: block;
    height: 0;
    /* Min-height fix for flex child */
    min-height: 0;
    /* Ensure it fills at least the container */
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Caption below image */
.bio-caption-text {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    font-style: italic;
    text-align: center;
}

.bio-content {
    text-align: left;
}

.bio-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    color: var(--color-background);
    /* Light color for dark bg */
    margin-bottom: var(--spacing-md);
}

.bio-text {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    /* White text for dark bg */
    margin-bottom: var(--spacing-md);
    line-height: 1.8;
}

/* Responsive Bio */
@media (max-width: 768px) {
    .bio-grid {
        /* Switch to flex for reordering unwrapped children */
        display: flex;
        flex-direction: column;
        text-align: center;
        gap: var(--spacing-md);
    }

    .bio-content {
        /* Unwrap to allow interleaving */
        display: contents;
    }

    /* 1. Title First */
    .bio-title {
        order: 1;
        margin-bottom: var(--spacing-xs);
    }

    /* 2. Image Second */
    .bio-image {
        order: 2;
        max-width: 400px;
        width: 100%;
        margin: 0 auto;
        transform: rotate(0);
        height: auto;
        display: block;
        /* Disable flex layout on mobile */
    }

    .bio-image img {
        /* Force Square and reset flex */
        aspect-ratio: 1 / 1;
        object-fit: cover;
        height: auto;
        min-height: 0;
        width: 100%;
        flex: none;
        /* Reset flex-grow/shrink if any remains */
        border: 1px solid rgba(255, 255, 255, 0.2);
    }

    /* 3. Text & Button Third */
    .bio-text,
    .btn-secondary {
        order: 3;
    }

    .bio-text {
        margin-bottom: var(--spacing-sm);
    }

    .btn-secondary {
        align-self: center;
        width: auto !important;
    }
}


.marquee-content {
    display: inline-flex;
    animation: marquee 25s linear infinite;
}

.marquee-item {
    width: 300px;
    /* Fixed width for uniformity */
    height: 300px;
    margin-right: var(--spacing-md);
    border-radius: var(--radius-md);
    overflow: hidden;
    flex-shrink: 0;
    position: relative;
}

.marquee-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.marquee-item:hover img {
    transform: scale(1.1);
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }

    /* Move by 50% because content is duplicated */
}

@media (max-width: 768px) {
    .main-nav {
        display: none;
        /* Hidden on mobile for now */
    }

    .mobile-menu-toggle {
        display: block;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero::after {
        clip-path: ellipse(80% 60% at 50% 100%);
        height: 60px;
    }
}

/* ========================================
   Component: Page Header & Modals
   ======================================== */

.page-header {
    background-color: var(--color-primary);
    padding-top: 140px;
    /* Header clearance */
    padding-bottom: var(--spacing-lg);
    text-align: center;
    color: var(--color-white);
}

/* Modal Overlay */
.modal-overlay {
    display: none;
    /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

/* Modal Content */
.modal-content {
    background-color: var(--color-surface);
    padding: var(--spacing-md);
    border-radius: var(--radius-lg);
    max-width: 500px;
    width: 90%;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
    box-shadow: var(--shadow-lg);
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text-light);
}

.mixin-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-sm);
    margin: 0 0 var(--spacing-md) 0;
}

.mixin-grid label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    white-space: nowrap;
}

.mixin-table {
    width: 100%;
    margin: 0 0 var(--spacing-md) 0;
    border-collapse: collapse;
}

.mixin-table td {
    padding: 0.5rem 1rem 0.25rem 0;
    text-align: left;
}

.mixin-table label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.95rem;
}

.modal-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: var(--spacing-md);
    border-top: 1px solid #eee;
    padding-top: var(--spacing-sm);
}

#custom-price-display {
    font-weight: 700;
    color: var(--color-primary);
    font-size: 1.1rem;
}

/* Mobile: Stack Total label and price vertically */
@media (max-width: 768px) {
    #custom-price-display {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        line-height: 1.3;
    }

    .modal-content h2 {
        font-size: 1.5rem;
    }
}

/* Cart Sidebar */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -100%;
    width: 350px;
    max-width: 90%;
    height: 100%;
    background-color: var(--color-surface);
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.2);
    z-index: 10005;
    /* Header is 9999, make this higher to show close button */
    display: flex;
    flex-direction: column;
    transition: right 0.3s ease;
}

.cart-sidebar.active {
    right: 0;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md);
    border-bottom: 1px solid #eee;
}

.cart-header h3 {
    margin: 0;
    font-family: var(--font-heading);
}

.close-btn {
    font-size: 1.8rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text-light);
    line-height: 1;
}

.cart-items {
    flex-grow: 1;
    overflow-y: auto;
    padding: var(--spacing-sm) var(--spacing-md);
}

.empty-cart-msg {
    color: var(--color-text-light);
    text-align: center;
    padding: var(--spacing-lg) 0;
}

.cart-item-row {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.cart-item-row:last-child {
    border-bottom: none;
}

.cart-item-top {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.cart-item-image {
    width: 70px;
    height: 70px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    flex-shrink: 0;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--color-text);
    line-height: 1.4;
}

.cart-item-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-left: 0;
    /* Align with left edge */
}

.cart-item-price {
    font-family: var(--font-heading);
    /* Or similar to user image */
    color: var(--color-accent-brown);
    /* "155k" color */
    font-size: 1.1rem;
    font-weight: 700;
}

.cart-qty-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.qty-btn {
    width: 32px;
    height: 32px;
    border: 1px solid var(--color-primary);
    background: transparent;
    color: var(--color-primary);
    font-size: 1.1rem;
    cursor: pointer;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.qty-value {
    min-width: 20px;
    text-align: center;
    font-weight: 700;
    font-size: 1rem;
}

.remove-btn {
    background: none;
    border: none;
    color: #e74c3c;
    /* Red color */
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, filter 0.2s;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.remove-btn:hover {
    transform: scale(1.1);
    color: #c0392b;
}

.cart-footer {
    padding: var(--spacing-md);
    border-top: 1px solid #eee;
    background-color: var(--color-background);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: var(--spacing-sm);
}

.total-price {
    color: var(--color-primary);
}

.cart-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1050;
}

.cart-overlay.active {
    display: block;
}

/* Checkout Section */
.checkout-section {
    padding: var(--spacing-xl) 0;
    background-color: var(--color-background);
}

.checkout-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
}

@media (max-width: 768px) {
    .checkout-wrapper {
        grid-template-columns: 1fr;
    }

    .order-summary {
        order: 1;
    }

    .checkout-form-container {
        order: 2;
    }
}

.checkout-form-container {
    background: var(--color-surface);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-primary);
}

.checkout-form-container h2 {
    font-family: var(--font-heading);
    margin-bottom: var(--spacing-xs);
}

.checkout-intro {
    color: var(--color-text-light);
    margin-bottom: var(--spacing-md);
    font-size: 0.95rem;
}

.checkout-form .form-group {
    margin-bottom: var(--spacing-sm);
}

.checkout-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    font-size: 0.9rem;
}

.checkout-form input,
.checkout-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-family: var(--font-body);
}

.checkout-form input:focus,
.checkout-form textarea:focus {
    outline: none;
    border-color: var(--color-primary);
}

.checkout-form small {
    display: block;
    margin-top: 5px;
    color: var(--color-text-light);
    font-size: 0.85rem;
}

.order-summary {
    background: var(--color-surface);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    height: fit-content;
    border: 1px solid var(--color-primary);
}

.order-summary h3 {
    font-family: var(--font-heading);
    margin-bottom: var(--spacing-sm);
}

.order-items {
    border-bottom: 1px solid #eee;
    padding-bottom: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
    min-height: 100px;
}

.order-item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
    gap: 16px;
}

.order-item-row:last-child {
    border-bottom: none;
}

.order-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.order-item-name {
    font-weight: 600;
    color: var(--color-text);
}

.order-item-controls {
    display: flex;
    align-items: center;
    gap: 16px;
}

.order-qty-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.order-item-total {
    font-weight: 600;
    min-width: 60px;
    text-align: right;
}

.remove-btn-order {
    background: none;
    border: 1px solid #ddd;
    padding: 6px;
    cursor: pointer;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    color: #999;
}

.remove-btn-order:hover {
    background-color: #fee;
    border-color: #d33;
    color: #d33;
}

.order-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
}

.order-total-price {
    color: var(--color-primary);
}

.delivery-info {
    background: var(--color-background);
    padding: var(--spacing-sm);
    border-radius: var(--radius-sm);
}

.delivery-info h4 {
    font-size: 0.95rem;
    margin-bottom: 8px;
}

.delivery-info ul {
    list-style: disc;
    padding-left: 20px;
    font-size: 0.9rem;
    color: var(--color-text-light);
}

.delivery-info li {
    margin-bottom: 5px;
}

/* Footer */
.main-footer {
    background-color: var(--color-primary);
    color: var(--color-white);
    padding: var(--spacing-md) 0 var(--spacing-sm);
    text-align: center;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-xs);
}

.footer-logo {
    height: 44px;
    width: auto;
    margin-bottom: 0;
}

.footer-brand-name {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    margin: 0 0 0.4rem 0;
    opacity: 0.95;
}

.footer-tagline {
    font-size: 0.9rem;
    opacity: 0.75;
    margin: 0 0 0.6rem 0;
}

.social-icons {
    display: flex;
    gap: 28px;
    margin-top: 0;
    align-items: center;
}

.social-icons a {
    color: #EACEAA;
    opacity: 0.85;
    transition: opacity 0.2s ease, transform 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 8px;
}

.social-icons a:hover {
    opacity: 1;
    transform: scale(1.1);
}

.social-icons a.coming-soon {
    opacity: 0.3;
    cursor: default;
    position: relative;
}

.social-icons a.coming-soon:hover {
    transform: none;
}

.social-icons a.coming-soon::after {
    content: "Coming Soon";
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--color-primary);
    color: var(--color-white);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.social-icons a.coming-soon:hover::after {
    opacity: 1;
}

.footer-bottom {
    margin-top: var(--spacing-md);
    padding-top: var(--spacing-sm);
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    font-size: 0.85rem;
    opacity: 0.7;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.footer-bottom p {
    margin: 0;
}

.footer-credit {
    font-size: 0.7rem;
}

.footer-credit a {
    color: inherit;
    text-decoration: none;
}

.footer-credit a:hover {
    opacity: 0.85;
    text-decoration: underline;
}


/* ========================================
   About Page
   ======================================== */

.about-content {
    display: flex;
    gap: 3rem;
    align-items: flex-start;
}

.about-image {
    flex: 0 0 400px;
}

.about-image img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.about-text {
    flex: 1;
}

.about-text h2 {
    margin-top: 0;
    margin-bottom: 1.5rem;
}

.about-text p {
    margin-bottom: 1rem;
    line-height: 1.8;
}

/* Design Elements Section */
.design-fonts,
.design-colors {
    margin-bottom: 3rem;
}

.design-fonts h3,
.design-colors h3 {
    margin-bottom: 1.5rem;
}

.font-showcase {
    display: flex;
    gap: 3rem;
    flex-wrap: wrap;
}

.font-item {
    flex: 1;
    min-width: 250px;
}

.color-treemap {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    height: 500px;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.treemap-row {
    display: flex;
    gap: 0.5rem;
}

.treemap-col {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.color-block {
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    padding: 1rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    overflow: hidden;
}

.color-block:hover {
    transform: scale(1.02);
    box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.3);
    z-index: 1;
}

.color-info {
    display: flex;
    flex-direction: column;
    color: var(--color-white);
}

.color-name {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.color-hex {
    font-family: monospace;
    font-size: 0.875rem;
    opacity: 0.9;
}

/* Gallery Specific Overrides */

/* ========================================
   Component: Gallery Collage
   ======================================== */

.collage-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    /* Strictly 4 per row */
    gap: 0;
    background-color: var(--color-background);
    border: 2px solid #EACEAA;
}

.collage-item {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    border: 2px solid #EACEAA;
    cursor: pointer;
    /* Interaction hint */
}

.collage-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.collage-item:hover img {
    transform: scale(1.1);
    z-index: 10;
}

/* Responsive Override for mobile if needed */
@media (max-width: 600px) {
    .collage-grid {
        grid-template-columns: repeat(4, 1fr);
        /* 4 columns on mobile */
    }
}

/* Lightbox Styles */
.lightbox-overlay {
    display: none;
    /* Hidden by default */
    position: fixed;
    z-index: 10000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.2);
    /* Much lighter, not black out */
    backdrop-filter: blur(2px);
    /* Slight blur to separate */
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox-overlay.active {
    display: flex;
    opacity: 1;
}

.lightbox-wrapper {
    position: relative;
    display: inline-block;
    /* Shrink to fit image */
    line-height: 0;
    /* Remove bottom shim */
    transform: scale(0.9);
    transition: transform 0.3s ease;
    /* Move shadow to content or keep here? Wrapper shadow handles the whole unit. */
    box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.5);
    /* 5,5,10 at 50% */
}

/* Animate the wrapper, not just content */
.lightbox-overlay.active .lightbox-wrapper {
    transform: scale(1);
}

.lightbox-content {
    max-width: 45vw;
    /* Roughly half screen width */
    max-height: 60vh;
    border: none;
    /* No border */
    border-radius: 4px;
    background: #fff;
    /* fallback */
    /* Remove shadow from here if on wrapper */
}

.lightbox-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 2.5rem;
    color: #fff;
    /* White contrasts well with most photos */
    cursor: pointer;
    font-family: sans-serif;
    line-height: 20px;
    height: 20px;
    z-index: 10002;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 1);
    opacity: 0.9;
    transition: opacity 0.2s;
}

.lightbox-close:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* Mobile Hero Fix */
@media (max-width: 768px) {
    .hero::before {
        background-size: 100% auto !important;
        /* Fill screen width on mobile */
        background-position: center bottom !important;
        /* Keep at bottom */
    }
}

/* Mobile Header & Menu System */
@media (max-width: 768px) {

    /* 1. Header Layout Reordering */
    .header-content {
        justify-content: space-between !important;
    }

    .header-actions {
        display: contents;
    }

    /* Lang: Right */
    .lang-toggle {
        order: 3;
        position: relative;
        left: auto;
        transform: none;
        margin-left: auto;
        margin-right: 0.25rem;
        /* Adjusted spacing to 0.25rem per user request */
    }

    /* Cart: Center */
    .cart-icon {
        order: 2;
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        margin: 0;
    }

    /* Logo: Left (Hamburger) */
    .logo-link {
        order: 1;
        margin-right: auto;
        margin-left: 0;
        z-index: 10002;
        /* Above everything */
        position: relative;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    /* Typography Scaling */
    h1 {
        font-size: 2.2rem !important;
    }

    h2 {
        font-size: 1.8rem !important;
    }

    h3 {
        font-size: 1.4rem !important;
    }

    p,
    .order-item-name,
    .lang-option {
        font-size: 0.95rem !important;
    }


    .logo-header {
        animation: logo-spin 6s linear 9s infinite;
        /* Wiggle once at 6s */
    }

    /* Menu flyout animation */
    .menu-flyout {
        display: block !important;
        font-family: var(--font-heading);
        font-weight: 700;
        font-style: italic;
        color: var(--color-white);
        font-size: 1rem;
        white-space: nowrap;
        opacity: 0;
        transform: translateX(-50px);
        animation: menuFlyout 3s ease-in-out 6s forwards;
    }

    @keyframes menuFlyout {

        /* Fly out */
        0% {
            opacity: 0;
            transform: translateX(-50px);
        }

        33% {
            opacity: 1;
            transform: translateX(0);
        }

        /* Flash 1 */
        39% {
            opacity: 0.2;
            transform: translateX(0);
        }

        44% {
            opacity: 1;
            transform: translateX(0);
        }

        /* Flash 2 */
        50% {
            opacity: 0.2;
            transform: translateX(0);
        }

        55% {
            opacity: 1;
            transform: translateX(0);
        }

        /* Flash 3 */
        61% {
            opacity: 0.2;
            transform: translateX(0);
        }

        66% {
            opacity: 1;
            transform: translateX(0);
        }

        /* Fly back in */
        100% {
            opacity: 0;
            transform: translateX(-50px);
        }
    }

    /* Hide standard hamburger */
    .mobile-menu-toggle {
        display: none !important;
    }

    /* 2. Mobile Nav Flyout - Left Side, Fit Content */
    .main-nav {
        display: block;
        position: fixed;
        top: 85px;
        /* Just below header */
        left: -100%;
        /* Offscreen Left */
        right: auto;
        width: max-content;
        /* Fit text */
        min-width: 180px;
        /* Minimum width */
        height: auto;
        /* Fit height */
        background-color: var(--color-primary);
        padding: 10px 0;
        transition: left 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
        z-index: 9998;
        /* Below header (9999) */
        box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.5);
        /* Shadow to right/bottom */
        border-bottom-right-radius: 8px;
    }

    .main-nav.active {
        left: 0;
        right: auto;
    }

    .main-nav ul {
        flex-direction: column;
        align-items: center;
        /* Center align text */
        width: 100%;
        gap: 0;
    }

    .main-nav li {
        width: 100%;
        text-align: center;
        /* Center align text */
        padding: 12px 20px;
        /* Pixel padding */
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .mobile-only-nav {
        display: block !important;
    }
}

/* Mobile Treemap Fix: Specific Layouts */
@media (max-width: 768px) {
    .color-treemap {
        display: block;
        height: auto !important;
    }

    .treemap-row {
        width: 100%;
        display: flex;
        flex-direction: column;
        margin-bottom: 4px;
        flex: auto !important;
    }

    /* Row 1: Stack Teal then Wheat/Brown */
    .treemap-col {
        display: flex;
        flex-direction: column;
        width: 100%;
        flex: auto !important;
    }

    /* Row 2: 2x2 Grid for Cream, White, Text Dark, Light Brown */
    .treemap-row:nth-child(2) {
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        gap: 4px;
        flex-direction: row !important;
        /* Override column from above */
    }

    /* Reorder: 
       Original: 1.Cream, 2.White, 3.TextDark, 4.LightBrown
       Grid fills Row 1 (1,2) then Row 2 (3,4).
       Result: Cream|White / TextDark|LightBrown
       Desired: Cream|White / LightBrown|TextDark (So Cream is above LightBrown, White above TextDark)
       Action: Swap 3 and 4.
    */
    .treemap-row:nth-child(2)>.color-block:nth-child(3) {
        order: 4;
    }

    /* Text Dark -> Bottom Right */
    .treemap-row:nth-child(2)>.color-block:nth-child(4) {
        order: 3;
    }

    /* Light Brown -> Bottom Left */

    .color-block {
        width: 100% !important;
        min-height: 80px;
        /* Taller rectangles */
        border: none !important;
    }
}

/* Wiggle Keyframes */
@keyframes logo-spin {
    /* Rest */
    0% {
        transform: rotate(0deg);
        animation-timing-function: cubic-bezier(0.4, 0, 1, 1);
    }
    /* Wind-up: pull back */
    7% {
        transform: rotate(-25deg);
        animation-timing-function: linear;
    }
    /* Six fast rotations at constant speed */
    45% {
        transform: rotate(2160deg);
        animation-timing-function: cubic-bezier(0, 0, 0.6, 1);
    }
    /* Overshoot forward — mirror of wind-up */
    48% {
        transform: rotate(2185deg);
        animation-timing-function: cubic-bezier(0.4, 0, 0.6, 1);
    }
    /* Settle back */
    50% {
        transform: rotate(2160deg);
    }
    /* Hold — 3s pause */
    100% {
        transform: rotate(2160deg);
    }
}

/* Mobile Lightbox Sizing */
@media (max-width: 768px) {
    .lightbox-content {
        max-width: 95vw !important;
        /* Huge on mobile */
        max-height: 85vh;
        /* Allow tall images */
    }
}

/* ========================================
   About Page Specifics (Revised)
   ======================================== */

.about-container {
    max-width: 900px;
    margin: 0 auto;
    padding-bottom: 4rem;
}

/* 1. Large Hero Placeholder */
/* 1. Large Hero Image */
.hero-large {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    border-radius: var(--radius-md);
    margin-bottom: 3rem;
    box-shadow: var(--shadow-sm);
}

/* 2. Intro Text */
.intro {
    text-align: center;
    margin-bottom: 3rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.intro h2 {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--color-primary);
    margin-bottom: 1.5rem;
    line-height: 1.3;
}

.intro p {
    font-size: 1.35rem;
    line-height: 1.8;
    color: #444;
    margin-bottom: 1rem;
}

/* 3. Image Grid (3 across) */
.image-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 4rem;
}

.image-grid .placeholder-img {
    aspect-ratio: 1 / 1;
    /* Square */
    background-color: #eee;
    border: 1px dashed #bbb;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1rem;
    color: #888;
    border-radius: var(--radius-sm);
}

.image-grid img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
}

/* 4. Flowing Text Sections */
.flowing-text {
    margin-bottom: 4rem;
    line-height: 1.8;
    font-size: 1.15rem;
    color: #333;
}

.flowing-text h2 {
    text-align: left;
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-size: 2rem;
    color: var(--color-primary);
    display: block;
    width: fit-content;
}

.flowing-text p {
    margin-bottom: 1.5rem;
}

/* 5. Featured Promise Section (Side-by-Side) */
.promise-section {
    display: flex;
    flex-direction: row-reverse;
    /* Swap: Image Left (end), Text Right (start) */
    gap: 3rem;
    align-items: stretch;
    margin-bottom: 2rem;
}

.promise-text {
    flex: 2;
    /* Text takes up 2/3 space */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.promise-image {
    flex: 1;
    /* Image takes up 1/3 space (50% reduction relative to text) */
    display: flex;
}

.promise-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-md);
    box-shadow: 4px 4px 8px rgba(0, 0, 0, 0.45);
}



/* 6. Video Container */
.video-container {
    width: 375px;
    aspect-ratio: 1 / 1;
    background-color: #000;
    margin-left: 1rem;
    margin-bottom: 1rem;
    float: right;
    border-radius: var(--radius-md);
    box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.66);
    overflow: hidden;
    /* Ensure video respects border radius */
}

.video-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Responsive */
@media (max-width: 768px) {
    .image-grid {
        grid-template-columns: 1fr;
        /* Stack on mobile */
    }

    .hero-large {
        height: auto;
    }

    .intro p {
        font-size: 1.15rem;
    }

    /* Reorder text and video on mobile */
    .flowing-text {
        display: flex;
        flex-direction: column;
    }

    .promise-section {
        flex-direction: column;
        gap: 0.5rem;
        margin-bottom: 1.5rem;
    }


    .video-container {
        order: 3;
        float: none;
        width: 100%;
        max-width: 375px;
        /* Keep it from getting too huge if tablet */
        margin-left: auto;
        margin-right: auto;
        margin-bottom: 0;
        margin-top: 2rem;
    }
}

/* ========================================
   Mobile Checkout Adjustments
   ======================================== */

.delivery-info-mobile {
    display: none;
    /* Hidden by default (Desktop) */
    margin-top: 1.5rem;
    padding-top: 1rem;
    /* Optional: Remove background if it looks weird inside the white form */
    background: transparent;
    /* border-top removed */
    border-radius: 0;
    padding-left: 0;
    padding-right: 0;
}

.delivery-info-mobile h4 {
    margin-top: 0;
}

@media (max-width: 768px) {
    .delivery-info-desktop {
        display: none !important;
    }

    .delivery-info-mobile {
        display: block !important;
    }

    .order-summary {
        display: none !important;
    }
}

/* ========================================
   Preferred App Styling
   ======================================== */
.preferred-app-group {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.app-choice-label {
    margin-bottom: 0 !important;
    margin-right: 0;
    white-space: nowrap;
}

.app-options {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.radio-label {
    display: inline-flex !important;
    align-items: center;
    cursor: pointer;
    font-weight: normal !important;
    margin-bottom: 0 !important;
}

/* Thicker Radio Buttons */
.radio-label input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid #555;
    /* Dark grey border */
    border-radius: 50%;
    margin-right: 0.5rem;
    display: grid;
    place-content: center;
    cursor: pointer;
    background-color: #fff;
}

.radio-label input[type="radio"]::before {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 50%;
    transform: scale(0);
    transition: 120ms transform ease-in-out;
    background-color: var(--color-primary);
}

.radio-label input[type="radio"]:checked {
    border-color: var(--color-primary);
}

.radio-label input[type="radio"]:checked::before {
    transform: scale(1);
}

/* Mobile Specific */
@media (max-width: 768px) {
    .preferred-app-group {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .app-choice-label {
        margin-bottom: 0.25rem !important;
    }
}

/* Desktop Header: Grid Layout for Perfect Centering */
@media (min-width: 769px) {
    .header-content {
        display: grid !important;
        grid-template-columns: 1fr auto 1fr;
        align-items: center;
        justify-content: initial !important;
        /* Reset flex */
        gap: 0;
    }

    .logo-link {
        justify-self: start;
        margin-right: 0 !important;
    }

    .main-nav {
        justify-self: center;
        /* Ensure it doesn't stretch */
        width: auto;
    }

    .header-actions {
        display: flex !important;
        justify-self: stretch;
        width: 100%;
        align-items: center;
        gap: 0 !important;
        /* Disable standard gap to use margins */
        margin-left: 0 !important;
    }

    .cart-icon {
        /* This centers the cart in the available space between Nav (left edge of this block) and Lang (right edge) */
        margin: auto !important;
    }

    .lang-toggle {
        /* Lang stays at natural position, pushed to right by Cart's auto margin */
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
}

/* ========================================
   Add to Cart Animation Rules
   ======================================== */

.flying-loaf {
    position: fixed;
    z-index: 100000;
    width: 60px;
    /* Logo Size */
    height: auto;
    pointer-events: none;
    /* Transformation will be handled via JS/WAAPI, but this ensures visibility */
    display: block;
}

/* Active Cart State (Items in Cart) */
.cart-icon {
    transition: all 0.3s ease;
}

.cart-icon.has-items {
    background-color: #D2691E;
    /* Light Brown/Orange */
    color: #2C4F54 !important;
    /* Dark Teal */
    border-radius: 50%;
    width: 40px;
    /* Reduced from 60px to fit tightly */
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    /* Ensure it stays centered in the grid layout */
    margin: auto;
}

/* Change SVG color */
.cart-icon.has-items svg {
    stroke: #2C4F54;
    /* Dark Teal */
    stroke-width: 2.5;
    /* Thicker lines */
    fill: none;
    /* Keep transparent fill unless user wants filled */
    transform: scale(1.2);
    /* Slightly smaller to fit in 40px circle */
}

/* Larger Count Bubble */
.cart-icon.has-items .cart-count {
    top: -2px;
    right: -4px;
    width: 20px;
    /* Adjusted to 20px */
    height: 20px;
    font-size: 0.75rem;
    /* Adjusted to 0.75rem */
    font-weight: 800;
    background-color: #D2691E;
    /* Changed to Orange/Brown */
    color: #ffffff;
    border: 2px solid #fff;
    /* Reset scale from previous overrides if any */
    transform: none;
}

/* Hero Shop Teaser Specifics */
#shop-teaser .card-price {
    margin-bottom: var(--spacing-xs);
}

@media (max-width: 768px) {
    br.desktop-only {
        display: none;
    }
    .desktop-only {
        display: none;
    }
    .footer-bottom {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

/* Mobile-only line breaks (hidden on desktop) */
@media (min-width: 769px) {
    br.mobile-only {
        display: none;
    }

    .mobile-only {
        display: none !important;
    }
}

/* Mobile: Bold modal instructions */
/* Mobile: Modal Adjustments */
@media (max-width: 768px) {
    .modal-instruction {
        font-weight: 700;
        margin-bottom: 0.75rem !important;
    }

    .modal-content h2 {
        font-size: 1.5rem !important;
    }

    .mixin-grid {
        grid-template-columns: 1fr !important;
        gap: 0.75rem !important;
    }

    .mixin-grid label {
        padding: 4px 0;
        /* Better touch target */
    }
}

/* ========================================
   Contact Page Styles
   ======================================== */

.contact-section {
    background-color: #EACEAA;
    min-height: calc(100vh - 80px);
    padding: 140px 0 var(--spacing-xl);
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.contact-title {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    color: var(--color-primary);
    margin-bottom: var(--spacing-md);
}

.contact-subtitle {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    color: var(--color-text);
    font-style: italic;
    margin-bottom: var(--spacing-md);
}

.contact-text {
    font-size: 1.2rem;
    line-height: 1.8;
    color: var(--color-text);
    margin-bottom: var(--spacing-md);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.contact-cta {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: var(--spacing-md);
}

.contact-icons {
    display: flex;
    gap: var(--spacing-xl);
    justify-content: center;
    align-items: center;
}

.contact-icon-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
    transition: all 0.3s ease;
    cursor: pointer;
    will-change: transform;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transform: translateZ(0);
}

.contact-icon-link:hover {
    transform: scale(1.1);
}

.contact-icon-link svg {
    width: 72px;
    height: 72px;
}

/* Zalo SVG needs special handling for 2-color design */
.contact-icon-link svg path[fill="currentColor"] {
    fill: var(--color-primary);
}

.contact-icon-link svg path[fill="#2C4F54"] {
    fill: #EACEAA;
}

/* Playful icon animations */

/* Snappy rubber-band bounce (1 second) */
@keyframes rubber-bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    10% {
        transform: translateY(-25px);
    }

    20% {
        transform: translateY(0);
    }

    30% {
        transform: translateY(-15px);
    }

    40% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }

    60%,
    100% {
        transform: translateY(0);
    }
}

/* Full cycle with 10s wait (total 12s) */
@keyframes bounce-cycle {

    0%,
    100% {
        transform: translateY(0);
    }

    0.8% {
        transform: translateY(-25px);
    }

    /* 10% of 1s / 12s */
    1.7% {
        transform: translateY(0);
    }

    /* 20% of 1s / 12s */
    2.5% {
        transform: translateY(-15px);
    }

    /* 30% of 1s / 12s */
    3.3% {
        transform: translateY(0);
    }

    /* 40% of 1s / 12s */
    4.2% {
        transform: translateY(-8px);
    }

    /* 50% of 1s / 12s */
    5%,
    100% {
        transform: translateY(0);
    }

    /* 60% and hold */
}

/* Facebook - starts immediately */
.contact-icon-link:nth-child(1) {
    animation: bounce-cycle 12s ease-out infinite;
    filter: drop-shadow(5px 5px 10px rgba(0, 0, 0, 0.66));
}

/* Instagram - starts after Facebook (1s delay) */
.contact-icon-link:nth-child(2) {
    animation: bounce-cycle 12s ease-out infinite;
    animation-delay: 1s;
    filter: drop-shadow(5px 5px 10px rgba(0, 0, 0, 0.66));
}

/* Zalo - starts after Instagram (2s delay) */
.contact-icon-link:nth-child(3) {
    animation: bounce-cycle 12s ease-out infinite;
    animation-delay: 2s;
    filter: drop-shadow(5px 5px 10px rgba(0, 0, 0, 0.66));
}

/* Mobile Styles */
@media (max-width: 768px) {
    .contact-section {
        padding: 120px var(--spacing-sm) var(--spacing-lg);
    }

    .contact-title {
        font-size: 2.5rem;
    }

    .contact-subtitle {
        font-size: 1.8rem;
    }

    .contact-text {
        font-size: 1.1rem;
    }

    .contact-cta {
        font-size: 1.2rem;
    }

    .contact-icons {
        gap: var(--spacing-lg);
    }

    .contact-icon-link svg {
        width: 64px;
        height: 64px;
    }
}

/* Mobile Adjustments for Hero Sequence */
@media (max-width: 768px) {

    /* Tighten up vertical spacing */
    /* Tighten up vertical spacing */
    .hero-divider {
        display: none;
        /* Remove divider completely */
    }

    .hero-title {
        font-size: 2.8rem;
        /* Slightly smaller to help fit */
        margin-bottom: 1rem;
        /* Added spacing after title */
    }

    .hero-logo-large {
        margin-bottom: 1rem;
        /* Reduced from default */
        /* Override animation to use fixed pixel values on mobile */
        animation: logoIntroMobile 4.0s cubic-bezier(0.2, 0.8, 0.2, 1) 1.0s both, float 6s ease-in-out infinite 5.0s !important;
        z-index: 10000 !important;
        /* Above header during animation */
        position: relative;
    }

    /* Remove breaks in description */
    .desktop-br {
        display: none !important;
        /* Force remove */
    }

    /* Shift content up to show more background */
    .hero-content {
        margin-top: 0;
    }

    /* Adjust padding to compensate for shift if needed, but margin-top handles the "lift" */
    /* Adjust padding to compensate for shift if needed, but margin-top handles the "lift" */
    .hero {
        padding-top: 50px;
        /* Reduced padding for more compact layout */
        padding-bottom: 2rem;
        /* Reduced padding */
        height: 675px !important;
        /* Increased to cover cream gap at bottom */
        min-height: 675px !important;
        max-height: 675px !important;
        animation: none !important;
        /* Force disable height lock */
        overflow: hidden;
        /* Prevent content overflow */
    }

    /* Disable content slide animation on mobile to prevent jump */
    .hero-content {
        animation: none !important;
        transform: none !important;
    }

    .hero-description {
        line-height: 1.2;
        /* Tighten text block */
        margin-bottom: 1.5rem;
        /* Added spacing after description */
    }

    /* Show scroll hint on mobile */
    .scroll-hint {
        display: block !important;
        font-size: 0.85rem;
        color: rgba(255, 255, 255, 0.8);
        margin-top: 1rem;
        text-align: center;
        font-style: italic;
    }

    /* Mobile-specific logo animation - keep the shrinking effect */
    /* Mobile-specific logo animation - keep the shrinking effect */
    @keyframes logoIntroMobile {
        0% {
            height: 450px;
            transform: translateY(80px) rotate(0deg);
            opacity: 0;
        }

        /* Long Fade In Phase */
        35% {
            height: 450px;
            transform: translateY(80px) rotate(0deg);
            opacity: 1;
        }

        /* Fast Decay Oscillation */
        40% {
            transform: translateY(80px) rotate(-10deg);
        }

        45% {
            transform: translateY(80px) rotate(8deg);
        }

        50% {
            transform: translateY(80px) rotate(-6deg);
        }

        55% {
            transform: translateY(80px) rotate(4deg);
        }

        60% {
            transform: translateY(80px) rotate(-2deg);
        }

        65% {
            transform: translateY(80px) rotate(1deg);
        }

        70% {
            height: 450px;
            transform: translateY(80px) rotate(0deg);
        }

        100% {
            /* Shrink to Final */
            height: 225px;
            transform: translateY(0) rotate(0deg);
            opacity: 1;
        }
    }
}