* {
    box-sizing: border-box;
} 

:root {
    --header-min: 240px;
    --footer-height: 64px;
}


/* Skip link for keyboard users */
.skip-link {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
.skip-link:focus {
    left: 20px;
    top: 20px;
    width: auto;
    height: auto;
    padding: 8px 12px;
    background: #ffffff;
    border-radius: 6px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.12);
    color: #5a3b3b;
    z-index: 1000;
}

html, body { height: 100%; }

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: 'Mali', 'Segoe UI', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: #fdecef;
    color: #5a3b3b;
}

/* Page content grows to fill available space so pages visually fill the viewport */
.page-content {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
} 

h1, h2, h3, h4, h5, h6 {
    font-family: 'Mali', 'Segoe UI', sans-serif;
    font-weight: 700;
}

header {
    background: linear-gradient(rgba(255,255,255,0.35), rgba(255,255,255,0.35)), url('hero.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: var(--header-min);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 28px 20px;
} 

header h1 {
    font-size: clamp(28px, 6vw, 52px);
    margin-bottom: 10px;
}

header p {
    font-size: clamp(14px, 3.2vw, 18px);
}

/* Responsive, accessible navigation */
.site-nav {
    background: #f7c9d3;
    padding: 10px;
}
.site-nav .nav-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

/* Toggle button */
.nav-toggle {
    background: transparent;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    color: #5a3b3b;
    z-index: 1400; /* ensure button sits above overlay */
    transition: background 220ms ease, transform 220ms ease, color 220ms ease;
}
.hamburger {
    width: 22px;
    height: 2px;
    background: currentColor;
    display: block;
    position: relative;
    border-radius: 2px;
    transition: background 220ms ease, transform 220ms ease;
}
.hamburger::before,
.hamburger::after {
    content: "";
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
}
.hamburger::before { top: -7px; }
.hamburger::after { top: 7px; }
.nav-toggle:focus { outline: 3px solid rgba(201,122,138,0.28); outline-offset: 2px; }

/* Hover visual (desktop) */
@media (hover: hover) {
    .nav-toggle:hover {
        background: linear-gradient(90deg, rgba(232,156,171,0.95), rgba(201,122,138,0.95));
        color: #ffffff;
        transform: translateY(-2px);
    }
    .nav-toggle:hover .hamburger { background: currentColor; }
}

/* Click animation: temporary visual for taps/clicks */
.nav-toggle.clicked {
    background: linear-gradient(90deg, rgba(232,156,171,0.95), rgba(201,122,138,0.95));
    color: #ffffff;
    transform: translateY(-2px);
}
.nav-toggle.clicked .hamburger { background: currentColor; }

/* Toggled (menu open) state */
.nav-toggle.toggled {
    background: #e0b3e0;
    color: #fff;
    box-shadow: 0 4px 16px 0 #0002;
    border-color: #e0b3e0;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s, border-color 0.2s;
}

/* Navigation links: collapsed on small screens -> full-screen overlay when opened */
.site-nav .nav-links {
    display: flex;
    gap: 8px;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 320ms cubic-bezier(0.2,0.9,0.2,1), opacity 220ms ease, transform 320ms cubic-bezier(0.2,0.9,0.2,1);
    flex-direction: column;
}

/* When menu is visible on small screens keep dropdown semantics */
.site-nav .nav-links.visible {
    max-height: 720px; /* fallback */
    opacity: 1;
    padding-top: 10px;
}

/* Anchored dropdown behavior for small devices */
@media (max-width: 699px) {
    /* ensure nav sits above other stacking contexts (header animations, etc.) */
    .site-nav { position: relative; z-index: 9999; }
    .site-nav .nav-inner { position: relative; }
    .site-nav .nav-links {
        position: absolute;
        top: calc(100% + 8px);
        left: 12px;
        right: 12px;
        margin: 0;
        padding: 12px;
        background: linear-gradient(180deg, rgba(253,236,239,0.98), rgba(247,201,211,0.98));
        display: flex;
        align-items: stretch;
        justify-content: flex-start;
        flex-direction: column;
        gap: 12px;
        border-radius: 12px;
        box-shadow: 0 18px 40px rgba(0,0,0,0.18);
        transform: translateY(-6px) scaleY(0.96);
        opacity: 0;
        max-height: 320px;
        overflow: auto;
        transition: opacity 220ms ease, transform 260ms cubic-bezier(0.2,0.9,0.2,1), visibility 0s linear 220ms;
        z-index: 10001; /* sit above everything */
        -webkit-overflow-scrolling: touch;
        visibility: hidden;
        pointer-events: none;
    }

    /* Visible => animate in */
    .site-nav .nav-links.visible {
        transform: translateY(0) scaleY(1);
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transition-delay: 0s;
    }

    /* Tappable links for dropdown */
    .site-nav .nav-links a {
        font-size: 18px;
        padding: 10px 14px;
        border-radius: 8px;
        background: rgba(255,255,255,0.98);
        box-shadow: 0 6px 18px rgba(0,0,0,0.06);
        width: 100%;
        max-width: none;
        text-align: left;
    }

    /* Do not lock page scroll for anchored dropdown */
    .menu-open, .menu-open body, .menu-open html { overflow: visible; height: auto; }

    /* Make full-viewport sections behave normally on phones so content stacks vertically */
    .full-viewport { min-height: auto; padding: 20px 12px; align-items: flex-start; }
    /* Ensure price section stacks vertically and cards are compact */
    /* Strong overrides to guarantee single-column stacking on small devices */
    /* Ensure price container has equal left/right padding and cards fill the inner area */
    #price, #price.full-viewport { display: flex !important; flex-direction: column !important; gap: 14px !important; padding: 8px 18px 24px !important; box-sizing: border-box; }
    #price { align-items: stretch !important; }
    /* Cards take full width of the padded container (use border-box to respect inner padding) */
    #price > .card { display: block !important; width: 100% !important; max-width: none !important; margin: 0 0 12px !important; box-sizing: border-box !important; }
    /* card inner spacing */
    #price > .card .card, #price > .card { padding: 16px !important; border-radius: 12px !important; }
    .price-list { gap: 8px; }
    .price-list li { padding: 10px 12px; font-size: 16px; }
    .card h2 { margin-bottom: 8px; font-size: 20px; }

    /* Mobile: force gallery and product lists to stack vertically for easier scrolling */
    .gallery-grid { grid-template-columns: 1fr !important; gap: 12px; }
    .gallery-item { width: 100%; }
    .gallery-item img { height: auto; display: block; }
    /* Reduce horizontal gap in price rows on small screens */
    .price-list li { gap: 12px; }

    /* Make cards full-width and compact on small screens */
    .card {
        width: 100%;
        margin: 0 0 16px;
        padding: 14px 14px;
        border-radius: 12px;
        box-sizing: border-box;
    }

    /* Stack price rows vertically for better readability on phones */
    .price-list li {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 10px 12px;
    }
    .price-qty, .price-amt {
        flex: none;
        width: 100%;
        text-align: left;
        font-size: 16px;
    }
    .price-amt { color: #c97a8a; margin-top: 2px; }

    /* Make image boxes more compact on phone */
    .img-box { padding: 16px; }
}
  

/* Desktop: show links as a row and hide toggle */
@media (min-width: 700px) {
    .nav-toggle { display: none; }
    .site-nav .nav-links { max-height: none; overflow: visible; opacity: 1; flex-direction: row; gap: 12px; }
    .site-nav .nav-inner { padding: 0 10px; }
}

nav a {
    margin: 0;
    text-decoration: none;
    color: #5a3b3b;
    font-weight: 700;
    position: relative;
    padding: 8px 12px;
    border-radius: 8px;
    display: inline-block;
    transition: color 220ms ease, transform 220ms ease;
    font-size: 15px;
}

nav a::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 4px;
    transform: translateX(-50%) scaleX(0);
    transform-origin: center;
    width: 60%;
    height: 3px;
    background: #c97a8a;
    border-radius: 2px;
    transition: transform 300ms cubic-bezier(0.2, 0.9, 0.2, 1), opacity 200ms;
    opacity: 0.9;
}

nav a:hover,
nav a:focus {
    color: #ffffff;
    background: linear-gradient(90deg, rgba(232,156,171,0.95), rgba(201,122,138,0.95));
    transform: translateY(-4px);
    box-shadow: 0 6px 18px rgba(201,122,138,0.18);
    text-decoration: none;
}

nav a:hover::after,
nav a:focus::after {
    transform: translateX(-50%) scaleX(1);
}

@media (prefers-reduced-motion: reduce) {
    nav a, nav a::after {
        transition: none !important;
    }
}

section {
    padding: 50px 20px;
    max-width: 1000px;
    margin: auto;
}

/* Full-viewport section helper: fills remaining viewport (header/footer deducted) */
.full-viewport {
    min-height: calc(100vh - var(--header-min) - var(--footer-height));
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 20px;
    padding: 40px 20px;
}

/* Optional utility to make hero content sit at top for small content */
.full-viewport .card { width: 100%; }

/* Ensure price section cards lay out horizontally on wider screens */
#price.full-viewport {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    align-items: start;
    padding: 12px 0;
}

#price .card {
    width: 100%;
    max-width: none;
    margin: 0;
}


.card {
    background: white;
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* Price list inside cards: vertical, accessible, and tappable */
.price-list {
    list-style: none;
    padding: 0;
    margin: 12px 0 0;
    display: grid;
    gap: 10px;
}
.price-list li {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    border-radius: 10px;
    background: linear-gradient(90deg, #ffffff, #fffefc);
    box-shadow: 0 6px 16px rgba(0,0,0,0.04);
    color: #5a3b3b;
    font-weight: 600;
    gap: 12px;
    justify-content: space-between;
}
.price-list li strong { font-weight: 700; }
.price-qty { font-weight: 700; flex: 1; text-align: left; }
.price-amt { color: #c97a8a; font-weight: 700; text-align: right; white-space: nowrap; }

.img-box {
    border: 2px dashed #f3b6c2;
    border-radius: 16px;
    padding: 30px;
    text-align: center;
    margin-top: 20px;
    color: #c97a8a;
}

.img-box img {
    max-width: 100%;
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
    margin: 10px auto 0;
} 

/* Optional helper class for even smaller thumbnails */
.img-sm {
    max-width: 320px;
    width: 70%;
}

footer {
    text-align: center;
    padding: 20px;
    background: #f7c9d3;
    font-size: 14px;
}

.btn {
    display: inline-block;
    position: relative;
    overflow: hidden;
    background: linear-gradient(90deg,#e89cab,#f7a2be);
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    text-decoration: none;
    margin-top: 10px;
    box-shadow: 0 6px 18px rgba(232,156,171,0.18);
    transition: transform 220ms cubic-bezier(0.2,0.9,0.2,1), box-shadow 220ms, filter 220ms;
    will-change: transform;
}

/* Subtle shine sweep */
.btn::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(255,255,255,0.18), rgba(255,255,255,0.06) 40%, rgba(255,255,255,0.18));
    transform: translateX(-110%);
    transition: transform 420ms cubic-bezier(0.2,0.9,0.2,1);
    pointer-events: none;
}

.btn:hover,
.btn:focus {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 28px rgba(232,156,171,0.24);
}

.btn:hover::before,
.btn:focus::before {
    transform: translateX(16%);
}

.btn:active {
    transform: translateY(-2px) scale(0.995);
    box-shadow: 0 6px 12px rgba(232,156,171,0.18);
}

/* Optional attention pulse class */
@keyframes btnPulse {
    0% { box-shadow: 0 6px 18px rgba(232,156,171,0.18); transform: scale(1); }
    50% { box-shadow: 0 14px 34px rgba(232,156,171,0.26); transform: scale(1.03); }
    100% { box-shadow: 0 6px 18px rgba(232,156,171,0.18); transform: scale(1); }
}

.btn--pulse {
    animation: btnPulse 1.6s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
    .btn, .btn::before, .btn--pulse {
        transition: none !important;
        animation: none !important;
        transform: none !important;
    }
}

/* Page load / tab open animation 🔧 */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Add class on load for controlled entrance */
.is-loaded header,
.is-loaded nav,
.is-loaded section,
.is-loaded footer {
    animation: fadeInUp 560ms cubic-bezier(0.2,0.9,0.2,1) both;
}

.is-loaded nav { animation-delay: 80ms; }
.is-loaded section { animation-delay: 160ms; }
.is-loaded footer { animation-delay: 240ms; }

/* Stagger cards a bit */
.card {
    opacity: 0;
    transform: translateY(8px);
}

.is-loaded .card {
    animation: fadeInUp 480ms cubic-bezier(0.2,0.9,0.2,1) both;
}

.is-loaded .card:nth-child(1) { animation-delay: 220ms; }
.is-loaded .card:nth-child(2) { animation-delay: 300ms; }
.is-loaded .card:nth-child(3) { animation-delay: 380ms; }

/* Respect prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
    .is-loaded header,
    .is-loaded nav,
    .is-loaded section,
    .is-loaded footer,
    .is-loaded .card {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}

/* Gallery grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
    margin-top: 18px;
}

.gallery-item {
    border: none;
    padding: 0;
    background: transparent;
    cursor: pointer;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(0,0,0,0.06);
    transition: transform 220ms cubic-bezier(0.2,0.9,0.2,1), box-shadow 220ms;
}

.gallery-item img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    display: block;
    transition: transform 260ms ease;
}

.gallery-item:hover,
.gallery-item:focus {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0,0,0,0.12);
}

.gallery-item:hover img,
.gallery-item:focus img {
    transform: scale(1.04);
}

/* Lightbox */
.lightbox {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(10,10,10,0.85);
    z-index: 20000; /* much higher so it sits above nav and dropdowns */
    padding: 20px;
}

.lightbox[aria-hidden="false"] {
    display: flex;
}

/* Open animation: subtle zoom + fade */
@keyframes lightboxZoomIn {
    from { opacity: 0; transform: scale(0.92); }
    to { opacity: 1; transform: scale(1); }
}

/* Close animation: shrink + fade */
@keyframes lightboxZoomOut {
    from { opacity: 1; transform: scale(1); }
    to { opacity: 0; transform: scale(0.96); }
}

.lightbox__content {
    position: relative;
    z-index: 20001; /* image content above backdrop */
}

.lightbox__content img {
    max-width: 90vw;
    max-height: 80vh;
    border-radius: 12px;
    box-shadow: 0 18px 48px rgba(0,0,0,0.6);
    /* Ensure it has an initial transform for smoother animation */
    transform-origin: center center;
    display: block;
}

/* Run the zoom-in when opened */
.lightbox[aria-hidden="false"] .lightbox__content img {
    animation: lightboxZoomIn 320ms cubic-bezier(0.2,0.9,0.2,1) both;
}

/* Run the zoom-out when closing */
.lightbox.is-closing .lightbox__content img {
    animation: lightboxZoomOut 260ms ease both;
}

/* Controls: ensure arrows and close are the front-most elements */
.lightbox__close,
.lightbox__nav {
    position: absolute;
    background: rgba(255,255,255,0.95);
    border: none;
    color: #5a3b3b;
    padding: 12px 14px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 22px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
    z-index: 20003; /* above image */
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.lightbox__close { top: 18px; right: 18px; }
.lightbox__prev,
.lightbox__next {
    top: 50%;
    transform: translateY(-50%);
    height: 64px;
    width: 56px;
    padding: 0;
    border-radius: 12px;
    font-size: 28px;
    z-index: 20005; /* arrows should be the very front */
}

.lightbox__prev { left: 18px; }
.lightbox__next { right: 18px; }

/* Make sure arrows stay clickable over the image */
.lightbox__prev:focus, .lightbox__next:focus, .lightbox__close:focus { outline: 3px solid rgba(201,122,138,0.28); outline-offset: 2px; }

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
    .gallery-item,
    .gallery-item img {
        transition: none !important;
    }
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
    .gallery-item,
    .gallery-item img {
        transition: none !important;
    }
}

/* Responsive tweaks */
@media (min-width: 700px) {
    section { padding: 60px 20px; }
    nav a { padding: 10px 16px; font-size: 16px; }
    .img-box img { width: auto; max-width: 520px; }
    #price { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: start; }
}

@media (min-width: 1000px) {
    section { max-width: 1100px; }
    :root { --header-min: 380px; }
    header { min-height: var(--header-min); }
}
