/**
 * shop.css
 *
 * Category/Shop page: page header, 11-filter sidebar, product grid,
 * pagination. Ported directly from the approved review mockup. Product
 * card styling itself lives in product-card.css — nothing duplicated
 * here, only the grid layout that wraps it. .breadcrumbs now lives in
 * base.css (global, since every page with a breadcrumb needs it, not
 * just this one) — see that file's comment for why.
 */

/*
 * Category Header Banner (2026-09-28, follow-up to Phase 5) — optional
 * per-category image, rendered by template-parts/shop/category-banner.php
 * right above this page's breadcrumb/title. The width toggle itself
 * (Block vs. Full page width) is handled entirely by that template
 * reusing homepage.css's existing .wt-section-full-width rule — nothing
 * banner-specific needed for that part. Only .category-banner--has-text
 * gets the dark overlay, so a banner with no heading/text set shows the
 * plain image with nothing dimming it.
 */
.category-banner {
	position: relative;
	min-height: 220px;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	display: flex;
	align-items: center;
	margin: 24px 0;
}
.category-banner--has-text::before {
	content: '';
	position: absolute;
	inset: 0;
	background: rgba(17, 17, 17, 0.45);
}
.category-banner__content {
	position: relative;
	z-index: 1;
	color: #fff;
	padding: 32px;
	max-width: 620px;
}
.category-banner__content h2 {
	margin: 0 0 0.3em;
	font-size: 28px;
	text-transform: uppercase;
	letter-spacing: 0.02em;
}
.category-banner__content p {
	margin: 0;
	color: #eee;
}
@media (max-width: 560px) {
	.category-banner {
		min-height: 160px;
	}
	.category-banner__content {
		padding: 20px;
	}
	.category-banner__content h2 {
		font-size: 20px;
	}
}

.page-header {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	border-bottom: 2px solid #111;
	padding: 10px 0 14px;
	margin-bottom: 22px;
	flex-wrap: wrap;
	gap: 12px;
}
.page-header h1 {
	margin: 0;
	font-size: 24px;
	text-transform: uppercase;
	letter-spacing: 0.01em;
}
/*
 * Search-results heading (v90.1) — live-testing feedback: only the
 * quoted search term itself was called out as "too overbearing," not
 * the "Search:" label — that label keeps the exact same style as Shop/
 * New Arrivals/etc (no override needed, it's the same <h1>). Only the
 * term span (archive-product.php, is_search() branch) is toned down —
 * smaller and grey.
 */
.page-header h1 .page-header__search-term {
	font-size: 18px;
	color: #666;
}
.page-header .count {
	font-size: 13px;
	color: #666;
	margin-top: 4px;
}
.header-controls {
	display: flex;
	align-items: center;
	gap: 14px;
}
/*
 * Sort dropdown — ported from the mockup as a plain `.sort-select`
 * class, but woocommerce_catalog_ordering() actually renders its own
 * native markup: `<form class="woocommerce-ordering">` wrapping
 * `<select name="orderby" class="orderby">`, neither of which is
 * `.sort-select`. The rule below never matched anything live. Fixed by
 * targeting WooCommerce's real markup with the same mockup styling,
 * rather than trying to rename WooCommerce's own class.
 */
.woocommerce-ordering {
	display: inline-flex;
	margin: 0;
	/*
	 * !important (2026-09-16, confirmed via live DevTools inspection):
	 * WooCommerce's own bundled woocommerce.css ships `.woocommerce
	 * .woocommerce-ordering { margin: 0 0 1em; }` — a 2-class selector
	 * that beats this file's plain `.woocommerce-ordering` on
	 * specificity alone, regardless of load order. That stray 1em
	 * bottom-only margin is what was shifting the sort dropdown ~8px
	 * above the Filters button in the header-controls row (an
	 * asymmetric margin shifts the align-items:center midpoint). This
	 * theme fully custom-styles WooCommerce end to end, so this
	 * !important just makes sure our own explicit `margin: 0` actually
	 * wins here — it isn't a hack to work around our own CSS.
	 */
	margin-bottom: 0 !important;
}
.woocommerce-ordering select.orderby,
.sort-select {
	/*
	 * Explicit height (2026-09-16, mobile-feedback follow-up) — this
	 * select intentionally keeps the browser's native appearance (see
	 * account.css's comment on the Country/State dropdowns), so its
	 * rendered box height is otherwise up to each OS/browser's own
	 * native chrome rather than just padding+border+line-height like an
	 * ordinary element. That let it drift a px or more taller/shorter
	 * than .mobile-filter-toggle right next to it, which looked
	 * "not vertically centered" even though both sit in a flex row with
	 * align-items:center — align-items centers whatever height each box
	 * ends up with, it can't make two different heights match. Giving
	 * both this same explicit height (border-box is set globally, see
	 * base.css's `* { box-sizing: border-box }`) pins them to identical
	 * boxes so centering has something equal to center.
	 */
	height: 38px;
	border: 1px solid #111;
	padding: 8px 12px;
	font-size: 12.5px;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	background: #fff;
	font-weight: 600;
	border-radius: 0;
	cursor: pointer;
}
/*
 * Custom sort dropdown (2026-09-16) — replaces the native <select> above
 * for anyone with JS (shop-filters.js builds this at runtime from the
 * same <option>s and drives the real <select> from behind the scenes, so
 * WooCommerce's own submit-on-change behavior is untouched). The native
 * select block above stays exactly as-is: it's the real no-JS fallback,
 * not dead code. Root cause this exists at all: a native <select>'s open
 * options list is OS-drawn chrome — no site's CSS can restyle it, and
 * unlike desktop Chrome (which happens to tint options from inherited
 * background/color), mobile Chrome/Safari ignore page CSS for it
 * entirely. Same visual spec as the select it replaces (border, padding,
 * font, height) so swapping one for the other is invisible when closed.
 */
.custom-select {
	position: relative;
}
.custom-select-trigger {
	display: inline-flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	height: 38px;
	border: 1px solid #111;
	padding: 8px 12px;
	font-family: inherit;
	font-size: 12.5px;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	background: #fff;
	color: #111;
	font-weight: 600;
	border-radius: 0;
	cursor: pointer;
	white-space: nowrap;
}
/* Same "▾" glyph + rotate-on-open treatment as .filter-group summary
   .chev (this file, above) — reusing the one custom-arrow convention
   this theme already had, rather than inventing a second one. */
.custom-select-arrow {
	font-size: 11px;
	color: #888;
	transition: transform 0.15s ease;
}
.custom-select.open .custom-select-arrow {
	transform: rotate(180deg);
}
.custom-select-list {
	position: absolute;
	top: calc(100% + 4px);
	right: 0;
	min-width: 100%;
	background: #fff;
	border: 1px solid #111;
	list-style: none;
	margin: 0;
	padding: 0;
	z-index: 30;
}
.custom-select-option {
	padding: 10px 12px;
	font-size: 12.5px;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	white-space: nowrap;
	cursor: pointer;
	border-bottom: 1px solid var(--line);
}
.custom-select-option:last-child {
	border-bottom: 0;
}
.custom-select-option:hover,
.custom-select-option:focus {
	background: #111;
	color: #fff;
	outline: none;
}
/* Selected option: bold + a soft tint (not the full black/white hover
   invert, so it reads as "current state" rather than "hovered") — same
   idea as .filter-option's checked checkbox, just without a checkbox
   here since there's nothing to check. */
.custom-select-option[aria-selected='true'] {
	font-weight: 700;
	background: var(--bg-soft);
}
.custom-select-option[aria-selected='true']:hover,
.custom-select-option[aria-selected='true']:focus {
	background: #111;
	color: #fff;
}
/* Standard visually-hidden pattern (same technique as cart.css's
   .sr-only, redeclared here since that file isn't loaded on Shop pages)
   — keeps the real <select> in the DOM/AX tree as little as possible
   without display:none, which would stop it from still holding/
   dispatching the value change-listener above relies on. */
.custom-select-enhanced {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}
.mobile-filter-toggle {
	display: none;
	height: 38px; /* matches .woocommerce-ordering select.orderby above — see that comment */
	border: 1px solid #111;
	background: #111;
	color: #fff;
	padding: 8px 14px;
	font-size: 12.5px;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	font-weight: 600;
}

.shop-layout {
	display: grid;
	grid-template-columns: 260px 1fr;
	gap: 32px;
	align-items: start;
	/* Bottom spacing before the footer now comes from .site-footer's
	 * canonical margin-top (footer.css, testing-round item 18) — this
	 * page-specific padding-bottom was removed 2026-09-02 to avoid
	 * doubling up with it. */
}

/* ---------------- Filter sidebar ---------------- */
.filters {
	border: 1px solid #111;
}
.filters-head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 14px 16px;
	border-bottom: 1px solid #111;
	background: #111;
	color: #fff;
}
.filters-head h3 {
	margin: 0;
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}
.filters-head-actions {
	display: flex;
	align-items: center;
	gap: 14px;
}
.filters-head button {
	background: none;
	border: 0;
	color: #ccc;
	font-size: 11.5px;
	text-decoration: underline;
}
.filters-head button:hover {
	color: #fff;
}
/*
 * Close (×) for the mobile full-screen filter panel — mobile-audit
 * "Filter Bar" pass, 2026-09-15 (filter-sidebar.php has the full
 * rationale: without this, the panel had no way to close once opened).
 * Hidden here by default since the desktop sidebar is never an overlay;
 * shown only in the 900px media query below, exactly where `.filters`
 * itself starts becoming one. Selector scoped as `.filters-head-actions
 * .filters-close` (2 classes), not the bare `.filters-close` class alone
 * — needs to outrank `.filters-head button` (1 class + 1 element) right
 * above, which would otherwise win on specificity and silently override
 * this button's color/size/underline with Clear All's styling.
 */
.filters-head-actions .filters-close {
	display: none;
	color: #fff;
	text-decoration: none;
	font-size: 22px;
	line-height: 1;
	/*
	 * Padding (not a wider font-size) is what actually grows the tap
	 * target here — Playwright measured the un-padded button at ~13x22px
	 * (the "×" glyph's own ink box), well under the ~44px minimum a
	 * thumb needs. Vertical padding is asymmetric (10px/8px, not 9/9)
	 * because .filters-head's own 14px vertical padding plus this
	 * button's line-height already centers the glyph a hair high;
	 * splitting it this way lands the visible "×" dead-center in the
	 * enlarged box instead of shifting the whole head bar taller.
	 * Negative margin cancels the added padding back out against
	 * .filters-head-actions's own 14px gap, so Clear All doesn't visibly
	 * shift position now that its neighbor got bigger.
	 */
	padding: 10px 10px 8px;
	margin: -10px -6px -8px 0;
	min-width: 44px;
	min-height: 44px;
	align-items: center;
	justify-content: center;
}
.filters-head-actions .filters-close:hover {
	color: #ccc;
}

.filter-group {
	border-bottom: 1px solid var(--line);
}
.filter-group:last-child {
	border-bottom: 0;
}
.filter-group summary {
	list-style: none;
	cursor: pointer;
	padding: 13px 16px;
	font-size: 12.5px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	display: flex;
	justify-content: space-between;
	align-items: center;
}
.filter-group summary::-webkit-details-marker {
	display: none;
}
.filter-group summary .chev {
	transition: transform 0.15s ease;
	font-size: 11px;
	color: #888;
}
.filter-group[open] summary .chev {
	transform: rotate(180deg);
}
.filter-group-body {
	padding: 0 16px 14px;
}

.filter-option {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 4px 0;
	font-size: 12.5px;
	cursor: pointer;
}
.filter-option .left {
	display: flex;
	align-items: center;
	gap: 8px;
}
.filter-option input[type='checkbox'] {
	accent-color: #111;
}
.filter-option .cnt {
	color: #999;
	font-size: 11.5px;
}

.price-inputs {
	display: flex;
	align-items: center;
	gap: 8px;
}
/*
 * User request 2026-09-27: +/- button stepper for the Min/Max price
 * inputs, matching the look of the Simple-product qty-stepper
 * (single-product.css's own `.qty-stepper` rules, just below this file's
 * counterpart) — kept as its own `.price-stepper` class rather than
 * reusing `.qty-stepper` directly, since that class's JS behavior
 * (pricing-matrix.js) only ever loads on is_product() pages and has
 * nothing to do with this filter (see shop-filters.js for this class's
 * own, independent stepper logic). The border that used to sit directly
 * on `.price-inputs input` moves to this wrapper instead, matching
 * `.qty-stepper`'s own border-on-the-wrapper structure.
 */
.price-stepper {
	display: inline-flex;
	align-items: stretch;
	flex: 1;
	min-width: 0;
	border: 1px solid #ccc;
}
.price-stepper button {
	background: #f7f7f7;
	border: 0;
	width: 22px;
	flex-shrink: 0;
	font-size: 13px;
	line-height: 1;
	color: #111;
	cursor: pointer;
}
.price-stepper .price-dec {
	border-right: 1px solid #ccc;
}
.price-stepper .price-inc {
	border-left: 1px solid #ccc;
}
.price-stepper button:hover:not(:disabled) {
	background: #e8e8e8;
}
.price-stepper button:disabled {
	color: #ccc;
	cursor: default;
}
.price-inputs input {
	width: 100%;
	min-width: 0;
	border: 0;
	padding: 7px 4px;
	font-size: 12.5px;
	text-align: center;
	/* Native spin arrows are redundant now that the stepper buttons do
	 * the same job — same fix as single-product.css's `.qty-stepper
	 * input`, needing both properties for the same reason (WebKit/Blink
	 * and Firefox each require their own). */
	-moz-appearance: textfield;
}
.price-inputs input::-webkit-outer-spin-button,
.price-inputs input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}
.price-inputs span {
	color: #999;
}

.color-swatches {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}
.color-swatch {
	width: 24px;
	height: 24px;
	border-radius: 50%;
	border: 1px solid #ccc;
	cursor: pointer;
	position: relative;
}
.color-swatch.selected::after {
	content: '✓';
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	font-size: 12px;
	text-shadow: 0 0 2px rgba(0, 0, 0, 0.8);
}

.size-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}
.size-chip {
	border: 1px solid #999;
	padding: 5px 10px;
	font-size: 11.5px;
	cursor: pointer;
	background: #fff;
}
.size-chip:hover,
.size-chip.selected {
	background: #111;
	color: #fff;
	border-color: #111;
}

.show-more-link {
	font-size: 11.5px;
	color: #666;
	text-decoration: underline;
	display: inline-block;
	margin-top: 4px;
}

/* ---------------- Active filter pills ---------------- */
.active-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 18px;
}
.active-filters:empty {
	display: none;
}
.filter-pill {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	border: 1px solid #111;
	padding: 5px 10px 5px 12px;
	font-size: 11.5px;
	text-transform: uppercase;
	letter-spacing: 0.02em;
	font-weight: 600;
}
.filter-pill button {
	background: none;
	border: 0;
	font-size: 13px;
	line-height: 1;
	padding: 0;
}
/*
 * v87.5 (2026-09-04, user request): previously used a red (#b00020)
 * text color — same "no color for UI styling, grayscale only"
 * violation found and fixed elsewhere this same round (v87.4's alert
 * boxes, this file's own .oos-tag). Now matches .show-more-link just
 * above — same underlined secondary-link treatment, same #666 — since
 * "Clear All" is an ordinary link action, not a warning that needs its
 * own visual weight.
 */
.clear-all-link {
	font-size: 11.5px;
	color: #666;
	text-decoration: underline;
	align-self: center;
	margin-left: 4px;
}

/* ---------------- Product grid ---------------- */
.product-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 20px;
	transition: opacity .15s ease;
}
.product-grid[aria-busy="true"] {
	opacity: .45;
	pointer-events: none;
}
/*
 * "Nothing found" empty state (woocommerce/loop/no-products-found.php)
 * renders as the lone child of .product-grid — without this, a single
 * <p> in a 3-column grid sits in just the first column, a third of the
 * width, left-aligned, looking broken rather than intentional. Matches
 * the same dashed-border/centered/generous-padding treatment already
 * established for the empty cart state (see .empty-state in cart.css)
 * so both empty states feel like the same design system.
 */
.product-grid .woocommerce-info {
	grid-column: 1 / -1;
	border: 1px dashed #999;
	padding: 60px 20px;
	margin: 0;
	text-align: center;
	color: #666;
	font-size: 14px;
}

/* ---------------- Pagination ---------------- */
.pagination {
	display: flex;
	justify-content: center;
	gap: 6px;
	margin-top: 36px;
	flex-wrap: wrap;
}
.pagination a,
.pagination span {
	border: 1px solid #ddd;
	padding: 8px 13px;
	font-size: 13px;
	min-width: 36px;
	text-align: center;
}
.pagination .current {
	background: #111;
	color: #fff;
	border-color: #111;
	font-weight: 700;
}
.pagination .arrow {
	font-weight: 700;
}

/* ---------------- Responsive ---------------- */
@media (max-width: 900px) {
	.shop-layout {
		grid-template-columns: 1fr;
	}
	.product-grid {
		grid-template-columns: repeat(2, 1fr);
	}
	.filters {
		display: none;
		position: fixed;
		inset: 0;
		z-index: 80;
		background: #fff;
		overflow: auto;
		border: 0;
	}
	.filters.open {
		display: block;
	}
	.mobile-filter-toggle {
		/* inline-flex + centered, not inline-block — with the explicit
		 * height set above, inline-block would just top-align the text
		 * inside the taller box instead of centering it. */
		display: inline-flex;
		align-items: center;
		justify-content: center;
	}
	.filters-head-actions .filters-close {
		display: inline-flex;
		align-items: center;
	}
	/* Locks the page behind the full-screen filter panel so it can't
	 * scroll along with it (toggled by shop-filters.js alongside
	 * `.filters.open` itself) — same treatment as the mobile nav drawer
	 * (header.css). */
	body.mobile-filters-open {
		overflow: hidden;
	}
}
@media (max-width: 560px) {
	.product-grid {
		grid-template-columns: 1fr 1fr;
		gap: 12px;
	}
	.page-header {
		flex-direction: column;
		align-items: flex-start;
	}
	/* .page-header going flex-direction:column above means its children
	 * (h1, count, .header-controls) each shrink to their own natural
	 * width instead of stretching — so .header-controls (Filters button
	 * + sort dropdown) no longer gets pushed flush right against the
	 * page edge the way it does at 560–900px, where .page-header is
	 * still row-direction and its own justify-content:space-between
	 * does that job. Restoring it explicitly here: stretch
	 * .header-controls to the full row width and let its own
	 * justify-content push the sort dropdown to the right edge, while
	 * its existing align-items:center (base rule, unchanged) keeps it
	 * vertically centered with the Filters button — mobile-feedback
	 * item 2026-09-16. */
	.header-controls {
		width: 100%;
		justify-content: space-between;
	}
}
