/* NoteyStuff — shop and product experience (Phase R4).
 *
 * Kadence already renders the archive as a CSS grid of .loop-entry cards and the single product
 * as gallery + summary, so this layer sets proportion, rhythm, type and state rather than
 * rebuilding markup. No WooCommerce template is overridden and no hook is removed.
 */

/* ===============================================================
 * Archive header
 *
 * The old build had a forest stock banner here; R2 replaced it with a brand band. A six-product
 * catalogue does not need a 200px hero, so this compacts it into a real page header.
 * =============================================================== */

.woocommerce-shop .entry-hero,
.tax-product_cat .entry-hero,
.post-type-archive-product .entry-hero {
	background-color: var(--ns-color-surface-warm);
}

.woocommerce-shop .entry-hero-container-inner,
.tax-product_cat .entry-hero-container-inner {
	min-height: 0 !important; /* overrides Kadence's inline hero height */
}

.woocommerce-shop .entry-hero .entry-header,
.tax-product_cat .entry-hero .entry-header {
	padding-block: var(--ns-space-5);
	min-height: 0; /* Kadence sets an inline min-height on the archive title block */
}

/* A six-product catalogue does not need a display-sized archive title; at 56px it pushed the
 * first row of products below the fold on a laptop. */
.woocommerce-shop .entry-hero h1,
.woocommerce-shop .entry-hero .page-title,
.tax-product_cat .entry-hero h1,
.tax-product_cat .entry-hero .page-title {
	font-size: var(--ns-h2);
	margin-bottom: var(--ns-space-2);
}

/* Kadence gives the archive content area an 80px top margin. Combined with the title band that
 * left a ~112px void above the first control, so the rhythm is reset to one section step. */
.woocommerce-shop .content-area,
.tax-product_cat .content-area,
.single-product .content-area {
	margin-top: 0;
}

.woocommerce-shop .site-main,
.tax-product_cat .site-main,
.single-product .site-main {
	padding-block-start: var(--ns-space-6);
}

.woocommerce-shop .entry-hero .archive-description p,
.tax-product_cat .entry-hero .archive-description p {
	color: var(--ns-color-text-muted);
	max-width: var(--ns-measure-narrow);
	margin-inline: auto;
	margin-bottom: 0;
}

/* Category chips ------------------------------------------------- */

.ns-shop-filters {
	display: flex;
	flex-wrap: wrap;
	gap: var(--ns-space-2);
	margin-bottom: var(--ns-space-5);
}

/* Result count and sorting --------------------------------------- */

.woocommerce .woocommerce-result-count,
.woocommerce .woocommerce-ordering {
	margin-bottom: var(--ns-space-5);
}

.woocommerce .woocommerce-result-count {
	color: var(--ns-color-text-muted);
	font-size: var(--ns-text-sm);
}

.woocommerce .woocommerce-ordering select {
	min-height: var(--ns-tap-min);
	border-radius: var(--ns-radius-pill);
	border-color: var(--ns-color-border-strong);
	font-size: var(--ns-text-sm);
	padding-block: var(--ns-space-2);
}

/* ===============================================================
 * Product cards on archives
 * =============================================================== */

.woocommerce ul.products li.product.loop-entry {
	background-color: var(--ns-color-surface);
	border: 1px solid var(--ns-color-border);
	border-radius: var(--ns-radius-lg);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	box-shadow: none;
	transition: transform var(--ns-transition), box-shadow var(--ns-transition),
		border-color var(--ns-transition);
}

.woocommerce ul.products li.product.loop-entry:hover {
	transform: translateY(-3px);
	box-shadow: var(--ns-shadow-lg);
	border-color: var(--ns-color-accent);
}

.woocommerce ul.products li.product .woocommerce-loop-image-link {
	display: block;
	overflow: hidden;
	background-color: var(--ns-color-surface-warm);
	aspect-ratio: 4 / 5;
}

.woocommerce ul.products li.product .woocommerce-loop-image-link img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	margin: 0;
	transition: transform 450ms var(--ns-ease);
}

.woocommerce ul.products li.product:hover .woocommerce-loop-image-link img {
	transform: scale(1.05);
}

/* Product-card galleries -----------------------------------------
 *
 * WooCommerce normally prints only the featured image in a loop. functions.php adds the product
 * gallery inside the same product link; ns-loop-gallery.js reveals one alternate on desktop hover
 * and turns a horizontal swipe into a deliberate first/alternate change on touch. The alternate is
 * not requested until that card is used, so the archive's first paint stays lean. */
.woocommerce ul.products li.product .ns-loop-gallery {
	--ns-loop-index: 0;
	position: relative;
	display: block;
	width: 100%;
	height: 100%;
	overflow: hidden;
	touch-action: pan-y;
	user-select: none;
}

.woocommerce ul.products li.product .ns-loop-gallery__track {
	display: flex;
	width: 100%;
	height: 100%;
	transform: translate3d(calc(var(--ns-loop-index) * -100%), 0, 0);
	transition: transform 420ms var(--ns-ease);
	will-change: transform;
}

.woocommerce ul.products li.product .ns-loop-gallery__slide {
	display: block;
	flex: 0 0 100%;
	width: 100%;
	height: 100%;
	overflow: hidden;
}

.woocommerce ul.products li.product .ns-loop-gallery__image {
	display: block;
	pointer-events: none;
}

/* The generic card hover zoom used to enlarge the off-screen slide by 5%, exposing a narrow
 * vertical strip before the gallery moved. Gallery images move horizontally instead, so keep
 * them at their exact slide width. */
.woocommerce ul.products li.product:hover .woocommerce-loop-image-link .ns-loop-gallery__image {
	transform: none;
}

.woocommerce ul.products li.product .ns-loop-gallery__dots {
	position: absolute;
	z-index: 2;
	inset-inline: 0;
	bottom: var(--ns-space-2);
	display: none;
	justify-content: center;
	gap: 5px;
	pointer-events: none;
}

.woocommerce ul.products li.product .ns-loop-gallery[data-ns-ready='true'] .ns-loop-gallery__dots {
	display: flex;
}

.woocommerce ul.products li.product .ns-loop-gallery__dot {
	display: block;
	width: 6px;
	height: 6px;
	border: 1px solid var(--ns-color-text);
	border-radius: 50%;
	background-color: var(--ns-color-surface);
	box-shadow: var(--ns-shadow-sm);
	transition: width var(--ns-transition), background-color var(--ns-transition);
}

.woocommerce ul.products li.product .ns-loop-gallery__dot.is-active {
	width: 16px;
	border-radius: var(--ns-radius-pill);
	background-color: var(--ns-color-cta-solid);
}

.woocommerce ul.products li.product .ns-loop-gallery__hint {
	display: none;
	position: absolute;
	z-index: 2;
	top: var(--ns-space-2);
	inset-inline-end: var(--ns-space-2);
	padding: 0.2rem var(--ns-space-2);
	border-radius: var(--ns-radius-pill);
	background-color: var(--ns-color-text);
	color: var(--ns-color-text-inverse);
	font-size: var(--ns-text-xs);
	font-weight: var(--ns-weight-medium);
	line-height: 1.4;
	pointer-events: none;
}

@media (hover: none), (pointer: coarse), (max-width: 767px) {
	.woocommerce ul.products li.product .ns-loop-gallery[data-ns-ready='true'] .ns-loop-gallery__hint {
		display: block;
	}

	.woocommerce ul.products li.product .ns-loop-gallery[data-ns-interacted='true'] .ns-loop-gallery__hint {
		display: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.woocommerce ul.products li.product .ns-loop-gallery__track,
	.woocommerce ul.products li.product .ns-loop-gallery__dot {
		transition: none;
	}
}

.woocommerce ul.products li.product .product-details {
	display: flex;
	flex-direction: column;
	gap: var(--ns-space-2);
	padding: var(--ns-space-4);
	flex: 1;
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
	font-family: var(--ns-font-display);
	font-size: var(--ns-text-base);
	font-weight: var(--ns-weight-medium);
	line-height: var(--ns-leading-snug);
	color: var(--ns-color-text);
	padding: 0;
	margin: 0;
}

.woocommerce ul.products li.product .price {
	font-family: var(--ns-font-display);
	font-size: var(--ns-text-lg);
	font-weight: var(--ns-weight-display);
	color: var(--ns-color-link);
	margin: 0;
}

.woocommerce ul.products li.product .price del {
	color: var(--ns-color-text-muted);
	font-size: var(--ns-text-sm);
	font-weight: var(--ns-weight-body);
	margin-inline-end: var(--ns-space-2);
}

/* Kadence positions the loop button wrapper ABSOLUTELY, so the card's overflow:hidden clipped
 * it and the add-to-cart control was invisible on every archive card. Returning it to normal
 * flow puts it at the bottom of the card body where it belongs. */
.woocommerce ul.products li.product .product-action-wrap {
	position: static;
	margin-top: auto;
	padding-top: var(--ns-space-3);
	width: 100%;
	opacity: 1;
	transform: none;
}

.woocommerce ul.products li.product .button {
	margin: 0;
	width: 100%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
}

/* Kadence zeroes the success button's font-size, leaving a tiny check on its top
 * baseline. Keep the label and place the native status icon beside it instead. */
.woocommerce ul.products li.product .product-action-wrap a.button {
	display: inline-flex;
}

.woocommerce ul.products li.product .product-action-wrap a.button.added {
	font-size: var(--ns-text-base);
	height: auto;
	padding: var(--ns-space-3) var(--ns-space-5);
}

.woocommerce ul.products li.product .button > .kadence-svg-iconset {
	display: none;
}

.woocommerce ul.products li.product .button.loading > .kadence-svg-iconset:first-of-type,
.woocommerce ul.products li.product .button.added > .kadence-svg-iconset:last-of-type {
	display: inline-flex;
	align-items: center;
	font-size: 1rem;
}

.woocommerce ul.products li.product .button > .kadence-svg-iconset svg {
	top: 0;
	margin: 0;
	width: 1em;
	height: 1em;
}

/* Two-up on phones.
 *
 * Kadence drops the archive to a single 342px column below its small-screen breakpoint, which
 * turns six products into a very long scroll. Two columns match the homepage row and keep the
 * catalogue scannable; the gap tightens so the cards stay a usable width at 320px. */
@media (max-width: 639px) {
	.woocommerce ul.products.grid-cols,
	.woocommerce ul.products {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: var(--ns-space-3);
	}

	.woocommerce ul.products li.product .product-details {
		padding: var(--ns-space-3);
	}

	.woocommerce ul.products li.product .button,
	.woocommerce ul.products li.product .product-action-wrap a.button.added {
		font-size: var(--ns-text-sm);
		padding-inline: var(--ns-space-3);
	}
}

/* Sale flash ----------------------------------------------------- */

.woocommerce span.onsale,
.woocommerce ul.products li.product .onsale {
	position: absolute;
	top: var(--ns-space-3);
	inset-inline-start: var(--ns-space-3);
	inset-inline-end: auto;
	z-index: 2;
	min-height: 0;
	min-width: 0;
	padding: 0.2rem var(--ns-space-3);
	border-radius: var(--ns-radius-pill);
	background-color: var(--ns-color-notice);
	color: var(--ns-color-text-on-brand);
	font-family: var(--ns-font-body);
	font-size: var(--ns-text-xs);
	font-weight: var(--ns-weight-medium);
	letter-spacing: var(--ns-tracking-wide);
	text-transform: uppercase;
	line-height: 1.6;
	box-shadow: var(--ns-shadow-sm);
}

@media (min-width: 640px) {
	.woocommerce ul.products li.product .woocommerce-loop-product__title {
		font-size: var(--ns-text-lg);
	}
}

/* ===============================================================
 * Single product
 * =============================================================== */

.single-product .product .woocommerce-product-gallery {
	border-radius: var(--ns-radius-xl);
	overflow: hidden;
	background-color: var(--ns-color-surface-warm);
}

/* Kadence's frozen gallery height ---------------------------------
 *
 * Kadence runs, at DOM ready:
 *
 *     jQuery('.woocommerce-product-gallery.gallery-has-thumbnails').each(function(){
 *         var b = jQuery(this);
 *         b.height( b.height() );                                   // freeze, to stop a jump
 *         b.on('wc-product-gallery-after-init', function(){
 *             setTimeout(function(){ b.height('') }, 500);          // release
 *         });
 *     });
 *
 * WooCommerce fires `wc-product-gallery-after-init` synchronously while it initialises the
 * gallery, and FlexSlider only collapses the stacked slides on a 100ms timeout after that. So
 * when Kadence's callback wins the race it measures every slide still stacked — 8149px at a
 * 490px viewport — freezes that, and then binds a listener for an event that has already fired.
 * The release never runs and the page below the gallery stays pushed down by thousands of
 * pixels. It is a timing race, which is why it showed on phones and not on a fast desktop, and
 * it is Kadence's code, so a child theme can only override the inline style it leaves behind.
 * Reported 28 Aug 2026; reproduced with the pre-28-Aug CSS, so it is not ours.
 *
 * The frozen value is never the height the gallery should have, so dropping it outright is safe. */
.single-product .product .woocommerce-product-gallery {
	height: auto !important; /* beats Kadence's frozen inline height — see above */
}

/* With the freeze inert, stop the stack itself from flashing. Until FlexSlider moves the wrapper
 * into `.flex-viewport` it is still a direct child of the gallery, so this rule applies only
 * before initialisation, and only when WooCommerce's own script has confirmed JS is running. */
.woocommerce-js .single-product .product .woocommerce-product-gallery > .woocommerce-product-gallery__wrapper > .woocommerce-product-gallery__image:not(:first-child) {
	display: none;
}

/* Match the upload's own proportions, including landscape sticker covers. A forced 4:5 slot
 * letterboxed those covers while jQuery Zoom positioned a differently shaped overlay over them.
 * Exclude the overlay: its native pixel dimensions are controlled by WooCommerce/jQuery Zoom.
 * The image's width/height attributes reserve the correct space before it loads. */
.single-product .product .woocommerce-product-gallery__image img:not(.zoomImg) {
	width: 100%;
	height: auto;
	aspect-ratio: auto;
	object-fit: contain;
}

.single-product .product .woocommerce-product-gallery__image img.zoomImg {
	aspect-ratio: auto;
	object-fit: fill;
	border-radius: 0;
}

/* Gallery previous/next arrows -------------------------------------
 *
 * Turned on in functions.php (`ns_gallery_carousel_options`). FlexSlider prints them as
 * `ul.flex-direction-nav > li > a.flex-prev|.flex-next` carrying visible label text, so the text
 * is pushed out of the box and the chevron is drawn with two borders on a pseudo-element — no
 * extra request, and the link keeps an accessible name.
 *
 * They sit above `.zoomImg`, which jQuery Zoom appends to the slide with `position: absolute`. */

/* The nav list is stretched over the image itself — full gallery width and square, the same box
 * the slide occupies — so `top: 50%` centres the arrows on the photograph rather than on the
 * gallery plus its thumbnail strip. It passes the pointer through so hover zoom still works. */
.single-product .product .woocommerce-product-gallery .flex-direction-nav {
	position: absolute;
	inset: 0 0 auto;
	aspect-ratio: var(--ns-gallery-image-ratio, 4 / 5);
	list-style: none;
	margin: 0;
	padding: 0;
	pointer-events: none;
}

.single-product .product .woocommerce-product-gallery .flex-direction-nav a {
	pointer-events: auto;
}

.single-product .product .woocommerce-product-gallery .flex-direction-nav a {
	position: absolute;
	top: 50%;
	z-index: 3;
	display: block;
	width: var(--ns-tap-min);
	height: var(--ns-tap-min);
	margin: 0;
	transform: translateY(-50%);
	border-radius: var(--ns-radius-pill);
	background: var(--ns-color-surface);
	box-shadow: var(--ns-shadow-md);
	color: var(--ns-color-text);
	overflow: hidden;
	white-space: nowrap;
	text-indent: -999em;
	opacity: 0;
	transition: opacity var(--ns-transition), background-color var(--ns-transition),
		transform var(--ns-transition);
}

.single-product .product .woocommerce-product-gallery .flex-direction-nav a::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 10px;
	height: 10px;
	border: solid currentColor;
	border-width: 2px 2px 0 0;
	text-indent: 0;
}

.single-product .product .woocommerce-product-gallery .flex-prev {
	left: var(--ns-space-3);
}

.single-product .product .woocommerce-product-gallery .flex-next {
	right: var(--ns-space-3);
}

.single-product .product .woocommerce-product-gallery .flex-prev::before {
	transform: translate(-40%, -50%) rotate(-135deg);
}

.single-product .product .woocommerce-product-gallery .flex-next::before {
	transform: translate(-60%, -50%) rotate(45deg);
}

/* Revealed on pointer intent, and always for keyboard users. */
.single-product .product .woocommerce-product-gallery:hover .flex-direction-nav a,
.single-product .product .woocommerce-product-gallery:focus-within .flex-direction-nav a {
	opacity: 1;
}

.single-product .product .woocommerce-product-gallery .flex-direction-nav a:hover {
	background: var(--ns-color-cta-solid);
	color: var(--ns-color-text-inverse);
}

.single-product .product .woocommerce-product-gallery .flex-direction-nav a:focus-visible {
	opacity: 1;
}

/* Touch has no hover state to reveal them with, so they stay visible below the pointer
 * breakpoint. RTL flips which side each arrow lives on. */
@media (hover: none), (max-width: 767px) {
	.single-product .product .woocommerce-product-gallery .flex-direction-nav a {
		opacity: 1;
		background: rgb(255 255 255 / 0.92);
	}
}

.rtl .single-product .product .woocommerce-product-gallery .flex-prev {
	left: auto;
	right: var(--ns-space-3);
}

.rtl .single-product .product .woocommerce-product-gallery .flex-next {
	right: auto;
	left: var(--ns-space-3);
}

.single-product .product .summary > * + * {
	margin-top: var(--ns-space-4);
}

.single-product .product_title {
	font-size: var(--ns-h2);
	margin-bottom: 0;
}

.single-product .summary .price,
.single-product .summary .price .amount {
	font-family: var(--ns-font-display);
	font-size: var(--ns-h3);
	font-weight: var(--ns-weight-display);
	color: var(--ns-color-link);
}

.single-product .woocommerce-product-details__short-description {
	color: var(--ns-color-text-muted);
	max-width: var(--ns-measure);
}

/* Quantity + add to cart sit on one line, and the button carries the row on mobile. */
.single-product form.cart {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--ns-space-3);
	margin-block: var(--ns-space-5);
}

/* Quantity stepper --------------------------------------------------
 *
 * One component for every quantity field on the site — the single product form and each cart
 * row — because they are the same control and used to be styled twice.
 *
 * The minus and plus buttons are printed server-side by `ns_quantity_button()`. They replace the
 * browser's own `input[type=number]` spinner, which Chrome paints only on hover, draws about 12px
 * wide, cannot be styled, and does not render at all on touch. */

.woocommerce .quantity {
	display: inline-flex;
	align-items: stretch;
	border: 1px solid var(--ns-color-border-strong);
	border-radius: var(--ns-radius-pill);
	overflow: hidden;
	background: var(--ns-color-surface);
	margin: 0;
}

.woocommerce .quantity input.qty {
	width: 3.25rem;
	min-height: var(--ns-tap-min);
	padding-inline: 0;
	border: 0;
	border-radius: 0;
	text-align: center;
	font-weight: var(--ns-weight-medium);
	background: transparent;
}

.woocommerce .quantity input.qty:focus {
	box-shadow: none;
}

/* Now that there are real buttons, the native spinner would be a second, uglier copy of the same
 * control sitting inside the field. Firefox needs `-moz-appearance`; Chrome and Safari need the
 * pseudo-element, which `appearance: none` alone does not remove on a focused field. */
.woocommerce .quantity input.qty {
	-moz-appearance: textfield;
	appearance: textfield;
}

.woocommerce .quantity input.qty::-webkit-outer-spin-button,
.woocommerce .quantity input.qty::-webkit-inner-spin-button {
	-webkit-appearance: none;
	appearance: none;
	margin: 0;
}

.woocommerce .quantity .ns-qty-btn {
	flex: 0 0 auto;
	width: var(--ns-tap-min);
	min-height: var(--ns-tap-min);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	color: var(--ns-color-text);
	font-family: var(--ns-font-body);
	font-size: var(--ns-text-lg);
	font-weight: var(--ns-weight-medium);
	line-height: 1;
	cursor: pointer;
	transition: background-color var(--ns-transition), color var(--ns-transition);
}

.woocommerce .quantity .ns-qty-btn:hover {
	background-color: var(--ns-color-surface-accent);
	color: var(--ns-color-link);
}

/* Inside the pill an outline is clipped by `overflow: hidden`, so the focus ring is drawn as a
 * filled state instead — the one place on the site that cannot use the standard outline. */
.woocommerce .quantity .ns-qty-btn:focus-visible {
	outline: none;
	background-color: var(--ns-color-surface-accent);
	box-shadow: inset 0 0 0 2px var(--ns-color-focus);
}

/* At the minimum (or the stock ceiling) the button still reads as a control, just a spent one.
 * Opacity rather than a muted colour: a disabled control is exempt from the contrast minimum, and
 * one property fades the glyph on whatever surface the stepper is sitting on. */
.woocommerce .quantity .ns-qty-btn[disabled] {
	opacity: 0.45;
	cursor: default;
	background: transparent;
}

/* Kadence lays the single-product form out as a flex row; the stepper must not stretch in it. */
.single-product form.cart .quantity {
	align-self: center;
}

.single-product form.cart .single_add_to_cart_button {
	flex: 1 1 220px;
	/* Full-width on mobile, but a 600px-wide button on desktop reads as a banner, not a control. */
	max-width: 320px;
	min-height: var(--ns-tap-min);
}

.single-product .product_meta {
	font-size: var(--ns-text-sm);
	color: var(--ns-color-text-muted);
	border-top: 1px solid var(--ns-color-border);
	padding-top: var(--ns-space-4);
}

/* R6: Kadence styles these with
 * `.woocommerce div.product .product_meta>span { font-size:70%; font-weight:bold; color:palette6 }`,
 * which rendered the SKU and category at 9.8px in #9B6EB2 — 3.89:1, the only AA contrast failure
 * left on the site, and too small to read either way. Kadence's WooCommerce stylesheet loads
 * *after* the child theme, so matching its specificity is not enough — the body class is there to
 * win the cascade outright. The link inside inherits this colour via Kadence's own
 * `> span a { color: inherit }`. */
.single-product.woocommerce div.product .product_meta > span {
	display: block;
	margin-bottom: var(--ns-space-1);
	font-size: var(--ns-text-sm);
	font-weight: var(--ns-weight-medium);
	color: var(--ns-color-text-muted);
}

/* Tabs ----------------------------------------------------------- */

.woocommerce-tabs ul.tabs {
	display: flex;
	flex-wrap: wrap;
	gap: var(--ns-space-2);
	border-bottom: 1px solid var(--ns-color-border);
	padding: 0;
	margin: 0 0 var(--ns-space-5);
}

.woocommerce-tabs ul.tabs::before,
.woocommerce-tabs ul.tabs li::before,
.woocommerce-tabs ul.tabs li::after {
	display: none; /* Woo draws rounded tab bevels we do not want */
}

.woocommerce-tabs ul.tabs li {
	background: transparent;
	border: 0;
	border-radius: 0;
	margin: 0;
	padding: 0;
}

.woocommerce-tabs ul.tabs li a {
	display: flex;
	align-items: center;
	min-height: var(--ns-tap-min);
	padding: var(--ns-space-2) var(--ns-space-4);
	color: var(--ns-color-text-muted);
	font-weight: var(--ns-weight-medium);
	border-bottom: 2px solid transparent;
	margin-bottom: -1px;
	text-decoration: none;
}

.woocommerce-tabs ul.tabs li.active a,
.woocommerce-tabs ul.tabs li a:hover {
	color: var(--ns-color-text);
	border-bottom-color: var(--ns-color-cta);
}

.woocommerce-tabs .panel {
	max-width: var(--ns-measure);
}

.woocommerce-tabs .panel > h2:first-child {
	display: none; /* the tab already names the panel */
}

/* Related products ----------------------------------------------- */

.related.products,
.up-sells.products {
	margin-top: var(--ns-space-8);
	padding-top: var(--ns-space-7);
	border-top: 1px solid var(--ns-color-border);
}

.related.products > h2,
.up-sells.products > h2 {
	font-size: var(--ns-h3);
	margin-bottom: var(--ns-space-5);
}

/* Breadcrumb ----------------------------------------------------- */

.woocommerce-breadcrumb {
	font-size: var(--ns-text-sm);
	color: var(--ns-color-text-muted);
	padding-block: var(--ns-space-4);
}

.woocommerce-breadcrumb a {
	color: var(--ns-color-text-muted);
}

.woocommerce-breadcrumb a:hover {
	color: var(--ns-color-link-hover);
}

/* ===============================================================
 * Empty catalogue state
 * =============================================================== */

.woocommerce-info.woocommerce-no-products-found,
.woocommerce ul.products.columns-1:empty {
	text-align: center;
}

/* ===============================================================
 * Target sizes (Phase R6)
 *
 * Three controls on the product page were measured below the 44px this design system commits
 * to: the breadcrumb links (17px), the category link in the product meta (12px) and the gallery
 * lightbox trigger (36px). The breadcrumb and meta links are inline text, so they take block
 * padding rather than a min-height — enlarging them to 44px would double the height of both
 * rows for no benefit. They clear the 24px WCAG 2.2 minimum comfortably.
 * =============================================================== */

.woocommerce-breadcrumb a,
.kadence-breadcrumb-container a {
	display: inline-block;
	padding-block: var(--ns-space-2);
}

.single-product .product_meta a {
	display: inline-block;
	padding-block: var(--ns-space-1);
}

/* The lightbox trigger is a 36px white disc drawn by
 * `.woocommerce div.product div.images .woocommerce-product-gallery__trigger`, with its magnifier
 * glyph placed by two absolutely positioned pseudo-elements. Growing the disc to 44px therefore
 * means re-centring both of them by the 4px the box gained on each side. */
.woocommerce div.product div.images .woocommerce-product-gallery__trigger {
	width: var(--ns-tap-min);
	height: var(--ns-tap-min);
	box-shadow: var(--ns-shadow-sm);
}

.woocommerce div.product div.images .woocommerce-product-gallery__trigger::before {
	top: 15px;
	left: 15px;
}

.woocommerce div.product div.images .woocommerce-product-gallery__trigger::after {
	top: 23px;
	left: 26px;
}

/* ===============================================================
 * Shop toolbar — sorting and view toggle (23 Aug 2026)
 *
 * Kadence ships the sorting control as an underlined select and the view toggle as two 32x30
 * square buttons with two different border colours. Both are rebuilt here as real controls: the
 * select matches every other select on the site, and the toggle becomes one segmented control.
 * =============================================================== */

.woocommerce .kadence-shop-top-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--ns-space-3);
	padding-bottom: var(--ns-space-5);
}

.woocommerce .kadence-shop-top-item.kadence-woo-results-count {
	margin-inline-end: auto;
}

.woocommerce .kadence-shop-top-item {
	margin: 0;
}

/* Woo gives the ordering form a 24px bottom margin. In a centre-aligned row that pushed the
 * select 11px above the view toggle beside it. */
.woocommerce .kadence-shop-top-item > form.woocommerce-ordering,
.woocommerce form.woocommerce-ordering {
	margin: 0;
}

.woocommerce .kadence-shop-top-item.kadence-woo-results-count p {
	margin: 0;
}

/* Sorting select — the same control as every other select in the design system.
 * This styles the *closed* state, which is all a native select allows; ns-select.js replaces it
 * with a themed listbox and hides this one. Both are styled so the control looks right either
 * way — with JavaScript, without it, and in the moment before the script runs. */
.woocommerce .woocommerce-ordering select.orderby {
	min-height: var(--ns-tap-min);
	width: auto;
	min-width: 12rem;
	padding: var(--ns-space-2) var(--ns-space-7) var(--ns-space-2) var(--ns-space-4);
	border: 1px solid var(--ns-color-border-strong);
	border-radius: var(--ns-radius-pill);
	background-color: var(--ns-color-surface);
	color: var(--ns-color-text);
	font-family: var(--ns-font-body);
	font-size: var(--ns-text-sm);
	font-weight: var(--ns-weight-medium);
	cursor: pointer;
}

.woocommerce .woocommerce-ordering select.orderby:hover {
	border-color: var(--ns-color-accent-ink);
}

/* ---------------------------------------------------------------
 * Themed dropdown (ns-select.js)
 *
 * Named `.ns-dropdown`, NOT `.ns-select` — `.ns-select` is already the design system's select
 * primitive in components.css, and reusing it gave this wrapper that component's chevron
 * background image on top of its own caret.
 *
 * A native <select> draws its open list with the operating system: system blue highlight, system
 * font, square corners, no way in for CSS. This is the same control rebuilt as a button and a
 * listbox so the palette applies to the open state too.
 * --------------------------------------------------------------- */

.ns-dropdown {
	position: relative;
	display: inline-block;
}

/* The real select stays in the DOM and keeps carrying the form value. */
.ns-dropdown .ns-dropdown__native {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

.ns-dropdown__button {
	display: inline-flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--ns-space-3);
	min-height: var(--ns-tap-min);
	min-width: 12rem;
	padding: var(--ns-space-2) var(--ns-space-4);
	border: 1px solid var(--ns-color-border-strong);
	border-radius: var(--ns-radius-pill);
	background-color: var(--ns-color-surface);
	color: var(--ns-color-text);
	font-family: var(--ns-font-body);
	font-size: var(--ns-text-sm);
	font-weight: var(--ns-weight-medium);
	line-height: 1.2;
	cursor: pointer;
	transition: border-color var(--ns-transition), background-color var(--ns-transition);
}

.ns-dropdown__button:hover {
	border-color: var(--ns-color-accent-ink);
	background-color: var(--ns-color-surface-warm);
}

.ns-dropdown__caret {
	width: 1rem;
	height: 1rem;
	flex: none;
	color: var(--ns-color-text-muted);
	transition: transform var(--ns-transition);
}

.ns-dropdown__button[aria-expanded='true'] {
	border-color: var(--ns-color-accent-ink);
}

.ns-dropdown__button[aria-expanded='true'] .ns-dropdown__caret {
	transform: rotate(180deg);
}

.ns-dropdown__list {
	position: absolute;
	z-index: var(--ns-z-dropdown);
	inset-inline-end: 0;
	top: calc(100% + var(--ns-space-2));
	min-width: 100%;
	width: max-content;
	max-width: min(20rem, 80vw);
	margin: 0;
	padding: var(--ns-space-2);
	list-style: none;
	border: 1px solid var(--ns-color-border-strong);
	border-radius: var(--ns-radius-lg);
	background-color: var(--ns-color-surface);
	box-shadow: var(--ns-shadow-lg);
}

.ns-dropdown__option {
	display: flex;
	align-items: center;
	min-height: var(--ns-tap-min);
	margin: 0;
	padding: var(--ns-space-2) var(--ns-space-4);
	border-radius: var(--ns-radius-md);
	color: var(--ns-color-text);
	font-size: var(--ns-text-sm);
	font-weight: var(--ns-weight-body);
	list-style: none;
	cursor: pointer;
	transition: background-color var(--ns-transition), color var(--ns-transition);
}

.ns-dropdown__option:hover {
	background-color: var(--ns-color-surface-warm);
}

.ns-dropdown__option[aria-selected='true'] {
	background-color: var(--ns-color-cta-solid); /* white label on #B23670 measures 5.75:1 */
	color: var(--ns-color-text-inverse);
	font-weight: var(--ns-weight-medium);
}

/* View toggle as a segmented control. */
.woocommerce .kadence-product-toggle-container {
	display: inline-flex;
	align-items: center;
	gap: 0;
	padding: 3px;
	border: 1px solid var(--ns-color-border-strong);
	border-radius: var(--ns-radius-pill);
	background-color: var(--ns-color-surface);
}

.woocommerce .kadence-product-toggle-container button.kadence-toggle-shop-layout {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 36px; /* 36 + 2x3px padding + 2x1px border = 44, matching the select beside it */
	padding: 0;
	border: 0;
	border-radius: var(--ns-radius-pill);
	background: transparent;
	color: var(--ns-color-text-muted);
	cursor: pointer;
	transition: background-color var(--ns-transition), color var(--ns-transition);
}

.woocommerce .kadence-product-toggle-container button.kadence-toggle-shop-layout:hover {
	background-color: var(--ns-color-surface-warm);
	color: var(--ns-color-text);
}

.woocommerce .kadence-product-toggle-container button.kadence-toggle-shop-layout.toggle-active {
	background-color: var(--ns-color-cta-solid);
	color: var(--ns-color-text-inverse); /* white on #B23670 measures 5.75:1 */
}

.woocommerce .kadence-product-toggle-container .kadence-svg-icon {
	width: 1.05em;
	height: 1.05em;
}

/* ===============================================================
 * Shop list view
 *
 * Kadence's list view keeps the card's column layout and centres everything, which leaves a
 * portrait photograph stranded in the middle of a very wide row with the title overlapping it.
 * A list row is a two-column object: image left, everything else right.
 * =============================================================== */

.woocommerce ul.products.products-list-view {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: var(--ns-space-4);
}

.woocommerce ul.products.products-list-view li.product.loop-entry {
	display: grid;
	grid-template-columns: minmax(0, 200px) minmax(0, 1fr);
	align-items: stretch;
	text-align: left;
}

.woocommerce ul.products.products-list-view li.product .woocommerce-loop-image-link {
	aspect-ratio: auto;
	height: 100%;
	min-height: 200px;
}

.woocommerce ul.products.products-list-view li.product .woocommerce-loop-image-link img {
	height: 100%;
	object-fit: cover;
}

.woocommerce ul.products.products-list-view li.product .product-details {
	align-items: flex-start;
	justify-content: center;
	gap: var(--ns-space-2);
	padding: var(--ns-space-5) !important; /* Kadence's unboxed list selector forces zero vertical padding. */
	text-align: left;
}

.woocommerce ul.products.products-list-view li.product .woocommerce-loop-product__title {
	font-size: var(--ns-text-xl);
}

.woocommerce ul.products.products-list-view li.product .product-excerpt {
	color: var(--ns-color-text-muted);
	font-size: var(--ns-text-sm);
	max-width: var(--ns-measure-narrow);
}

.woocommerce ul.products.products-list-view li.product .product-excerpt p {
	margin: 0;
}

/* The row is wide, so the button stops being a full-width bar and becomes a button again. */
.woocommerce ul.products.products-list-view li.product .product-action-wrap {
	width: auto;
	margin-top: var(--ns-space-2);
	padding-top: 0;
}

.woocommerce ul.products.products-list-view li.product .button {
	width: auto;
	min-width: 12rem;
}

/* Below 640px a 200px image column leaves nothing for the copy; the picture shrinks rather than
 * the row stacking, so the list still reads as a list. */
@media (max-width: 639px) {
	.woocommerce ul.products.products-list-view {
		grid-template-columns: minmax(0, 1fr);
		gap: var(--ns-space-3);
	}

	.woocommerce ul.products.products-list-view li.product.loop-entry {
		grid-template-columns: minmax(0, 112px) minmax(0, 1fr);
	}

	.woocommerce ul.products.products-list-view li.product .woocommerce-loop-image-link {
		min-height: 0;
	}

	.woocommerce ul.products.products-list-view li.product .product-details {
		padding: var(--ns-space-3) !important; /* Match the desktop override of Kadence's unboxed list padding. */
	}

	.woocommerce ul.products.products-list-view li.product .woocommerce-loop-product__title {
		font-size: var(--ns-text-base);
	}

	.woocommerce ul.products.products-list-view li.product .product-excerpt {
		display: none; /* there is no room for a description beside a 112px thumbnail */
	}

	.woocommerce ul.products.products-list-view li.product .button {
		width: 100%;
		min-width: 0;
	}
}
