/* ============================================================
   Valhalla Peptides — Responsive Header CSS (CC#2 Block C)
   Breakpoints: 1025+ desktop / 769-1024 tablet / ≤768 mobile / ≤480 small
   Tokens: bg #0A0A0A | gold #D4AF37 | text #F5F5F5
   ============================================================ */

/* ---------- Desktop (1025px+) — full horizontal nav ---------- */
@media (min-width: 1025px) {
    .vp-hamburger { display: none; }
    .vp-mobile-drawer { display: none !important; }

    .vp-nav {
        display: flex !important;
        flex-wrap: nowrap;
        align-items: center;
        justify-content: center;
        gap: 1.5rem;
        max-width: 100%;
    }

    .vp-nav .vp-nav-link {
        white-space: nowrap;
        font-size: 0.85rem;
        padding: 0.5rem 0;
        letter-spacing: 0.05em;
    }

    .vp-mega-wrap {
        position: relative;
    }
}

/* ---------- Tablet (769–1024px) — compact horizontal nav ---------- */
@media (min-width: 769px) and (max-width: 1024px) {
    .vp-hamburger { display: none; }
    .vp-mobile-drawer { display: none !important; }

    .vp-nav {
        display: flex !important;
        flex-wrap: nowrap;
        align-items: center;
        justify-content: center;
        gap: 1rem;
        overflow-x: visible;
    }

    .vp-nav .vp-nav-link {
        font-size: 0.75rem;
        white-space: nowrap;
        letter-spacing: 0.03em;
        padding: 0.5rem 0;
    }
}

/* ---------- Mobile (≤768px) — hamburger + drawer ---------- */
@media (max-width: 768px) {
    /* Hide desktop nav + any open mega panel */
    .vp-nav,
    .vp-mega-wrap > .vp-mega {
        display: none !important;
    }

    /* Hamburger button */
    .vp-hamburger {
        display: flex !important;
        flex-direction: column;
        justify-content: space-around;
        width: 32px;
        height: 32px;
        background: transparent;
        border: 0;
        cursor: pointer;
        padding: 6px 4px;
        z-index: 1001;
    }

    .vp-hamburger-line {
        display: block;
        width: 100%;
        height: 2px;
        background: #D4AF37;
        border-radius: 1px;
        transition: transform 0.3s ease, opacity 0.3s ease;
    }

    .vp-hamburger[aria-expanded="true"] .vp-hamburger-line:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .vp-hamburger[aria-expanded="true"] .vp-hamburger-line:nth-child(2) {
        opacity: 0;
    }
    .vp-hamburger[aria-expanded="true"] .vp-hamburger-line:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    /* Drawer (slide from right) */
    .vp-mobile-drawer {
        display: block !important;
        position: fixed;
        top: 0;
        right: -100%;
        width: 85%;
        max-width: 360px;
        height: 100vh;
        height: 100dvh;
        background: #0A0A0A;
        border-left: 1px solid rgba(212, 175, 55, 0.2);
        z-index: 1000;
        transition: right 0.35s ease;
        overflow-y: auto;
        padding: 5rem 1.5rem 2rem;
    }

    .vp-mobile-drawer.vp-mobile-drawer-open {
        right: 0;
    }

    .vp-mobile-nav {
        display: flex;
        flex-direction: column;
        gap: 0;
    }

    .vp-mobile-nav-link {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 1rem 0;
        color: #F5F5F5;
        font-family: 'Inter', sans-serif;
        font-size: 1rem;
        font-weight: 400;
        text-decoration: none;
        background: transparent;
        border: 0;
        border-bottom: 1px solid rgba(212, 175, 55, 0.08);
        width: 100%;
        text-align: left;
        cursor: pointer;
        transition: color 0.3s ease;
    }

    .vp-mobile-nav-link:hover,
    .vp-mobile-nav-link:focus {
        color: #D4AF37;
    }

    .vp-mobile-chevron {
        width: 16px;
        height: 16px;
        color: #D4AF37;
        transition: transform 0.3s ease;
        flex-shrink: 0;
    }

    .vp-mobile-expandable[aria-expanded="true"] .vp-mobile-chevron {
        transform: rotate(180deg);
    }

    .vp-mobile-submenu {
        display: flex;
        flex-direction: column;
        padding: 0.5rem 0 0.5rem 1rem;
        gap: 0;
    }

    .vp-mobile-submenu a {
        padding: 0.75rem 0;
        color: #B0B0B0;
        font-family: 'Inter', sans-serif;
        font-size: 0.9rem;
        text-decoration: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        transition: color 0.3s ease;
    }

    .vp-mobile-submenu a:hover {
        color: #D4AF37;
    }

    /* Backdrop */
    .vp-mobile-backdrop {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.7);
        z-index: 999;
    }

    body.vp-mobile-menu-open .vp-mobile-backdrop {
        display: block;
    }

    body.vp-mobile-menu-open {
        overflow: hidden;
    }

    /* Mobile header layout */
    .vp-header,
    .vp-header-top {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    .vp-header-top {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.75rem;
    }

    .vp-header-center img,
    .vp-logo-img {
        display: block;
        height: 64px;
        width: auto;
        max-width: 240px;
        object-fit: contain;
    }
}

/* ---------- Small mobile (≤480px) ---------- */
@media (max-width: 480px) {
    .vp-announce {
        font-size: 0.7rem;
        padding: 0.5rem 0.75rem;
        line-height: 1.4;
    }

    .vp-header,
    .vp-header-top {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }

    .vp-logo-img {
        height: 54px;
        max-width: 200px;
    }
}

/* ---------- Logo (wordmark) — Phase Logo (2026-05-25) ---------- */
/* Customizer custom_logo replaces the migrated Shopify-CDN <img>. Wordmark is
   ~4:1 (2560x646); the mobile/small-mobile rules above cap height + width.
   Tablet/desktop rule below sets size at ≥769px (mobile/small-mobile rules
   above this in the cascade target ≤768 / ≤480 and would have lost out to
   source order if this rule were unscoped). */
@media (min-width: 769px) {
    .vp-header-center img,
    .vp-logo-img {
        display: block;
        height: 110px;
        width: auto;
        max-width: 420px;
        object-fit: contain;
    }
    .vp-header-top {
        min-height: 128px;
    }
}

/* Fallback text wordmark (renders only if Customizer custom_logo is unset). */
.vp-logo-text {
    font-family: 'Fraunces', 'Times New Roman', serif;
    font-size: 38px;
    font-weight: 600;
    letter-spacing: 3px;
    color: var(--vp-gold, #C9A055);
    white-space: nowrap;
}
