/*
 * Wagz header (premium retail design): forest masthead with strapline, logo, product search,
 * account and cart; white navigation row; mobile menu. Keep this component separate from page styles.
 */
.wagz-site-header { background: var(--wagz-forest); color: var(--wagz-cream); margin-block-start: 0; }
.wagz-site-header > * { margin-block-start: 0 !important; }
.wagz-hwrap { max-width: 1280px; margin-inline: auto !important; padding-inline: 44px; box-sizing: border-box; }

/* Strapline and help links. */
.wagz-top { display: flex; justify-content: space-between; gap: 20px; padding-top: 11px; font-size: 10px; color: #dde9e2; }
.wagz-top p { margin: 0 !important; line-height: 1.5; }
.wagz-top a { color: inherit; text-decoration: none; }
.wagz-top a:hover { text-decoration: underline; }
.wagz-top span { margin-inline: .6em; }

/* Masthead. */
.wagz-mast { display: flex; align-items: center; gap: 42px; padding-block: 20px; }
.wagz-mast > * { margin: 0 !important; }
.wagz-site-header .wagz-logo { line-height: 0; flex: 0 0 auto; }
.wagz-site-header .wagz-logo img { width: 152px; height: auto; display: block; }
.wagz-search { flex: 1; min-width: 0; }
.wagz-search .wp-block-search__inside-wrapper { background: #fff; border: 1px solid transparent; border-radius: 99px; padding: 5px; }
.wagz-search .wp-block-search__input { border: 0; background: transparent; min-width: 0; padding: 9px 18px; font-size: 13px; color: var(--wagz-forest); }
.wagz-search .wp-block-search__input:focus-visible { outline: 2px solid #368261; outline-offset: 0; border-radius: 99px; }
.wagz-search .wp-block-search__button { margin: 0; width: 39px; height: 39px; min-width: 39px; padding: 0; display: grid; place-items: center; border-radius: 50%; border: 0; background: var(--wagz-forest); color: #fff; }
.wagz-search .wp-block-search__button svg { width: 22px; height: 22px; fill: currentColor; }
.wagz-search .wp-block-search__button:hover { background: #235b45; }
.wagz-search .wp-block-search__button:focus-visible { outline: 3px solid var(--wagz-mint); outline-offset: 3px; }

/* Account and cart. */
.wagz-header-actions { gap: 25px; align-items: center; flex: 0 0 auto; }
.wagz-header-actions a, .wagz-header-actions .wc-block-mini-cart__button { color: var(--wagz-cream); }
.wagz-header-actions .wc-block-mini-cart__button, .wagz-header-actions .wp-block-woocommerce-customer-account a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; min-width: 44px; min-height: 44px; padding: 0; border-radius: 8px; text-decoration: none; background: none; }
.wagz-header-actions .label, .wagz-cart-label { font-size: 11px; font-weight: 400; line-height: 1.2; white-space: nowrap; }
.wagz-header-actions svg { width: 23px; height: 23px; }
.wagz-header-actions .wp-block-woocommerce-customer-account .icon { margin: 0; }
.wagz-header-actions a:focus-visible, .wagz-header-actions button:focus-visible { outline: 3px solid var(--wagz-mint); outline-offset: 3px; }
.wc-block-mini-cart__badge { background: var(--wagz-mint); color: var(--wagz-forest); font-weight: 600; }

/* Mobile menu (phones only). */
.wagz-mobile-menu { display: none !important; }
.wagz-mobile-menu .wp-block-navigation__responsive-container-open { color: var(--wagz-cream); width: 44px; height: 44px; display: grid !important; place-items: center; }
.wagz-mobile-menu .wp-block-navigation__responsive-container.is-menu-open { padding: 1.5rem; color: var(--wagz-forest); }
.wagz-mobile-menu .is-menu-open .wp-block-navigation-item__content { font-size: 1.05rem; padding: .7rem 0; font-weight: 600; }

/* White navigation row. */
.wagz-navrow { background: #fff; color: var(--wagz-forest); border-bottom: 1px solid #dce6df; margin-block-start: 0 !important; }
.wagz-nav-row { min-height: 55px; font-size: 13px; font-weight: 600; }
.wagz-nav-row .wp-block-navigation__container { gap: 32px; width: 100%; flex-wrap: nowrap; align-items: stretch; }
.wagz-nav-row .wp-block-navigation-item { align-self: stretch; }
.wagz-nav-row .wp-block-navigation-item__content { display: flex; align-items: center; height: 100%; padding: 17px 0 14px; border-bottom: 3px solid transparent; text-decoration: none; }
.wagz-nav-row .wp-block-navigation-item__content:hover { text-decoration: underline; text-underline-offset: 7px; }
.wagz-nav-row .current-menu-item > .wp-block-navigation-item__content, .home .wagz-nav-row .is-packs > .wp-block-navigation-item__content { border-bottom-color: var(--wagz-mint); }
.wagz-nav-row .is-end { margin-left: auto; }
.wagz-nav-row .is-end > .wp-block-navigation-item__content { font-size: 11px; font-weight: 400; }
.wagz-nav-row .wp-block-navigation-item__content:focus-visible { outline: 3px solid #3b8a65; outline-offset: -3px; }

@media (max-width: 1000px) {
	.wagz-hwrap { padding-inline: 28px; }
	.wagz-mast { gap: 24px; }
	.wagz-header-actions { gap: 16px; }
}
@media (max-width: 650px) {
	.wagz-hwrap { padding-inline: 18px; }
	.wagz-top { display: none; }
	.wagz-mast { flex-wrap: wrap; gap: 12px 6px; padding-top: 17px; padding-bottom: 15px; }
	.wagz-site-header .wagz-logo img { width: 115px; }
	.wagz-header-actions { margin-left: auto !important; gap: 6px; }
	.wagz-header-actions .label, .wagz-cart-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
	.wagz-mobile-menu { display: block !important; }
	.wagz-search { order: 3; flex-basis: 100%; }
	.wagz-search .wp-block-search__input { font-size: 16px; }
	.wagz-nav-row { min-height: 48px; font-size: 11px; overflow-x: auto; scrollbar-width: none; }
	.wagz-nav-row::-webkit-scrollbar { display: none; }
	.wagz-nav-row .wp-block-navigation__container { gap: 22px; white-space: nowrap; }
	.wagz-nav-row .wp-block-navigation-item__content { padding: 14px 0 11px; }
	.wagz-nav-row .is-end { display: none; }
}

/* Checkout header: matches the dark brand bar. */
.wagz-checkout-header { padding-block: 1.35rem; }
.wagz-checkout-header .wagz-logo img { width: 150px; }
.wagz-checkout-header .wagz-secure { color: var(--wagz-cream); }
.wagz-checkout-header .wagz-secure::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238ED3B2' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='11' width='16' height='10' rx='2'/%3E%3Cpath d='M8 11V7a4 4 0 0 1 8 0v4'/%3E%3C/svg%3E"); }
.wagz-checkout-header a.wc-block-cart-link { color: var(--wagz-cream); }
@media (max-width: 781px) { .wagz-checkout-header { padding-inline: 20px; } .wagz-checkout-header .wagz-logo img { width: 110px; } .wagz-checkout-header .wagz-secure { white-space: nowrap; font-size: .8rem; } }

/* ---------- Delivery alert and folding fixed header (redesign rev 3) ---------- */
.wagz-delivery-alert { background: var(--wagz-sage); color: var(--wagz-forest); text-align: center; font-size: 12px; line-height: 1.6; margin: 0 !important; padding: 9px 20px; max-height: 48px; overflow: hidden; transition: max-height .22s, padding .22s, opacity .18s; }
.wagz-delivery-alert a { display: inline-block; color: inherit; text-decoration: none; }
.wagz-delivery-alert a:hover { text-decoration: underline; text-underline-offset: 3px; }
/* The script fixes the header in place and keeps a spacer of the expanded height, so folding never moves the page. */
header.wagz-sticky { position: fixed; top: 0; left: 0; right: 0; width: 100%; z-index: 40; margin: 0 !important; transition: box-shadow .2s; }
.wagz-header-spacer { height: var(--wagz-header-expanded, 210px); overflow-anchor: none; margin: 0 !important; }
html.has-wagz-sticky { scroll-padding-top: var(--wagz-anchor-offset, 100px); }
header.wagz-sticky.is-measuring, header.wagz-sticky.is-measuring * { transition: none !important; }
.wagz-sticky .wagz-top { max-height: 34px; overflow: hidden; transition: max-height .22s, padding .22s, opacity .18s; }
.wagz-sticky .wagz-mast { transition: padding .22s; }
.wagz-sticky .wagz-logo img { transition: width .22s; }
.wagz-sticky .wagz-navrow { max-height: 65px; overflow: hidden; transition: max-height .22s, opacity .18s; }
header.wagz-sticky.is-compact { box-shadow: 0 3px 16px #0d3b2e1c; }
.is-compact .wagz-delivery-alert { max-height: 0; padding-top: 0; padding-bottom: 0; opacity: 0; pointer-events: none; }
.is-compact .wagz-top { max-height: 0; padding-top: 0; opacity: 0; pointer-events: none; }
.is-compact .wagz-mast { padding-top: 10px; padding-bottom: 10px; }
.is-compact .wagz-site-header .wagz-logo img { width: 140px; }
.is-compact .wagz-navrow { max-height: 0; border: 0; opacity: 0; pointer-events: none; }
@media (max-width: 650px) {
	.wagz-delivery-alert { font-size: 11px; padding: 8px 16px; }
	.wagz-sticky:not(.is-compact) .wagz-navrow { max-height: 56px; }
	.is-compact .wagz-site-header .wagz-logo img { width: 108px; }
	.is-compact .wagz-mast { padding-top: 9px; padding-bottom: 10px; row-gap: 10px; }
	.is-compact .wagz-search .wp-block-search__inside-wrapper { padding: 3px; }
	.is-compact .wagz-search .wp-block-search__input { padding-top: 7px; padding-bottom: 7px; }
}
@media (prefers-reduced-motion: reduce) {
	header.wagz-sticky, .wagz-sticky .wagz-top, .wagz-sticky .wagz-mast, .wagz-sticky .wagz-logo img, .wagz-sticky .wagz-navrow, .wagz-delivery-alert { transition: none; }
}

/* ---------- Homepage streamline (Oct 2026): single-line menu on tablets, shorter header on phones ---------- */
@media (max-width: 900px) {
	.wagz-nav-row { overflow-x: auto; scrollbar-width: none; }
	.wagz-nav-row::-webkit-scrollbar { display: none; }
	.wagz-nav-row .wp-block-navigation__container { gap: 24px; white-space: nowrap; }
}
@media (max-width: 650px) {
	.wagz-mast { gap: 8px 6px; padding-top: 11px; padding-bottom: 12px; }
	.wagz-site-header .wagz-logo img { width: 108px; }
	.wagz-search .wp-block-search__inside-wrapper { padding: 3px; }
	.wagz-search .wp-block-search__input { padding-top: 8px; padding-bottom: 8px; }
	.wagz-search .wp-block-search__button { width: 36px; height: 36px; min-width: 36px; }
	.wagz-nav-row { min-height: 44px; }
	.wagz-nav-row .wp-block-navigation-item__content { padding: 12px 0 9px; }
	.wagz-delivery-alert { padding-top: 6px; padding-bottom: 6px; }
}
