/* Phones (<=767px): one fixed size for the announcement bar and header, on every page, in light AND dark mode.
   Single source of truth: change --s31-ann-h / --s31-hdr-h here and nothing else.

   Why the high-specificity prefix: woocommerce-custom.css sets the bar to 30px / 9px text with
   `.dark #announcement-bar ...` selectors, which out-rank a plain `html body #announcement-bar`.
   That made the bar shrink in light mode but stay tall (with bigger text) in dark mode.
   `html:root:root:root body` out-ranks every light/dark/hover/focus variant of those rules. */
@media (max-width:767px){
	:root{--s31-ann-h:19px;--s31-hdr-h:55px}

	html:root:root:root body #announcement-bar{box-sizing:border-box!important;display:flex!important;align-items:center!important;justify-content:center!important;height:var(--s31-ann-h)!important;min-height:var(--s31-ann-h)!important;max-height:var(--s31-ann-h)!important;padding:0!important;margin:0!important;overflow:hidden!important;font-size:7.5px!important;letter-spacing:.2em!important;line-height:var(--s31-ann-h)!important}
	html:root:root:root body #announcement-bar .announcement-slides,
	html:root:root:root body #announcement-bar .announcement-slide,
	html:root:root:root body #announcement-bar .announcement-slide.announcement-slide-active{box-sizing:border-box!important;height:var(--s31-ann-h)!important;min-height:var(--s31-ann-h)!important;max-height:var(--s31-ann-h)!important;padding:0!important;margin:0!important}
	html:root:root:root body #announcement-bar .announcement-link,
	html:root:root:root body #announcement-bar a.announcement-link{box-sizing:border-box!important;height:var(--s31-ann-h)!important;min-height:0!important;max-height:var(--s31-ann-h)!important;padding:0!important;border:0!important;font-size:7.5px!important;letter-spacing:.2em!important;line-height:var(--s31-ann-h)!important;max-width:calc(100vw - 24px)!important;white-space:nowrap!important}
	html:root:root:root body #announcement-bar .announcement-link span{font-size:inherit!important;letter-spacing:inherit!important;line-height:inherit!important}

	html body header.step31-site-header>.container{height:var(--s31-hdr-h)!important;min-height:var(--s31-hdr-h)!important;max-height:var(--s31-hdr-h)!important;box-sizing:border-box!important}
	html body header.step31-site-header .mobile-header-left button,
	html body header.step31-site-header .mobile-header-right button,
	html body header.step31-site-header .mobile-header-right a{min-width:38px!important;min-height:38px!important;padding:0 .35rem!important}
	html body header.step31-site-header .mobile-header-left svg,
	html body header.step31-site-header .mobile-header-right svg{width:19px!important;height:19px!important}
	html body header.step31-site-header .site-header-brand a{font-size:1.1rem!important;line-height:1!important;letter-spacing:.14em!important}
	html body header.step31-site-header .site-header-brand img,
	html body header.step31-site-header .custom-logo{max-height:18px!important;height:auto!important;width:auto!important}
	html body header.step31-site-header .mini-cart-count{width:14px!important;height:14px!important;font-size:8px!important}
}

/* Desktop: slightly shorter header, smaller text and icons. */
@media (min-width:768px){
	html body header.step31-site-header>.container{height:60px!important}
	html body header.step31-site-header .desktop-header-nav{gap:1.9rem!important}
	html body header.step31-site-header .desktop-header-nav a{font-size:10px!important;letter-spacing:.14em!important}
	html body header.step31-site-header .desktop-header-actions{gap:1.1rem!important}
	html body header.step31-site-header .desktop-header-actions svg{width:17px!important;height:17px!important}
	html body header.step31-site-header .desktop-header-actions :is(button,a){min-width:34px!important;min-height:34px!important}
	html body header.step31-site-header .site-header-brand a{font-size:1.45rem!important;line-height:1!important}
	html body header.step31-site-header .site-header-brand img,
	html body header.step31-site-header .custom-logo{max-height:22px!important;height:auto!important;width:auto!important}
	html body header.step31-site-header .mini-cart-count{width:14px!important;height:14px!important;font-size:8px!important}
	html body header.step31-site-header .desktop-header-nav .fixed{top:60px!important}
}

@media (min-width:768px) and (max-width:1099px){
	html body header.step31-site-header .desktop-header-nav{gap:1.1rem!important;padding-left:1rem!important;padding-right:1rem!important}
	html body header.step31-site-header .desktop-header-nav a{white-space:nowrap!important;font-size:9.5px!important;letter-spacing:.1em!important}
	html body header.step31-site-header .site-header-brand{flex:0 0 auto!important;min-width:0!important}
	html body header.step31-site-header .site-header-brand a{font-size:1.2rem!important}
	html body header.step31-site-header .desktop-header-actions{flex:0 0 auto!important;min-width:0!important;gap:.7rem!important}
}
html body header.step31-site-header .desktop-header-nav a{white-space:nowrap}

/* Footer logo: compact wordmark */
html body footer .step31-footer-brand,
html body footer a.step31-footer-brand{font-size:1.15rem!important;line-height:1.2!important;letter-spacing:.16em!important;margin-bottom:.9rem!important}
html body footer .step31-footer-brand img{max-height:22px!important;width:auto!important}
@media (min-width:768px){html body footer .step31-footer-brand{font-size:1.3rem!important}}

/* Footer custom-logo image */
html body footer .custom-logo-link,html body footer .custom-logo-link img,html body footer img.custom-logo{max-height:26px!important;height:auto!important;width:auto!important;max-width:150px!important}
html body footer .custom-logo-link{display:inline-block!important}

/* ==========================================================================
   Shop / product-category pages: announcement bar on TOP, header directly below it.

   Why this is needed: on these pages the header is `position:fixed; top:0` (woo-archive.css) and
   the page is pushed down with `padding-top: --archive-header-height`. The bar was left in normal
   flow, so the fixed header covered the top of the page and the bar showed up underneath it.
   Now the bar is fixed at the very top, the header is fixed right below it, and every offset that
   used the header height (page padding, sticky category bar / toolbar, filter drawer) adds the bar height.
   --archive-header-height itself is set by main.js, so the bar height is added in CSS with calc().
   ========================================================================== */
body.post-type-archive-product,
body.tax-product_cat{--s31-archive-bar-h:28px}
@media (max-width:767px){
	body.post-type-archive-product,
	body.tax-product_cat{--s31-archive-bar-h:var(--s31-ann-h,19px)}
}

/* Bar: always visible, pinned to the top, above the header */
html body.post-type-archive-product #announcement-bar,
html body.tax-product_cat #announcement-bar{display:flex!important;position:fixed!important;top:0!important;left:0!important;right:0!important;width:100%!important;z-index:161!important}

/* Header: sits directly under the bar */
html body.post-type-archive-product>div.min-h-screen>header,
html body.tax-product_cat>div.min-h-screen>header{top:var(--s31-archive-bar-h)!important}

/* Page content starts below bar + header */
html body.post-type-archive-product>div.min-h-screen,
html body.tax-product_cat>div.min-h-screen{padding-top:calc(var(--archive-header-height,0px) + var(--s31-archive-bar-h))}

/* Sticky category bar and toolbar stick under bar + header */
html body.post-type-archive-product .step31-archive-category-bar,
html body.tax-product_cat .step31-archive-category-bar{top:calc(var(--archive-header-height,0px) + var(--s31-archive-bar-h))}
html body.post-type-archive-product #archive-toolbar-section>div,
html body.tax-product_cat #archive-toolbar-section>div{top:calc(var(--archive-toolbar-sticky-top,64px) + var(--s31-archive-bar-h))!important}

/* Filter drawer opens below the archive bar + header */
html body.post-type-archive-product #filter-drawer-overlay,
html body.post-type-archive-product #filter-drawer-panel,
html body.tax-product_cat #filter-drawer-overlay,
html body.tax-product_cat #filter-drawer-panel{top:calc(var(--archive-header-height,0px) + var(--s31-archive-bar-h))!important;height:calc(100dvh - var(--archive-header-height,0px) - var(--s31-archive-bar-h))!important;max-height:calc(100dvh - var(--archive-header-height,0px) - var(--s31-archive-bar-h))!important}

/* Mini-cart covers the full viewport, including the archive bar and header. */
html body.post-type-archive-product #mini-cart-overlay,
html body.tax-product_cat #mini-cart-overlay{top:0!important;bottom:0!important;height:100dvh!important;max-height:100dvh!important}
html body.post-type-archive-product #mini-cart-panel,
html body.tax-product_cat #mini-cart-panel{top:0!important;height:100%!important;max-height:100%!important}
