/* =========================================================
   V70 — Header / Navigation / Promo responsive repair
   Fixes wrapping desktop nav, crowded tablet header,
   low-contrast mobile menu items, and inconsistent promo bar.
   Loaded last so these rules are authoritative.
   ========================================================= */

body.theme-v38 .site-header,
body.theme-v38 .desktop-nav,
body.theme-v38 .nav-actions{min-width:0}
body.theme-v38 .site-header{flex-wrap:nowrap!important}
body.theme-v38 .desktop-nav{flex-wrap:nowrap!important;white-space:nowrap}
body.theme-v38 .desktop-nav a,
body.theme-v38 .nav-actions>a,
body.theme-v38 .menu-toggle{white-space:nowrap}

/* Wide desktop: one deliberate row, never a wrapped two-line nav. */
@media(min-width:1361px){
  body.theme-v38 .site-header{
    top:10px!important;
    left:clamp(12px,2vw,30px)!important;
    right:clamp(12px,2vw,30px)!important;
    width:auto!important;
    height:72px!important;
    padding:0 18px!important;
    gap:14px!important;
    border-radius:28px!important;
  }
  body.theme-v38 .site-header .brand-v32{
    flex:0 0 156px!important;
    width:156px!important;
    min-width:156px!important;
    height:60px!important;
  }
  body.theme-v38 .site-logo-v32{
    width:150px!important;
    max-width:150px!important;
    height:58px!important;
    object-fit:contain!important;
  }
  body.theme-v38 .desktop-nav{
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    flex:1 1 auto!important;
    gap:clamp(10px,.9vw,16px)!important;
    margin-left:0!important;
    overflow:visible!important;
  }
  body.theme-v38 .desktop-nav a{
    flex:0 0 auto!important;
    padding:9px 0!important;
    font-size:clamp(10.5px,.82vw,12px)!important;
    letter-spacing:0!important;
    line-height:1!important;
  }
  body.theme-v38 .nav-actions{
    flex:0 0 auto!important;
    margin-left:0!important;
    gap:9px!important;
  }
  body.theme-v38 .search-link,
  body.theme-v38 .mobile-cart-link{display:inline-flex!important;align-items:center!important}
  body.theme-v38 .nav-actions>.btn{
    display:inline-flex!important;
    min-height:48px!important;
    padding:0 20px!important;
    white-space:nowrap!important;
  }
  body.theme-v38 .menu-toggle{display:none!important}
  body.theme-v38 .mobile-menu{display:none!important}
  body.theme-v38 .promo-bar{
    top:92px!important;
    height:40px!important;
  }
  body.theme-v38 .promo-track{height:40px!important;align-items:stretch!important}
  body.theme-v38 .promo-track>a{min-height:40px!important}
}

/* Tablet / small laptop: intentionally switch to menu before nav can wrap. */
@media(min-width:761px) and (max-width:1360px){
  body.theme-v38{
    --v70-header-top:8px;
    --v70-header-h:72px;
  }
  body.theme-v38 .site-header{
    top:var(--v70-header-top)!important;
    left:10px!important;
    right:10px!important;
    width:auto!important;
    height:var(--v70-header-h)!important;
    min-height:var(--v70-header-h)!important;
    padding:0 14px 0 16px!important;
    gap:12px!important;
    border-radius:26px!important;
    background:rgba(11,20,18,.97)!important;
    box-shadow:0 12px 36px rgba(0,0,0,.22)!important;
  }
  body.theme-v38 .site-header.nav-hide{transform:none!important}
  body.theme-v38 .site-header .brand-v32{
    flex:0 0 132px!important;
    width:132px!important;
    min-width:132px!important;
    height:58px!important;
  }
  body.theme-v38 .site-logo-v32{
    width:126px!important;
    max-width:126px!important;
    height:56px!important;
    object-fit:contain!important;
  }
  body.theme-v38 .desktop-nav{display:none!important}
  body.theme-v38 .nav-actions{
    display:flex!important;
    align-items:center!important;
    justify-content:flex-end!important;
    margin-left:auto!important;
    gap:8px!important;
  }
  body.theme-v38 .search-link{display:none!important}
  body.theme-v38 .mobile-cart-link{
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    gap:4px!important;
    min-height:44px!important;
    padding:0 8px!important;
    color:#fff!important;
    font-size:12px!important;
    font-weight:900!important;
  }
  body.theme-v38 .mobile-cart-link span{
    width:22px!important;
    height:22px!important;
    margin-left:2px!important;
    background:#fff!important;
    color:#071016!important;
  }
  body.theme-v38 .nav-actions>.btn{
    display:inline-flex!important;
    min-height:48px!important;
    padding:0 20px!important;
    background:#ffb548!important;
    color:#071016!important;
    font-size:13px!important;
    white-space:nowrap!important;
  }
  body.theme-v38 .menu-toggle{
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    gap:7px!important;
    min-width:92px!important;
    min-height:46px!important;
    margin-left:0!important;
    padding:0 14px!important;
    color:#f7fbff!important;
    background:#182229!important;
    border:1px solid rgba(255,255,255,.22)!important;
    border-radius:999px!important;
    font-size:13px!important;
    font-weight:900!important;
    box-shadow:inset 0 0 0 1px rgba(0,0,0,.2)!important;
  }
  body.theme-v38 .menu-toggle:hover,
  body.theme-v38 .menu-toggle:focus-visible{background:#22313a!important;border-color:rgba(255,255,255,.42)!important}

  body.theme-v38 .mobile-menu{
    display:grid!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:10px!important;
    top:90px!important;
    left:10px!important;
    right:10px!important;
    bottom:auto!important;
    width:auto!important;
    max-height:calc(100dvh - 104px)!important;
    padding:12px!important;
    border-radius:24px!important;
    background:rgba(5,17,24,.995)!important;
    border:1px solid rgba(255,255,255,.12)!important;
    box-shadow:0 28px 70px rgba(0,0,0,.42)!important;
    overflow-y:auto!important;
    overscroll-behavior:contain!important;
    opacity:0!important;
    visibility:hidden!important;
    pointer-events:none!important;
    transform:translateY(-8px) scale(.99)!important;
    transition:opacity .18s ease,transform .18s ease,visibility .18s ease!important;
  }
  body.theme-v38 .mobile-menu.open{
    opacity:1!important;
    visibility:visible!important;
    pointer-events:auto!important;
    transform:none!important;
  }
  body.theme-v38 .mobile-menu-top{
    grid-column:1/-1!important;
    display:grid!important;
    grid-template-columns:minmax(0,1.4fr) minmax(260px,.6fr)!important;
    gap:10px!important;
    padding:0 0 10px!important;
    border-bottom:1px solid rgba(255,255,255,.1)!important;
  }
  body.theme-v38 .mobile-menu-project{
    display:grid!important;
    align-content:center!important;
    gap:2px!important;
    min-height:64px!important;
    padding:12px 16px!important;
    border:0!important;
    border-radius:17px!important;
    background:linear-gradient(135deg,#20c9dc,#37d8e5)!important;
    color:#071016!important;
    box-shadow:none!important;
  }
  body.theme-v38 .mobile-menu-project strong{font-size:18px!important;line-height:1.05!important;color:#071016!important}
  body.theme-v38 .mobile-menu-project span{font-size:12px!important;line-height:1.2!important;font-weight:800!important;color:#071016!important;opacity:.82!important}
  body.theme-v38 .mobile-menu-tools{display:grid!important;grid-template-columns:1fr 1fr!important;gap:8px!important}
  body.theme-v38 .mobile-menu-tools a,
  body.theme-v38 .mobile-menu-grid a{
    display:flex!important;
    align-items:center!important;
    min-height:44px!important;
    padding:10px 12px!important;
    border:1px solid rgba(255,255,255,.08)!important;
    border-radius:13px!important;
    background:#14242d!important;
    color:#f7fbff!important;
    font-size:13px!important;
    line-height:1.15!important;
    font-weight:850!important;
    text-shadow:none!important;
  }
  body.theme-v38 .mobile-menu-tools a{justify-content:space-between!important}
  body.theme-v38 .mobile-menu-tools a:hover,
  body.theme-v38 .mobile-menu-tools a:focus-visible,
  body.theme-v38 .mobile-menu-grid a:hover,
  body.theme-v38 .mobile-menu-grid a:focus-visible{
    background:#1d3440!important;
    color:#fff!important;
    border-color:rgba(32,201,220,.38)!important;
  }
  body.theme-v38 .mobile-menu-tools b{
    display:grid!important;
    place-items:center!important;
    min-width:22px!important;
    height:22px!important;
    padding:0 6px!important;
    border-radius:999px!important;
    background:#fff!important;
    color:#071016!important;
    font-size:11px!important;
  }
  body.theme-v38 .mobile-menu-section{padding:10px 2px 4px!important}
  body.theme-v38 .mobile-menu-label{
    display:block!important;
    margin:0 8px 8px!important;
    color:#26d9ed!important;
    font-size:10px!important;
    font-weight:950!important;
    letter-spacing:.14em!important;
    text-transform:uppercase!important;
  }
  body.theme-v38 .mobile-menu-grid{display:grid!important;grid-template-columns:1fr!important;gap:5px!important}
  body.theme-v38 .mobile-menu-grid a[aria-current="page"]{
    background:#173541!important;
    border-color:rgba(38,217,237,.46)!important;
    color:#fff!important;
  }

  body.theme-v38.mobile-nav-open::before{
    content:""!important;
    position:fixed!important;
    inset:0!important;
    z-index:80!important;
    background:rgba(0,0,0,.48)!important;
    backdrop-filter:blur(3px)!important;
    -webkit-backdrop-filter:blur(3px)!important;
  }
  body.theme-v38.mobile-nav-open{overflow:hidden!important}
  body.theme-v38.mobile-nav-open .site-header,
  body.theme-v38.mobile-nav-open .mobile-menu{z-index:120!important}

  /* One concise promo at this width, no cramped multi-column strip. */
  body.theme-v38 .promo-bar{
    top:90px!important;
    height:44px!important;
    z-index:70!important;
    overflow:hidden!important;
  }
  body.theme-v38 .promo-track{
    display:flex!important;
    width:100%!important;
    height:44px!important;
    overflow:hidden!important;
  }
  body.theme-v38 .promo-track>a{display:none!important}
  body.theme-v38 .promo-track>a:first-child{
    display:flex!important;
    flex:1 0 100%!important;
    align-items:center!important;
    justify-content:flex-start!important;
    gap:14px!important;
    min-height:44px!important;
    padding:0 20px!important;
    border:0!important;
    white-space:nowrap!important;
    overflow:hidden!important;
  }
  body.theme-v38 .promo-track>a:first-child b{
    flex:0 0 auto!important;
    font-size:11px!important;
    line-height:1!important;
    letter-spacing:.08em!important;
  }
  body.theme-v38 .promo-track>a:first-child span{
    min-width:0!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
    white-space:nowrap!important;
    font-size:11px!important;
    line-height:1!important;
  }
}

/* Phone: clean logo / cart / menu row and high-contrast menu cards. */
@media(max-width:760px){
  body.theme-v38 .site-header.nav-hide{transform:none!important}
  body.theme-v38 .site-header{
    top:max(8px,env(safe-area-inset-top))!important;
    left:8px!important;
    right:8px!important;
    width:auto!important;
    height:64px!important;
    min-height:64px!important;
    padding:0 9px 0 11px!important;
    gap:6px!important;
    border-radius:20px!important;
  }
  body.theme-v38 .site-header .brand-v32{
    flex:0 0 100px!important;
    width:100px!important;
    min-width:100px!important;
    height:50px!important;
  }
  body.theme-v38 .site-logo-v32{width:96px!important;max-width:96px!important;height:48px!important;object-fit:contain!important}
  body.theme-v38 .desktop-nav,
  body.theme-v38 .search-link,
  body.theme-v38 .nav-actions>.btn{display:none!important}
  body.theme-v38 .nav-actions{margin-left:auto!important;gap:5px!important}
  body.theme-v38 .mobile-cart-link{
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    gap:3px!important;
    min-height:42px!important;
    padding:0 5px!important;
    color:#fff!important;
    font-size:11.5px!important;
    font-weight:900!important;
  }
  body.theme-v38 .menu-toggle{
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    gap:6px!important;
    min-width:78px!important;
    min-height:44px!important;
    padding:0 10px!important;
    color:#f7fbff!important;
    background:#182229!important;
    border:1px solid rgba(255,255,255,.22)!important;
    border-radius:999px!important;
    font-size:12px!important;
    font-weight:900!important;
  }
  body.theme-v38 .mobile-menu{
    top:calc(max(8px,env(safe-area-inset-top)) + 72px)!important;
    left:8px!important;
    right:8px!important;
    bottom:calc(var(--mobile-dock-h) + env(safe-area-inset-bottom) + 8px)!important;
    max-height:none!important;
    padding:11px!important;
    border-radius:22px!important;
    background:rgba(5,17,24,.995)!important;
  }
  body.theme-v38 .mobile-menu-project{
    background:linear-gradient(135deg,#20c9dc,#37d8e5)!important;
    color:#071016!important;
  }
  body.theme-v38 .mobile-menu-project strong,
  body.theme-v38 .mobile-menu-project span{color:#071016!important}
  body.theme-v38 .mobile-menu-tools a,
  body.theme-v38 .mobile-menu-grid a{
    background:#14242d!important;
    color:#f7fbff!important;
    border:1px solid rgba(255,255,255,.07)!important;
    text-shadow:none!important;
  }
  body.theme-v38 .mobile-menu-tools a:hover,
  body.theme-v38 .mobile-menu-tools a:focus-visible,
  body.theme-v38 .mobile-menu-grid a:hover,
  body.theme-v38 .mobile-menu-grid a:focus-visible{
    background:#1d3440!important;
    color:#fff!important;
  }
  body.theme-v38 .mobile-menu-label{color:#26d9ed!important}
  body.theme-v38.mobile-nav-open{overflow:hidden!important}

  body.theme-v38 .promo-bar{
    top:calc(max(8px,env(safe-area-inset-top)) + 72px)!important;
    height:44px!important;
  }
  body.theme-v38 .promo-track>a:first-child{
    justify-content:center!important;
    min-height:44px!important;
    padding:0 10px!important;
  }
  body.theme-v38 .promo-track>a:first-child b{
    font-size:10px!important;
    line-height:1.05!important;
    text-align:center!important;
  }
  body.theme-v38 .promo-track>a:first-child span{display:none!important}
}

@media(max-width:390px){
  body.theme-v38 .site-header .brand-v32{flex-basis:84px!important;width:84px!important;min-width:84px!important}
  body.theme-v38 .site-logo-v32{width:82px!important;max-width:82px!important}
  body.theme-v38 .mobile-cart-link{font-size:10.5px!important;padding:0 3px!important}
  body.theme-v38 .menu-toggle{min-width:72px!important;padding:0 8px!important}
  body.theme-v38 .mobile-menu-grid{grid-template-columns:1fr!important}
}

@media(prefers-reduced-motion:reduce){
  body.theme-v38 .mobile-menu,
  body.theme-v38 .menu-toggle-icon i{transition:none!important}
}
