/* Universal Store Clean Child 5.3.0 - Mobile Stability Hardening
   Scope: mobile header + bottom navigation only. Stable layer after 5.2.0. */
:root{
  --usc53-bottom-nav-height:72px;
  --usc53-bottom-gap:10px;
  --usc53-header-radius:0 0 24px 24px;
  --usc53-ease:cubic-bezier(.2,.8,.2,1);
}

@media (max-width:940px){
  html{overflow-x:hidden!important;}
  body.usg-theme{
    overflow-x:hidden!important;
    padding-bottom:calc(var(--usc53-bottom-nav-height) + 24px + env(safe-area-inset-bottom,0px))!important;
    --usc-mobile-side:10px;
  }

  /* Keep the desktop GeneratePress header out of the mobile stacking context. */
  body.usg-theme .site-header,
  body.usg-theme .main-navigation:not(.toggled){
    display:none!important;
  }

  /* Top mobile header: compact app-bar, predictable height, safe z-index. */
  body.usg-theme .usg-mobile-header{
    display:block!important;
    position:sticky!important;
    top:0!important;
    right:0!important;
    left:0!important;
    z-index:100050!important;
    width:100%!important;
    max-width:100%!important;
    background:rgba(255,255,255,.96)!important;
    border-bottom:1px solid rgba(15,23,42,.075)!important;
    border-radius:var(--usc53-header-radius)!important;
    box-shadow:0 10px 30px rgba(15,23,42,.075)!important;
    backdrop-filter:saturate(150%) blur(16px)!important;
    -webkit-backdrop-filter:saturate(150%) blur(16px)!important;
    transform:translate3d(0,0,0)!important;
    opacity:1!important;
    visibility:visible!important;
    contain:layout paint!important;
  }
  body.usg-theme .usg-mobile-header.is-hidden{
    transform:translate3d(0,0,0)!important;
    opacity:1!important;
    visibility:visible!important;
  }
  html[data-usg-theme="dark"] body.usg-theme .usg-mobile-header{
    background:rgba(15,23,42,.94)!important;
    border-bottom-color:rgba(255,255,255,.09)!important;
    box-shadow:0 10px 30px rgba(0,0,0,.28)!important;
  }

  body.usg-theme .usg-mobile-header__notice{
    height:24px!important;
    min-height:24px!important;
    max-height:24px!important;
    padding:0 14px!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    font-size:10.5px!important;
    line-height:1!important;
    font-weight:850!important;
    color:color-mix(in srgb,var(--usg-primary) 78%,#0f172a)!important;
    background:linear-gradient(90deg,color-mix(in srgb,var(--usg-primary) 7%,#fff),color-mix(in srgb,var(--usg-accent) 6%,#fff))!important;
    overflow:hidden!important;
    white-space:nowrap!important;
    text-overflow:ellipsis!important;
  }
  html[data-usg-theme="dark"] body.usg-theme .usg-mobile-header__notice{
    color:#dbeafe!important;
    background:linear-gradient(90deg,rgba(37,99,235,.18),rgba(6,182,212,.12))!important;
  }

  body.usg-theme .usg-mobile-header__bar{
    height:58px!important;
    min-height:58px!important;
    display:grid!important;
    grid-template-columns:44px minmax(0,1fr) max-content!important;
    align-items:center!important;
    gap:8px!important;
    padding:7px var(--usc-mobile-side)!important;
    width:100%!important;
    max-width:100%!important;
  }
  body.usg-theme .usg-mobile-brand{
    min-width:0!important;
    max-width:100%!important;
    display:flex!important;
    align-items:center!important;
    gap:8px!important;
    padding:3px 0!important;
    overflow:hidden!important;
    color:var(--usg-text)!important;
    text-decoration:none!important;
  }
  body.usg-theme .usg-mobile-brand__logo{
    width:auto!important;
    height:auto!important;
    max-width:70px!important;
    max-height:38px!important;
    object-fit:contain!important;
    display:block!important;
    flex:0 0 auto!important;
  }
  body.usg-theme .usg-mobile-brand__mark{
    width:38px!important;
    height:38px!important;
    min-width:38px!important;
    border-radius:15px!important;
    display:grid!important;
    place-items:center!important;
    font-size:17px!important;
    font-weight:950!important;
    color:#fff!important;
    background:linear-gradient(135deg,var(--usg-primary),var(--usg-accent))!important;
    box-shadow:0 10px 24px color-mix(in srgb,var(--usg-primary) 20%,transparent)!important;
  }
  body.usg-theme .usg-mobile-brand__text{
    min-width:0!important;
    display:flex!important;
    flex-direction:column!important;
    justify-content:center!important;
    gap:2px!important;
    line-height:1.15!important;
  }
  body.usg-theme .usg-mobile-brand__text strong{
    min-width:0!important;
    max-width:100%!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
    white-space:nowrap!important;
    font-size:12.5px!important;
    font-weight:950!important;
    letter-spacing:-.02em!important;
    color:var(--usg-text)!important;
  }
  body.usg-theme .usg-mobile-brand__text small{
    min-width:0!important;
    max-width:100%!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
    white-space:nowrap!important;
    font-size:9.5px!important;
    font-weight:760!important;
    color:var(--usg-muted)!important;
  }

  body.usg-theme .usg-mobile-header__actions{
    display:flex!important;
    align-items:center!important;
    gap:5px!important;
    flex:0 0 auto!important;
  }
  body.usg-theme .usg-icon-btn,
  body.usg-theme .usg-mobile-header__bar .usg-icon-btn{
    position:relative!important;
    width:42px!important;
    height:42px!important;
    min-width:42px!important;
    min-height:42px!important;
    border-radius:16px!important;
    display:grid!important;
    place-items:center!important;
    padding:0!important;
    margin:0!important;
    color:var(--usg-text)!important;
    background:rgba(248,250,252,.92)!important;
    border:1px solid rgba(15,23,42,.09)!important;
    box-shadow:none!important;
    transition:transform .14s var(--usc53-ease),background .14s ease,color .14s ease,border-color .14s ease!important;
    touch-action:manipulation!important;
    -webkit-tap-highlight-color:transparent!important;
  }
  html[data-usg-theme="dark"] body.usg-theme .usg-icon-btn,
  html[data-usg-theme="dark"] body.usg-theme .usg-mobile-header__bar .usg-icon-btn{
    background:rgba(255,255,255,.06)!important;
    border-color:rgba(255,255,255,.09)!important;
  }
  body.usg-theme .usg-icon-btn svg{width:20px!important;height:20px!important;display:block!important;}
  body.usg-theme .usg-icon-btn:active,
  body.usg-theme .usg-icon-btn.is-pressed{
    transform:scale(.94)!important;
    color:var(--usg-primary)!important;
    background:color-mix(in srgb,var(--usg-primary) 10%,#fff)!important;
    border-color:color-mix(in srgb,var(--usg-primary) 18%,transparent)!important;
  }

  /* Bottom nav: stable dock, readable labels, no form-focus hiding, no layout jump. */
  body.usg-theme .usg-bottom-nav{
    display:grid!important;
    grid-template-columns:repeat(5,minmax(0,1fr))!important;
    position:fixed!important;
    right:12px!important;
    left:12px!important;
    bottom:calc(var(--usc53-bottom-gap) + env(safe-area-inset-bottom,0px))!important;
    width:auto!important;
    max-width:520px!important;
    height:var(--usc53-bottom-nav-height)!important;
    margin-inline:auto!important;
    padding:7px!important;
    gap:4px!important;
    border-radius:26px!important;
    z-index:100040!important;
    background:rgba(255,255,255,.96)!important;
    border:1px solid rgba(15,23,42,.10)!important;
    box-shadow:0 18px 48px rgba(15,23,42,.18)!important;
    backdrop-filter:saturate(160%) blur(18px)!important;
    -webkit-backdrop-filter:saturate(160%) blur(18px)!important;
    transform:translate3d(0,0,0)!important;
    opacity:1!important;
    visibility:visible!important;
    overflow:visible!important;
    pointer-events:auto!important;
    contain:layout paint!important;
  }
  html[data-usg-theme="dark"] body.usg-theme .usg-bottom-nav{
    background:rgba(15,23,42,.94)!important;
    border-color:rgba(255,255,255,.10)!important;
    box-shadow:0 18px 48px rgba(0,0,0,.35)!important;
  }
  body.usg-theme.usg-form-focus .usg-bottom-nav,
  body.usg-theme .usg-bottom-nav.is-hidden{
    display:grid!important;
    opacity:1!important;
    visibility:visible!important;
    transform:translate3d(0,0,0)!important;
    pointer-events:auto!important;
  }
  body.usg-theme .usg-bottom-nav__item{
    position:relative!important;
    min-width:0!important;
    width:100%!important;
    min-height:56px!important;
    height:56px!important;
    display:grid!important;
    grid-template-rows:24px 1fr!important;
    align-items:center!important;
    justify-items:center!important;
    gap:2px!important;
    padding:6px 2px 5px!important;
    margin:0!important;
    border:0!important;
    border-radius:19px!important;
    background:transparent!important;
    color:var(--usg-muted)!important;
    font-size:10.5px!important;
    line-height:1.08!important;
    font-weight:850!important;
    text-decoration:none!important;
    box-shadow:none!important;
    outline:0!important;
    overflow:visible!important;
    transition:transform .14s var(--usc53-ease),background .14s ease,color .14s ease!important;
    touch-action:manipulation!important;
    -webkit-tap-highlight-color:transparent!important;
  }
  body.usg-theme .usg-bottom-nav__item svg{
    width:21px!important;
    height:21px!important;
    display:block!important;
    fill:currentColor!important;
    stroke:currentColor!important;
  }
  body.usg-theme .usg-bottom-nav__item span{
    display:block!important;
    width:100%!important;
    max-width:100%!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
    white-space:nowrap!important;
    text-align:center!important;
  }
  body.usg-theme .usg-bottom-nav__item.is-active:not(.usg-bottom-nav__item--search){
    color:var(--usg-primary)!important;
    background:linear-gradient(135deg,color-mix(in srgb,var(--usg-primary) 12%,#fff),color-mix(in srgb,var(--usg-accent) 7%,#fff))!important;
  }
  body.usg-theme .usg-bottom-nav__item.is-active:not(.usg-bottom-nav__item--search)::before{
    content:""!important;
    position:absolute!important;
    top:4px!important;
    width:18px!important;
    height:3px!important;
    border-radius:999px!important;
    background:linear-gradient(90deg,var(--usg-primary),var(--usg-accent))!important;
  }
  body.usg-theme .usg-bottom-nav__item:active,
  body.usg-theme .usg-bottom-nav__item.is-pressed{
    transform:scale(.94)!important;
  }
  body.usg-theme .usg-bottom-nav__item b{
    position:absolute!important;
    top:0!important;
    left:9px!important;
    min-width:18px!important;
    height:18px!important;
    padding-inline:4px!important;
    display:grid!important;
    place-items:center!important;
    border-radius:999px!important;
    background:#ef4444!important;
    color:#fff!important;
    border:2px solid #fff!important;
    font-size:9.5px!important;
    line-height:1!important;
    font-weight:950!important;
  }

  /* Center search button must stay neutral and circular. */
  body.usg-theme .usg-bottom-nav__item--search{
    width:50px!important;
    height:50px!important;
    min-width:50px!important;
    min-height:50px!important;
    align-self:center!important;
    justify-self:center!important;
    display:grid!important;
    grid-template-rows:1fr!important;
    place-items:center!important;
    padding:0!important;
    border-radius:999px!important;
    color:color-mix(in srgb,var(--usg-primary) 58%,var(--usg-muted))!important;
    background:color-mix(in srgb,var(--usg-primary) 6%,#fff)!important;
    border:1px solid color-mix(in srgb,var(--usg-primary) 11%,transparent)!important;
    box-shadow:none!important;
  }
  body.usg-theme .usg-bottom-nav__item--search span,
  body.usg-theme .usg-bottom-nav__item--search::before{display:none!important;content:none!important;}
  body.usg-theme .usg-bottom-nav__item--search svg{width:23px!important;height:23px!important;}
  body.usg-theme .usg-bottom-nav__item--search.is-active,
  body.usg-theme .usg-bottom-nav__item--search:hover,
  body.usg-theme .usg-bottom-nav__item--search:focus-visible{
    color:color-mix(in srgb,var(--usg-primary) 62%,var(--usg-muted))!important;
    background:color-mix(in srgb,var(--usg-primary) 7%,#fff)!important;
    transform:none!important;
  }

  body.usg-theme .usg-mobile-buy-bar{
    bottom:calc(var(--usc53-bottom-nav-height) + 22px + env(safe-area-inset-bottom,0px))!important;
    z-index:100030!important;
  }
}

@media (max-width:390px){
  body.usg-theme{--usc-mobile-side:8px;}
  body.usg-theme .usg-mobile-header__bar{grid-template-columns:40px minmax(0,1fr) max-content!important;gap:6px!important;}
  body.usg-theme .usg-mobile-brand__logo{max-width:60px!important;max-height:35px!important;}
  body.usg-theme .usg-mobile-brand__text small{display:none!important;}
  body.usg-theme .usg-icon-btn{width:39px!important;height:39px!important;min-width:39px!important;min-height:39px!important;border-radius:15px!important;}
  body.usg-theme .usg-bottom-nav{right:8px!important;left:8px!important;height:66px!important;border-radius:24px!important;padding:6px!important;gap:2px!important;}
  body.usg-theme .usg-bottom-nav__item{height:54px!important;min-height:54px!important;font-size:9.8px!important;border-radius:18px!important;}
  body.usg-theme .usg-bottom-nav__item--search{width:48px!important;height:48px!important;min-width:48px!important;min-height:48px!important;}
}

@media (min-width:941px){
  body.usg-theme .usg-mobile-header,
  body.usg-theme .usg-bottom-nav{display:none!important;}
}

@media (prefers-reduced-motion:reduce){
  body.usg-theme .usg-mobile-header,
  body.usg-theme .usg-mobile-header *,
  body.usg-theme .usg-bottom-nav,
  body.usg-theme .usg-bottom-nav *{transition:none!important;animation:none!important;}
}
