/* ---------- Shop archive (product category) ---------- */
.prod-sec {
	padding-top: 20px;
	/* Kept tight: on the category archives an editorial section follows with its
	   own top padding, and the client asked for the two to sit closer. */
	padding-bottom: 24px;
}

.prod-sec .section-title {
	margin: 14px 0 40px;
}

/* Flex, not grid: a short last row (Pickup has three tires) has to centre
   rather than leave a hole on the right. Full rows are unchanged — four cards
   at basis 25% fill the row exactly like the old 4 x 1fr tracks did. */
.prod-grid {
	--prod-cols: 4;
	--prod-gap: 24px;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: var(--prod-gap);
}

.prod-card {
	box-sizing: border-box;
	flex: 0 1 calc((100% - (var(--prod-cols) - 1) * var(--prod-gap)) / var(--prod-cols));
	min-width: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	padding: 0 6px;
}

.prod-card .tire {
	height: 300px;
	display: flex;
	align-items: flex-end;
	justify-content: center;
}

.prod-card .tire img {
	max-height: 300px;
	width: auto;
	filter: drop-shadow(0 24px 14px rgba(0, 0, 0, .55));
}

.prod-card h3 {
	font-size: clamp(22px, 1.7vw, 30px);
	font-weight: 400;
	margin: 24px 0 12px;
}

.prod-card p {
	font-size: 14px;
	font-weight: 400;
	line-height: 1.4;
	color: #fff;
	max-width: 340px;
}

.prod-sec hr.rule {
	border: none;
	border-top: 1px solid rgba(255, 255, 255, .28);
	margin: 40px 0;
}

/* category editorial (ACF detail_top / detail_bottom, WYSIWYG) — design v4
   "NEXEN's Popular …" write-ups: numbered product headings, magenta subtitles,
   magenta bullet lists, two-column Vehicle Type / Ideal models blocks. */
.wc-detail-top,
.wc-detail-bottom {
	max-width: 1700px;
}

.wc-detail-top {
	margin: 0 0 34px;
}

.wc-detail-bottom {
	/* carries its own end-of-page spacing now that .prod-sec's bottom padding is
	   tight — a page that ends on this block would otherwise crowd the footer. */
	margin: 8px 0 32px;
}

/* section heading — "NEXEN's Popular Passenger Tires" */
.wc-detail-top h1,
.wc-detail-bottom h1,
.wc-detail-top h2,
.wc-detail-bottom h2 {
	font-size: clamp(28px, 2.6vw, 42px);
	font-weight: 600;
	color: #fff;
	letter-spacing: .5px;
	margin: 8px 0 26px;
}

/* numbered product name — "1. NEXEN N'BLUE HD Plus" */
.wc-detail-top h3,
.wc-detail-bottom h3 {
	font-size: clamp(20px, 1.7vw, 28px);
	font-weight: 700;
	color: #fff;
	margin: 30px 0 4px;
}

/* subtitle — "Eco-Smart Performance" */
.wc-detail-top h4,
.wc-detail-bottom h4 {
	font-size: clamp(15px, 1.2vw, 19px);
	font-weight: 600;
	color: #bb54cb;
	margin: 0 0 14px;
}

.wc-detail-top h5,
.wc-detail-bottom h5 {
	font-size: clamp(15px, 1.15vw, 18px);
	font-weight: 700;
	color: #bb54cb;
	margin: 14px 0 8px;
}

.wc-detail-top p,
.wc-detail-bottom p,
.wc-detail-top li,
.wc-detail-bottom li {
	font-size: clamp(18px, 1.05vw, 16px);
	font-weight: 300;
	line-height: 1.75;
	color: var(--muted);
}

.wc-detail-top ul,
.wc-detail-bottom ul,
.wc-detail-top ol,
.wc-detail-bottom ol {
	margin: 2px 0 18px 20px;
}

.wc-detail-top ul li,
.wc-detail-bottom ul li {
	list-style: none;
	position: relative;
	padding-left: 6px;
}

.wc-detail-top ul li::before,
.wc-detail-bottom ul li::before {
	content: '';
	position: absolute;
	left: -14px;
	top: .55em;
	width: 8px;
	height: 8px;
	background: #bb54cb;
}

.wc-detail-top ul li strong,
.wc-detail-bottom ul li strong {
	color: #fff;
	font-weight: 500;
}

.wc-detail-top img,
.wc-detail-bottom img {
	height: auto;
	border-radius: 12px;
	margin: 16px 0;
}

.wc-detail-top table,
.wc-detail-bottom table {
	width: 100%;
	border-collapse: collapse;
	margin: 16px 0;
}

.wc-detail-top td,
.wc-detail-top th,
.wc-detail-bottom td,
.wc-detail-bottom th {
	border: 1px solid rgba(255, 255, 255, .15);
	padding: 10px 14px;
	font-size: 14px;
	font-weight: 300;
	vertical-align: top;
}

.wc-detail-top th,
.wc-detail-bottom th {
	color: #bb54cb;
	font-weight: 700;
	text-align: left;
}

/* ---------- Single product ---------- */
.detail {
	display: flex;
	gap: clamp(30px, 4vw, 70px);
	align-items: flex-start;
	padding: 36px 0 60px;
}

.gallery {
	flex: 0 0 auto;
	width: min(560px, 48%);
}

.gallery-main {
	background: rgba(255, 255, 255, .07);
	border-radius: 20px;
	aspect-ratio: 650/524;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 26px;
}

.gallery-main img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	filter: drop-shadow(0 22px 18px rgba(0, 0, 0, .5));
}

.gallery-thumbs {
	display: flex;
	gap: 14px;
	margin-top: 18px;
	flex-wrap: wrap;
}

.gallery-thumbs button {
	flex: 1;
	min-width: 70px;
	aspect-ratio: 1/1;
	background: rgba(255, 255, 255, .07);
	border: 1px solid transparent;
	border-radius: 10px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 9px;
	transition: border-color .15s;
}

.gallery-thumbs button.active,
.gallery-thumbs button:hover {
	border-color: var(--purple);
}

.gallery-thumbs img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
}

.detail-panel {
	flex: 1 1 0;
	min-width: 0;
	padding-top: 4px;
}

.detail-panel h1 {
	font-size: clamp(28px, 2.4vw, 42px);
	font-weight: 700;
}

.detail-panel .lead {
	font-size: clamp(15px, 1.2vw, 18px);
	font-weight: 300;
	color: rgba(255, 255, 255, .85);
	margin-top: 14px;
}

.detail-panel .field {
	margin-top: 26px;
}

.detail-panel .field label {
	display: block;
	font-size: clamp(16px, 1.2vw, 20px);
	font-weight: 700;
	margin-bottom: 12px;
}

.detail-panel .field select {
	width: 100%;
	appearance: none;
	-webkit-appearance: none;
	background: #1c1c1c;
	border: 1px solid rgba(255, 255, 255, .14);
	border-radius: 8px;
	height: 56px;
	padding: 0 20px;
	color: #fff;
	font-family: inherit;
	font-size: clamp(15px, 1.1vw, 17px);
	cursor: pointer;
}

.detail-panel .field select:focus {
	outline: none;
	border-color: var(--purple);
}

.btn-contact {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	margin-top: 34px;
	background: var(--purple);
	border: none;
	border-radius: 30px;
	height: 58px;
	color: #fff;
	font-size: clamp(16px, 1.2vw, 18px);
	font-weight: 700;
	letter-spacing: .5px;
	cursor: pointer;
	transition: filter .15s;
}

.btn-contact:hover {
	filter: brightness(1.1);
}

.desc-sec {
	padding-bottom: 74px;
}

.desc-sec h2 {
	font-size: clamp(28px, 2.6vw, 40px);
	font-weight: 700;
	margin-bottom: 28px;
}

.desc-block {
	margin-bottom: 28px;
}

.desc-block:last-child {
	margin-bottom: 0;
}

.desc-block h3 {
	font-size: clamp(17px, 1.35vw, 20px);
	font-weight: 700;
	margin-bottom: 12px;
}

.desc-block h3.accent {
	color: var(--purple);
}

.desc-block p {
	font-size: clamp(14px, 1.05vw, 15px);
	font-weight: 300;
	line-height: 1.75;
	color: var(--muted);
	max-width: 1220px;
}

.desc-block ul,
.desc-block ol {
	list-style: disc;
	padding-left: 24px;
	color: var(--muted);
	font-size: clamp(14px, 1.05vw, 15px);
	line-height: 1.85;
	max-width: 1000px;
}

/* the_content wrapper reuses .desc-block typography */
.desc-content p {
	font-size: clamp(14px, 1.05vw, 15px);
	font-weight: 300;
	line-height: 1.75;
	color: var(--muted);
	margin-bottom: 16px;
	max-width: 1220px;
}

.desc-content img {
	height: auto;
	border-radius: 12px;
	margin: 16px 0;
}

/* ---------- Product detail v4: right-rail features + pills ---------- */
.detail-panel .lead {
	font-size: clamp(16px, 1.3vw, 25px);
	font-weight: 400;
	color: #fff;
	line-height: 1.45;
}

.detail-panel .feat-list {
	margin-top: 24px;
	color: #fff;
	font-size: clamp(15px, 1.15vw, 20px);
	font-weight: 300;
	line-height: 1.55;
}

.detail-panel .feat-list ul {
	list-style: disc;
	padding-left: 26px;
}

.detail-panel .feat-list li {
	margin-bottom: 14px;
}

.detail-panel .veh-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	margin-top: 32px;
}

.detail-panel .veh-pills .pill {
	border: 1px solid #bb54cb;
	border-radius: 28px;
	padding: 14px 30px;
	font-size: clamp(15px, 1.1vw, 20px);
	color: #fff;
	line-height: 1;
}

/* Plain Size / Rim Size / Load-Speed table — the layout Nexen Options falls back
   to when the filterable grid is switched off. */
.spec-table {
	margin: 6px 0 60px;
}

.spec-table .spec-head {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	background: var(--chrome);
	border: 1px solid #bb54cb;
	border-radius: 5px 5px 0 0;
}

.spec-table.no-load .spec-head,
.spec-table.no-load .spec-row {
	grid-template-columns: repeat(2, 1fr);
}

.spec-table .spec-head span {
	padding: 20px;
	text-align: center;
	color: #bb54cb;
	font-weight: 900;
	font-size: clamp(16px, 1.15vw, 20px);
}

.spec-table .spec-body {
	background: #fff;
	border: 1px solid #bb54cb;
	border-top: 0;
	border-radius: 0 0 5px 5px;
}

.spec-table .spec-row {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	border-bottom: 1px solid rgba(187, 84, 203, .55);
}

.spec-table .spec-row:last-child {
	border-bottom: 0;
}

.spec-table .spec-row span {
	padding: 15px 20px;
	text-align: center;
	color: #171717;
	font-weight: 500;
	font-size: 16px;
}

.spec-table .spec-head span+span,
.spec-table .spec-row span+span {
	border-left: 1px solid #bb54cb;
}

/* ---------- Available sizes ----------
   A tyre line can carry seventy fitments. As a two-column table that ran 3800px
   down the page and pushed the description five screens under the fold, while
   the second column only ever repeated the R-number already inside the size.
   One column of short strings wastes the width, so the sizes sit in a grid that
   fills it, with the rim diameters as a filter across the top. */
.spec-sizes {
	margin: 6px 0 60px;
	border: 1px solid #bb54cb;
	border-radius: 5px;
	overflow: hidden;
}

.spec-sizes-head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	padding: 16px 20px;
	background: var(--chrome);
	border-bottom: 1px solid #bb54cb;
}

.spec-sizes-head h2 {
	display: flex;
	align-items: baseline;
	gap: 10px;
	color: #bb54cb;
	font-weight: 900;
	font-size: clamp(16px, 1.15vw, 20px);
}

.spec-count {
	padding: 2px 10px;
	border-radius: 999px;
	background: rgba(187, 84, 203, .18);
	color: #fff;
	font-size: 13px;
	font-weight: 500;
}

.spec-filters {
	display: flex;
	flex-direction: column;
	gap: 8px;
	min-width: 0;
}

.spec-filter-row {
	display: flex;
	align-items: center;
	gap: 12px;
	min-width: 0;
}

.spec-filter-label {
	flex: 0 0 auto;
	width: 48px;
	color: rgba(255, 255, 255, .65);
	font-size: 13px;
	font-weight: 500;
	text-align: right;
}

.spec-filter-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	min-width: 0;
}

.spec-filter {
	padding: 7px 15px;
	border: 1px solid rgba(187, 84, 203, .55);
	border-radius: 999px;
	background: none;
	color: #fff;
	font-family: inherit;
	font-size: 14px;
	font-weight: 500;
	line-height: 1;
	cursor: pointer;
	transition: background .15s, border-color .15s, color .15s;
}

.spec-filter:hover:not(.is-active) {
	background: rgba(187, 84, 203, .2);
	border-color: #bb54cb;
	opacity: 1;
}

.spec-filter.is-active {
	background: var(--purple);
	border-color: var(--purple);
	color: #fff;
}

/* A chip that the other two rows have already ruled out. Left in place rather
   than removed so the row does not reflow under the pointer as you narrow. */
.spec-filter:disabled {
	border-color: rgba(255, 255, 255, .12);
	color: rgba(255, 255, 255, .3);
	cursor: default;
}

.spec-empty {
	padding: 22px 20px;
	background: #fff;
	color: #6b6b6b;
	font-size: 15px;
	text-align: center;
}

/* auto-fill, not auto-fit: a filter down to two sizes leaves them at their own
   width instead of stretching each across half the panel.

   The cell lines are borders on the items over a white grid, not a coloured
   grid showing through 1px gaps: the last row is rarely full, and the gap
   approach painted the leftover cells as a solid purple block. The negative
   margin tucks the outer lines under the panel's own border, which
   overflow:hidden then clips. */
.spec-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	gap: 0;
	margin: 0 -1px -1px 0;
	padding: 0;
	list-style: none;
	background: #fff;
}

.spec-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 3px;
	padding: 14px 10px;
	border-right: 1px solid rgba(187, 84, 203, .55);
	border-bottom: 1px solid rgba(187, 84, 203, .55);
	background: #fff;
	text-align: center;
}

/* .spec-item sets display:flex, and an author rule outranks the browser's own
   [hidden]{display:none} however specific that looks — without this the filter
   marks items hidden and paints every one of them anyway. */
.spec-item[hidden] {
	display: none;
}

.spec-size {
	color: #171717;
	font-weight: 500;
	font-size: 16px;
	line-height: 1.2;
}

.spec-load {
	color: #6b6b6b;
	font-size: 13px;
	font-weight: 400;
	line-height: 1.2;
}

/* A phone fits three columns of "245/40R20" at 14px, not two — which is the
   difference between 23 rows and 34 for a line this size. */
@media (max-width:560px) {
	.spec-grid {
		grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
	}

	.spec-item {
		padding: 11px 6px;
	}

	.spec-size {
		font-size: 14px;
	}

	.spec-sizes-head {
		padding: 14px 16px;
	}

	/* Three dimensions of chips wrap into a wall on a phone. One line each that
	   scrolls sideways keeps the filters to a fixed, shallow height. */
	.spec-filter-row {
		gap: 8px;
	}

	.spec-filter-label {
		width: auto;
		min-width: 42px;
		text-align: left;
	}

	.spec-filter-chips {
		flex-wrap: nowrap;
		overflow-x: auto;
		scrollbar-width: none;
		padding-bottom: 2px;
	}

	.spec-filter-chips::-webkit-scrollbar {
		display: none;
	}

	.spec-filter {
		flex: 0 0 auto;
	}
}

/* Tire finder reused on the product page */
.finder-sec {
	/* keep the .container left/right padding (shorthand would zero it out) */
	padding-top: 8px;
	padding-bottom: 74px;
}

@media (max-width:1200px) {
	.prod-grid {
		--prod-cols: 2;
		row-gap: 40px;
	}
}

@media (max-width:900px) {
	.detail {
		flex-direction: column;
	}

	.gallery {
		width: 100%;
		max-width: 560px;
		margin: 0 auto;
	}

	.detail-panel {
		width: 100%;
	}
}

@media (max-width:560px) {
	.prod-grid {
		--prod-cols: 1;
	}
}
