/* Fixes layer (11.2026). Loads after home-a.css, so small corrections do not need a rewrite of app.css. */

/* Accessibility widget (Enable): goes behind the cart drawer, the filters panel, the menu and the cookie panel while they are open.
   The widget sets "#enable-toolbar #enable-toolbar-content{z-index:...!important}", so these selectors carry both ids to win. */
html.av-lock #enable-toolbar #enable-toolbar-content,
html:has(#av-drawer[open]) #enable-toolbar #enable-toolbar-content,
html:has(#av-cc:not([hidden])) #enable-toolbar #enable-toolbar-content{z-index:60 !important}

/* Product buy box on phones: quantity, quick amounts and the add button each get a full row. */
@media (max-width:599px){
  .av-buybox__form{display:grid;grid-template-columns:minmax(0,1fr);gap:14px;align-items:stretch}
  .av-buybox__form .av-qty-wrap{display:grid;width:100%}
  .av-buybox__form .av-qty{display:flex;width:100%}
  .av-buybox__form .av-qty button{flex:0 0 56px;width:56px}
  .av-buybox__form .av-qty input{flex:1 1 auto;width:auto;min-width:0}
  .av-buybox__form .av-qty-quick{display:grid;grid-template-columns:repeat(4,minmax(0,1fr))}
  .av-buybox__form .av-qty-quick button{width:100%}
  .av-buybox__form .av-buybox__btn{width:100%;min-width:0;white-space:normal;text-align:center}
}

/* Header on phones and tablets: sticks to the top, slides away while scrolling down and comes back on scroll up (script in inc/skins.php). */
@media (max-width:999px){
  .hv-a .av-header{position:sticky;top:0;transition:transform .3s var(--ks-ease),box-shadow .3s}
  .hv-a .av-header.is-up{transform:translateY(-100%)}
  .hv-a .av-header.is-stuck{box-shadow:0 12px 28px -20px rgba(0,34,60,.45)}
}
@media (min-width:601px) and (max-width:782px){.admin-bar.hv-a .av-header{top:46px}}
@media (max-width:600px){.admin-bar.hv-a .av-header{top:0}}
@media (prefers-reduced-motion:reduce){.hv-a .av-header{transition:none}}
/* --av-hh is the height of the header while it is on screen, 0 while it is hidden. */
.av-chips--sticky{top:var(--av-hh,0px);transition:top .3s}
html{scroll-padding-top:calc(var(--av-hh,0px) + 12px)}
