/**
 * header.css
 *
 * Top bar, header inner (logo/search/account/cart), and the mega-menu.
 * Ported directly from the approved review mockups — verified identical
 * mega-menu CSS across all 7 mockup files via hash comparison during the
 * mockup phase, so this is the single, confirmed-consistent design.
 */

/* ---------------- Top bar ---------------- */
.topbar {
	background: #111;
	color: #fff;
	font-size: 12.5px;
}
.topbar .wrap {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 8px 24px;
	flex-wrap: wrap;
	gap: 6px;
}
.topbar .wrap span:last-child {
	text-align: right;
}
.topbar a {
	color: #fff;
}
.topbar a:hover {
	color: #ccc;
}

/* ---------------- Header ---------------- */
.site-header {
	border-bottom: 2px solid var(--ink);
	position: sticky;
	top: 0;
	background: #fff;
	z-index: 60;
	/* Fixes the whitespace-after-scroll bug: browsers' scroll-anchoring
	 * feature (Chrome/Firefox) can insert compensating space near a
	 * `position: sticky` element after the user scrolls down and back
	 * up, to avoid a perceived content jump. Nothing here actually needs
	 * that compensation, so opt this element out of it entirely. */
	overflow-anchor: none;
}
.site-header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	/* Longhand-equivalent 2-value form kept explicit (2026-09-07 fix) —
	 * the old `padding: 16px 0` zeroed left/right, silently overriding
	 * .wrap's `padding: 0 24px` horizontal gutter (base.css) since this
	 * rule loads after base.css and wins by cascade order. That pushed
	 * the logo flush to the true left edge and the search/account/cart
	 * icons flush to the true right edge, instead of matching the 24px
	 * inset every other row (topbar, nav, page content) uses. */
	padding: 16px 24px;
}
.site-title {
	margin: 0;
	font-size: 22px;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	font-weight: 800;
}
/*
 * Desktop size for an uploaded Custom Logo image (2026-09-16 — see
 * class-theme-setup.php's add_theme_support('custom-logo') comment for
 * why this didn't exist/do anything until now). 40px tall matches the
 * header's existing visual scale (.header-search input renders ~36-40px
 * tall). width:auto keeps whatever aspect ratio the uploaded image has —
 * flex-width/flex-height in add_theme_support means it isn't force-
 * cropped to any fixed shape. The ≤600px mobile override already
 * existed below at 30px tall.
 */
.custom-logo {
	max-height: 40px;
	width: auto;
}
.header-search {
	flex: 1;
	max-width: 368px; /* was 460px — reduced ~20% per 2026-09-06 request */
}
.header-search form {
	display: flex;
	border: 1px solid #111;
}
.header-search input {
	flex: 1;
	border: 0;
	padding: 10px 12px;
	outline: none;
	font-size: 14px;
}
.header-search button {
	background: #111;
	color: #fff;
	border: 0;
	padding: 0 16px;
}
.header-actions {
	display: flex;
	gap: 20px;
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}
/*
 * Root cause of the View Cart/Checkout invisible-text bug (2026-09-03
 * fix) — this was a plain DESCENDANT selector, so it matched every <a>
 * anywhere inside .header-actions, not just the two icon links it was
 * written for (My Account, and the cart icon itself). .cart-dropdown
 * lives inside .cart-nav-item purely so its `position: absolute` has
 * .cart-nav-item's `position: relative` to anchor to — but that nesting
 * also put the View Cart/Checkout <a class="btn ..."> buttons 3 levels
 * deep inside .header-actions, so this rule's `color: var(--ink)`
 * (#111) was silently reaching them too.
 *
 * Specificity is exactly why it only broke Checkout and not View Cart:
 * `.header-actions a` (1 class + 1 element = 0,1,1) outranks the plain
 * `.btn` class (0,1,0) at rest, but loses to `.btn:hover`/
 * `.btn-outline:hover` (1 class + 1 pseudo-class = 0,2,0) on hover.
 * View Cart carries .btn-outline too, whose own resting color (#111)
 * happens to match var(--ink) anyway, so it looked fine by coincidence.
 * Checkout is plain .btn, whose resting color is white — that's what
 * var(--ink) was quietly overriding to #111, producing #111 text on a
 * #111 background at rest (fixed the instant you hover, since the
 * higher-specificity hover rule takes over — matches exactly what was
 * reported: broken at rest, correct on hover, correct on View Cart).
 *
 * Fix: scope this rule to the two <a> elements it actually means —
 * .header-actions's own direct-child <a> (My Account) and
 * .cart-nav-item's direct-child <a> (the cart icon) — via child
 * combinators, so it can never again reach anything nested inside
 * .cart-dropdown, present or future. This is the root-cause fix, not a
 * band-aid override: no new rule outranks .btn/.btn-outline's own
 * :hover rules, so this can't reintroduce the "color pinned regardless
 * of hover" bug that testing-round item 20 already fixed once.
 */
.header-actions > a,
.header-actions > .cart-nav-item > a {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 3px;
	position: relative;
	color: var(--ink);
}
.header-actions svg {
	width: 20px;
	height: 20px;
}
.cart-count {
	position: absolute;
	top: -6px;
	right: -12px;
	background: #111;
	color: #fff;
	border-radius: 50%;
	width: 16px;
	height: 16px;
	font-size: 10px;
	display: flex;
	align-items: center;
	justify-content: center;
}

/*
 * ---------------- Mobile nav toggle / off-canvas drawer ----------------
 * Mobile-audit "Header" pass (2026-09-15). Base rules below just keep
 * these elements out of the desktop layout entirely (`display: none`);
 * all real sizing/position/animation lives in the 600px media query at
 * the bottom of this file, matching this theme's existing 900/600
 * breakpoint convention. #mainNav itself (the drawer surface) is
 * template-parts/header/mega-menu.php's own <nav> — no separate element.
 */
.mobile-nav-toggle {
	display: none;
	background: none;
	border: 0;
	padding: 0;
	margin: 0;
	width: 32px;
	height: 32px;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}
.mobile-nav-toggle .hamburger-lines {
	position: relative;
	display: block;
	width: 22px;
	height: 2px;
	background: var(--ink);
	transition: background-color 0.2s ease;
}
.mobile-nav-toggle .hamburger-lines::before,
.mobile-nav-toggle .hamburger-lines::after {
	content: "";
	position: absolute;
	left: 0;
	width: 22px;
	height: 2px;
	background: var(--ink);
	transition: transform 0.2s ease, top 0.2s ease;
}
.mobile-nav-toggle .hamburger-lines::before {
	top: -7px;
}
.mobile-nav-toggle .hamburger-lines::after {
	top: 7px;
}
/* Hamburger morphs into an X once the drawer is open — body.mobile-nav-open
 * is set by assets/js/mega-menu.js on toggle, same trigger the drawer
 * itself and the backdrop below key off of. */
body.mobile-nav-open .mobile-nav-toggle .hamburger-lines {
	background: transparent;
}
body.mobile-nav-open .mobile-nav-toggle .hamburger-lines::before {
	top: 0;
	transform: rotate(45deg);
}
body.mobile-nav-open .mobile-nav-toggle .hamburger-lines::after {
	top: 0;
	transform: rotate(-45deg);
}

.nav-backdrop {
	display: none;
}

.nav-drawer-header {
	display: none;
}

/* ---------------- Cart "Current Cart" / "Switch Cart" dropdown ---------------- */
/*
 * Values match mockup-cart.html's #cartDropdown exactly. Previous
 * implementation (a separate small toggle button + bare list of saved
 * carts) never had a mockup reference at all — this is the real one,
 * found on a second, broader search after the first search only
 * checked for "saved cart"/"switch cart" text and missed the actual
 * .cart-dropdown/.switch-cart-item class names used in the markup.
 */
.cart-nav-item {
	position: relative;
}
.cart-dropdown {
	display: none;
	position: absolute;
	top: calc(100% + 14px);
	right: 0;
	width: 300px;
	background: #fff;
	border: 1px solid #111;
	box-shadow: 0 10px 24px rgba(0, 0, 0, 0.1);
	z-index: 70;
	padding: 18px;
}
.cart-dropdown.open {
	display: block;
}
.cart-dropdown h4 {
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: #888;
	margin: 0 0 10px;
}
.cart-dropdown .current-cart-name {
	font-weight: 700;
	font-size: 14px;
	margin-bottom: 4px;
}
.cart-dropdown .current-cart-meta {
	font-size: 12px;
	color: #666;
	margin-bottom: 14px;
}
.cart-dropdown .dropdown-actions {
	display: flex;
	gap: 8px;
	margin-bottom: 16px;
}
.cart-dropdown .dropdown-actions .btn {
	flex: 1;
	padding: 9px;
	font-size: 11.5px;
	margin-top: 0;
	/*
	 * The `color:#fff`/`.btn-outline { color:#111 }` overrides that used
	 * to sit here were removed 2026-09-02 (testing-round item 20) — they
	 * were a defensive restatement for an earlier "Checkout text isn't
	 * white" report, but being 3-class selectors with no :hover variant,
	 * they permanently outranked base.css's .btn:hover/.btn-outline:hover
	 * rules (which DO flip color correctly) in every state, including
	 * hover. Net effect: background flipped on hover (base.css's
	 * unopposed rule) but text color stayed pinned to the forced resting
	 * value — invisible white-on-white "Checkout" text and black-on-black
	 * "View Cart" text on hover. base.css's existing .btn/.btn-outline
	 * resting + :hover rules already produce the correct, legible result
	 * once nothing here fights them — nothing needed to be added back.
	 */
}
.cart-dropdown .dropdown-actions .btn-outline {
	/* See .btn's comment above — its color override is gone for the
	 * same reason. */
}
.switch-cart-list {
	border-top: 1px solid var(--line);
	padding-top: 14px;
}
.switch-cart-list .switch-cart-item {
	/*
	 * Prefixed with .switch-cart-list (raising specificity to 2
	 * classes) rather than the bare .switch-cart-item alone — found via
	 * live debugging (DevTools Computed panel) that .header-actions a
	 * (1 class + 1 element = higher specificity than a single bare
	 * class) was unintentionally winning for display/align-items/color,
	 * since these dropdown links are structurally nested inside
	 * .header-actions and that selector has no depth limit. That rule
	 * is only meant for the top-level Track Order/Account/Cart icons
	 * (stacking an icon above a text label) — it was never meant to
	 * reach this deep, but a descendant selector like `.header-actions
	 * a` doesn't know the difference. Two explicit columns — name
	 * (left, allowed to wrap) and unit count (right, fixed) — both
	 * top-aligned rather than centered against each other, so a
	 * wrapped multi-line name doesn't pull the unit count down to its
	 * vertical middle. Per explicit user spec, a refinement on top of
	 * the mockup's own simpler space-between row.
	 */
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	padding: 8px 0;
	font-size: 12.5px;
	cursor: pointer;
	border-bottom: 1px solid #f2f2f2;
	color: var(--ink);
	text-decoration: none;
}
.switch-cart-list .switch-cart-item .switch-cart-name {
	flex: 1;
	min-width: 0;
	text-align: left;
	padding-right: 12px;
}
.switch-cart-list .switch-cart-item:last-child {
	border-bottom: 0;
}
.switch-cart-list .switch-cart-item:hover {
	color: var(--ink-soft);
}
.switch-cart-list .switch-cart-item .cart-meta {
	font-size: 11px;
	color: #999;
	flex-shrink: 0;
	text-align: right;
	white-space: nowrap;
}
.switch-cart-list .switch-cart-item.active {
	font-weight: 700;
}
.switch-cart-list .switch-cart-item.active .switch-cart-name::before {
	/*
	 * Scoped to the name column specifically, not the outer flex row —
	 * a ::before on a flex container becomes its own separate flex
	 * item, which justify-content:space-between would then push away
	 * from the name span with a visible gap, rather than sitting
	 * directly adjacent to it as intended.
	 */
	content: "✓ ";
}
.switch-cart-list .switch-cart-view-all {
	/*
	 * Prefixed with .switch-cart-list for the same reason every other
	 * selector in this block is — a bare single-class .switch-cart-item
	 * lost a specificity fight against .header-actions a (see that
	 * rule's own history above); this link is exactly as vulnerable
	 * (also an <a> tag, also needs display/color .header-actions a also
	 * declares) if left unprefixed.
	 */
	display: block;
	text-align: center;
	font-size: 11.5px;
	color: #666;
	text-decoration: underline;
	padding-top: 12px;
	margin-top: 4px;
	border-top: 1px solid #e5e5e5;
}
.switch-cart-list .switch-cart-view-all:hover {
	color: var(--ink);
}

/* ---------------- Nav / mega-menu ---------------- */
nav.main-nav {
	border-top: 1px solid var(--line);
	position: relative;
}
.nav-inner {
	max-width: 1240px;
	margin: 0 auto;
	padding: 0 24px;
	display: flex;
	flex-wrap: wrap;
}
.nav-item {
	position: static;
	display: flex;
	align-items: stretch;
}
.nav-item-link {
	background: none;
	border: 0;
	padding: 12px 4px 12px 16px;
	font-size: 12.5px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	font-weight: 600;
	color: var(--ink);
	text-decoration: none;
	display: inline-flex;
	align-items: center;
}
.nav-item-toggle {
	background: none;
	border: 0;
	padding: 12px 16px 12px 4px;
	color: var(--ink);
	cursor: pointer;
	display: inline-flex;
	align-items: center;
}
.nav-item-toggle .chev {
	font-size: 10px;
	transition: transform 0.15s ease;
}
.nav-item:hover .nav-item-link,
.nav-item:hover .nav-item-toggle,
.nav-item.open .nav-item-link,
.nav-item.open .nav-item-toggle {
	background: var(--ink);
	color: #fff;
}
.nav-item.open .nav-item-toggle .chev {
	transform: rotate(180deg);
}
/* Chevron removed on desktop only (2026-09-07) — now that hover opens the
 * panel (see mega-menu.js), the chevron became a redundant second
 * "activated" signal next to the caret below. `display: none` (not just
 * hidden visually) takes it fully out of the tab order and accessibility
 * tree here, which is what we want on desktop; mobile has no real hover
 * (fails this media query) and keeps the chevron exactly as before,
 * since tapping it is still the only way those users open the panel.
 * The label's own right padding widens to fill the space the chevron
 * used to occupy. */
@media (hover: hover) and (pointer: fine) {
	.nav-item-toggle {
		display: none;
	}
	.nav-item-link {
		padding: 12px 16px;
	}
}
.nav-plain-link {
	display: inline-block;
	padding: 12px 16px;
	font-size: 12.5px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	font-weight: 600;
}
.nav-plain-link:hover {
	background: var(--ink);
	color: #fff;
}
.mega-panel {
	display: none;
	position: absolute;
	top: 100%;
	left: 50%;
	transform: translateX(-50%);
	width: min(90vw, 1116px);
	background: #fff;
	border: 1px solid var(--ink);
	/* Was `border-top: none` — left the panel looking like an "unfinished
	 * window" cutting across the other nav items with no top edge
	 * (2026-09-07 report). Restored to match the other 3 sides; the small
	 * caret below re-connects the panel visually to whichever specific
	 * item actually opened it. */
	border-top: 1px solid var(--ink);
	box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
	z-index: 50;
	padding: 24px 30px;
}
.nav-item.open .mega-panel {
	display: block;
}
/*
 * Mobile-only "Back" button inside the fullscreen mega-panel — see
 * mega-menu.php's full rationale. Hidden here (desktop/tablet); shown
 * and positioned only in the 600px media query below, exactly where
 * .mega-panel itself becomes the `position: fixed; inset: 0` fullscreen
 * overlay this button exists to escape.
 */
.mega-panel-back {
	display: none;
}
/* Caret/pointer (2026-09-07): the panel itself still centers under the
 * whole nav bar rather than repositioning per item — a full per-item
 * reposition was considered and set aside as riskier (real off-screen
 * overflow risk for right-side items like "Bags"). Instead this small
 * pointer anchors visually back to whichever item is actually open.
 * Positioned against the same containing block as .mega-panel itself
 * (nav.main-nav — .nav-item is deliberately left `position: static`, same
 * as before, so .mega-panel's own positioning is unaffected); its
 * horizontal offset is supplied as a per-item CSS variable set in
 * mega-menu.js at open time, computed from the actual clicked/hovered
 * toggle button. Classic tooltip-arrow technique: a small square straddles
 * the panel's top border, rotated 45°, with only the two touching sides
 * bordered so it reads as a single triangular notch. */
.nav-item.open::after {
	content: "";
	display: block;
	position: absolute;
	top: 100%;
	left: var(--caret-left, 50%);
	width: 12px;
	height: 12px;
	margin-top: -6px;
	background: #fff;
	border-left: 1px solid var(--ink);
	border-top: 1px solid var(--ink);
	transform: translateX(-50%) rotate(45deg);
	z-index: 51;
}
/*
 * Column count is dynamic since Phase 4 (2026-09-28, configurable
 * mega-menu) — a per-item admin config (Appearance > Menus) can render
 * fewer than the default 5 facet columns and/or add one image cell, so
 * mega-menu.php sets --facet-col-count inline per panel to match
 * whatever it actually rendered. The `5` fallback only matters outside
 * WordPress (e.g. a raw CSS preview) — every real render sets the
 * variable itself. The two responsive overrides below (900px/600px)
 * intentionally keep their own fixed counts regardless of
 * --facet-col-count: they're about how many columns fit the
 * *viewport*, not how many the admin configured, and — being plain
 * declarations of the same selector/specificity, later in this file —
 * still win at those widths.
 */
.facet-columns {
	display: grid;
	grid-template-columns: repeat(var(--facet-col-count, 5), 1fr);
	gap: 24px;
}
/* Image slot cell (Phase 4) — fills its grid cell edge-to-edge, same
   height as the column content beside it (grid's own default stretch). */
.facet-col--image {
	display: block;
	overflow: hidden;
}
.facet-col--image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.facet-col h4 {
	font-size: 10.5px;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--ink-soft);
	border-bottom: 1px solid var(--line);
	padding-bottom: 7px;
	margin-bottom: 10px;
}
.facet-col ul {
	list-style: none;
	margin: 0;
	padding: 0;
}
.facet-col li {
	margin-bottom: 5px;
}
.facet-col a {
	font-size: 12.5px;
}
.facet-col a:hover {
	text-decoration: underline;
}
.mega-footer-row {
	margin-top: 18px;
	padding-top: 14px;
	border-top: 1px solid var(--line);
	display: flex;
	justify-content: flex-start; /* was flex-end — left-align per 2026-09-06 request */
}
.view-all-btn {
	border: 1px solid var(--ink);
	padding: 7px 14px;
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	font-weight: 600;
}
.view-all-btn:hover {
	background: var(--ink);
	color: #fff;
}
.promo-columns {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 20px 28px;
}
.promo-group h4 {
	font-size: 12px;
	text-transform: uppercase;
	font-weight: 700;
	margin-bottom: 8px;
}
.promo-group ul {
	list-style: none;
	margin: 0;
	padding: 0;
}
.promo-group li {
	margin-bottom: 4px;
}
.promo-group a {
	font-size: 12.5px;
	color: var(--ink-soft);
}

/* ---------------- Responsive ---------------- */
@media (max-width: 900px) {
	.facet-columns {
		grid-template-columns: repeat(3, 1fr);
	}
}
@media (max-width: 600px) {
	.mega-panel {
		position: fixed;
		top: 0;
		left: 0;
		right: 0;
		bottom: 0;
		width: 100%;
		max-width: none;
		transform: none;
		overflow: auto;
		padding: 60px 20px 20px;
	}
	/* The caret only makes sense pointing from a nav item down into a
	 * panel docked under the nav bar — irrelevant once the panel goes
	 * full-screen. */
	.nav-item.open::after {
		display: none;
	}
	/*
	 * Anchored inside .mega-panel's own reserved 60px top padding above —
	 * position: absolute is valid here because .mega-panel is itself
	 * position: fixed at this width, which establishes the containing
	 * block this button anchors against (no separate wrapper needed). No
	 * z-index required: as the panel's first child in source order, and
	 * the only positioned descendant, it already paints above the normal-
	 * flow .facet-columns/.promo-columns content beneath it.
	 */
	.mega-panel-back {
		display: flex;
		align-items: center;
		gap: 6px;
		position: absolute;
		top: 10px;
		left: 12px;
		background: none;
		border: 0;
		font-size: 12.5px;
		text-transform: uppercase;
		letter-spacing: 0.04em;
		font-weight: 700;
		color: var(--ink);
		/* Padding (not the 12.5px text alone) is the real tap target —
		 * same ~44px-minimum reasoning as .filters-close (shop.css). */
		padding: 12px 10px;
		cursor: pointer;
	}
	.facet-columns {
		grid-template-columns: 1fr;
		gap: 18px;
	}
	/*
	 * `flex: 0 0 100%` (not just width:100%) is the load-bearing part here
	 * — the base .header-search rule above sets `flex: 1`, which sets
	 * flex-basis: 0%, and flex-basis overrides width for a flex item's
	 * actual sizing. Without resetting flex-basis too, this element never
	 * really got its own full-width row despite the width:100% below —
	 * it just squeezed onto whatever line had leftover space, which is
	 * what let it silently share a line with .header-actions instead of
	 * sitting on its own row (2026-09-16 header wrap bug, see
	 * .site-header-inner below for the matching justify-content fix).
	 */
	.header-search {
		order: 3;
		flex: 0 0 100%;
		max-width: 100%;
		width: 100%;
	}
	.header-search input {
		/* Below 16px, iOS Safari auto-zooms the page on focus — same
		 * known issue flagged for other form inputs in this sub-project
		 * (session-handoff.md); fixed here since search lives in the
		 * header. Visual size otherwise unchanged (input still fills its
		 * flex row). */
		font-size: 16px;
	}
	/*
	 * Mobile-audit "Switch Cart"/"Switch Quote" pass (2026-09-15) —
	 * replaces an earlier, unverified attempt at this same rule
	 * (`width: 90vw; right: -60px`, bundled into the original mobile
	 * Header pass before Switch Cart/Quote were tackled as their own
	 * items). Confirmed broken via Playwright at 375px/320px: `right`
	 * still anchors to .cart-nav-item (the icon that opened it), and
	 * since the Cart icon sits well left-of-center in the mobile header
	 * row, a 90vw-wide box anchored that far right rendered with most of
	 * its content (the cart name, meta, and every Switch Cart/Quote row)
	 * pushed off the LEFT edge of the viewport — literally unreachable,
	 * since browsers don't offer horizontal scroll for content
	 * positioned at a negative x (there's nothing to scroll left INTO),
	 * so document.documentElement.scrollWidth never even flagged it as
	 * an overflow. Same class of bug as the Filter Bar's un-closeable
	 * panel found earlier in this sub-project — only caught by actually
	 * opening the dropdown and inspecting it, not by an overflow check
	 * alone.
	 *
	 * Fix: stop anchoring to the triggering icon at all. .cart-nav-item
	 * reverts to `position: static` here, so .cart-dropdown's containing
	 * block becomes .site-header instead (the next ancestor that's
	 * actually positioned — sticky counts). `top: 100%` then sits the
	 * dropdown right below the full header regardless of its exact
	 * rendered height (topbar + a header-inner that itself wraps to 2
	 * rows on mobile — no pixel value to keep in sync), and `left`/
	 * `right: 16px` with `width: auto` keeps it inset from both true
	 * viewport edges — guaranteed to fit at any width, and identical
	 * whichever icon (Cart or Quote) triggered it, since position no
	 * longer depends on where that icon happens to sit. Desktop is
	 * unaffected — .cart-nav-item's `position: relative` (this file,
	 * outside any media query) still applies below 600px's own more
	 * specific override only inside this block.
	 */
	.cart-nav-item {
		position: static;
	}
	.cart-dropdown {
		position: absolute;
		top: 100%;
		left: 16px;
		right: 16px;
		width: auto;
	}

	/* ---- Topbar: "Get Custom Quote" removed from mobile entirely per
	 * explicit request (topbar.php has the full rationale) — only the
	 * free-shipping message remains, left-aligned in its own row instead
	 * of the desktop space-between layout built for two items. ---- */
	.topbar-quote {
		display: none;
	}
	.topbar .wrap {
		justify-content: flex-start;
		padding: 8px 16px;
	}
	.topbar .wrap span:last-child {
		text-align: left;
	}

	/* ---- Header row: hamburger + logo + icon-only actions on one line
	 * that fits any phone viewport; search drops to its own full-width
	 * row below (order: 3, set above) instead of squeezing in.
	 *
	 * Fixed 2026-09-16 (live-confirmed on real iPhone Safari, "huge gap
	 * between hamburger and logo" + icons wrapping unpredictably): the
	 * base .site-header-inner rule's `justify-content: space-between`
	 * redistributes a LINE's leftover space between whatever items land
	 * on that line — and this row's item widths (hamburger + logo +
	 * actions) add up to right around the edge of a typical phone's
	 * width, so tiny sub-pixel rendering differences between browsers
	 * could tip whether 2 or 3 items landed on line one. When only 2
	 * landed there (hamburger + logo), space-between stretched the
	 * entire row's free space between just those two — the reported
	 * "huge gap." `justify-content: flex-start` + `margin-left: auto` on
	 * .header-actions below removes that per-line redistribution
	 * entirely, so this can't recur regardless of exact item widths.
	 * Tightened column-gap (was inheriting 24px from the desktop `gap:
	 * 24px` shorthand — this block only ever reset row-gap) so all 3
	 * items reliably fit on one line as designed, instead of being right
	 * at the fit/wrap boundary. ---- */
	.site-header-inner {
		flex-wrap: wrap;
		justify-content: flex-start;
		column-gap: 12px;
		row-gap: 10px;
		padding: 12px 16px;
	}
	.mobile-nav-toggle {
		display: flex;
	}
	.site-title {
		font-size: 17px;
	}
	.custom-logo {
		max-height: 30px;
		width: auto;
	}
	.header-actions {
		gap: 14px;
		/* Pins the icon group to the right edge of whichever line it
		 * lands on — stable regardless of item count on that line,
		 * unlike the space-between it replaces (see comment above). */
		margin-left: auto;
	}
	/* Icon labels (Sign In/name, Cart, Quote) go visual-only via
	 * aria-hidden on the span (header-inner.php) + the aria-label now on
	 * each link itself, so hiding them here loses no accessible name. */
	.header-action-label {
		display: none;
	}

	/*
	 * ---- Nav: off-canvas drawer, replacing the old
	 * `overflow-x: auto; flex-wrap: nowrap` horizontal-scroll bar. That
	 * made the whole page require sideways scrolling to reach nav items
	 * past the first screenful — exactly what this mobile-audit pass is
	 * fixing first. #mainNav now sits closed (off-screen left) until
	 * #mobileNavToggle adds body.mobile-nav-open (assets/js/mega-menu.js).
	 *
	 * Animated via `left`, not `transform`, deliberately: a `transform`
	 * on this element would make it the containing block for the
	 * `position: fixed` .mega-panel nested inside it (a category's
	 * full-screen sub-panel, opened by tapping a nav item's chevron while
	 * the drawer is open), which would then size/position against the
	 * drawer's own box instead of the real viewport and stop being
	 * full-screen. `left` avoids that trap entirely.
	 */
	nav.main-nav {
		border-top: 0;
	}
	#mainNav {
		position: fixed;
		top: 0;
		left: -100%;
		bottom: 0;
		width: 85vw;
		max-width: 340px;
		background: #fff;
		z-index: 90;
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
		box-shadow: 4px 0 16px rgba(0, 0, 0, 0.15);
		transition: left 0.25s ease;
	}
	body.mobile-nav-open #mainNav {
		left: 0;
	}
	.nav-backdrop {
		display: block;
		position: fixed;
		inset: 0;
		background: rgba(0, 0, 0, 0.5);
		z-index: 80;
		opacity: 0;
		pointer-events: none;
		transition: opacity 0.25s ease;
	}
	body.mobile-nav-open .nav-backdrop {
		opacity: 1;
		pointer-events: auto;
	}
	/* Locks the page behind the drawer so it doesn't scroll along with it. */
	body.mobile-nav-open {
		overflow: hidden;
	}
	.nav-drawer-header {
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding: 14px 16px;
		border-bottom: 1px solid var(--line);
	}
	.nav-drawer-title {
		font-size: 12.5px;
		text-transform: uppercase;
		letter-spacing: 0.06em;
		font-weight: 700;
	}
	.nav-drawer-close {
		background: none;
		border: 0;
		font-size: 26px;
		line-height: 1;
		padding: 2px 6px;
		color: var(--ink);
	}
	.nav-inner {
		max-width: none;
		margin: 0;
		padding: 8px 0;
		flex-direction: column;
		flex-wrap: nowrap;
	}
	.nav-item {
		width: 100%;
	}
	.nav-item-link {
		flex: 1;
	}
}
