/* Phase 39 product page (39-06). Loaded on product pages only (functions.php), after theme.css.
   Jay's locked look: Direction A+ with D's photo layout ("final", 39-05, evidence/39-05-jay-rulings.json
   d02), ported from scripts/product-page/mockups/templates/r2.css and dir-final.css onto WooCommerce's
   own markup (hooks-first, no copied templates). Theme tokens only.
   Super Cache serves one HTML to every device, so every phone difference here is CSS only.
   Nothing here is fixed-position, so the ELEX floating icon's bottom-right corner stays clear. */

.njs-pdp {
	--njs-pdp-muted: #5f5f5a;
}

/* ---- Top grid: photos left (7), buy column right (5); everything after spans both ---- */
.njs-pdp div.product {
	display: grid;
	grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
	column-gap: var(--space-2xl);
	align-items: start;
}

.njs-pdp div.product > * {
	grid-column: 1 / -1;
	min-width: 0;
}

.njs-pdp div.product > .njs-pdp-gallery {
	grid-column: 1;
	grid-row: 1;
}

.njs-pdp div.product > .summary {
	grid-column: 2;
	grid-row: 1;
}

.njs-pdp--no-gallery div.product > .summary {
	grid-column: 1 / -1;
}

/* ---- Gallery: unframed photos on the neutral stage (P1); D's grid on desktop ---- */
.njs-pdp-gallery {
	position: relative;
}

.njs-gal-track {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
}

.njs-gal-t {
	margin: 0;
	background: var(--color-neutral);
	border-radius: var(--radius-md);
	aspect-ratio: 4 / 3;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
}

.njs-gal-t--wide {
	grid-column: 1 / -1;
}

.njs-gal-t img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.njs-gal-t--more {
	display: none;
}

.njs-pdp-gallery.is-all .njs-gal-t--more {
	display: flex;
}

.njs-gal-thumbs {
	display: none;
}

.njs-gal-all {
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 12px auto 0;
	height: 44px;
	padding: 0 16px;
	background: var(--color-bg);
	color: var(--color-ink);
	border: 0;
	border-radius: var(--radius-sm);
	box-shadow: inset 0 0 0 1px var(--color-ink);
	font-family: var(--font-heading);
	font-size: 16px;
	letter-spacing: .03em;
	text-transform: uppercase;
	cursor: pointer;
}

.njs-pdp-gallery.is-all .njs-gal-all {
	display: none;
}

.njs-pdp-gallery .onsale {
	position: absolute;
	top: 12px;
	left: 12px;
	z-index: 1;
}

/* ---- Buy column ---- */
.njs-pdp .summary {
	display: flex;
	flex-direction: column;
}

.njs-pdp-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0 8px;
	margin: 0 0 8px;
	font-size: 14px;
	color: var(--njs-pdp-muted);
	overflow-wrap: anywhere;
}

.njs-pdp-meta a {
	color: var(--color-ink);
}

.njs-pdp-meta--sku-only {
	margin: 0;
}

.njs-pdp-qs {
	display: inline-block;
	padding: 0 8px;
	border-radius: var(--radius-pill);
	background: var(--color-accent);
	color: var(--color-ink);
	font-weight: 700;
}

.njs-pdp-title .product_title {
	margin: 0;
	font-size: var(--step-display);
	line-height: 1.1;
	overflow-wrap: anywhere;
}

.njs-pdp-buybox {
	display: flex;
	flex-direction: column;
	gap: var(--space-lg);
	margin-top: var(--space-md);
}

.njs-pdp-buybox > * {
	margin-top: 0;
	margin-bottom: 0;
}

/* Price in ink, not orange: orange on white failed the contrast check on every page (39-01). */
.njs-pdp .summary .price {
	margin: 0;
	color: var(--color-ink);
	font-family: var(--font-heading);
	font-size: var(--step-heading);
	line-height: 1;
}

.njs-pdp-price_line {
	margin-top: -12px;
	max-width: 36rem;
	font-size: 16px;
}

.njs-pdp-price_line p {
	margin: 0;
}

/* 39-22: on a split product one of the two lines carries hidden (product-page.js swaps them). */
.njs-pdp-price_line [data-njs-price-line][hidden] {
	display: none;
}

/* Key-spec strip (P4): use zone with its footprint, then fall height, ages, child capacity */
.njs-pdp-key-specs {
	display: grid;
	grid-template-columns: 1fr 1fr;
	margin: 0;
	border: 1px solid var(--color-divider);
	border-radius: var(--radius-md);
}

.njs-pdp-key-specs > div {
	min-width: 0;
	padding: 14px 16px;
	border-top: 1px solid var(--color-divider);
}

.njs-pdp-key-specs > div:first-child {
	border-top: 0;
}

.njs-pdp-key-specs > .njs-ks-uz {
	grid-column: 1 / -1;
	position: relative;
	min-height: 128px;
	padding-right: 132px;
	display: flex;
	flex-direction: column;
	justify-content: center;
}

.njs-ks-uz .njs-ks-fp {
	position: absolute;
	top: 50%;
	right: 16px;
	transform: translateY(-50%);
}

.njs-pdp-gallery .njs-gal-track:focus-visible {
	outline: 2px solid var(--color-ink);
	outline-offset: 2px;
}

.njs-pdp-key-specs > .njs-ks-uz + div:not(.njs-ks-span2) + div:not(.njs-ks-span2) {
	border-left: 1px solid var(--color-divider);
}

.njs-pdp-key-specs > .njs-ks-span2 {
	grid-column: 1 / -1;
}

.njs-pdp-key-specs dt {
	font-size: 14px;
	color: var(--njs-pdp-muted);
}

.njs-pdp-key-specs dd {
	margin: 4px 0 0;
	font-family: var(--font-heading);
	font-size: var(--step-heading);
	line-height: 1.05;
	font-variant-numeric: tabular-nums;
}

.njs-pdp-key-specs dd.njs-ks-long {
	font-family: var(--font-body);
	font-size: 16px;
	font-weight: 700;
	line-height: 1.35;
}

.njs-ks-fp {
	flex: none;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100px;
	height: 100px;
}

.njs-ks-fp-box {
	display: block;
	border: 2px solid var(--color-ink);
	background: repeating-linear-gradient(45deg, transparent 0 6px, rgba(26, 26, 26, .06) 6px 7px);
}

/* Buttons: one column in the buy column at every width (the row layout was for a full-width
   summary). Button colours and order stay with the tier rules in theme.css (39-10 owns them). */
.njs-pdp .njs-product-ctas {
	flex-direction: column;
	align-items: stretch;
	margin: 0;
}

/* ---- Sections under the buy box: one 720px centre line (content layout lock) ---- */
.njs-pdp-col {
	width: min(var(--text-measure), 100%);
	margin-inline: auto;
}

.njs-pdp-sec {
	margin-top: var(--space-3xl);
}

.njs-pdp-sec-h {
	margin: 0 0 var(--space-md);
	font-size: var(--step-heading);
}

/* The Specifications band runs the full viewport width without widening the page: the shadow
   paints sideways and clip-path keeps it to the band's own height. */
.njs-pdp-band {
	padding: var(--space-2xl) 0;
	background: var(--color-neutral);
	box-shadow: 0 0 0 100vmax var(--color-neutral);
	clip-path: inset(0 -100vmax);
}

.njs-pdp-spec-table {
	width: 100%;
	border-collapse: collapse;
}

.njs-pdp-spec-table th,
.njs-pdp-spec-table td {
	padding: 10px 0;
	border-bottom: 1px solid var(--color-divider);
	text-align: left;
	vertical-align: top;
}

.njs-pdp-spec-table th {
	width: 40%;
	padding-right: var(--space-md);
	font-size: 14px;
	font-weight: 400;
	color: var(--njs-pdp-muted);
}

.njs-pdp-spec-table td {
	font-size: 16px;
	font-variant-numeric: tabular-nums;
	color: var(--color-ink);
}

.njs-pdp-spec-table .njs-pdp-grp th {
	width: auto;
	padding-top: var(--space-lg);
	font-family: var(--font-heading);
	font-size: 14px;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--color-ink);
}

.njs-pdp-spec-table tbody:first-child .njs-pdp-grp th {
	padding-top: 0;
}

.njs-pdp-zl {
	display: block;
}

/* Standards rows (39-12, D-05): the approved label across the row after a green check, as in the
   39-05 final mockup (.std-row). */
.njs-pdp-std-wrap {
	display: flex;
	gap: 8px;
	align-items: flex-start;
}

.njs-pdp-std-ic {
	flex: none;
	width: 18px;
	height: 18px;
	margin-top: 3px;
	color: #2e7d32;
}

/* ---- Sections (39-09): a <details> per section, open in the HTML; at phone width a head script
   closes all but Specifications before the first paint (39-27). The marker sits next to the label, not at the
   far edge (modern-web-guidance "accordion"), and the summary is a 44px-tall target. ---- */
.njs-pdp-acc > .njs-pdp-acc-sum {
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 44px;
	margin: 0 0 var(--space-md);
	list-style: none;
	cursor: pointer;
}

.njs-pdp-acc > .njs-pdp-acc-sum::-webkit-details-marker {
	display: none;
}

.njs-pdp-acc > .njs-pdp-acc-sum::before {
	content: "";
	flex: none;
	width: 9px;
	height: 9px;
	margin-top: -4px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg);
}

/* 39-28 (Modern Web Guidance motion): the chevron turns only for a visitor who has not asked for
   less motion (opt in with no-preference, rather than declaring it and cancelling it). */
@media (prefers-reduced-motion: no-preference) {
	.njs-pdp-acc > .njs-pdp-acc-sum::before {
		transition: transform .15s ease;
	}
}

.njs-pdp-acc:not([open]) > .njs-pdp-acc-sum::before {
	margin-top: 0;
	transform: rotate(-45deg);
}

.njs-pdp-acc > .njs-pdp-acc-sum:focus-visible {
	outline: 2px solid var(--color-ink);
	outline-offset: 4px;
}

.njs-pdp-acc > .njs-pdp-acc-sum .njs-pdp-sec-h {
	margin: 0;
	font-family: var(--font-heading);
	font-weight: 600;
	line-height: 1.2;
}

/* Migrated description prose wraps long links instead of widening the page (the mockup's .prose
   rule). 5219's body joins "Facebook:" and the URL with a no-break space, 15px too wide at 390
   (39-01 baseline). Moved here from the old tab panel with the tab row (39-09). */
.njs-pdp-prose {
	overflow-wrap: break-word;
	font-size: 18px;
	line-height: 1.65;
}

.njs-pdp-prose a {
	overflow-wrap: anywhere;
}

.njs-pdp-prose > :first-child {
	margin-top: 0;
}

.njs-pdp-prose img,
.njs-pdp-prose iframe,
.njs-pdp-prose table {
	max-width: 100%;
}

.njs-pdp-prose img {
	height: auto;
}

/* Warranty (D-16): Jay's approved copy (39-23), rows, a "Main conditions" list and a PDF link. */
.njs-pdp-warranty {
	font-size: 16px;
	line-height: 1.6;
	overflow-wrap: break-word;
}

.njs-pdp-warranty table {
	width: 100%;
	border-collapse: collapse;
}

.njs-pdp-warranty th,
.njs-pdp-warranty td {
	padding: 10px 0;
	border-bottom: 1px solid var(--color-divider);
	text-align: left;
	vertical-align: top;
}

.njs-pdp-warranty td + td,
.njs-pdp-warranty th + td {
	padding-left: var(--space-md);
	white-space: nowrap;
}

.njs-pdp-warranty h3 {
	margin: var(--space-lg) 0 var(--space-xs);
	font-family: var(--font-heading);
	font-size: 14px;
	letter-spacing: .08em;
	text-transform: uppercase;
}

.njs-pdp-warranty ul {
	margin: 0;
	padding-left: 1.2em;
}

.njs-pdp-warranty a {
	overflow-wrap: anywhere;
}

/* 39-22 buy-box lines under the buttons: ships_in (D-15) and shipping_note (D-18), each a plain
   row with an icon, like the policy link below them. */
.njs-pdp-row {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	margin-top: var(--space-md);
	font-size: 15px;
	line-height: 1.5;
}

.njs-pdp-row .njs-pdp-ic {
	flex: none;
	margin-top: 2px;
	color: var(--njs-pdp-muted);
}

.njs-pdp-row-text p {
	margin: 0;
}

.njs-pdp-row-text strong {
	font-weight: 700;
	color: var(--color-ink);
}

/* Policy link in the buy box (research C4, C18): a plain row with a document icon. */
.njs-pdp-policy-link {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-top: var(--space-md);
	font-size: 15px;
}

.njs-pdp-policy-link .njs-pdp-ic {
	flex: none;
	color: var(--njs-pdp-muted);
}

.njs-pdp-policy-link a {
	display: inline-block;
	padding-block: 3px;
	color: var(--color-ink);
}

/* ELEX floating quote icon (research Pitfall 3, WCAG 2.2 2.4.11). ELEX prints the round icon inside
   a fixed, transparent, full-width flex row (.elex-rqst-float-minicart-icon-alignment). That row
   swallowed taps and hit tests across the whole width: at 390 a focused select on 4649 sat under
   it (39-09 review). Only the icon itself takes pointer events now. No ELEX setting is changed. */
.njs-pdp #elex-rqst-float-minicart-icon,
.njs-pdp #elex-rqst-float-minicart-icon .elex-rqst-float-minicart-icon-alignment {
	pointer-events: none;
}

.njs-pdp #elex-rqst-float-minicart-icon .elex-raq-view-quote-dropdown-btn {
	pointer-events: auto;
}

/* 39-10: ELEX places the icon 100px in from the bottom and right (mini-quote-float-widget.css), which
   is inside the buy column at 1440 (over the Gift Card's ADD TO CART) and mid-page at 390. On product
   pages it moves to the corner, clear of the safe area. Position only: no ELEX setting changes. */
.njs-pdp #elex-rqst-float-minicart-icon.elex-rqst-mini-qote-list-wrap {
	right: max(16px, env(safe-area-inset-right));
	bottom: max(16px, env(safe-area-inset-bottom));
}

/* 39-10 cart toggle (product-page.js initCartToggle). A split product (some variations quote-only)
   hides Add to Cart and its quantity until a cart-allowed variation is chosen, and any product
   hides them on a quote-only choice. Hidden, not only disabled: the button is not offered for that
   choice. The option selectors and ELEX's ADD TO QUOTE stay. */
.njs-pdp .njs-cart-split form.variations_form:not(.njs-cart-ok) .woocommerce-variation-add-to-cart,
.njs-pdp form.variations_form.njs-cart-off .woocommerce-variation-add-to-cart {
	display: none;
}

/* 39-10 PayPal and Venmo (njs_cart_paypal_render_hook): rendered inside the add-to-cart form after
   the button, so they sit full width under it at 1440 and 390, the way the Gift Card's do (33-13). */
.njs-pdp .njs-product-ctas form.cart:not(.variations_form),
.njs-pdp .njs-product-ctas .woocommerce-variation-add-to-cart {
	flex-wrap: wrap;
}

.njs-pdp .njs-product-ctas form.cart .ppc-button-wrapper {
	flex: 1 1 100%;
	width: 100%;
	margin-top: var(--space-md);
	/* 39-27 (guide performance, reserve space for late content): PayPal's script fills this wrapper
	   after first paint and pushed the rest of the buy box down 108 to 110 px on every cart product
	   (39-27-before-t2.json). The wrapper is printed only where PayPal renders, and 108px is the
	   smallest height measured, so the finished buy box keeps its height. */
	min-height: 108px;
}

/* ---- Downloads (39-20, D-10): one row per stored PDF, the file type and size after the label ---- */
.njs-pdp-dl {
	margin: 0;
	padding: 0;
	list-style: none;
}

.njs-pdp-dl-row {
	padding-block: 6px;
	font-size: 17px;
}

.njs-pdp-dl-row + .njs-pdp-dl-row {
	border-top: 1px solid var(--color-divider);
}

.njs-pdp-dl-link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 24px;
	color: var(--color-ink);
	overflow-wrap: anywhere;
}

.njs-pdp-dl-link .njs-pdp-ic {
	flex: none;
	color: var(--njs-pdp-muted);
}

.njs-pdp-dl-meta {
	color: var(--njs-pdp-muted);
	font-size: 15px;
	white-space: nowrap;
}

/* ---- Video (39-20, D-10): a 16:9 lazy embed on the centre line, its name under it ---- */
.njs-pdp-video-frame {
	position: relative;
	aspect-ratio: 16 / 9;
	background: var(--color-neutral);
	border-radius: var(--radius-sm);
	overflow: hidden;
}

.njs-pdp-video-frame iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

.njs-pdp-video-name {
	margin: var(--space-sm) 0 0;
	color: var(--njs-pdp-muted);
	font-size: 15px;
}

/* ---- Guide link (39-20, D-10): one line, the target page's own title as the link ---- */
.njs-pdp-guide {
	margin-top: var(--space-xl);
	margin-bottom: 0;
	font-size: 17px;
	line-height: 1.6;
}

/* Inline, so a long title flows on after "Learn more:" instead of dropping to its own line. */
.njs-pdp-guide a {
	color: var(--color-ink);
	overflow-wrap: anywhere;
}

/* Local element (P12, text only) */
.njs-pdp-local {
	padding-top: var(--space-lg);
	border-top: 1px solid var(--color-divider);
	font-size: 18px;
	line-height: 1.65;
}

.njs-pdp-local p {
	margin: 0;
}

/* 39-28: a phone number in the local box stays on one line (njs_pdp_nowrap_phones wraps it). */
.njs-pdp-local .njs-pdp-nowrap {
	white-space: nowrap;
}

/* ---- Related rows (39-11, D-07): 3 or 4 cards on the 720px centre line ---- */
.njs-pdp-related .related > h2,
.njs-pdp-related .up-sells > h2,
.njs-pdp-related .cross-sells > h2 {
	margin: 0 0 var(--space-md);
	font-size: var(--step-heading);
}

.njs-pdp .njs-pdp-related ul.products {
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: var(--space-md);
	margin: 0;
}

.njs-pdp .njs-pdp-related ul.products li.product {
	display: flex;
	flex-direction: column;
	padding: 12px;
}

.njs-pdp .njs-pdp-related ul.products li.product .woocommerce-loop-product__title {
	font-size: 16px;
	line-height: 1.3;
}

.njs-pdp .njs-pdp-related ul.products li.product .button {
	margin-top: auto;
}

.njs-card-detail {
	margin: 4px 0 var(--space-sm);
	font-size: 14px;
	line-height: 1.4;
	color: var(--njs-pdp-muted);
}

.njs-card-detail-v {
	white-space: nowrap;
}

/* Goes with in the buy column (residential cart pages, Jay 2026-11-14): compact cards, photo left,
   one per line, under the policy link. Same loop markup as the rows below. */
.njs-pdp-related--buy {
	margin-top: var(--space-lg);
}

.njs-pdp-related--buy .cross-sells > h2 {
	margin: 0 0 var(--space-sm);
	font-size: 20px;
}

.njs-pdp .njs-pdp-related--buy ul.products {
	grid-template-columns: minmax(0, 1fr);
	gap: 8px;
}

.njs-pdp .njs-pdp-related--buy ul.products li.product {
	display: block;
	padding: 8px;
}

.njs-pdp .njs-pdp-related--buy ul.products li.product:hover {
	transform: none;
}

.njs-pdp .njs-pdp-related--buy ul.products li.product > a:not(.button) {
	display: grid;
	grid-template-columns: 72px minmax(0, 1fr);
	column-gap: 12px;
	align-items: start;
}

.njs-pdp .njs-pdp-related--buy ul.products li.product img {
	grid-column: 1;
	grid-row: 1 / span 3;
	width: 72px;
	height: 72px;
	margin: 0;
}

.njs-pdp .njs-pdp-related--buy ul.products li.product > a > :not(img) {
	grid-column: 2;
}

.njs-pdp .njs-pdp-related--buy ul.products li.product .woocommerce-loop-product__title {
	margin: 0;
	font-size: 15px;
}

.njs-pdp .njs-pdp-related--buy ul.products li.product .price {
	font-size: 15px;
}

.njs-pdp .njs-pdp-related--buy .njs-card-detail {
	margin: 2px 0 0;
	font-size: 13px;
}

.njs-pdp .njs-pdp-related--buy ul.products li.product .button {
	display: inline-block;
	width: auto;
	min-height: 36px;
	margin: 6px 0 0 84px;
	padding: 6px 16px;
}

/* ---- Phone ---- */
@media (max-width: 860px) {
	.njs-pdp div.product {
		grid-template-columns: minmax(0, 1fr);
		row-gap: 20px;
	}

	.njs-pdp div.product > .summary {
		grid-column: 1;
		grid-row: 2;
	}

	/* One swipeable photo, edge to edge: the negative margin is exactly the container's 3% gutter
	   (theme.css .njs-container is 94% of the viewport), so the page never widens. */
	.njs-gal-track {
		display: flex;
		gap: 0;
		margin-inline: calc(-3% / 0.94);
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		scrollbar-width: none;
	}

	.njs-gal-track::-webkit-scrollbar {
		display: none;
	}

	.njs-gal-t,
	.njs-gal-t--more {
		display: flex;
		flex: 0 0 100%;
		border-radius: 0;
		scroll-snap-align: start;
	}

	.njs-gal-thumbs {
		display: flex;
		gap: 8px;
		margin-top: 12px;
		padding: 2px;
		overflow-x: auto;
		scrollbar-width: none;
		/* 39-28 (guide carousel): a row of thumbnails that scrolls sideways snaps too. Proximity, with
		   scroll padding equal to the 2px padding, so the row rests exactly where it does today. */
		scroll-snap-type: x proximity;
		scroll-padding-inline: 2px;
	}

	.njs-gal-thumb {
		flex: none;
		width: 64px;
		height: 64px;
		padding: 0;
		border: 0;
		border-radius: var(--radius-sm);
		background: var(--color-neutral);
		cursor: pointer;
		scroll-snap-align: start;
	}

	.njs-gal-thumb img {
		display: block;
		width: 100%;
		height: 100%;
		object-fit: contain;
		border-radius: var(--radius-sm);
	}

	.njs-gal-thumb.is-current {
		box-shadow: 0 0 0 2px var(--color-ink);
	}

	.njs-gal-all {
		display: none;
	}

	.njs-pdp-sec {
		margin-top: var(--space-2xl);
	}

	.njs-pdp .njs-pdp-related ul.products {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 12px;
	}

	.njs-pdp .njs-pdp-related--buy ul.products {
		grid-template-columns: minmax(0, 1fr);
		gap: 8px;
	}

	.njs-pdp-band {
		padding: var(--space-lg) 0 var(--space-xl);
	}

	.njs-pdp-local,
	.njs-pdp-prose {
		font-size: 16px;
	}

	/* A closed section keeps its summary tight to the next one. */
	.njs-pdp-acc:not([open]) > .njs-pdp-acc-sum {
		margin-bottom: 0;
	}

	/* Closed sections stack as a list of headings, each with a rule above it. */
	.njs-pdp-sec--description,
	.njs-pdp-sec--warranty,
	.njs-pdp-sec--downloads,
	.njs-pdp-sec--video {
		margin-top: var(--space-md);
		padding-top: var(--space-sm);
		border-top: 1px solid var(--color-divider);
	}

	.njs-pdp-warranty td + td,
	.njs-pdp-warranty th + td {
		white-space: normal;
	}

	.njs-pdp-key-specs > .njs-ks-uz {
		min-height: 104px;
		padding-right: 104px;
	}

	.njs-ks-uz .njs-ks-fp {
		right: 8px;
		transform: translateY(-50%) scale(.8);
	}
}

/* ---- The Google reviews box (39-25 feed, 39-26 final look). The last block of the buy column on
   every kind, under the buttons (and under the Goes with cards on swing set pages). Jay's locked
   A+ look: a group label, the rating numeral at the price size, ink stars on the divider grey (never
   the CTA orange, research K10), "N reviews" and View all on one row, then a scroll-snap strip with
   one review at a time and Previous / Next buttons on the left, clear of the ELEX corner (K5). No
   image, no Google logo. Labels only (C13): the text a reader hears for the stars is the aria-label.
   The buttons are in the HTML from the start, disabled until product-page.js enables them, and
   "Read more" is printed server-side, so nothing shifts when the script runs. ---- */
.njs-reviews {
	margin-top: var(--space-lg);
	padding-top: var(--space-md);
	border-top: 1px solid var(--color-divider);
	min-width: 0;
	max-width: 100%;
	overflow-wrap: anywhere;
}

.njs-reviews__head {
	display: grid;
	gap: var(--space-sm);
}

.njs-reviews__title {
	margin: 0;
	font-family: var(--font-body);
	font-size: var(--step-label);
	font-weight: 700;
	line-height: 1.3;
}

.njs-reviews__summary {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--space-xs) var(--space-md);
	margin: 0;
	font-size: var(--step-label);
}

.njs-reviews__rating {
	font-family: var(--font-heading);
	font-size: var(--step-heading);
	font-weight: 700;
	line-height: 1;
}

.njs-reviews__count {
	color: var(--color-ink);
}

.njs-reviews__all {
	display: inline-flex;
	align-items: center;
	min-height: 24px;
	color: var(--color-ink);
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* width max-content: inside the item grid the span would stretch to the card's width, and the fill
   (a share of that width) would cover all five stars whatever the rating. */
.njs-reviews__stars {
	--njs-stars: 0;
	position: relative;
	display: inline-block;
	justify-self: start;
	width: max-content;
	font-size: 16px;
	line-height: 1;
	letter-spacing: 2px;
	white-space: nowrap;
}

.njs-reviews__stars::before {
	content: "\2605\2605\2605\2605\2605";
	color: var(--color-divider);
}

.njs-reviews__stars::after {
	content: "\2605\2605\2605\2605\2605";
	position: absolute;
	top: 0;
	left: 0;
	width: calc(var(--njs-stars) / 5 * 100%);
	overflow: hidden;
	color: var(--color-ink);
}

/* One review at a time: the strip scrolls sideways and snaps to each card. */
.njs-reviews__list {
	display: flex;
	gap: var(--space-md);
	margin: var(--space-md) 0 0;
	padding: 0;
	list-style: none;
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
}

.njs-reviews__list::-webkit-scrollbar {
	display: none;
}

.njs-reviews__list:focus-visible {
	outline: 2px solid var(--color-ink);
	outline-offset: 2px;
}

.njs-reviews__item {
	display: grid;
	align-content: start;
	gap: var(--space-xs);
	flex: 0 0 100%;
	min-width: 0;
	margin: 0;
	padding: var(--space-md);
	border: 1px solid var(--color-divider);
	border-radius: var(--radius-md);
	background: var(--color-bg);
	scroll-snap-align: start;
}

.njs-reviews__name,
.njs-reviews__date {
	margin: 0;
	font-size: var(--step-label);
}

.njs-reviews__name {
	font-size: 16px;
	font-weight: 600;
}

.njs-reviews__date {
	color: var(--njs-pdp-muted);
}

.njs-reviews__text {
	margin: var(--space-xs) 0 0;
	white-space: pre-line;
	overflow-wrap: anywhere;
}

/* A text over 280 characters prints clamped from the start; Read more opens it. */
.njs-reviews__text--clamp {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 6;
	line-clamp: 6;
	overflow: hidden;
}

.njs-reviews__text--open {
	display: block;
	-webkit-line-clamp: unset;
	line-clamp: none;
	overflow: visible;
}

.njs-reviews__more {
	justify-self: start;
	min-height: 24px;
	padding: 0;
	border: 0;
	background: none;
	color: var(--color-ink);
	font: inherit;
	font-size: var(--step-label);
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}

.njs-reviews__nav {
	display: flex;
	gap: var(--space-sm);
	margin-top: var(--space-sm);
}

.njs-reviews__nav button {
	min-height: 44px;
	padding: 0 var(--space-md);
	border: 1px solid var(--color-ink);
	border-radius: var(--radius-sm);
	background: var(--color-bg);
	color: var(--color-ink);
	font-family: var(--font-body);
	font-size: var(--step-label);
	font-weight: 600;
	cursor: pointer;
}

.njs-reviews__nav button:disabled,
.njs-reviews__more:disabled {
	border-color: var(--color-divider);
	color: var(--njs-pdp-muted);
	cursor: default;
}

.njs-reviews__more:disabled {
	text-decoration: none;
}

.njs-reviews__nav button:focus-visible,
.njs-reviews__more:focus-visible,
.njs-reviews__all:focus-visible {
	outline: 2px solid var(--color-ink);
	outline-offset: 2px;
}

/* ---- Recently viewed (39-26): the last block on every product page, on the 720px centre line (K1).
   The visitor's own history, filled in the browser (product-page.js njs-recent region). Hidden
   until there is a card. A snap-scrolling strip of the related rows' cards (39-11 look): photo and
   title only, no price. Four cards in view on desktop, two and a part of the next on the phone. ---- */
.njs-pdp-recent[hidden] {
	display: none;
}

.njs-recent__list {
	display: flex;
	gap: var(--space-md);
	margin: 0;
	padding: 2px 2px var(--space-sm);
	list-style: none;
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scroll-snap-type: x mandatory;
	scrollbar-width: thin;
}

.njs-recent__card {
	flex: 0 0 calc((100% - 3 * var(--space-md)) / 4);
	min-width: 0;
	margin: 0;
	scroll-snap-align: start;
}

.njs-recent__link {
	display: flex;
	flex-direction: column;
	gap: var(--space-sm);
	height: 100%;
	padding: 12px;
	border-radius: var(--radius-md);
	background: var(--color-bg);
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
	color: var(--color-ink);
	text-decoration: none;
}

.njs-recent__link:hover {
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.njs-recent__link:focus-visible {
	outline: 2px solid var(--color-ink);
	outline-offset: 2px;
}

.njs-recent__img {
	display: block;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	border-radius: var(--radius-md);
	background: var(--color-neutral);
}

.njs-recent__img img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.njs-recent__title {
	font-family: var(--font-heading);
	font-size: 16px;
	font-weight: 500;
	line-height: 1.3;
	overflow-wrap: anywhere;
}

.njs-recent__list:focus-visible {
	outline: 2px solid var(--color-ink);
	outline-offset: 2px;
}

@media (max-width: 860px) {
	.njs-recent__list {
		gap: 12px;
	}

	.njs-recent__card {
		flex-basis: calc((100% - 12px) / 2.25);
	}
}

/* 39-28 (Modern Web Guidance validate-input-after-interaction, accessible-error-announcement): a cart
   form field shows the theme's error token only once the visitor has committed an invalid value
   (:user-invalid, never :invalid, so nothing is red at load). Colour is never the only cue: product-page.js
   sets aria-invalid at the same moment. ELEX's quote form is not styled here (C1). */
.njs-pdp form.cart :is(input, select, textarea):user-invalid:not([class*="elex"] *, [id^="elex"] *) {
	border-color: var(--color-sale);
	outline: 2px solid var(--color-sale);
	outline-offset: 1px;
}
