/* =========================================================
   KASHIKOSH — PREMIUM STOREFRONT
   Responsive CSS
========================================================= */

:root {
    --bg-ivory: #efe7dc;
    --bg-charcoal: #3b2a23;
    --text-main: #1a1a1a;
    --text-muted: #6b6863;
    --accent-gold: #c5a059;
    --accent-gold-light: #e2ce9f;
    --bg-paper: #fffdf9;
    --bg-footer: #170f0c;
    --border-subtle: rgba(197, 160, 89, 0.25);
    --nav-height: 82px;
    --transition-smooth: cubic-bezier(0.25, 1, 0.5, 1);
}

/* =========================================================
   RESET & TYPOGRAPHY
========================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { width: 100%; max-width: 100%; overflow-x: clip; }
body { width: 100%; min-height: 100vh; background-color: var(--bg-paper); color: var(--text-main); font-family: 'Montserrat', sans-serif; font-weight: 300; letter-spacing: 0.03em; line-height: 1.6; overflow-x: clip; }

/* Add this rule to allow the Nav to stick independently of the Header wrapper */
.site-header { display: contents; }

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; transition: color 0.3s ease; }
h1, h2, h3, h4, .eyebrow, .eyebrow_dark, .brand-logo, .product-name, .mobile-menu-title { font-family: 'Cormorant Garamond', serif; }

/* =========================================================
   TOP ANNOUNCEMENT BAR
========================================================= */
.topbar { width: 100%; background-color: var(--bg-charcoal); color: var(--accent-gold-light); padding: 10px 20px; text-align: center; font-size: 0.68rem; font-weight: 400; text-transform: uppercase; letter-spacing: 0.22em; line-height: 1.4; }
.topbar-dot { margin: 0 8px; }

/* =========================================================
   MAIN NAVIGATION (DESKTOP DEFAULT)
========================================================= */
.nav { position: sticky; top: 0; left: 0; width: 100%; z-index: 1000; background: rgba(255, 253, 249, 0.98); border-bottom: 1px solid var(--border-subtle); }
.nav-inner { max-width: 1440px; height: var(--nav-height); margin: 0 auto; padding: 0 40px; display: flex; align-items: center; justify-content: space-between; gap: 30px; }

.brand-logo { font-size: 1.9rem; letter-spacing: 0.28em; font-weight: 600; text-transform: uppercase; color: var(--text-main); }
.brand-logo:hover { color: var(--accent-gold); }

.navlinks { display: flex; align-items: center; justify-content: center; gap: clamp(20px, 2.5vw, 38px); }
.navlinks a { position: relative; padding: 8px 0; font-size: 0.7rem; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; }
.navlinks a::after { content: ''; position: absolute; left: 0; bottom: 0; width: 0; height: 1px; background-color: var(--accent-gold); transition: width 0.4s var(--transition-smooth); }
.navlinks a:hover::after { width: 100%; }
.navlinks a:hover { color: var(--accent-gold); }

.nav-actions { display: flex; align-items: center; gap: clamp(14px, 1.7vw, 25px); font-size: 0.68rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; }
.nav-actions a:hover { color: var(--accent-gold); }

/* Hidden on Desktop */
.mobile-menu-btn { display: none; }

/* =========================================================
   MOBILE MENU DRAWER (GLOBAL HIDDEN STATE)
   (This must stay outside media queries to fix the spilling bug)
========================================================= */
.mobile-menu-overlay { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(0, 0, 0, 0.5); z-index: 1999; opacity: 0; visibility: hidden; pointer-events: none; transition: opacity 0.4s ease, visibility 0.4s ease; }
.mobile-menu-overlay.active { opacity: 1; visibility: visible; pointer-events: auto; }

.mobile-menu { 
    position: fixed !important; 
    top: 0 !important; 
    left: 0 !important; 
    bottom: 0; 
    width: 85%; 
    max-width: 400px; 
    height: 100vh; 
    background: var(--bg-paper); 
    z-index: 2000; 
    transform: translateX(-100%); 
    transition: transform 0.4s var(--transition-smooth); 
    overflow: hidden; /* Prevents the whole drawer from scrolling */
    display: flex; 
    flex-direction: column; 
    box-shadow: 10px 0 30px rgba(0,0,0,0.1); 
}
.mobile-menu.active { transform: translateX(0); }

.mobile-menu-header { 
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    padding: 20px 24px; 
    border-bottom: 1px solid var(--border-subtle); 
    background: var(--bg-paper); 
    flex-shrink: 0; /* Forces the header to stay exactly its intended height */
    z-index: 10;
}
.mobile-menu-title { font-size: 1.35rem; font-weight: 600; letter-spacing: 0.15em; color: var(--text-main); }
.mobile-menu-close { background: none; border: none; font-size: 2.2rem; line-height: 1; color: var(--text-muted); cursor: pointer; }

.mobile-menu-content { 
    padding: 30px 24px; 
    display: flex; 
    flex-direction: column; 
    gap: 30px; 
    flex: 1; /* Tells the content to fill all remaining space below the header */
    overflow-y: auto; /* Enables scrolling ONLY for this specific area */
}
.mobile-menu-section { display: flex; flex-direction: column; gap: 16px; }
.mobile-menu-label { font-size: 0.45rem; text-transform: uppercase; letter-spacing: 0.2em; color: var(--text-muted); margin-bottom: 5px; }
.mobile-menu-section a { font-family: 'Cormorant Garamond', serif; font-size: 1.6rem; color: var(--text-main); }
.mobile-menu-section a:hover { color: var(--accent-gold); }
.mobile-menu-divider { height: 1px; background: var(--border-subtle); }

.mobile-concierge { margin-top: 10px; padding: 30px 20px; background: var(--bg-charcoal); color: var(--accent-gold-light); text-align: center; }
.mobile-concierge-eyebrow { font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.2em; margin-bottom: 10px; }
.mobile-concierge h3 { font-size: 1.4rem; color: #fff; margin-bottom: 15px; }
.mobile-concierge a { display: inline-block; padding: 10px 20px; border: 1px solid var(--accent-gold-light); color: var(--accent-gold-light); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.15em; }

/* =========================================================
   PAGE COMPONENTS
========================================================= */
.hero { width: 100%; height: calc(100vh - var(--nav-height)); min-height: 520px; background: linear-gradient( rgba(18, 18, 18, 0.4), rgba(18, 18, 18, 0.65) ), url('../images/banner_image.jpg?auto=format&fit=crop&w=1800&q=90') center / cover no-repeat; display: flex; align-items: center; justify-content: center; text-align: center; color: #fff; padding: 40px 20px; }
.hero-copy { max-width: 800px; }
.eyebrow { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.35em; color: var(--accent-gold-light); margin-bottom: 20px; }
.eyebrow_dark { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.35em; color: var(--accent-gold); margin-bottom: 20px; }
.hero h1 { font-size: clamp(3rem, 6vw, 5.5rem); font-weight: 400; line-height: 1.15; margin-bottom: 25px; }
.hero p { max-width: 550px; margin: 0 auto 40px; font-size: 1.1rem; opacity: 0.9; }

.btn { display: inline-block; padding: 14px 38px; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.25em; border: 1px solid var(--text-main); color: var(--text-main); transition: 0.4s var(--transition-smooth); cursor: pointer; }
.btn:hover { background: var(--text-main); color: #fff; }
.btn-light { border-color: #fff; color: #fff; }
.btn-light:hover { background: #fff; color: var(--bg-charcoal); border-color: #fff; }

.section { max-width: 1400px; margin: 0 auto; padding: 120px 40px; }
.section-head { max-width: 700px; margin: 0 auto 70px; text-align: center; }
.section-head h2 { font-size: clamp(2.2rem, 4vw, 3.2rem); font-weight: 400; margin-bottom: 20px; }
.section-head p { color: var(--text-muted); font-size: 1rem; }

.grid { display: grid; gap: 30px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.collection-card, .product-card { position: relative; overflow: hidden; display: block; }
.collection-card img, .product-img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; transition: transform 0.8s var(--transition-smooth); }
.collection-card:hover img, .product-card:hover .product-img { transform: scale(1.05); }

.collection-overlay { position: absolute; right: 0; bottom: 0; left: 0; padding: 40px 30px; background: linear-gradient( to top, rgba(18,18,18,0.85), transparent ); color: #fff; }
.collection-overlay h3 { font-size: 1.8rem; font-weight: 400; letter-spacing: 0.05em; }
.product-info { padding: 20px 5px; }
.tag { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.2em; color: var(--accent-gold); font-weight: 500; margin-bottom: 8px; }
.product-name { font-size: 1.4rem; font-weight: 500; margin-bottom: 5px; }
.muted { font-size: 0.85rem; color: var(--text-muted); }

.split { display: grid; grid-template-columns: 1fr 1fr; background: var(--bg-charcoal); color: #fff; }
.split img { width: 100%; height: 100%; object-fit: cover; }
.split-copy { padding: 80px; display: flex; flex-direction: column; justify-content: center; }
.split-copy h2 { font-size: clamp(2.5rem, 4vw, 3.5rem); font-weight: 400; margin-bottom: 25px; line-height: 1.2; }
.split-copy p { margin-bottom: 40px; color: #b5b2ab; font-size: 1.05rem; }
.split-copy .btn { align-self: flex-start; border-color: #fff; color: #fff; }
.split-copy .btn:hover { background: #fff; color: var(--bg-charcoal); }

.section.dark { background: var(--bg-charcoal); color: #fff; text-align: center; }
.section.dark p { color: #b5b2ab; }
.cta { padding: 140px 40px; background-color: var(--bg-ivory); border-top: 1px solid var(--border-subtle); text-align: center; }
.cta h2 { font-size: clamp(2.5rem, 4vw, 3.5rem); font-weight: 400; margin-bottom: 20px; }

.footer { padding: 100px 40px 40px; background: var(--bg-footer); color: #fff; border-top: 1px solid rgba(197, 160, 89, 0.15); }
.footer-grid { max-width: 1400px; margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 60px; padding-bottom: 80px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.footer .brand-logo { color: #fff; margin-bottom: 20px; }
.footer p { color: #9a968e; font-size: 0.9rem; }
.footer h4 { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.25em; color: var(--accent-gold-light); margin-bottom: 25px; }
.footer a { display: inline-block; color: #b5b2ab; font-size: 0.9rem; margin-bottom: 12px; }
.footer a:hover { color: #fff; }
.copyright { margin: 40px auto 0; text-align: center; font-size: 0.75rem; letter-spacing: 0.15em; color: #7a766e; text-transform: uppercase; }

/* =========================================================
   RESPONSIVE LAYOUTS
========================================================= */
@media (max-width: 1024px) {
    :root { --nav-height: 68px; }
    
    .topbar { padding: 8px 14px; font-size: 0.55rem; }

    /* MOBILE HEADER GRID: Left(Burger) | Center(Logo) | Right(Bag) */
    .nav-inner {
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        align-items: center;
        padding: 0 20px;
    }

    /* Fixed Hamburger Icon */
    .mobile-menu-btn {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 5px; /* Spacing between lines */
        background: transparent;
        border: none;
        cursor: pointer;
        width: 32px;
        height: 32px;
        padding: 0;
        grid-column: 1; /* Anchor to left */
    }
    
    .mobile-menu-btn span {
        display: block;
        width: 24px;
        height: 2px;
        background-color: var(--text-main);
    }

    /* Centered Logo */
    .brand-logo {
        grid-column: 2; /* Anchor to center */
        font-size: 1.5rem;
        letter-spacing: 0.2em;
        text-align: center;
    }

    /* Right Side Bag */
    .nav-actions {
        grid-column: 3; /* Anchor to right */
        justify-content: flex-end;
    }

    /* Hide extra menus to prevent overlap */
    .navlinks { display: none; }
    .hide-on-mobile { display: none !important; }

    /* Adjust page spacing */
    .hero { min-height: 520px; padding: 30px 20px; }
    .btn { padding: 13px 25px; font-size: 0.65rem; }
    .section { padding: 75px 20px; }
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .split { grid-template-columns: 1fr; }
    .split-copy { padding: 60px 30px; }
    .section.dark, .cta { padding: 80px 20px; }
    .footer { padding: 70px 20px 30px; }
    .footer-grid { grid-template-columns: 1fr; gap: 35px; }
}

@media (max-width: 600px) {
    .grid-4 { grid-template-columns: 1fr; }
    .nav-inner { padding: 0 15px; }
    .brand-logo { font-size: 1.3rem; }
}