/**
 * WCE Theme — Site Header (Phase 6 Pass C, consolidated).
 *
 * Single source of truth for:
 *   - .wce-site-header (sticky frame + stacking fix for WC pages)
 *   - .wce-utility-bar + .wce-utility-links + [delivery_message] colours
 *   - .wce-header-main (logo / mega-nav / actions grid)
 *   - .wce-logo
 *   - .wce-mega-nav + .wce-mega-panel (desktop only, ≥1024px)
 *   - .wce-product-search (inline on desktop, icon-toggle on mobile)
 *   - .wp-block-woocommerce-customer-account (custom outlined icon)
 *   - .wc-block-mini-cart__button + badge
 *   - .wce-hamburger + .wce-mobile-drawer (off-canvas, body-root level)
 *   - Sticky shrink on body.wce-header-scrolled
 *
 * Breakpoint: desktop ≥1280px, otherwise hamburger + drawer. Tablet
 * nav is capped to 5 pinned categories (see PHP `wce_mega_nav_pinned`
 * filter) — the full 8 top-level cats remain in the drawer and at /shop/.
 *
 * @package WCE_Theme
 */

/* ==========================================================
   1. Header frame + stacking-context fix
   ========================================================== */

/* WP wraps our header in <header class="wp-block-template-part"> which
   has z-index: 2 by core style. WC templates set <main> to z-index: 2
   too, so by DOM order main paints on top of header. Lift the wrapper
   and let the sticky inner header sit above page content cleanly. */
.wp-site-blocks > header.wp-block-template-part {
	position: relative;
	z-index: 100;
}

.wce-site-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background-color: var(--wp--preset--color--surface);
	border-bottom: 1px solid var(--wp--preset--color--border);
	transition: box-shadow 200ms ease;
}
body.wce-header-scrolled .wce-site-header {
	box-shadow: 0 8px 24px -16px rgba(0, 0, 0, 0.7);
}

/* ==========================================================
   2. Utility bar (delivery message + help links)
   ========================================================== */

.wce-utility-bar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1rem;
	padding: 0.45rem 0.75rem;
	background-color: var(--wp--preset--color--background);
	border-bottom: 1px solid var(--wp--preset--color--border);
	font-size: 0.72rem;
	letter-spacing: 0.04em;
	color: var(--wp--preset--color--foreground-muted);
	line-height: 1.4;
	overflow: hidden; /* defensive — never allow horizontal spill */
}
.wce-utility-bar p { margin: 0; }

/* BBT delivery-message plugin emits <span style="color:#101010; ..."> with
   no wrapper class; inline style must lose to these !important rules. */
.wce-utility-bar .wce-utility-bar__left span,
.wce-utility-bar .wce-utility-bar__left span[style] {
	color: var(--wp--preset--color--primary) !important;
	font-size: inherit !important;
	font-weight: 700 !important;
}

.wce-utility-bar__left,
.wce-utility-bar__right {
	display: flex;
	align-items: center;
	gap: 1rem;
	min-width: 0;
}
.wce-utility-bar__left { flex: 1 1 auto; min-width: 0; }
.wce-utility-bar__right { flex: 0 0 auto; }
.wce-utility-bar__left p {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	min-width: 0;
}

.wce-utility-links {
	display: flex;
	align-items: center;
	gap: 1.5rem;
	list-style: none;
	margin: 0;
	padding: 0;
}
.wce-utility-links__item { margin: 0; padding: 0; }
.wce-utility-links__link {
	color: var(--wp--preset--color--foreground-muted);
	text-decoration: none;
	font-size: 0.65rem;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	white-space: nowrap;
	transition: color 180ms ease;
}
.wce-utility-links__link:hover,
.wce-utility-links__link:focus-visible {
	color: var(--wp--preset--color--foreground);
}

/* ==========================================================
   3. Main header row — logo, nav, actions
   ========================================================== */

.wce-header-main {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 2rem;
	padding: 0.75rem;
	max-width: none;
	transition: padding 200ms ease;
}
body.wce-header-scrolled .wce-header-main {
	padding-top: 0.5rem;
	padding-bottom: 0.5rem;
}

.wce-header-left,
.wce-header-actions {
	display: flex;
	align-items: center;
	flex: 0 0 auto;
}
.wce-header-left  { gap: 0.5rem; }
.wce-header-actions { gap: 0.25rem; }

/* Skip link (visually hidden by core but still focusable) */
.wce-skip-link {
	position: absolute;
	top: -100px;
	left: 0;
	padding: 0.5rem 1rem;
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--background);
	font-weight: 700;
	z-index: 1000;
}
.wce-skip-link:focus { top: 0; }

/* ==========================================================
   4. Logo
   ========================================================== */

.wce-logo {
	font-size: 1.5rem;
	font-weight: 800;
	letter-spacing: -0.03em;
	line-height: 1;
	text-decoration: none;
	white-space: nowrap;
	/* Flex child of .wce-header-left (align-items:center) — the 40px
	   hamburger sets the row height. Flex centers this automatically.
	   No vertical padding, use flex to align visual baseline. */
	display: inline-flex;
	align-items: center;
	height: 40px;
	transition: font-size 200ms ease;
}
.wce-logo-brand { color: var(--wp--preset--color--foreground); }
.wce-logo-tld   { color: var(--wp--preset--color--primary); font-weight: 700; }
body.wce-header-scrolled .wce-logo { font-size: 1.25rem; }

/* ==========================================================
   5. Mega-nav (desktop only)
   ========================================================== */

.wce-mega-nav {
	flex: 1 1 auto;
	display: flex;
	justify-content: center;
	min-width: 0;
}
.wce-mega-nav__list {
	display: flex;
	gap: 0;
	align-items: stretch;
	list-style: none;
	margin: 0;
	padding: 0;
	flex-wrap: nowrap;
}

/* Item MUST be static — the panel below is position:absolute and needs
   the .wce-site-header (sticky positioned) as its containing block so it
   spans the full header width, not the item's ~100px slot. */
.wce-mega-nav__item {
	position: static;
	margin: 0;
}

.wce-mega-nav__trigger {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	padding: 1rem 1rem;
	background: transparent;
	border: none;
	color: var(--wp--preset--color--foreground);
	font-size: 0.78rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
	position: relative;
	transition: color 180ms ease;
}
.wce-mega-nav__trigger::after {
	content: "";
	position: absolute;
	left: 1rem;
	right: 1rem;
	bottom: 0;
	height: 2px;
	background-color: var(--wp--preset--color--primary);
	transform: scaleX(0);
	transform-origin: center;
	transition: transform 240ms cubic-bezier(0.2, 0.9, 0.4, 1);
	pointer-events: none;
}
.wce-mega-nav__trigger:hover,
.wce-mega-nav__trigger:focus-visible,
.wce-mega-nav__item.is-open > .wce-mega-nav__trigger,
.wce-mega-nav__trigger[aria-expanded="true"] {
	color: var(--wp--preset--color--primary);
}
.wce-mega-nav__trigger:hover::after,
.wce-mega-nav__trigger:focus-visible::after,
.wce-mega-nav__item.is-open > .wce-mega-nav__trigger::after,
.wce-mega-nav__trigger[aria-expanded="true"]::after {
	transform: scaleX(1);
}
.wce-mega-nav__chevron {
	opacity: 0.55;
	transition: opacity 180ms ease, transform 240ms cubic-bezier(0.2, 0.9, 0.4, 1);
	display: inline-flex;
}
.wce-mega-nav__trigger:hover .wce-mega-nav__chevron,
.wce-mega-nav__item.is-open .wce-mega-nav__chevron,
.wce-mega-nav__trigger[aria-expanded="true"] .wce-mega-nav__chevron {
	opacity: 1;
}
.wce-mega-nav__trigger[aria-expanded="true"] .wce-mega-nav__chevron {
	transform: rotate(180deg);
}

/* ==========================================================
   6. Mega panel
   ========================================================== */

.wce-mega-panel {
	position: absolute;
	left: 0;
	right: 0;
	top: 100%;
	background-color: var(--wp--preset--color--surface);
	border-top: 1px solid var(--wp--preset--color--border);
	border-bottom: 1px solid var(--wp--preset--color--border);
	box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.5);
	padding: 2.5rem 1.5rem;
	z-index: 99;
	opacity: 0;
	transform: translateY(-6px);
	pointer-events: none;
	transition: opacity 200ms ease, transform 240ms cubic-bezier(0.2, 0.9, 0.4, 1);
}
.wce-mega-nav__item:hover > .wce-mega-panel,
.wce-mega-nav__item:focus-within > .wce-mega-panel,
.wce-mega-nav__item.is-open > .wce-mega-panel {
	display: block;
	opacity: 1;
	transform: translateY(0);
	pointer-events: auto;
}
.wce-mega-panel[hidden] { display: none; }
.wce-mega-nav__item:hover > .wce-mega-panel[hidden],
.wce-mega-nav__item:focus-within > .wce-mega-panel[hidden],
.wce-mega-nav__item.is-open > .wce-mega-panel[hidden] { display: block; }

.wce-mega-panel__grid {
	max-width: 1200px;
	margin-inline: auto;
	display: grid;
	grid-template-columns: minmax(0, 2.5fr) minmax(0, 1fr);
	gap: 3rem;
	align-items: start;
}
.wce-mega-panel__col { min-width: 0; }

.wce-mega-panel__subcats {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 0;
	list-style: none;
	margin: 0 0 1.25rem 0;
	padding: 0;
}
.wce-mega-panel__subcats li { margin: 0; }
.wce-mega-panel__subcat {
	display: block;
	padding: 0.6rem 0.75rem;
	color: var(--wp--preset--color--foreground);
	font-size: 0.9rem;
	font-weight: 500;
	text-decoration: none;
	border-left: 2px solid transparent;
	transition: color 180ms ease, border-color 180ms ease, padding-left 180ms ease;
}
.wce-mega-panel__subcat:hover,
.wce-mega-panel__subcat:focus-visible {
	color: var(--wp--preset--color--primary);
	border-left-color: var(--wp--preset--color--primary);
	padding-left: 1rem;
}

.wce-mega-panel__view-all {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.55rem 1.1rem;
	border: 1px solid var(--wp--preset--color--primary);
	border-radius: 999px;
	color: var(--wp--preset--color--primary);
	font-size: 0.65rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	text-decoration: none;
	transition: background-color 180ms ease, color 180ms ease;
}
.wce-mega-panel__view-all:hover,
.wce-mega-panel__view-all:focus-visible {
	background-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--background);
}

.wce-mega-panel__featured {
	display: grid;
	grid-template-rows: auto auto;
	gap: 0.75rem;
	color: var(--wp--preset--color--foreground);
	text-decoration: none;
}
.wce-mega-panel__featured-img {
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	border-radius: 6px;
	background-color: var(--wp--preset--color--surface-alt);
	transition: transform 240ms cubic-bezier(0.2, 0.9, 0.4, 1);
}
.wce-mega-panel__featured:hover .wce-mega-panel__featured-img {
	transform: scale(1.02);
}
.wce-mega-panel__featured-body {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
}
.wce-mega-panel__featured-kicker {
	font-size: 0.6rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--wp--preset--color--accent);
}
.wce-mega-panel__featured-title {
	font-size: 0.95rem;
	font-weight: 600;
	line-height: 1.3;
}
.wce-mega-panel__featured-price {
	font-size: 0.85rem;
	color: var(--wp--preset--color--foreground-muted);
}

/* ==========================================================
   7. Inline product search (desktop)
   ========================================================== */

.wce-product-search { position: relative; display: inline-flex; align-items: center; }
.wce-product-search__form {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	width: 240px;
	min-width: 0;
	padding: 0;
	background: transparent;
	border: none;
	box-shadow: none;
}
.wce-product-search__input {
	flex: 1 1 auto;
	min-width: 0;
	width: 100%;
	background-color: var(--wp--preset--color--surface-alt);
	border: 1px solid transparent;
	border-radius: 999px;
	padding: 0.5rem 1rem;
	font: inherit;
	font-size: 0.85rem;
	color: var(--wp--preset--color--foreground);
	transition: background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}
.wce-product-search__input::placeholder {
	color: var(--wp--preset--color--foreground-muted);
	opacity: 0.75;
}
.wce-product-search__input:hover {
	border-color: var(--wp--preset--color--border);
}
.wce-product-search__input:focus-visible {
	outline: none;
	background-color: var(--wp--preset--color--surface);
	border-color: var(--wp--preset--color--primary);
	box-shadow: 0 0 0 3px rgba(212, 255, 58, 0.15);
}
.wce-product-search__submit {
	flex: 0 0 auto;
	width: 36px;
	height: 36px;
	padding: 0.4rem;
	background: transparent;
	border: none;
	border-radius: 50%;
	color: var(--wp--preset--color--foreground-muted);
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: color 180ms ease, background-color 180ms ease;
}
.wce-product-search__submit:hover,
.wce-product-search__submit:focus-visible {
	color: var(--wp--preset--color--primary);
	background-color: var(--wp--preset--color--surface-alt);
}

/* Toggle button is desktop-hidden by default; mobile rules below re-enable it. */
.wce-product-search__toggle { display: none; }

/* ==========================================================
   8. Account + cart icon buttons
   ========================================================== */

/* WC core block emits its own <svg>; hide it and paint a modern
   outlined user icon via mask-image so we get palette-consistent colour. */
.wp-block-woocommerce-customer-account {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border-radius: 999px;
	color: var(--wp--preset--color--foreground);
	text-decoration: none;
	position: relative;
	transition: background-color 180ms ease, color 180ms ease;
}
.wp-block-woocommerce-customer-account:hover,
.wp-block-woocommerce-customer-account:focus-visible {
	background-color: var(--wp--preset--color--surface-alt);
	color: var(--wp--preset--color--primary);
}
.wp-block-woocommerce-customer-account .wc-block-customer-account__account-icon { display: none; }
.wp-block-woocommerce-customer-account > span,
.wp-block-woocommerce-customer-account .wc-block-customer-account__label {
	position: absolute;
	width: 1px; height: 1px;
	margin: -1px; padding: 0;
	overflow: hidden;
	clip: rect(0,0,0,0);
	white-space: nowrap;
	border: 0;
}
.wp-block-woocommerce-customer-account::before {
	content: "";
	display: block;
	width: 20px;
	height: 20px;
	background-color: currentColor;
	-webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'><path d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'/><circle cx='12' cy='7' r='4'/></svg>");
	mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'><path d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'/><circle cx='12' cy='7' r='4'/></svg>");
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
	-webkit-mask-position: center;
	mask-position: center;
	-webkit-mask-size: contain;
	mask-size: contain;
}

/* Mini-cart trigger — unified 40px round button */
.wc-block-mini-cart__button {
	width: 40px;
	height: 40px;
	padding: 0;
	border-radius: 999px;
	color: var(--wp--preset--color--foreground);
	background: transparent;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: background-color 180ms ease, color 180ms ease;
}
.wc-block-mini-cart__button:hover,
.wc-block-mini-cart__button:focus-visible {
	background-color: var(--wp--preset--color--surface-alt);
	color: var(--wp--preset--color--primary);
}
.wc-block-mini-cart__button > svg { width: 20px; height: 20px; }
.wc-block-mini-cart__badge {
	background-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--background);
	font-weight: 700;
	font-size: 0.65rem;
	min-width: 18px;
	height: 18px;
	border-radius: 999px;
	padding: 0 6px;
	line-height: 18px;
}

/* ==========================================================
   9. Hamburger (mobile only)
   ========================================================== */

.wce-hamburger {
	display: none; /* shown below 1280px via media query */
	align-items: center;
	justify-content: center;
	flex-direction: column;
	gap: 5px;
	width: 40px;
	height: 40px;
	padding: 0;
	background: transparent;
	border: none;
	border-radius: 999px;
	cursor: pointer;
	transition: background-color 180ms ease;
}
.wce-hamburger:hover,
.wce-hamburger:focus-visible {
	background-color: var(--wp--preset--color--surface-alt);
}
.wce-hamburger__bar {
	display: block;
	width: 20px;
	height: 2px;
	background-color: var(--wp--preset--color--foreground);
	border-radius: 2px;
	transition: transform 200ms ease, opacity 200ms ease;
}
.wce-hamburger[aria-expanded="true"] .wce-hamburger__bar:nth-child(1) {
	transform: translateY(7px) rotate(45deg);
}
.wce-hamburger[aria-expanded="true"] .wce-hamburger__bar:nth-child(2) {
	opacity: 0;
}
.wce-hamburger[aria-expanded="true"] .wce-hamburger__bar:nth-child(3) {
	transform: translateY(-7px) rotate(-45deg);
}

/* ==========================================================
   10. Mobile drawer (off-canvas, body-root level via wp_footer)
   ========================================================== */

.wce-mobile-drawer {
	position: fixed;
	inset: 0 auto 0 0;
	width: min(380px, 90vw);
	max-width: 100vw;
	background-color: var(--wp--preset--color--surface);
	transform: translateX(-100%);
	transition: transform 240ms cubic-bezier(0.2, 0.9, 0.4, 1);
	z-index: 9999;
	overflow-y: auto;
	overscroll-behavior: contain;
	-webkit-overflow-scrolling: touch;
	box-shadow: 20px 0 60px -20px rgba(0, 0, 0, 0.8);
}
.wce-mobile-drawer.is-open { transform: translateX(0); }
.wce-mobile-drawer[hidden] { display: block; } /* keep for transition; JS toggles visibility via .is-open */

.wce-mobile-drawer__inner {
	display: flex;
	flex-direction: column;
}

/* Sticky header inside drawer: brand + close */
.wce-mobile-drawer__header {
	position: sticky;
	top: 0;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 1rem 1.25rem;
	background-color: var(--wp--preset--color--surface);
	border-bottom: 1px solid var(--wp--preset--color--border);
}
.wce-mobile-drawer__brand {
	font-size: 1.125rem;
	font-weight: 800;
	letter-spacing: -0.02em;
	line-height: 1;
}
.wce-mobile-drawer__close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	padding: 0;
	background-color: var(--wp--preset--color--surface-alt);
	border: none;
	border-radius: 999px;
	color: var(--wp--preset--color--foreground);
	cursor: pointer;
	transition: background-color 180ms ease, color 180ms ease;
}
.wce-mobile-drawer__close:hover,
.wce-mobile-drawer__close:focus-visible {
	background-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--background);
}

.wce-mobile-drawer__section {
	padding: 1rem 1.25rem;
	border-bottom: 1px solid var(--wp--preset--color--border);
}
.wce-mobile-drawer__section:last-child { border-bottom: none; }

.wce-mobile-drawer__heading {
	margin: 0 0 0.75rem 0;
	font-size: 0.65rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--wp--preset--color--foreground-muted);
}

/* Search inside drawer (inline form) */
.wce-mobile-drawer .wce-product-search { width: 100%; }
.wce-mobile-drawer .wce-product-search__form--inline {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	width: 100%;
}
.wce-mobile-drawer .wce-product-search__input {
	background-color: var(--wp--preset--color--surface-alt);
	border: 1px solid var(--wp--preset--color--border);
	padding: 0.625rem 1rem;
	font-size: 0.95rem;
	width: 100%;
}
.wce-mobile-drawer .wce-product-search__submit {
	background-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--background);
	width: 40px;
	height: 40px;
	flex: 0 0 auto;
}

/* Category accordion rows */
.wce-mobile-drawer__cats {
	list-style: none;
	margin: 0 -1.25rem;
	padding: 0;
}
.wce-mobile-drawer__cats > li {
	margin: 0;
	border-bottom: 1px solid var(--wp--preset--color--border);
}
.wce-mobile-drawer__cats > li:last-child { border-bottom: none; }

.wce-mobile-drawer__cat > summary,
.wce-mobile-drawer__cat-link {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0.9rem 1.25rem;
	font-size: 0.95rem;
	font-weight: 600;
	color: var(--wp--preset--color--foreground);
	text-decoration: none;
	cursor: pointer;
	list-style: none;
	min-height: 48px;
	transition: background-color 160ms ease, color 160ms ease;
}
.wce-mobile-drawer__cat > summary::-webkit-details-marker { display: none; }
.wce-mobile-drawer__cat > summary:hover,
.wce-mobile-drawer__cat-link:hover,
.wce-mobile-drawer__cat[open] > summary {
	background-color: var(--wp--preset--color--surface-alt);
	color: var(--wp--preset--color--primary);
}

.wce-mobile-drawer__chev {
	display: inline-flex;
	transition: transform 180ms ease;
	opacity: 0.6;
}
.wce-mobile-drawer__cat[open] > summary .wce-mobile-drawer__chev { transform: rotate(180deg); opacity: 1; }

.wce-mobile-drawer__subcats {
	list-style: none;
	margin: 0;
	padding: 0.25rem 0 0.5rem 0;
	background-color: var(--wp--preset--color--background);
}
.wce-mobile-drawer__subcats li { border-bottom: none; margin: 0; }
.wce-mobile-drawer__subcats a {
	display: block;
	padding: 0.625rem 1.25rem;
	font-size: 0.875rem;
	color: var(--wp--preset--color--foreground-muted);
	text-decoration: none;
	min-height: 40px;
	transition: color 160ms ease;
}
.wce-mobile-drawer__subcats a:hover { color: var(--wp--preset--color--primary); }
.wce-mobile-drawer__view-all {
	color: var(--wp--preset--color--primary);
	font-weight: 700;
	font-size: 0.7rem;
	text-transform: uppercase;
	letter-spacing: 0.1em;
}

/* Account + info link lists */
.wce-mobile-drawer__account {
	list-style: none;
	margin: 0 -1.25rem;
	padding: 0;
}
.wce-mobile-drawer__account li { margin: 0; border-bottom: none; }
.wce-mobile-drawer__account a {
	display: block;
	padding: 0.75rem 1.25rem;
	font-size: 0.9rem;
	color: var(--wp--preset--color--foreground);
	text-decoration: none;
	min-height: 44px;
	transition: background-color 160ms ease, color 160ms ease;
}
.wce-mobile-drawer__account a:hover,
.wce-mobile-drawer__account a:focus-visible {
	background-color: var(--wp--preset--color--surface-alt);
	color: var(--wp--preset--color--primary);
}

/* Promo (delivery message) at bottom */
.wce-mobile-drawer__promo {
	background-color: var(--wp--preset--color--background);
	padding: 1rem 1.25rem;
	font-size: 0.8rem;
	text-align: center;
	color: var(--wp--preset--color--foreground-muted);
}
.wce-mobile-drawer__promo span[style] {
	color: var(--wp--preset--color--primary) !important;
	font-size: inherit !important;
	font-weight: 700 !important;
}

/* Drawer backdrop (body::before, sits under drawer at z 9998) */
body.wce-drawer-open { overflow: hidden; }
body.wce-drawer-open::before {
	content: "";
	position: fixed;
	inset: 0;
	background-color: rgba(10, 5, 8, 0.75);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
	z-index: 9998;
}

/* ==========================================================
   11. Breakpoints — 1280px is the desktop/mobile cutover
   ========================================================== */

@media (max-width: 1279px) {
	.wce-mega-nav { display: none; }
	.wce-hamburger { display: inline-flex; }

	/* Hide utility links on mobile/tablet — defensive high-specificity
	   because WordPress block layout emits is-layout-flex classes that
	   default descendants to display:flex. */
	.wce-utility-bar .wce-utility-bar__right,
	.wce-utility-bar__right.wp-block-group {
		display: none;
	}

	.wce-utility-bar {
		padding: 0.4rem 0.5rem;
		font-size: 0.65rem;
		justify-content: flex-start;
	}
	/* On mobile the BBT text is ~100 chars — wrap to 2 lines instead of
	   1-line ellipsis (ellipsis would chop at "Order within 20 hou…" which
	   is useless). Line-clamp keeps it bounded. */
	.wce-utility-bar__left p {
		white-space: normal;
		overflow: hidden;
		text-overflow: clip;
		display: -webkit-box;
		-webkit-line-clamp: 2;
		-webkit-box-orient: vertical;
		line-height: 1.35;
	}

	.wce-header-main { padding: 0.4rem 0.5rem; gap: 0.4rem; }
	.wce-logo { font-size: 1.25rem; height: 36px; }

	/* Account icon moves into drawer on mobile */
	.wce-header-actions .wp-block-woocommerce-customer-account { display: none; }

	/* Desktop inline search collapses to icon-toggle */
	.wce-product-search__toggle {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: 40px;
		height: 40px;
		padding: 0;
		background: transparent;
		border: none;
		border-radius: 999px;
		color: var(--wp--preset--color--foreground);
		cursor: pointer;
		transition: background-color 180ms ease, color 180ms ease;
	}
	.wce-product-search__toggle:hover,
	.wce-product-search__toggle:focus-visible {
		background-color: var(--wp--preset--color--surface-alt);
		color: var(--wp--preset--color--primary);
	}
	.wce-product-search--expanding .wce-product-search__form {
		display: none;
		position: absolute;
		top: calc(100% + 0.25rem);
		right: 0;
		left: auto;
		width: 320px;
		max-width: calc(100vw - 1rem);
		background-color: var(--wp--preset--color--surface);
		border: 1px solid var(--wp--preset--color--border);
		border-radius: 999px;
		padding: 0.25rem;
		box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.6);
		z-index: 101;
	}
	.wce-product-search--expanding .wce-product-search__form.is-open { display: flex; }
}

@media (min-width: 1280px) {
	.wce-hamburger { display: none; }
	.wce-mega-nav   { display: flex; }
}

/* Narrow phones — edge-to-edge chrome */
@media (max-width: 480px) {
	.wce-utility-bar { padding: 0.35rem 0.4rem; font-size: 0.6rem; }
	.wce-header-main { padding: 0.35rem 0.4rem; }
	.wce-logo { font-size: 1.1rem; }
}

/* Tighten nav at the narrow desktop edge */
@media (min-width: 1280px) and (max-width: 1440px) {
	.wce-mega-nav__trigger { padding: 1rem 0.65rem; font-size: 0.72rem; }
	.wce-product-search__form { width: 200px; }
}

/* ==========================================================
   12. Sticky-shrink niceties
   ========================================================== */

body.wce-header-scrolled .wce-utility-bar {
	padding-top: 0;
	padding-bottom: 0;
	max-height: 0;
	border-bottom-width: 0;
	overflow: hidden;
	opacity: 0;
	transition: max-height 200ms ease, padding 200ms ease, opacity 200ms ease;
}

/* =========================================================
   Phase L — Light/dark theme toggle button.
   Lives in the utility bar right group. Sun shown in dark,
   moon shown in light; swap via html[data-theme="light"].
   ========================================================= */
.wce-theme-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	padding: 0;
	margin-right: 0.5rem;
	background: transparent;
	color: currentColor;
	border: 1px solid transparent;
	border-radius: var(--wp--custom--wce--border-radius-small, 10px);
	cursor: pointer;
	transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}

.wce-theme-toggle:hover {
	background-color: var(--wp--preset--color--surface-alt);
	color: var(--wp--preset--color--primary);
}

.wce-theme-toggle:focus-visible {
	outline: none;
	box-shadow: var(--wp--custom--wce--glow-primary, 0 0 0 3px rgba(212, 255, 58, 0.3));
}

.wce-theme-toggle__sun,
.wce-theme-toggle__moon {
	display: block;
	width: 18px;
	height: 18px;
}

/* Default (dark mode) — show sun, hide moon. */
.wce-theme-toggle__moon { display: none; }

/* Light mode — show moon, hide sun. */
html[data-theme="light"] .wce-theme-toggle__sun { display: none; }
html[data-theme="light"] .wce-theme-toggle__moon { display: block; }
