/* Shop, category and search pages: the title band with the part-type tabs, the filter bar, the cards (also used on the homepage and in the product page's related parts), the pagination and the empty state. PHP in inc/shop.php and inc/filters.php. Loaded after style.css; colours, fonts and --jkd-* variables come from there. Owner: shop pages. */

/* ------------------------------------------------------------------ Title band: black, title on the left, type tabs under it */
.product-archive-hero-section { overflow: hidden; }
.product-archive-hero-section .entry-hero-container-inner { position: relative; background: var(--jkd-black); }
/* The red slash from the homepage hero, smaller */
.product-archive-hero-section .entry-hero-container-inner::after {
	content: "";
	position: absolute;
	top: 0;
	bottom: 0;
	right: -6%;
	width: 24%;
	background: var(--jkd-red);
	transform: skewX(-16deg);
	transform-origin: bottom;
	pointer-events: none;
}
.product-archive-hero-section .hero-container { position: relative; z-index: 1; }
.product-archive-hero-section .entry-header {
	min-height: 0;
	align-items: flex-start;
	text-align: left;
	padding: 36px 0 0;
}
.product-archive-hero-section .page-title { margin: 0; color: #fff; }
.product-archive-hero-section .search-title span { color: var(--jkd-red); }
.product-archive-hero-section .archive-description {
	max-width: 600px;
	margin: 10px 0 0;
	color: var(--jkd-on-dark);
	font-size: 15px;
	line-height: 1.5;
}
.product-archive-hero-section .archive-description p { margin: 0; }
.jkd-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 0 28px;
	width: 100%;
	margin-top: 22px;
	border-top: 1px solid rgba(255, 255, 255, .14);
}
.jkd-tabs a {
	display: inline-flex;
	align-items: center;
	min-height: 48px;
	margin-bottom: -1px;
	padding-top: 2px;
	border-bottom: 3px solid transparent;
	color: var(--jkd-on-dark);
	font: 600 13px/1 var(--global-body-font-family, Saira, sans-serif);
	letter-spacing: .06em;
	text-transform: uppercase;
	text-decoration: none;
	transition: color .15s;
}
.jkd-tabs a:hover, .jkd-tabs a:focus-visible { color: #fff; }
.jkd-tabs a.is-active { color: #fff; border-bottom-color: var(--jkd-red); }

/* The band already has the intro: no second copy under it, and less space before the bar */
.post-type-archive-product .woocommerce-products-header .page-description { display: none; }
.woocommerce-page.archive .content-area, .woocommerce-page.search .content-area { margin-top: clamp(26px, 1.8vw, 36px); }

/* Laptops and up: the band's type and spacing grow with the screen (the page is 1440px wide, 1600px from 1800px) */
@media (min-width: 782px) {
	.product-archive-hero-section .entry-header { padding-top: clamp(36px, 2.5vw, 52px); }
	.product-archive-hero-section .page-title { font-size: clamp(36px, 1.9vw + 13px, 52px); }
	.product-archive-hero-section .archive-description { max-width: 62ch; margin-top: clamp(14px, 0.8vw, 18px); font-size: clamp(15px, 0.55vw + 7px, 17px); }
	.jkd-tabs { gap: 0 clamp(28px, 2vw, 40px); margin-top: clamp(22px, 1.6vw, 32px); }
	.jkd-tabs a { min-height: clamp(48px, 2.9vw, 56px); font-size: clamp(13px, 0.3vw + 9px, 14.5px); }
}

/* ------------------------------------------------------------------ Filter bar (inc/filters.php) */
.jkd-bar {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 12px 24px;
	margin: 0 0 clamp(22px, 1.5vw, 32px);
}
.jkd-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin: 0; }
/* The fields widen a little with the screen (168px at 1440, 224px at 1920) */
.jkd-filters__field, .jkd-bar__sort {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: clamp(168px, 11.6vw, 224px);
	margin: 0;
	padding: clamp(8px, 0.55vw, 11px) 40px clamp(8px, 0.55vw, 11px) clamp(12px, 0.8vw, 16px);
	border: 1px solid var(--jkd-line);
	border-radius: 6px;
	background: #fff;
	cursor: pointer;
	transition: border-color .15s, box-shadow .15s;
}
.jkd-bar__sort { min-width: clamp(200px, 13.5vw, 260px); }
.jkd-filters__field:hover, .jkd-bar__sort:hover { border-color: var(--jkd-muted); }
.jkd-filters__field:focus-within, .jkd-bar__sort:focus-within { border-color: var(--jkd-text); box-shadow: 0 0 0 3px rgba(14, 15, 17, .08); }
.jkd-filters__label, .jkd-bar__label {
	font-size: 11px;
	line-height: 1.2;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--jkd-muted);
}
.jkd-filters__field select, .jkd-bar__sort select {
	appearance: none;
	-webkit-appearance: none;
	display: block;
	width: 100%;
	height: auto;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	font: 700 15px/1.4 var(--global-body-font-family, Saira, sans-serif);
	color: var(--jkd-text);
	cursor: pointer;
}
.jkd-filters__field select:focus, .jkd-bar__sort select:focus { outline: 0; box-shadow: none; background: transparent; }
.jkd-bar .woocommerce-ordering { display: block; float: none; margin: 0; padding: 0; }
/* The chevron */
.jkd-filters__field::after, .jkd-bar__sort::after {
	content: "";
	position: absolute;
	right: 15px;
	top: 50%;
	width: 8px;
	height: 8px;
	margin-top: -6px;
	border: solid var(--jkd-muted);
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
	pointer-events: none;
}
.jkd-filters__clear, .jkd-filters__apply {
	display: inline-flex;
	align-items: center;
	align-self: center;
	min-height: 44px;
	padding: 0 6px;
	font-size: 13.5px;
	font-weight: 600;
	color: var(--jkd-red);
	text-decoration: none;
}
.jkd-filters__clear::before { content: "×"; margin-right: 5px; font-size: 17px; line-height: 1; }
.jkd-filters__clear:hover { color: var(--jkd-text); }
.jkd-filters__apply { border: 0; border-radius: 6px; padding: 0 18px; background: var(--jkd-black); color: #fff; }
.jkd-bar__right { display: flex; align-items: flex-end; gap: 16px; margin-left: auto; }
.jkd-bar__count { padding-bottom: 16px; font-size: 13.5px; line-height: 1.2; color: var(--jkd-muted); white-space: nowrap; }
.jkd-bar__count p { margin: 0; }

/* ------------------------------------------------------------------ Grid */
/* Phones: one per row (below). Small tablets: two. Tablets from 768px: three (Kadence). Laptops from 1025px: four.
   Wide screens from 1800px (the page is 1600px there): five on the shop pages; the homepage keeps its four. */
.woocommerce ul.products { column-gap: clamp(16px, 1.1vw, 22px); row-gap: clamp(16px, 1.1vw, 22px); }
@media (min-width: 576px) and (max-width: 767px) {
	.woocommerce ul.products.grid-sm-col-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1800px) {
	.woocommerce ul.products.woo-archive-loop.grid-lg-col-4 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

/* ------------------------------------------------------------------ Cards (inc/shop.php) */
.woocommerce ul.products li.product {
	position: relative;
	display: flex;
	flex-direction: column;
	margin: 0;
	border: 1px solid var(--jkd-line);
	border-radius: var(--jkd-radius);
	background: #fff;
	overflow: hidden;
	box-shadow: none;
	transition: border-color .15s, box-shadow .15s;
}
.woocommerce ul.products li.product:hover, .woocommerce ul.products li.product:focus-within {
	border-color: var(--jkd-muted);
	box-shadow: 0 10px 24px -16px rgba(0, 0, 0, .35);
}
.woocommerce ul.products li.product a.woocommerce-loop-image-link {
	position: relative;
	display: block;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	background: var(--jkd-grey);
	outline-offset: 0;
}
.woocommerce ul.products li.product a.woocommerce-loop-image-link img {
	display: block;
	width: 100%;
	height: 100%;
	margin: 0;
	object-fit: cover;
	transition: transform .35s ease;
}
.woocommerce ul.products li.product:hover a.woocommerce-loop-image-link img { transform: scale(1.03); }
.jkd-tag {
	position: absolute;
	left: 8px;
	top: 8px;
	z-index: 2;
	padding: 4px 7px;
	border-radius: 3px;
	background: var(--jkd-red);
	color: #fff;
	font: 800 11px/1 var(--jkd-display);
	letter-spacing: .1em;
	text-transform: uppercase;
}
.jkd-tag--sold { left: auto; right: 8px; background: var(--jkd-black); }
/* !important on the box: Kadence's "unboxed" archive rule zeroes the side padding with a longer selector */
.woocommerce ul.products li.product .product-details.entry-content-wrap {
	position: static;
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 4px;
	margin: 0 !important;
	padding: 10px 12px 12px !important;
	border-radius: 0;
	background: transparent;
	transform: none !important;
}
/* Two lines, always: so the mileage, fits and price lines sit on the same axis across a row */
.woocommerce ul.products li.product .woocommerce-loop-product__title {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	overflow: hidden;
	min-height: 2.6em;
	margin: 0;
	padding: 0;
	font-family: var(--global-body-font-family, Saira, sans-serif);
	font-size: 15px;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: 0;
	text-transform: none;
	color: var(--jkd-text);
}
.woocommerce ul.products li.product .woocommerce-loop-product__title a { color: inherit; text-decoration: none; }
/* The whole card is the link */
.woocommerce ul.products li.product .woocommerce-loop-product__title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
/* Full selectors here too: inside a page's .entry-content (homepage) Kadence's paragraph margins would win otherwise */
.woocommerce ul.products li.product .jkd-card-meta { margin: 0; font-size: 12.5px; line-height: 1.4; color: var(--jkd-muted); }
.woocommerce ul.products li.product .jkd-card-fits {
	margin: 0;
	font-size: 12px;
	line-height: 1.4;
	color: var(--jkd-muted);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.jkd-card-fits span { font-weight: 600; color: var(--jkd-steel); }
.woocommerce ul.products li.product .jkd-card-row {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 10px;
	margin-top: auto;
	padding-top: 8px;
}
.woocommerce ul.products li.product .price { margin: 0; font: 800 20px/1 var(--jkd-display); letter-spacing: .02em; color: var(--jkd-text); }
.woocommerce ul.products li.product .price .amount { font: inherit; color: inherit; }
.jkd-card-stock { font-size: 11.5px; font-weight: 700; line-height: 1; color: var(--jkd-ok); white-space: nowrap; }
.jkd-card-stock--sold { color: var(--jkd-muted); }
.woocommerce ul.products li.product .product-action-wrap, .woocommerce ul.products li.product .product-excerpt { display: none; }

/* Phones: one part per row, photo on the left, so the list reads like a spec sheet */
@media (max-width: 575px) {
	.woocommerce ul.products { row-gap: 10px; }
	.woocommerce ul.products li.product { display: grid; grid-template-columns: 128px minmax(0, 1fr); }
	.woocommerce ul.products li.product a.woocommerce-loop-image-link { aspect-ratio: auto; height: 100%; min-height: 108px; }
	.woocommerce ul.products li.product a.woocommerce-loop-image-link img { position: absolute; inset: 0; }
	.jkd-tag { left: 6px; top: 6px; padding: 3px 5px; font-size: 10px; }
	.jkd-tag--sold { left: auto; right: 6px; }
	.woocommerce ul.products li.product .product-details.entry-content-wrap { gap: 3px; padding: 10px 12px !important; }
	.woocommerce ul.products li.product .woocommerce-loop-product__title { min-height: 0; font-size: 14px; }
	.jkd-card-row { padding-top: 6px; }
	.woocommerce ul.products li.product .price { font-size: 19px; }
}

/* ------------------------------------------------------------------ Pagination */
.woocommerce nav.woocommerce-pagination { margin: 28px auto 0; }
.woocommerce nav.woocommerce-pagination ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 0; padding: 0; }
.woocommerce nav.woocommerce-pagination ul li { margin: 0; }
.woocommerce nav.woocommerce-pagination ul li .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	height: 44px;
	margin: 0;
	padding: 0 12px;
	border: 1px solid var(--jkd-line);
	border-radius: 6px;
	font: 700 14px/1 var(--jkd-display);
	letter-spacing: .04em;
	color: var(--jkd-text);
	text-decoration: none;
	transition: border-color .15s;
}
.woocommerce nav.woocommerce-pagination ul li a.page-numbers:hover, .woocommerce nav.woocommerce-pagination ul li a.page-numbers:focus { border-color: var(--jkd-text); }
.woocommerce nav.woocommerce-pagination ul li span.current { background: var(--jkd-black); border-color: var(--jkd-black); color: #fff; }
.woocommerce nav.woocommerce-pagination ul li .page-numbers.dots { min-width: 24px; padding: 0; border: 0; color: var(--jkd-muted); }

/* ------------------------------------------------------------------ Nothing matches (inc/filters.php) */
.jkd-empty {
	max-width: clamp(560px, 36vw, 680px);
	margin: 6px 0 24px;
	padding: clamp(26px, 1.6vw, 34px) clamp(24px, 1.5vw, 32px) clamp(22px, 1.4vw, 28px);
	border: 1px dashed var(--jkd-line);
	border-radius: var(--jkd-radius);
}
.jkd-empty__title { margin: 0 0 6px; font-size: 24px; text-transform: uppercase; }
.jkd-empty p { margin: 0 0 14px; color: var(--jkd-muted); }
.jkd-empty__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; }
.jkd-empty .jkd-empty__button {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 0 18px;
	border-radius: 4px;
	background: var(--jkd-red);
	color: #fff;
	font-weight: 700;
	font-size: 13.5px;
	letter-spacing: .06em;
	text-transform: uppercase;
	text-decoration: none;
}
.jkd-empty .jkd-empty__button:hover { background: var(--global-palette2, #b0141f); color: #fff; }
.jkd-empty__link { color: var(--jkd-text); font-weight: 600; text-decoration: none; }
.jkd-empty__link:hover { color: var(--jkd-red); }
.jkd-empty .jkd-empty__call { margin: 0; padding-top: 14px; border-top: 1px solid var(--jkd-line); font-size: 14px; }
.jkd-empty__call a { color: var(--jkd-text); font-weight: 700; text-decoration: none; }
.jkd-empty__call a:hover { color: var(--jkd-red); }

/* ------------------------------------------------------------------ Keyboard focus */
.jkd-tabs a:focus-visible,
.jkd-filters__clear:focus-visible,
.jkd-empty a:focus-visible,
.woocommerce nav.woocommerce-pagination a:focus-visible,
.woocommerce ul.products li.product a.woocommerce-loop-image-link:focus-visible,
.woocommerce ul.products li.product .woocommerce-loop-product__title a:focus-visible {
	outline: 2px solid var(--jkd-red);
	outline-offset: 2px;
}
.woocommerce ul.products li.product .woocommerce-loop-product__title a:focus-visible { outline-offset: -2px; }

/* ------------------------------------------------------------------ Phones and small tablets: the bar */
@media (max-width: 781px) {
	.jkd-bar { gap: 12px; }
	.jkd-filters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; gap: 8px; }
	.jkd-filters__field, .jkd-bar__sort { min-width: 0; padding: 7px 28px 7px 10px; }
	.jkd-filters__field select, .jkd-bar__sort select { font-size: 14px; }
	.jkd-filters__field::after, .jkd-bar__sort::after { right: 11px; }
	.jkd-filters__clear, .jkd-filters__apply { grid-column: 1 / -1; justify-self: start; min-height: 40px; }
	.jkd-bar__right { width: 100%; margin: 0; justify-content: space-between; }
	.jkd-bar__sort { flex: 0 1 200px; }
	.jkd-bar__count { padding-bottom: 14px; }
	.product-archive-hero-section .entry-hero-container-inner::after { right: -12%; width: 20%; }
	.product-archive-hero-section .entry-header { padding-top: 26px; }
	.product-archive-hero-section .archive-description { margin-top: 14px; font-size: 14px; }
	.jkd-tabs { gap: 0 16px; margin-top: 16px; }
	.jkd-tabs a { min-height: 44px; font-size: 12px; letter-spacing: .05em; }
}

/* Wide screens: the card text grows a step with the wider page, so cards don't read small next to the
   homepage's fluid sections or in the 1600px page. (Integrator, 2026-10-19.) */
@media (min-width: 1440px) {
	.woocommerce ul.products li.product .woocommerce-loop-product__title { font-size: 16px; }
	.woocommerce ul.products li.product .jkd-card-meta { font-size: 13px; }
	.woocommerce ul.products li.product .jkd-card-fits { font-size: 12.5px; }
	.woocommerce ul.products li.product .price { font-size: 22px; }
	.jkd-card-stock { font-size: 12px; }
}
@media (min-width: 1800px) {
	.woocommerce ul.products li.product .woocommerce-loop-product__title { font-size: 17px; }
	.woocommerce ul.products li.product .jkd-card-meta { font-size: 13.5px; }
	.woocommerce ul.products li.product .jkd-card-fits { font-size: 13px; }
	.woocommerce ul.products li.product .price { font-size: 24px; }
	.jkd-card-stock { font-size: 12.5px; }
}
