/* Nova Supply shop: breadcrumbs, category header, filters, toolbar, product cards, grid, pagination, empty states. Tokens only. */

/* ---------- Breadcrumbs ---------- */
.woocommerce-breadcrumb, .wc-block-breadcrumbs {
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--contrast);
}
:is(.woocommerce-breadcrumb, .wc-block-breadcrumbs) a {
	display: inline-flex;
	align-items: center;
	min-height: var(--wp--custom--control--height-sm);
	color: var(--wp--preset--color--accent-4);
	text-decoration: none;
}
:is(.woocommerce-breadcrumb, .wc-block-breadcrumbs) a:hover { color: var(--wp--preset--color--contrast); text-decoration: underline; }

/* ---------- Category header: scene photo on the side scrim ---------- */
.wp-block-cover.nv-cathead {
	min-height: calc(var(--wp--custom--layout--content) * 0.5);
	padding: var(--wp--preset--spacing--60) var(--wp--preset--spacing--50);
	background: var(--wp--preset--color--accent-3);
	border: var(--wp--custom--border--width) solid var(--wp--preset--color--accent-6);
	border-radius: var(--wp--custom--radius--card);
	overflow: hidden;
}
.nv-cathead .wp-block-cover__image-background { object-position: right center; }
.wp-block-cover.nv-cathead .wp-block-cover__background {
	opacity: 1 !important;
	background: var(--wp--custom--glow--scrim-side) !important;
}
.nv-cathead .wp-block-cover__inner-container {
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--30);
	max-width: var(--wp--custom--layout--content);
	margin-inline: 0 auto;
}
.nv-cathead :is(h1, p) { margin: 0; }
.nv-cathead h1 {
	font-size: var(--wp--preset--font-size--xx-large);
	line-height: var(--wp--custom--line-height--xx-large);
	letter-spacing: var(--wp--custom--letter-spacing--xx-large);
}
.nv-cathead .wp-block-term-description p { color: var(--wp--preset--color--accent-4); }
@media (max-width: 599px) {
	.wp-block-cover.nv-cathead { padding: var(--wp--preset--spacing--50) var(--wp--preset--spacing--40); }
	.nv-cathead .wp-block-cover__image-background { opacity: 0.45; }
}

/* ---------- Shop layout: filter sidebar + results ---------- */
.nv-shop { gap: var(--wp--preset--spacing--60) !important; }
.nv-shop > .wp-block-column { min-width: 0; }
@media (min-width: 782px) and (max-width: 1023px) {
	.nv-shop { flex-wrap: wrap !important; }
	.nv-shop > .wp-block-column { flex-basis: 100% !important; }
}

/* ---------- Toolbar: count + sort ---------- */
.nv-toolbar { min-height: var(--wp--custom--control--height); }
.nv-toolbar .wc-block-product-results-count,
.nv-toolbar .woocommerce-result-count {
	margin: 0;
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--accent-4);
}
.nv-toolbar .woocommerce-ordering { margin: 0; }
:where(.nv-toolbar, .nv-filters) select,
.woocommerce-ordering select {
	min-height: var(--wp--custom--control--height);
	min-width: calc(var(--wp--custom--layout--sidebar) * 0.8);
	padding: 0 calc(var(--wp--custom--control--padding-x) * 2 + var(--wp--custom--icon--size-sm)) 0 var(--wp--custom--control--padding-x);
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--contrast);
	background-color: var(--wp--preset--color--surface);
	background-image: url("../icons/ui/chevron-down-contrast.svg");
	background-repeat: no-repeat;
	background-position: right var(--wp--preset--spacing--30) center;
	background-size: var(--wp--custom--icon--size-sm);
	border: var(--wp--custom--border--width) solid var(--wp--preset--color--border-strong);
	border-radius: var(--wp--custom--radius--input);
	appearance: none;
}
.woocommerce-ordering select:hover { border-color: var(--wp--preset--color--contrast); }

/* ---------- Filters ---------- */
.nv-filters { gap: 0; }
.nv-filters > h2,
.nv-filters .wc-block-product-filters__overlay-content > h2 {
	margin: 0 0 var(--wp--preset--spacing--30);
	font-size: var(--wp--preset--font-size--large);
}
.nv-filters :is(.wp-block-woocommerce-product-filter-taxonomy, .wp-block-woocommerce-product-filter-price, .wp-block-woocommerce-product-filter-attribute, .wp-block-woocommerce-product-filter-status) {
	padding-block: var(--wp--preset--spacing--30) var(--wp--preset--spacing--40);
	border-bottom: var(--wp--custom--border--width) solid var(--wp--preset--color--accent-6);
}
.nv-filters h3 {
	margin: 0 0 var(--wp--preset--spacing--20) !important;
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: var(--wp--custom--font-weight--regular);
	letter-spacing: var(--wp--custom--letter-spacing--label);
	text-transform: uppercase;
	color: var(--wp--preset--color--accent-4);
}
.nv-filters .wc-block-product-filter-checkbox-list__item,
.nv-filters .wc-block-product-filter-checkbox-list__label {
	min-height: var(--wp--custom--control--height-sm);
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--contrast);
}
.nv-filters .wc-block-product-filter-checkbox-list__label { display: flex; align-items: center; gap: var(--wp--preset--spacing--30); width: 100%; }
.nv-filters .wc-block-product-filter-checkbox-list__input-wrapper { flex: none; }
/* WooCommerce draws a fake 14px checkbox as ::before on the wrapper; our 20px input is the real control. */
.nv-filters .wc-block-product-filter-checkbox-list__input-wrapper::before,
.nv-filters .wc-block-product-filter-checkbox-list__input-wrapper::after { display: none !important; }
.nv-filters input[type="checkbox"] {
	appearance: none;
	width: var(--wp--custom--icon--size-sm);
	height: var(--wp--custom--icon--size-sm);
	margin: 0;
	background: var(--wp--preset--color--surface);
	border: var(--wp--custom--border--width) solid var(--wp--preset--color--border-strong);
	border-radius: var(--wp--custom--radius--sm);
}
.nv-filters input[type="checkbox"]:hover { border-color: var(--wp--preset--color--contrast); }
.nv-filters input[type="checkbox"]:checked {
	background: var(--wp--preset--color--accent-1) url("../icons/ui/check-on-accent.svg") center / 80% no-repeat;
	border-color: var(--wp--preset--color--accent-1);
}
.nv-filters .wc-block-product-filter-checkbox-list__mark,
.nv-filters .wc-block-product-filter-checkbox-list__input:checked + .wc-block-product-filter-checkbox-list__mark { display: none !important; }
.nv-filters .wc-block-product-filter-checkbox-list__text-wrapper { display: flex; flex: 1; justify-content: space-between; gap: var(--wp--preset--spacing--20); }
.nv-filters .wc-block-product-filter-checkbox-list__count { color: var(--wp--preset--color--accent-4); }
.nv-filters .wc-block-product-filter-checkbox-list__show-more { color: var(--wp--preset--color--link); font-size: var(--wp--preset--font-size--small); }
/* No products for the current results: kept in place, disabled (functions.php adds `disabled`). */
.nv-filters input[type="checkbox"]:disabled,
.nv-filters input[type="checkbox"]:disabled:hover {
	background: var(--wp--preset--color--accent-5);
	border-color: var(--wp--preset--color--accent-6);
}
.nv-filters .wc-block-product-filter-checkbox-list__label:has(input:disabled) {
	color: var(--wp--preset--color--accent-4);
	cursor: not-allowed;
}
.nv-filters .wc-block-product-filter-checkbox-list__label:has(input:disabled) input { cursor: not-allowed; }

/* Filtering scrolls the results back into view below the sticky header (assets/js/shop-filters.js). */
.nv-shop__results {
	scroll-margin-top: calc(var(--wp-admin--admin-bar--height, 0px) + var(--wp--custom--layout--header-height) + var(--wp--preset--spacing--40));
}
@media (max-width: 600px) {
	.nv-shop__results { scroll-margin-top: calc(var(--wp--custom--layout--header-height) + var(--wp--preset--spacing--40)); }
}

/* Price slider */
.nv-filters .wc-block-product-filter-price-slider { --range-color: var(--wp--preset--color--contrast); }
/* Two equal price fields under the slider (WooCommerce: 60px / 120px gap / 60px) */
.nv-filters .wc-block-product-filter-price-slider__content {
	grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
	grid-template-areas: "price-slider price-slider" "left-input right-input" !important;
	column-gap: var(--wp--preset--spacing--20) !important;
	row-gap: var(--wp--preset--spacing--30) !important;
}
.nv-filters .wc-block-product-filter-price-slider :is(.wc-block-product-filter-price-slider__left, .wc-block-product-filter-price-slider__right) { min-width: 0; }
.nv-filters .wc-block-product-filter-price-slider input[type="text"],
.nv-filters .wc-block-product-filter-price-slider input[type="number"] {
	box-sizing: border-box;
	width: 100% !important;
	max-width: none !important;
	text-align: start;
	min-height: var(--wp--custom--control--height-sm);
	padding-inline: var(--wp--preset--spacing--30);
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--contrast);
	background: var(--wp--preset--color--surface);
	border: var(--wp--custom--border--width) solid var(--wp--preset--color--border-strong);
	border-radius: var(--wp--custom--radius--input);
}

/* Active filter chips */
.nv-filters .wp-block-woocommerce-product-filter-active { padding-bottom: var(--wp--preset--spacing--30); }
.nv-filters .wc-block-product-filter-removable-chips__item {
	min-height: calc(var(--wp--custom--control--height-sm) - var(--wp--preset--spacing--20));
	padding: 0 var(--wp--preset--spacing--20) 0 var(--wp--preset--spacing--30);
	background: var(--wp--preset--color--accent-2);
	color: var(--wp--preset--color--contrast);
	border: 0;
	border-radius: var(--wp--custom--radius--badge);
	font-size: var(--wp--preset--font-size--small);
	font-weight: var(--wp--custom--font-weight--medium);
}
.nv-filters .wc-block-product-filter-removable-chips__item:hover { background: var(--wp--preset--color--accent-6); }
.nv-filters .wc-block-product-filter-clear-button :is(button, .wp-block-button__link),
.nv-filters .wp-block-woocommerce-product-filter-clear-button .wp-block-button__link {
	min-height: calc(var(--wp--custom--control--height-sm) - var(--wp--preset--spacing--20));
	padding-inline: var(--wp--preset--spacing--20);
	background: transparent;
	color: var(--wp--preset--color--contrast);
	border: 0 !important;
	box-shadow: none !important;
	font-size: var(--wp--preset--font-size--small);
	text-decoration: underline;
	text-underline-offset: 0.2em;
	cursor: pointer;
}
.nv-filters .wp-block-woocommerce-product-filter-active { display: flex; flex-wrap: wrap; align-items: center; gap: var(--wp--preset--spacing--20); }

/* Filter drawer under 1024px (WooCommerce switches at 601px; the spec wants 1024px) */
.nv-filters .wc-block-product-filters__open-overlay {
	display: inline-flex;
	align-items: center;
	gap: var(--wp--preset--spacing--20);
	min-height: var(--wp--custom--control--height);
	padding-inline: var(--wp--custom--control--padding-x);
	background: transparent;
	color: var(--wp--preset--color--contrast);
	border: var(--wp--custom--border--width) solid var(--wp--preset--color--border-strong);
	border-radius: var(--wp--custom--radius--button);
	font-size: var(--wp--preset--font-size--small);
	font-weight: var(--wp--custom--font-weight--semibold);
}
.nv-filters .wc-block-product-filters__overlay {
	position: fixed;
	inset: 0;
	top: var(--wp-admin--admin-bar--height, 0px);
	background: transparent;
	pointer-events: none;
	z-index: var(--wp--custom--z--drawer);
	transition: background-color var(--wp--custom--transition--slow);
}
.nv-filters.is-overlay-opened .wc-block-product-filters__overlay {
	background: var(--wp--preset--color--overlay);
	pointer-events: auto;
}
.nv-filters .wc-block-product-filters__overlay-wrapper { height: 100%; width: 100%; background: transparent; }
.nv-filters .wc-block-product-filters__overlay-dialog {
	position: absolute;
	inset: 0 0 0 auto;
	display: flex;
	flex-direction: column;
	width: min(100%, calc(var(--wp--custom--layout--content) * 0.66));
	background: var(--wp--preset--color--surface);
	color: var(--wp--preset--color--contrast);
	box-shadow: var(--wp--preset--shadow--lg);
	transform: translateX(100%);
	transition: transform var(--wp--custom--transition--slow);
}
.nv-filters.is-overlay-opened .wc-block-product-filters__overlay-dialog { transform: none; }
.nv-filters .wc-block-product-filters__overlay-header {
	display: flex;
	padding: var(--wp--preset--spacing--30);
	border-bottom: var(--wp--custom--border--width) solid var(--wp--preset--color--accent-6);
}
.nv-filters .wc-block-product-filters__close-overlay {
	min-width: var(--wp--custom--control--height);
	min-height: var(--wp--custom--control--height);
	justify-content: center;
	color: var(--wp--preset--color--contrast);
}
.nv-filters .wc-block-product-filters__overlay-content {
	flex: 1;
	overflow-y: auto;
	padding: var(--wp--preset--spacing--40);
}
.nv-filters .wc-block-product-filters__overlay-footer {
	display: block;
	position: relative;
	padding: var(--wp--preset--spacing--40);
	border-top: var(--wp--custom--border--width) solid var(--wp--preset--color--accent-6);
	box-shadow: none;
}
.nv-filters .wc-block-product-filters__overlay-footer::before {
	content: "";
	position: absolute;
	inset-inline: 0;
	top: calc(var(--wp--custom--border--width) * -1);
	height: var(--wp--custom--border--width);
	background: var(--wp--custom--glow--edge);
}
.nv-filters .wc-block-product-filters__apply {
	width: 100%;
	min-height: var(--wp--custom--control--height);
	background: var(--wp--preset--color--accent-1);
	color: var(--wp--preset--color--on-accent);
	border: 0;
	border-radius: var(--wp--custom--radius--button);
	font-weight: var(--wp--custom--font-weight--semibold);
}
@media (prefers-reduced-motion: reduce) {
	.nv-filters .wc-block-product-filters__overlay-dialog { transition: none; }
}

/* 1024px and up: filters sit inline in the sidebar */
@media (min-width: 1024px) {
	.nv-filters :is(.wc-block-product-filters__open-overlay, .wc-block-product-filters__overlay-header, .wc-block-product-filters__overlay-footer) { display: none; }
	.nv-filters .wc-block-product-filters__overlay,
	.nv-filters.is-overlay-opened .wc-block-product-filters__overlay {
		position: relative;
		inset: auto;
		background: transparent;
		pointer-events: auto;
		z-index: auto;
	}
	.nv-filters .wc-block-product-filters__overlay-dialog {
		position: relative;
		inset: auto;
		width: auto;
		background: transparent;
		box-shadow: none;
		transform: none;
		transition: none;
	}
	.nv-filters .wc-block-product-filters__overlay-content { overflow: visible; padding: 0; }
	.nv-filters__title { display: none; }
}

/* ---------- Product grid ---------- */
.nv-grid .wc-block-product-template {
	display: grid !important;
	grid-template-columns: repeat(var(--wp--custom--grid--columns-mobile), minmax(0, 1fr)) !important;
	gap: var(--wp--preset--spacing--40) !important;
	margin: 0;
	padding: 0;
	list-style: none;
}
@media (min-width: 600px) {
	.nv-grid .wc-block-product-template { grid-template-columns: repeat(var(--wp--custom--grid--columns-tablet), minmax(0, 1fr)) !important; }
}
@media (min-width: 1024px) {
	.nv-grid--full .wc-block-product-template { grid-template-columns: repeat(var(--wp--custom--grid--columns-desktop), minmax(0, 1fr)) !important; }
}
.nv-grid .wc-block-product-template > li { width: auto !important; max-width: none !important; margin: 0 !important; }

/* ---------- Product card ---------- */
.nv-grid .wc-block-product {
	position: relative;
	display: flex;
	flex-direction: column;
	background: var(--wp--preset--color--surface);
	border: var(--wp--custom--border--width) solid var(--wp--preset--color--accent-6);
	border-radius: var(--wp--custom--radius--card);
	overflow: hidden;
	isolation: isolate;
	text-align: start;
}
.nv-grid .wc-block-product::before {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
	box-shadow: var(--wp--preset--shadow--glow);
	opacity: 0;
	transition: opacity var(--wp--custom--transition--base);
	pointer-events: none;
	z-index: 2;
}
.nv-grid .wc-block-product::after {
	content: "";
	position: absolute;
	inset: 0 0 auto;
	height: var(--wp--custom--border--width);
	background-image: var(--wp--custom--glow--edge);
	opacity: 0;
	transition: opacity var(--wp--custom--transition--base);
	z-index: 3;
}
.nv-grid .wc-block-product:hover::before,
.nv-grid .wc-block-product:hover::after { opacity: 1; }
.nv-grid .wc-block-product:has(.nv-card__title a:focus-visible) {
	outline: var(--wp--custom--border--width-strong) solid var(--wp--preset--color--focus);
	outline-offset: var(--wp--custom--border--width-strong);
}

.nv-card__media { position: relative; margin: 0 !important; background: var(--wp--preset--color--accent-3); }
.nv-card__media .wc-block-components-product-image { margin: 0 !important; overflow: hidden; }
.nv-card__media img {
	display: block;
	width: 100%;
	aspect-ratio: var(--wp--custom--image--ratio-product);
	object-fit: cover;
	border-radius: 0 !important;
	transition: transform var(--wp--custom--transition--base);
}
.nv-grid .wc-block-product:hover .nv-card__media img { transform: scale(1.03); }
.nv-grid .wc-block-product:has(.nv-badge--muted) .nv-card__media img { opacity: 0.45; }
.nv-card__badge {
	position: absolute;
	top: var(--wp--preset--spacing--30);
	left: var(--wp--preset--spacing--30);
	z-index: 4;
	margin: 0 !important;
}

.nv-badge {
	display: inline-flex;
	align-items: center;
	padding: calc(var(--wp--preset--spacing--20) / 2) var(--wp--preset--spacing--20);
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--x-small);
	line-height: var(--wp--custom--line-height--x-small);
	font-weight: var(--wp--custom--font-weight--semibold);
	letter-spacing: var(--wp--custom--letter-spacing--x-small);
	border-radius: var(--wp--custom--radius--badge);
	white-space: nowrap;
	background: var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--base);
}
.nv-badge--sale { background: var(--wp--preset--color--sale-surface); color: var(--wp--preset--color--sale); }
.nv-badge--accent { background: var(--wp--preset--color--accent-1); color: var(--wp--preset--color--on-accent); }
.nv-badge--muted { background: var(--wp--preset--color--accent-5); color: var(--wp--preset--color--accent-4); }
.nv-badge--warning { background: var(--wp--preset--color--warning-surface); color: var(--wp--preset--color--warning); }

.nv-card__body {
	display: flex;
	flex-direction: column;
	flex: 1;
	gap: var(--wp--preset--spacing--20);
	margin: 0 !important;
	padding: var(--wp--preset--spacing--40);
}
.nv-card__body > * { margin: 0 !important; }
.nv-card__cat {
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--x-small);
	letter-spacing: var(--wp--custom--letter-spacing--label);
	text-transform: uppercase;
	color: var(--wp--preset--color--accent-4);
}
.nv-card__title {
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--medium) !important;
	line-height: var(--wp--custom--line-height--large) !important;
	font-weight: var(--wp--custom--font-weight--semibold);
	letter-spacing: 0;
}
.nv-card__title a { color: var(--wp--preset--color--contrast); text-decoration: none; }
.nv-card__title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.nv-card__title a:focus-visible { outline: 0; }
.nv-card__chips { display: flex; flex-wrap: wrap; gap: calc(var(--wp--preset--spacing--20) / 2); }
.nv-card__chips .nv-term {
	display: inline-flex;
	align-items: center;
	min-height: calc(var(--wp--preset--spacing--30) * 1.8);
	padding: 0 var(--wp--preset--spacing--20);
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--x-small);
	color: var(--wp--preset--color--accent-4);
	border: var(--wp--custom--border--width) solid var(--wp--preset--color--accent-6);
	border-radius: var(--wp--custom--radius--badge);
	white-space: nowrap;
}
/* Review chip (functions.php nova_supply_rating_chip): star, average, count. Same frame as the spec chips. */
.nv-rating { margin: 0; line-height: 1; }
.nv-rating-chip {
	display: inline-flex;
	align-items: center;
	gap: calc(var(--wp--preset--spacing--20) * 0.75);
	min-height: calc(var(--wp--preset--spacing--30) * 1.8);
	padding: 0 var(--wp--preset--spacing--20);
	background: var(--wp--preset--color--accent-5);
	border: var(--wp--custom--border--width) solid var(--wp--preset--color--accent-6);
	border-radius: var(--wp--custom--radius--badge);
	color: var(--wp--preset--color--contrast);
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--x-small);
	font-variant-numeric: tabular-nums;
	line-height: 1;
	text-decoration: none;
	white-space: nowrap;
	box-sizing: border-box;
}
.nv-rating-chip::before {
	content: "";
	flex: none;
	width: calc(var(--wp--custom--icon--size-sm) * 0.7);
	height: calc(var(--wp--custom--icon--size-sm) * 0.7);
	background: var(--wp--preset--color--star);
	mask: url("../icons/ui/star-filled.svg") center / contain no-repeat;
}
.nv-rating-chip__avg { font-weight: var(--wp--custom--font-weight--semibold); }
.nv-rating-chip__count, .nv-rating-chip__sep { color: var(--wp--preset--color--accent-4); }
a.nv-rating-chip { transition: border-color var(--wp--custom--transition--fast); }
a.nv-rating-chip:hover { border-color: var(--wp--preset--color--border-strong); }
a.nv-rating-chip:hover .nv-rating-chip__count { color: var(--wp--preset--color--contrast); }
a.nv-rating-chip:focus-visible { outline: var(--wp--custom--border--width-strong) solid var(--wp--preset--color--focus); outline-offset: var(--wp--custom--border--width-strong); }
/* "full": product summary and reviews heading, a touch larger */
.nv-rating-chip--full {
	min-height: calc(var(--wp--preset--spacing--30) * 2.2);
	padding-inline: var(--wp--preset--spacing--30);
	font-size: var(--wp--preset--font-size--small);
}
.nv-rating-chip--full::before { width: calc(var(--wp--custom--icon--size-sm) * 0.8); height: calc(var(--wp--custom--icon--size-sm) * 0.8); }

.nv-card__foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--wp--preset--spacing--20);
	margin-top: auto !important;
	padding-top: var(--wp--preset--spacing--20);
}
.nv-card__foot > * { margin: 0 !important; }
.nv-card__foot .wc-block-components-product-price,
.wc-block-components-product-price {
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--medium);
	font-weight: var(--wp--custom--font-weight--semibold);
	color: var(--wp--preset--color--contrast);
	font-variant-numeric: tabular-nums;
}
.wc-block-components-product-price del { color: var(--wp--preset--color--accent-4); font-weight: var(--wp--custom--font-weight--regular); }
.wc-block-components-product-price ins { color: var(--wp--preset--color--sale); text-decoration: none; }
.nv-grid .wc-block-product:has(.nv-badge--muted) .wc-block-components-product-price { color: var(--wp--preset--color--accent-4); }

/* Card button: secondary outline, lifted above the stretched title link */
.nv-card__foot .wp-block-button, .nv-card__foot .wc-block-components-product-button { position: relative; z-index: 4; margin: 0; }
.nv-card__foot .wc-block-components-product-button__button,
.nv-card__foot .wp-block-button__link {
	min-height: var(--wp--custom--control--height-sm);
	padding: 0 var(--wp--custom--control--padding-x-sm);
	background: transparent;
	color: var(--wp--preset--color--contrast);
	border: 0;
	box-shadow: inset 0 0 0 var(--wp--custom--border--width) var(--wp--preset--color--border-strong);
	border-radius: var(--wp--custom--radius--button);
	font-size: var(--wp--preset--font-size--small);
	font-weight: var(--wp--custom--font-weight--semibold);
	white-space: nowrap;
}
.nv-card__foot .wc-block-components-product-button__button:hover { box-shadow: inset 0 0 0 var(--wp--custom--border--width) var(--wp--preset--color--contrast); background: transparent; }
.nv-card__foot .wc-block-components-product-button__button.added,
.nv-card__foot .wc-block-components-product-button__button[aria-pressed="true"] {
	background: var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--base);
	box-shadow: none;
}
.nv-card__foot .wc-block-components-product-button__button:disabled {
	background: var(--wp--preset--color--accent-5);
	color: var(--wp--preset--color--accent-4);
	box-shadow: none;
}
.nv-card__foot .added_to_cart { display: none; }

@media (max-width: 599px) {
	.nv-card__body { padding: var(--wp--preset--spacing--30); }
	.nv-card__chips { display: none; }
	.nv-card__foot { flex-direction: column; align-items: stretch; }
	.nv-card__foot .wp-block-woocommerce-product-button,
	.nv-card__foot .wc-block-components-product-button__button { width: 100%; }
	.nv-card__foot .wp-block-woocommerce-product-button > * { align-self: stretch; width: 100% !important; justify-content: center; }
}

/* ---------- Pagination ---------- */
.nv-grid .wp-block-query-pagination { gap: var(--wp--preset--spacing--20); margin-top: var(--wp--preset--spacing--60); }
.nv-grid .wp-block-query-pagination :is(a, span.page-numbers) {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: calc(var(--wp--preset--spacing--20) / 2);
	min-width: var(--wp--custom--control--height-sm);
	height: var(--wp--custom--control--height-sm);
	padding-inline: var(--wp--preset--spacing--20);
	border-radius: var(--wp--custom--radius--button);
	font-size: var(--wp--preset--font-size--small);
	font-weight: var(--wp--custom--font-weight--medium);
	color: var(--wp--preset--color--contrast);
	text-decoration: none;
	white-space: nowrap;
	box-sizing: border-box;
}
.nv-grid .wp-block-query-pagination-numbers { display: flex; gap: calc(var(--wp--preset--spacing--20) / 2); }
.nv-grid .wp-block-query-pagination :is(.wp-block-query-pagination-previous, .wp-block-query-pagination-next) { padding-inline: var(--wp--preset--spacing--30); }
.nv-grid .wp-block-query-pagination a:hover { background: var(--wp--preset--color--accent-5); }
/* Current page: contrast fill, base text (handoff Pagination). Needs the span.page-numbers specificity to beat the rule above. */
.nv-grid .wp-block-query-pagination span.page-numbers.current { background: var(--wp--preset--color--contrast); color: var(--wp--preset--color--base); font-weight: var(--wp--custom--font-weight--semibold); }
.nv-grid .wp-block-query-pagination span.page-numbers.dots { min-width: 0; color: var(--wp--preset--color--accent-4); }
/* Arrows: the icon set's chevrons instead of « » */
.nv-grid .wp-block-query-pagination :is(.wp-block-query-pagination-previous-arrow, .wp-block-query-pagination-next-arrow) {
	width: var(--wp--custom--icon--size-sm);
	height: var(--wp--custom--icon--size-sm);
	margin: 0;
	font-size: 0;
	background: currentColor;
	mask: url("../icons/chevron-left.svg") center / contain no-repeat;
}
.nv-grid .wp-block-query-pagination .wp-block-query-pagination-next-arrow { mask-image: url("../icons/chevron-right.svg"); }

/* ---------- Empty states ---------- */
.nv-empty {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--wp--preset--spacing--30);
	padding: var(--wp--preset--spacing--70) var(--wp--preset--spacing--40);
	text-align: center;
	background-image: var(--wp--custom--motif--dots);
	background-size: var(--wp--custom--motif--dots-size);
	border: var(--wp--custom--border--width) solid var(--wp--preset--color--accent-6);
	border-radius: var(--wp--custom--radius--card);
}
.nv-empty > * { margin: 0 !important; }
.nv-empty__icon {
	width: calc(var(--wp--custom--control--height) * 1.33);
	height: calc(var(--wp--custom--control--height) * 1.33);
	border-radius: var(--wp--custom--radius--pill);
	background: var(--wp--preset--color--accent-5);
	position: relative;
}
.nv-empty__icon::before {
	content: "";
	position: absolute;
	inset: 0;
	margin: auto;
	width: var(--wp--custom--icon--size);
	height: var(--wp--custom--icon--size);
	background: var(--wp--preset--color--contrast);
	mask: url("../icons/search.svg") center / contain no-repeat;
}
.nv-empty h2 { font-size: var(--wp--preset--font-size--large); }
.nv-empty p { max-width: calc(var(--wp--custom--layout--content) * 0.7); color: var(--wp--preset--color--accent-4); }

/* ---------- Search page ---------- */
.nv-searchhead { gap: var(--wp--preset--spacing--30); }
.nv-searchhead h1 { margin: 0; }
.nv-searchhead .wp-block-search__inside-wrapper { gap: var(--wp--preset--spacing--20); padding: 0; border: 0; }
.nv-searchhead .wp-block-search__input {
	min-height: var(--wp--custom--control--height);
	padding-inline: var(--wp--custom--control--padding-x);
	background: var(--wp--preset--color--surface);
	color: var(--wp--preset--color--contrast);
	border: var(--wp--custom--border--width) solid var(--wp--preset--color--border-strong);
	border-radius: var(--wp--custom--radius--input);
	font-size: var(--wp--preset--font-size--medium);
}
.nv-searchhead .wp-block-search { width: 100%; max-width: var(--wp--custom--layout--content); }
.nv-searchhead .wp-block-search__button {
	min-width: var(--wp--custom--control--height);
	min-height: var(--wp--custom--control--height);
	margin: 0;
	padding: 0;
	border-radius: var(--wp--custom--radius--button);
}

/* ---------- 404 ---------- */
.nv-empty--404 h1 {
	font-size: var(--wp--preset--font-size--xx-large);
	line-height: var(--wp--custom--line-height--xx-large);
	letter-spacing: var(--wp--custom--letter-spacing--xx-large);
}
.nv-404-search { width: 100%; max-width: calc(var(--wp--custom--layout--content) * 0.75); }
.nv-404-search .wp-block-search__inside-wrapper { gap: var(--wp--preset--spacing--20); padding: 0; border: 0; }
.nv-404-search .wp-block-search__input {
	min-height: var(--wp--custom--control--height);
	padding-inline: var(--wp--custom--control--padding-x);
	background: var(--wp--preset--color--surface);
	color: var(--wp--preset--color--contrast);
	border: var(--wp--custom--border--width) solid var(--wp--preset--color--border-strong);
	border-radius: var(--wp--custom--radius--input);
	font-size: var(--wp--preset--font-size--medium);
}
.nv-404-search .wp-block-search__button {
	min-width: var(--wp--custom--control--height);
	min-height: var(--wp--custom--control--height);
	margin: 0;
	padding: 0;
	border-radius: var(--wp--custom--radius--button);
}

/* Card image link: inset focus ring (the media box clips outer outlines) */
.nv-card__media a:focus-visible {
	display: block;
	outline: var(--wp--custom--border--width-strong) solid var(--wp--preset--color--focus) !important;
	outline-offset: calc(var(--wp--custom--border--width-strong) * -1) !important;
}

/* ---------- Latest reviews rail (parts/latest-reviews.html, before the footer) ---------- */
.nv-latest-reviews__inner { position: relative; display: flex; flex-direction: column; gap: var(--wp--preset--spacing--20); }
.nv-latest-reviews__inner > * { margin: 0 !important; }
.nv-latest-reviews h2 { font-size: var(--wp--preset--font-size--x-large); line-height: var(--wp--custom--line-height--x-large); letter-spacing: var(--wp--custom--letter-spacing--x-large); }
.nv-review-rail { margin-top: var(--wp--preset--spacing--40) !important; }
.nv-review-rail__track {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: 72%;
	gap: var(--wp--preset--spacing--40);
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	overscroll-behavior-x: contain;
	padding-bottom: var(--wp--preset--spacing--30);
	scrollbar-width: thin;
	scrollbar-color: var(--wp--preset--color--accent-6) transparent;
}
@media (min-width: 600px) { .nv-review-rail__track { grid-auto-columns: 42%; } }
@media (min-width: 1024px) { .nv-review-rail__track { grid-auto-columns: calc((100% - 3 * var(--wp--preset--spacing--40)) / 4.3); } }
.nv-review-rail__track:focus-visible { outline: var(--wp--custom--border--width-strong) solid var(--wp--preset--color--focus); outline-offset: var(--wp--custom--border--width-strong); }

/* Card: same frame as the product cards */
.nv-review-card {
	scroll-snap-align: start;
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--30);
	min-width: 0;
	padding: var(--wp--preset--spacing--40);
	background: var(--wp--preset--color--surface);
	border: var(--wp--custom--border--width) solid var(--wp--preset--color--accent-6);
	border-radius: var(--wp--custom--radius--card);
}
.nv-review-card__top { display: flex; align-items: center; justify-content: space-between; gap: var(--wp--preset--spacing--20); min-width: 0; }
.nv-review-card__product {
	display: flex;
	align-items: center;
	gap: var(--wp--preset--spacing--20);
	min-width: 0;
	color: var(--wp--preset--color--contrast);
	font-size: var(--wp--preset--font-size--small);
	font-weight: var(--wp--custom--font-weight--semibold);
	text-decoration: none;
}
.nv-review-card__product span { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; line-height: var(--wp--custom--line-height--small); }
.nv-review-card__product:hover span { text-decoration: underline; text-underline-offset: 0.2em; }
.nv-review-card__thumb {
	flex: none;
	width: var(--wp--custom--control--height-sm);
	height: var(--wp--custom--control--height-sm);
	object-fit: cover;
	background: var(--wp--preset--color--accent-3);
	border: var(--wp--custom--border--width) solid var(--wp--preset--color--accent-6);
	border-radius: var(--wp--custom--radius--md);
}
.nv-review-card__top .nv-rating-chip { flex: none; }
.nv-review-card__text {
	flex: 1;
	margin: 0;
	padding: 0;
	border: 0;
	color: var(--wp--preset--color--contrast);
	font-size: var(--wp--preset--font-size--medium);
	line-height: var(--wp--custom--line-height--medium);
}
.nv-review-card__text p {
	margin: 0;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 5;
	overflow: hidden;
}
.nv-review-card__by { display: flex; align-items: center; gap: var(--wp--preset--spacing--20); padding-top: var(--wp--preset--spacing--30); border-top: var(--wp--custom--border--width) solid var(--wp--preset--color--accent-6); }
.nv-review-card__avatar {
	flex: none;
	width: calc(var(--wp--custom--icon--size) * 1.33);
	height: calc(var(--wp--custom--icon--size) * 1.33);
	border-radius: var(--wp--custom--radius--pill);
	background: var(--wp--preset--color--accent-3);
	box-shadow: 0 0 0 var(--wp--custom--border--width) var(--wp--preset--color--accent-6);
}
.nv-review-card__who { display: flex; flex-direction: column; gap: calc(var(--wp--preset--spacing--20) / 2); min-width: 0; }
.nv-review-card__name { font-size: var(--wp--preset--font-size--small); font-weight: var(--wp--custom--font-weight--semibold); color: var(--wp--preset--color--contrast); }
.nv-review-card__who time { font-family: var(--wp--preset--font-family--mono); font-size: var(--wp--preset--font-size--x-small); letter-spacing: var(--wp--custom--letter-spacing--label); text-transform: uppercase; color: var(--wp--preset--color--accent-4); }

/* Previous / next: 48px icon buttons level with the heading; phones swipe */
.nv-review-rail__nav { display: none; }
@media (min-width: 600px) {
	.nv-review-rail__nav { position: absolute; top: 0; right: 0; display: flex; gap: var(--wp--preset--spacing--20); }
	.nv-review-rail.is-static .nv-review-rail__nav { display: none; }
}
.nv-review-rail__btn {
	display: inline-grid;
	place-items: center;
	width: var(--wp--custom--control--height);
	height: var(--wp--custom--control--height);
	padding: 0;
	background: transparent;
	border: var(--wp--custom--border--width) solid var(--wp--preset--color--border-strong);
	border-radius: var(--wp--custom--radius--button);
	color: var(--wp--preset--color--contrast);
	cursor: pointer;
	transition: border-color var(--wp--custom--transition--fast), background-color var(--wp--custom--transition--fast);
}
.nv-review-rail__btn::before {
	content: "";
	width: var(--wp--custom--icon--size);
	height: var(--wp--custom--icon--size);
	background: currentColor;
	mask: url("../icons/chevron-left.svg") center / contain no-repeat;
}
.nv-review-rail__btn--next::before { mask-image: url("../icons/chevron-right.svg"); }
.nv-review-rail__btn:hover:not(:disabled) { border-color: var(--wp--preset--color--contrast); background: var(--wp--preset--color--accent-5); }
.nv-review-rail__btn:focus-visible { outline: var(--wp--custom--border--width-strong) solid var(--wp--preset--color--focus); outline-offset: var(--wp--custom--border--width-strong); }
.nv-review-rail__btn:disabled { color: var(--wp--preset--color--accent-6); border-color: var(--wp--preset--color--accent-6); cursor: default; }
