/**
 * 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.
 */

.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;
}
.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;
}
.woocommerce-ordering select.orderby,
.sort-select {
	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;
}
.mobile-filter-toggle {
	display: none;
	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 button {
	background: none;
	border: 0;
	color: #ccc;
	font-size: 11.5px;
	text-decoration: underline;
}
.filters-head button:hover {
	color: #fff;
}

.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;
}
.price-inputs input {
	width: 100%;
	border: 1px solid #ccc;
	padding: 7px 8px;
	font-size: 12.5px;
}
.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;
}
.clear-all-link {
	font-size: 11.5px;
	color: #b00020;
	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 {
		display: inline-block;
	}
}
@media (max-width: 560px) {
	.product-grid {
		grid-template-columns: 1fr 1fr;
		gap: 12px;
	}
	.page-header {
		flex-direction: column;
		align-items: flex-start;
	}
}
