/* =============================================================
   VALHALLA PEPTIDES — Mobile Nav Polish (Phase: UI haul)
   Additive on top of header.css + mobile-nav.css.
   Targets ≤1024 (matches mobile-nav.css breakpoint).
   ============================================================= */

@media (max-width: 1024px) {

  /* ── Drawer container — soft inset shadow + gradient veil ─────── */
  .vp-mobile-drawer {
    background:
      linear-gradient(180deg, rgba(212,175,55,0.04) 0%, rgba(0,0,0,0) 24%),
      #0A0A0A !important;
    border-left: 1px solid rgba(212,175,55,0.22) !important;
    box-shadow: -24px 0 48px rgba(0,0,0,0.6);
  }

  /* ── Drawer head — Cormorant logo + breathing room ────────────── */
  .vp-mobile-drawer-head {
    padding: 22px 22px !important;
    background:
      linear-gradient(180deg, rgba(212,175,55,0.06) 0%, rgba(0,0,0,0.0) 100%) !important;
    border-bottom: 1px solid rgba(212,175,55,0.18) !important;
  }
  .vp-mobile-logo {
    font-size: 16px !important;
    letter-spacing: 0.22em !important;
    font-weight: 500 !important;
  }
  .vp-mobile-logo::after {
    content: "";
    display: block;
    width: 28px;
    height: 1px;
    background: linear-gradient(90deg, rgba(212,175,55,0.6), rgba(212,175,55,0));
    margin-top: 6px;
  }

  /* ── Nav wrapper ────────────────────────────────────────────── */
  .vp-mobile-nav {
    padding: 8px 14px 24px !important;
    display: flex;
    flex-direction: column;
    gap: 2px;
  }

  /* ── Top-level link: icon + label + (optional) chevron ───────── */
  .vp-mobile-nav-link {
    position: relative;
    display: grid !important;
    grid-template-columns: 36px 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 13px 14px !important;
    border: 0 !important;
    border-radius: 6px;
    color: #E9E1D2 !important;
    font-family: 'Inter', sans-serif !important;
    font-size: 15px !important;
    font-weight: 400 !important;
    letter-spacing: 0.01em;
    text-decoration: none;
    background: transparent;
    cursor: pointer;
    transition: background-color 240ms ease, color 240ms ease, transform 240ms ease;
  }

  /* gold accent rail (slides in on hover/active) */
  .vp-mobile-nav-link::before {
    content: "";
    position: absolute;
    left: 0;
    top: 12px;
    bottom: 12px;
    width: 2px;
    border-radius: 2px;
    background: #D4AF37;
    transform: scaleY(0);
    transform-origin: center;
    transition: transform 240ms ease;
  }

  .vp-mobile-nav-link:hover,
  .vp-mobile-nav-link:focus-visible {
    background: rgba(212,175,55,0.06);
    color: #F5EFD8 !important;
    outline: none;
  }
  .vp-mobile-nav-link:hover::before,
  .vp-mobile-nav-link:focus-visible::before,
  .vp-mobile-nav-link.is-active::before,
  .vp-mobile-nav-link[aria-expanded="true"]::before {
    transform: scaleY(1);
  }

  .vp-mobile-nav-link.is-active {
    background: rgba(212,175,55,0.10);
    color: #F5EFD8 !important;
  }

  /* Icon container */
  .vp-mobile-nav-icon {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(212,175,55,0.08);
    color: #D4AF37;
    flex-shrink: 0;
    transition: background-color 240ms ease, color 240ms ease, transform 240ms ease;
  }
  .vp-mobile-nav-icon svg { width: 18px; height: 18px; }

  .vp-mobile-nav-link:hover .vp-mobile-nav-icon,
  .vp-mobile-nav-link:focus-visible .vp-mobile-nav-icon,
  .vp-mobile-nav-link.is-active .vp-mobile-nav-icon {
    background: rgba(212,175,55,0.18);
    color: #E8C766;
    transform: scale(1.04);
  }

  /* Label */
  .vp-mobile-nav-label {
    font-family: 'Inter', sans-serif;
    line-height: 1.2;
  }

  /* Chevron stays as-is */
  .vp-mobile-chevron {
    width: 14px !important;
    height: 14px !important;
    color: #8A8076;
    transition: transform 320ms cubic-bezier(.22,.61,.36,1), color 240ms ease;
  }
  .vp-mobile-expandable[aria-expanded="true"] .vp-mobile-chevron {
    color: #D4AF37;
    transform: rotate(180deg);
  }

  /* ── Submenu (animated expand) ───────────────────────────────── */
  .vp-mobile-submenu {
    display: block !important;     /* override [hidden] */
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 360ms cubic-bezier(.22,.61,.36,1),
                opacity 220ms ease;
    padding: 0 !important;
  }
  .vp-mobile-submenu[hidden] {
    /* keep hidden for SR until JS toggles; class drives visual state */
    display: block !important;
  }
  .vp-mobile-submenu.is-open {
    max-height: 1400px;            /* large enough for 9 items */
    opacity: 1;
    margin-bottom: 4px;
  }

  .vp-mobile-submenu-inner {
    padding: 6px 0 10px 6px;
    margin-left: 22px;
    border-left: 1px dashed rgba(212,175,55,0.20);
  }

  .vp-mobile-submenu-link {
    display: grid;
    grid-template-columns: 32px 1fr;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 4px;
    color: #B6AB94 !important;
    text-decoration: none;
    transition: background-color 200ms ease, color 200ms ease, transform 200ms ease;
  }
  .vp-mobile-submenu-link:hover,
  .vp-mobile-submenu-link:focus-visible {
    background: rgba(212,175,55,0.06);
    color: #F5EFD8 !important;
    outline: none;
    transform: translateX(2px);
  }

  .vp-mobile-submenu-icon {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #D4AF37;
    flex-shrink: 0;
  }
  .vp-mobile-submenu-icon svg {
    width: 22px;
    height: 22px;
  }

  .vp-mobile-submenu-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
    line-height: 1.15;
  }
  .vp-mobile-submenu-eyebrow {
    font-family: 'Inter', sans-serif;
    font-size: 9px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: #7a6c54;
  }
  .vp-mobile-submenu-title {
    font-family: 'Inter', sans-serif;
    font-size: 13.5px;
    font-weight: 500;
    color: inherit;
  }

  .vp-mobile-submenu-all .vp-mobile-submenu-title {
    color: #D4AF37;
  }

  /* ── Drawer foot — email CTA + age line ──────────────────────── */
  .vp-mobile-drawer-foot {
    display: flex !important;
    flex-direction: column;
    gap: 10px;
    padding: 16px 22px calc(16px + env(safe-area-inset-bottom, 0px)) !important;
    background:
      linear-gradient(0deg, rgba(212,175,55,0.05) 0%, rgba(0,0,0,0) 100%) !important;
    border-top: 1px solid rgba(212,175,55,0.18) !important;
  }
  .vp-mobile-foot-contact {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    align-self: center;
    color: #D4AF37 !important;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    letter-spacing: 0.05em;
    text-decoration: none;
    padding: 6px 10px;
    border-radius: 4px;
    transition: color 220ms ease, background-color 220ms ease;
  }
  .vp-mobile-foot-contact:hover,
  .vp-mobile-foot-contact:focus-visible {
    color: #E8C766 !important;
    background: rgba(212,175,55,0.08);
    outline: none;
  }
  .vp-mobile-foot-contact svg {
    width: 14px;
    height: 14px;
  }

  /* ── Stagger entry animation when drawer opens ───────────────── */
  .vp-mobile-drawer .vp-mobile-nav-link,
  .vp-mobile-drawer .vp-mobile-foot-contact {
    opacity: 0;
    transform: translateY(6px);
  }
  .vp-mobile-drawer.vp-mobile-drawer-open .vp-mobile-nav-link,
  .vp-mobile-drawer.vp-mobile-drawer-open .vp-mobile-foot-contact {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 360ms ease, transform 360ms cubic-bezier(.22,.61,.36,1);
  }
  /* Stagger delays (cap at 8 items) */
  .vp-mobile-drawer.vp-mobile-drawer-open .vp-mobile-nav > *:nth-child(1) { transition-delay:  60ms; }
  .vp-mobile-drawer.vp-mobile-drawer-open .vp-mobile-nav > *:nth-child(2) { transition-delay: 100ms; }
  .vp-mobile-drawer.vp-mobile-drawer-open .vp-mobile-nav > *:nth-child(3) { transition-delay: 140ms; }
  .vp-mobile-drawer.vp-mobile-drawer-open .vp-mobile-nav > *:nth-child(4) { transition-delay: 180ms; }
  .vp-mobile-drawer.vp-mobile-drawer-open .vp-mobile-nav > *:nth-child(5) { transition-delay: 220ms; }
  .vp-mobile-drawer.vp-mobile-drawer-open .vp-mobile-nav > *:nth-child(6) { transition-delay: 260ms; }
  .vp-mobile-drawer.vp-mobile-drawer-open .vp-mobile-nav > *:nth-child(7) { transition-delay: 300ms; }
  .vp-mobile-drawer.vp-mobile-drawer-open .vp-mobile-foot-contact         { transition-delay: 340ms; }

  /* Respect prefers-reduced-motion */
  @media (prefers-reduced-motion: reduce) {
    .vp-mobile-drawer .vp-mobile-nav-link,
    .vp-mobile-drawer .vp-mobile-foot-contact { opacity: 1; transform: none; }
    .vp-mobile-submenu { transition: none; }
    .vp-mobile-chevron { transition: none; }
  }
}
