/* AniTala RC37 — adaptive three-mode storefront header + compact live ribbon. */
.storefront-v13 .sf-header-inner{min-width:0}
.storefront-v13 .sf-brand,.storefront-v13 .sf-header-actions,.storefront-v13 .sf-nav{min-width:0}
.storefront-v13 .sf-brand span{min-width:0}
.storefront-v13 .sf-brand b,.storefront-v13 .sf-brand small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.storefront-v13 .sf-header-search{min-width:0;width:clamp(210px,22vw,330px)}
.storefront-v13 .sf-header-search input{min-width:0;width:100%}
.storefront-v13 .sf-nav{flex-wrap:nowrap;overflow:hidden}
.storefront-v13 .sf-nav a{white-space:nowrap;flex:0 0 auto}
.storefront-v13 .sf-price-ribbon-item{min-width:0;overflow:hidden}
.storefront-v13 .sf-price-ribbon-copy,.storefront-v13 .sf-price-ribbon-item>strong{min-width:0;overflow:hidden}
.storefront-v13 .sf-price-ribbon-copy b,.storefront-v13 .sf-price-ribbon-copy small,.storefront-v13 .sf-price-ribbon-item>strong{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* Wide desktop: one row with enough real width for brand, navigation and tools.
   The previous 1540px cap plus centered, non-shrinking nav could clip the RTL
   leading item (Home) and visually push navigation under the brand. */
@media (min-width:1600px){
  .storefront-v13 .sf-desktop-header{display:grid!important;max-width:1880px!important;grid-template-columns:minmax(170px,205px) minmax(0,1fr) minmax(500px,auto)!important;gap:clamp(10px,1vw,18px)!important;padding-inline:clamp(18px,1.8vw,30px)!important}
  .storefront-v13 .sf-mobile-header{display:none!important}
  .storefront-v13 .sf-brand{max-width:205px!important;overflow:hidden!important}
  .storefront-v13 .sf-nav{gap:2px!important;justify-content:center!important;overflow:visible!important}
  .storefront-v13 .sf-nav a{padding:9px clamp(7px,.55vw,10px)!important;font-size:clamp(11px,.76vw,13px)!important}
  .storefront-v13 .sf-header-actions{min-width:0!important;gap:6px!important;justify-content:flex-end!important}
  .storefront-v13 .sf-header-search{width:clamp(220px,17vw,300px)!important;flex:0 1 300px!important}
  .storefront-v13 .sf-live-link,.storefront-v13 .sf-cart-link,.storefront-v13 .sf-account-link,.storefront-v13 .sf-login-link{padding-inline:9px!important;font-size:11.5px!important}
  .storefront-v13 .sf-brand b{font-size:15px!important}.storefront-v13 .sf-brand small{font-size:9px!important}
}

/* Medium desktop: keep the full navigation visible on a dedicated second row.
   This is intentionally a real two-row desktop header, not a squeezed single row. */
@media (min-width:1321px) and (max-width:1599px){
  :root{--sf-header:112px}
  .storefront-v13 .sf-header{height:112px!important;min-height:112px!important;max-height:112px!important;overflow:visible!important}
  .storefront-v13 .sf-desktop-header{display:grid!important;width:100%!important;max-width:1700px!important;height:112px!important;grid-template-columns:minmax(170px,1fr) auto!important;grid-template-rows:60px 52px!important;grid-template-areas:"brand actions" "nav nav"!important;align-items:center!important;gap:0 14px!important;padding:0 clamp(18px,2.2vw,32px)!important}
  .storefront-v13 .sf-mobile-header{display:none!important}
  .storefront-v13 .sf-brand{grid-area:brand!important;max-width:300px!important;overflow:hidden!important}
  .storefront-v13 .sf-header-actions{grid-area:actions!important;min-width:0!important;gap:6px!important;justify-content:flex-end!important}
  .storefront-v13 .sf-header-search{width:clamp(240px,28vw,390px)!important;min-width:200px!important;flex:0 1 390px!important;height:44px!important}
  .storefront-v13 .sf-nav{grid-area:nav!important;width:100%!important;min-width:0!important;justify-content:center!important;gap:4px!important;overflow:visible!important;border-top:1px solid rgba(255,255,255,.055)!important}
  .storefront-v13 .sf-nav a{padding:8px clamp(8px,.9vw,13px)!important;font-size:12px!important}
  .storefront-v13 .sf-live-link,.storefront-v13 .sf-cart-link,.storefront-v13 .sf-account-link,.storefront-v13 .sf-login-link{min-height:40px!important;padding-inline:9px!important;font-size:11px!important}
  .storefront-v13.sf-home-layout{--sf-home-header-height:112px!important}
  .storefront-v13.sf-home-layout .sf-price-ribbon{top:112px!important}
}

/* Compact/tablet/small-laptop: use the dedicated two-row header, never squeeze desktop nav. */
@media (min-width:761px) and (max-width:1320px){
  :root{--sf-header:116px;--sf-mobile-header-height:116px}
  .storefront-v13 .sf-header{height:116px!important;min-height:116px!important;max-height:116px!important;overflow:visible!important}
  .storefront-v13 .sf-desktop-header{display:none!important}
  .storefront-v13 .sf-mobile-header{display:block!important;position:relative!important;width:100%!important;height:116px!important;min-height:116px!important;padding:0!important}
  .storefront-v13 .sf-mobile-header-row{height:62px!important;display:flex!important;align-items:center!important;justify-content:space-between!important;gap:12px!important;padding:8px clamp(14px,2.2vw,28px) 5px!important}
  .storefront-v13 .sf-mobile-brand{display:flex!important;align-items:center!important;gap:10px!important;min-width:0!important;max-width:min(360px,42vw)!important;color:#fff!important}
  .storefront-v13 .sf-mobile-brand-logo{width:44px!important;height:44px!important;min-width:44px!important;display:grid!important;place-items:center!important;overflow:hidden!important;border-radius:13px!important}
  .storefront-v13 .sf-mobile-brand-logo img{display:block!important;width:100%!important;height:100%!important;object-fit:contain!important;padding:3px!important}
  .storefront-v13 .sf-mobile-brand-copy{display:grid!important;min-width:0!important;line-height:1.35!important}
  .storefront-v13 .sf-mobile-brand-copy b,.storefront-v13 .sf-mobile-brand-copy small{white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
  .storefront-v13 .sf-mobile-brand-copy b{font-size:14px!important}.storefront-v13 .sf-mobile-brand-copy small{font-size:9px!important;color:#bdb3a4!important}
  .storefront-v13 .sf-mobile-header-actions{display:flex!important;align-items:center!important;gap:6px!important;flex:none!important}
  .storefront-v13 .sf-mobile-icon-link,.storefront-v13 .sf-mobile-menu-toggle{display:grid!important;place-items:center!important;width:40px!important;height:40px!important;min-width:40px!important;border-radius:12px!important;border:1px solid rgba(255,255,255,.09)!important;background:rgba(15,14,12,.58)!important;color:#f7eedf!important}
  .storefront-v13 .sf-mobile-menu-toggle{display:flex!important;flex-direction:column!important;justify-content:center!important;gap:4px!important}
  .storefront-v13 .sf-mobile-icon-link svg{width:20px!important;height:20px!important}
  .storefront-v13 .sf-mobile-search{position:relative!important;height:46px!important;margin:0 clamp(14px,2.2vw,28px) 8px!important;display:grid!important;grid-template-columns:30px minmax(0,1fr) auto!important;align-items:center!important;gap:5px!important;padding:0 6px!important;border-radius:14px!important;background:rgba(12,11,9,.78)!important;border:1px solid rgba(255,231,164,.16)!important;backdrop-filter:blur(18px)!important;overflow:visible!important}
  .storefront-v13 .sf-mobile-search>svg{width:18px!important;height:18px!important;color:#d9bd71!important}
  .storefront-v13 .sf-mobile-search input{display:block!important;width:100%!important;height:42px!important;min-height:0!important;padding:0 5px!important;border:0!important;background:transparent!important;color:#fff!important;box-shadow:none!important;font-size:12px!important}
  .storefront-v13 .sf-mobile-search input::placeholder{color:#aaa092!important}
  .storefront-v13 .sf-mobile-search button{height:34px!important;min-width:54px!important;padding-inline:11px!important;border:0!important;border-radius:10px!important;font-size:11px!important}
  .storefront-v13 .sf-mobile-menu-scrim{position:fixed!important;inset:0!important;z-index:1280!important}
  .storefront-v13 .sf-mobile-menu-panel{position:fixed!important;z-index:1290!important;top:0!important;right:0!important;bottom:0!important;width:min(86vw,380px)!important}
  .storefront-v13.sf-home-layout{--sf-home-header-height:116px!important}
  .storefront-v13.sf-home-layout .sf-header{position:absolute!important;inset:0 0 auto!important;background:linear-gradient(180deg,rgba(4,4,3,.94),rgba(4,4,3,.68) 76%,transparent)!important;border:0!important;box-shadow:none!important}
  .storefront-v13.sf-home-layout .sf-price-ribbon{top:116px!important;padding:7px clamp(12px,2vw,24px) 9px!important}
  .storefront-v13 .sf-price-ribbon-page{gap:6px!important;grid-template-columns:repeat(var(--ribbon-cols,6),minmax(0,1fr))!important;grid-template-rows:repeat(var(--ribbon-rows,2),52px)!important}
  .storefront-v13 .sf-price-ribbon-item{height:52px!important;min-height:52px!important;padding:6px 8px!important;border-radius:12px!important}
  .storefront-v13 .sf-price-ribbon-copy b{font-size:9.5px!important}.storefront-v13 .sf-price-ribbon-copy small{font-size:8px!important}.storefront-v13 .sf-price-ribbon-item>strong{font-size:10px!important}
}

/* Phone: preserve native-like header and reduce price density further. */
@media (max-width:760px){
  .storefront-v13 .sf-desktop-header{display:none!important}.storefront-v13 .sf-mobile-header{display:block!important}
  .storefront-v13 .sf-mobile-brand{max-width:calc(100% - 174px)!important}
  .storefront-v13 .sf-price-ribbon-page{grid-template-columns:repeat(var(--ribbon-cols,2),minmax(0,1fr))!important;grid-template-rows:repeat(var(--ribbon-rows,2),46px)!important}
  .storefront-v13 .sf-price-ribbon-item{height:46px!important;min-height:46px!important}
}
@media (min-width:561px) and (max-width:760px){.storefront-v13 .sf-price-ribbon-page{grid-template-columns:repeat(var(--ribbon-cols,4),minmax(0,1fr))!important}}

/* Extreme narrow viewports: hide nonessential action icons before collision is possible. */
@media (max-width:430px){
  .storefront-v13 .sf-mobile-live{display:none!important}
  .storefront-v13 .sf-mobile-brand{max-width:calc(100% - 132px)!important}
  .storefront-v13 .sf-mobile-brand-copy small{display:none!important}
}
@media (max-width:350px){
  .storefront-v13 .sf-mobile-brand-copy{display:none!important}
  .storefront-v13 .sf-mobile-brand{max-width:48px!important}
  .storefront-v13 .sf-mobile-search button{min-width:44px!important;padding-inline:8px!important;font-size:10px!important}
}
