/**
 * WooCommerce compatibility layer.
 *
 * WooCommerce's own stylesheet stays enqueued — this only re-themes the parts
 * that would otherwise clash with the Aureon token system (buttons, radius,
 * spacing, card styling). Loaded conditionally, only on WooCommerce pages
 * (see Performance::enqueue_woocommerce()).
 */

/* Buttons -------------------------------------------------------------- */

.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit,
.woocommerce-message a.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: var(--aureon-btn-padding-y, 0.65em) var(--aureon-btn-padding-x, 1.4em);
	border: var(--aureon-btn-border-width, 2px) solid transparent;
	border-radius: var(--aureon-btn-radius, var(--aureon-radius-md));
	background: var(--aureon-btn-bg, var(--aureon-color-primary));
	color: var(--aureon-btn-text, var(--aureon-color-button-text));
	font-size: var(--aureon-font-size-sm);
	font-weight: var(--aureon-font-weight-button, 600);
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce #respond input#submit:hover {
	background: var(--aureon-btn-hover-bg, var(--aureon-color-primary-hover));
	color: var(--aureon-btn-hover-text, var(--aureon-btn-text, var(--aureon-color-button-text)));
	box-shadow: var(--aureon-shadow-sm);
}

/* The `alt` button (proceed-to-checkout, place-order) is the secondary brand
 * colour rather than the primary one, so it needs its own hover — without one
 * the generic `.button:hover` above takes over and the button flips from
 * secondary to *primary* mid-interaction, reading as two different buttons.
 *
 * The hover shade is mixed toward the page background rather than toward black:
 * the secondary is usually a near-black, and darkening it further is invisible.
 * Mixing toward the background lightens a dark secondary and darkens a light
 * one, so the state is legible whichever way the palette is set. */
.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce input.button.alt {
	background: var(--aureon-color-secondary);
}

/* WooCommerce's own `.alt.disabled` rule (e.g. add-to-cart before a variation
 * is chosen) is more specific than the above and paints its brand purple; keep
 * the theme colour and let WooCommerce's reduced opacity mark the state. */
.woocommerce a.button.alt.disabled,
.woocommerce a.button.alt.disabled:hover,
.woocommerce button.button.alt.disabled,
.woocommerce button.button.alt.disabled:hover,
.woocommerce button.button.alt:disabled,
.woocommerce button.button.alt:disabled:hover,
.woocommerce input.button.alt:disabled,
.woocommerce input.button.alt:disabled:hover {
	background: var(--aureon-color-secondary);
	color: var(--aureon-color-button-text);
}

.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover,
.woocommerce input.button.alt:hover {
	background: color-mix(in srgb, var(--aureon-color-secondary) 85%, var(--aureon-color-background));
	color: var(--aureon-color-button-text);
}

/* Product loop ----------------------------------------------------------- */

/* The theme owns the product grid end to end (CSS Grid), instead of leaning on
 * WooCommerce's float-based `.columns-N` widths — those break the moment the
 * card gains its own padding/border (the box then overflows the 30.75% track
 * and only two fit per row). Column counts come from body classes the
 * WooCommerce module sets per breakpoint (aureon-cols-d/t/m-N), so desktop,
 * tablet and mobile are each authoritative and repaint live in the preview. */
.woocommerce ul.products,
.woocommerce-page ul.products {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr)); /* desktop default */
	gap: var(--aureon-space-lg);
	margin: 0 0 var(--aureon-space-lg);
	padding: 0;

	&::before,
	&::after {
		content: none; /* kill WooCommerce's float clearfix pseudo-rows. */
	}

	/* Grids that get no aureon-cols-* body class (related products and
	 * up-sells on the single product page, shortcodes) still need to step
	 * down on smaller screens, or three tracks squeeze into a phone. */
	@media (max-width: 1024px) {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

.woocommerce ul.products li.product {

	/* Neutralise WooCommerce's float sizing so the grid track governs width. */
	float: none !important;
	width: auto !important;
	box-sizing: border-box;
	margin: 0;
	padding: var(--aureon-space-md);
	border: 1px solid var(--aureon-color-border);
	border-radius: var(--aureon-radius-md);
	transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.2s ease;

	&:hover {
		border-color: var(--aureon-card-border);
		box-shadow: var(--aureon-card-shadow);
		transform: translateY(var(--aureon-card-lift));
	}

	img {
		border-radius: var(--aureon-radius-sm);
	}

	.woocommerce-loop-product__title {
		margin-block: var(--aureon-space-sm) var(--aureon-space-xs);
		color: var(--aureon-color-heading);
		font-size: var(--aureon-font-size-lg);
	}

	.price {
		color: var(--aureon-color-link);
		font-weight: 600;
	}

	.star-rating {
		color: var(--aureon-color-accent);
	}

	.onsale {
		background: var(--aureon-color-accent);
		color: var(--aureon-color-heading);
		font-weight: 600;
	}
}

/* Shop toolbar (result count + sorting) — rendered inside a
 * `.aureon-woo-toolbar` wrapper (see WooCommerce::reorder_toolbar()) so the
 * saved element order is actually visible. WooCommerce's own stylesheet
 * floats these elements to fixed sides regardless of source order; the flex
 * layout here overrides that so reordering them takes effect. */
.aureon-woo-toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--aureon-space-sm);
	margin-bottom: var(--aureon-space-lg);

	.woocommerce-result-count,
	.woocommerce-ordering {
		float: none;
		margin: 0;
	}
}

.woocommerce-result-count {
	color: var(--aureon-color-text-muted, var(--aureon-color-text));
}

.woocommerce-ordering {

	select.orderby {
		padding: 0.5em 2em 0.5em 0.75em;
		border: 1px solid var(--aureon-color-border);
		border-radius: var(--aureon-radius-sm);
		background-color: var(--aureon-color-background);
		color: var(--aureon-color-text);
		font: inherit;
		cursor: pointer;

		&:focus {
			border-color: var(--aureon-color-primary);
			outline: none;
			box-shadow: 0 0 0 3px color-mix(in srgb, var(--aureon-color-primary) 15%, transparent);
		}
	}
}

/* Digital-product buying row: one line of two equal buttons — the priced buy
 * button and a secondary "Preview" — instead of the stepper-plus-button row a
 * shipped product gets.
 *
 * A download is bought one at a time, so the quantity stepper is hidden rather
 * than removed: the input stays in the form and still posts its 1, which keeps
 * WooCommerce's own add-to-cart handling untouched.
 *
 * With no preview URL set the buy button simply takes the whole row. */
.woocommerce div.product.aureon-product-digital form.cart {

	/* Every control on the row is the height of the tallest — a label that wraps
	 * to two lines takes the preview button up with it rather than leaving them centred against a taller neighbour. */
	align-items: stretch;

	.quantity {
		display: none;
	}

	/* Both buttons share whatever the row has left, from a zero basis — a basis
	 * in rems would force a wrap in a narrow summary column. */
	.single_add_to_cart_button {
		flex: 1 1 0;
		min-width: 0;
		justify-content: center;
		text-align: center;
	}
}

/* Secondary button: the same shape as add-to-cart, in a tint of the primary
 * rather than a fill, so the pair reads as one primary and one alternative. */
.woocommerce div.product .button.aureon-digital-preview {
	flex: 1 1 0;
	min-width: 0;
	border: 0;
	background: color-mix(in srgb, var(--aureon-color-primary) 12%, transparent);
	color: var(--aureon-color-link);
	text-align: center;

	&:hover,
	&:focus-visible {
		background: color-mix(in srgb, var(--aureon-color-primary) 20%, transparent);
		color: var(--aureon-color-link);
	}
}

/* Digital-product blocks (Digital_Product): the version line under the title,
 * and the Highlights / License sections closing the summary. Each is silent
 * when its field is empty, so a shipped product renders none of them. */
.aureon-digital-version {
	margin: calc(var(--aureon-space-sm) * -1) 0 var(--aureon-space-sm);
	color: var(--aureon-color-text-muted, var(--aureon-color-text));
	font-size: var(--aureon-font-size-sm);
	line-height: 1.4;
}

.aureon-digital-block {

	/* The same hairline rhythm as the short description, product meta and share
	 * row above, so every section boundary in the summary is one measure. */
	padding-top: var(--aureon-space-md);
	margin-top: var(--aureon-space-md);
	border-top: 1px solid var(--aureon-color-border);

	&__title {
		margin: 0 0 var(--aureon-space-sm);
		color: var(--aureon-color-heading);
		font-size: var(--aureon-font-size-md);
		font-weight: 600;
		line-height: 1.3;
	}

	&__list {
		padding-left: 1.15em;
		margin: 0;
		color: var(--aureon-color-text);
		font-size: var(--aureon-font-size-sm);
		line-height: 1.6;

		li {
			margin-bottom: 0.35em;

			&:last-child {
				margin-bottom: 0;
			}
		}
	}

	&__body {
		margin: 0;
		color: var(--aureon-color-text-muted, var(--aureon-color-text));
		font-size: var(--aureon-font-size-sm);
		line-height: 1.6;
	}

	&__link {
		color: var(--aureon-color-link);
		font-weight: 600;
		text-decoration: none;
		white-space: nowrap;

		&:hover,
		&:focus {
			text-decoration: underline;
		}
	}
}

/* Variation swatches on the single product form ----------------------------
 *
 * The shared swatch styling above serves the product card, where a swatch row
 * is a hint at the range. On the product page it is the control the customer
 * actually buys through, so it gets the size and the layout of a real picker:
 * colour chips in a loose row, labelled swatches (Size, Material, …) in an even
 * grid where every option is the same target regardless of label length.
 *
 * Scoped to the add-to-cart form so the loop card keeps its compact row. */
.woocommerce div.product form.cart {

	.variations tr {
		margin-bottom: var(--aureon-space-md);
	}

	.variations th.label,
	.variations th.label label {
		font-size: var(--aureon-font-size-md);
		font-weight: 600;
	}

	.aureon-swatches {
		gap: var(--aureon-space-sm, 0.75rem);
	}

	/* Labelled swatches: an even grid. `auto-fill` with a minimum track keeps
	 * four across a full-width column and folds to two on a narrow one,
	 * without the row of ragged pill widths a flex wrap produces. */
	.aureon-swatches--text {
		display: grid;
		grid-template-columns: repeat(auto-fill, minmax(5rem, 1fr));
		gap: var(--aureon-space-sm, 0.75rem);
	}

	.aureon-swatches--text .aureon-swatch {
		width: 100%;
		min-height: 3rem;
		padding: 0.5em 0.75em;
		border-width: 1px;
		font-size: var(--aureon-font-size-md);
	}

	/* An option the current combination can't reach reads as unavailable, not
	 * as crossed-out text — the strike-through belongs on a price. */
	.aureon-swatches--text .aureon-swatch:disabled {
		background: color-mix(in srgb, var(--aureon-color-text) 4%, transparent);
		color: var(--aureon-color-text-muted, var(--aureon-color-text));
		opacity: 1;
		text-decoration: none;
	}

	.aureon-swatch--color {
		width: 2.4rem;
		height: 2.4rem;
	}
}

/* Product single ----------------------------------------------------------- */

.woocommerce div.product {

	.price {
		color: var(--aureon-color-link);
	}
}

/* Summary column typography. WooCommerce ships the title, rating, price and
 * excerpt at near-identical weights, so the buying column reads as one
 * undifferentiated stack; these rules give it a hierarchy — large title, quiet
 * rating line, a price that is the loudest thing in the column, and a short
 * description set as body copy beneath a hairline.
 *
 * Scoped to `.summary` / `.entry-summary` (the pair the layout grid uses) so
 * the loop card — which reuses `.price` and `.star-rating` — is untouched. */
.woocommerce div.product .summary,
.woocommerce div.product .entry-summary {

	.product_title {
		margin: 0 0 var(--aureon-space-sm);
		color: var(--aureon-color-heading);
		font-size: var(--aureon-font-size-2xl, 2.25rem);
		line-height: 1.15;
	}

	/* Rating line: WooCommerce floats the review link to the right of a block
	 * wrapper; the flex row puts it on the stars' baseline instead. */
	.woocommerce-product-rating {
		display: flex;
		align-items: center;
		gap: var(--aureon-space-sm, 0.75rem);
		margin: 0 0 var(--aureon-space-sm);
		line-height: 1;

		.star-rating {
			float: none;
			margin: 0;
			color: var(--aureon-color-accent);
		}

		.woocommerce-review-link {
			float: none;
			color: var(--aureon-color-link);
			font-size: var(--aureon-font-size-sm);
			font-weight: 600;
			text-decoration: none;

			&:hover,
			&:focus {
				text-decoration: underline;
			}
		}
	}

	/* The price is the column's headline number. `del`/`ins` keep WooCommerce's
	 * sale pairing, but sized so the two figures aren't interchangeable. */
	> .price,
	> p.price {
		display: flex;
		flex-wrap: wrap;
		align-items: baseline;
		gap: var(--aureon-space-xs, 0.5rem);
		margin: 0 0 var(--aureon-space-md);
		font-size: var(--aureon-font-size-xl, 1.75rem);
		font-weight: 700;
		line-height: 1.2;

		del {
			color: var(--aureon-color-text-muted, var(--aureon-color-text));
			font-size: var(--aureon-font-size-lg);
			font-weight: 500;
			opacity: 0.7;
		}

		ins {
			background: none;
			text-decoration: none;
		}

		.woocommerce-price-suffix {
			color: var(--aureon-color-text-muted, var(--aureon-color-text));
			font-size: var(--aureon-font-size-sm);
			font-weight: 400;
		}
	}

	/* Short description: body copy, separated from the buying controls by a
	 * hairline so the two read as different jobs. */
	.woocommerce-product-details__short-description {
		padding-top: var(--aureon-space-md);
		margin-bottom: var(--aureon-space-md);
		border-top: 1px solid var(--aureon-color-border);
		color: var(--aureon-color-text);
		line-height: 1.7;

		> :last-child {
			margin-bottom: 0;
		}

		ul,
		ol {
			padding-left: 1.15em;
			margin: 0 0 var(--aureon-space-sm);
		}

		li {
			margin-bottom: 0.35em;
		}
	}

	/* SKU / categories / tags: a quiet meta block, not body copy. */
	.product_meta {
		padding-top: var(--aureon-space-md);
		margin-top: var(--aureon-space-md);
		border-top: 1px solid var(--aureon-color-border);
		color: var(--aureon-color-text-muted, var(--aureon-color-text));
		font-size: var(--aureon-font-size-sm);
		line-height: 1.8;
	}
}

/* Digital-delivery note (WooCommerce::digital_notice()) — the download
 * equivalent of a shipping estimate. It's a footnote to the price rather than a
 * section of its own, so it sits tight under it and carries no hairline. */
.aureon-digital-note {
	display: flex;
	align-items: flex-start;
	gap: var(--aureon-space-xs, 0.5rem);
	margin: 0 0 var(--aureon-space-sm);
	color: var(--aureon-color-text-muted, var(--aureon-color-text));
	font-size: var(--aureon-font-size-sm);
	line-height: 1.4;

	// Align the icon to the first line's cap height rather than the block's
	// centre, so a note that wraps to two lines still reads as one unit.
	svg {
		flex-shrink: 0;
		margin-top: 0.1em;
		color: var(--aureon-color-link);
	}
}

/* "What's included" for a downloadable product: the files, the download
 * allowance and the access window, each ticked off. Sits between the delivery
 * note and the buying controls, so what arrives is settled before the price is
 * committed to. */
.aureon-digital-includes {
	padding: var(--aureon-space-md);
	margin: 0 0 var(--aureon-space-sm);
	border: 1px solid var(--aureon-color-border);
	border-radius: var(--aureon-radius-md);

	&__title {
		margin: 0 0 var(--aureon-space-sm);
		color: var(--aureon-color-heading);
		font-size: var(--aureon-font-size-sm);
		font-weight: 700;
		letter-spacing: 0.02em;
		line-height: 1.3;
		text-transform: uppercase;
	}

	&__list {
		display: grid;
		gap: 0.4rem;
		padding: 0;
		margin: 0;
		list-style: none;
	}

	li {
		display: flex;
		align-items: flex-start;
		gap: var(--aureon-space-xs, 0.5rem);
		margin: 0;
		color: var(--aureon-color-text);
		font-size: var(--aureon-font-size-sm);
		line-height: 1.5;
	}

	svg {
		flex-shrink: 0;
		margin-top: 0.15em;
		color: var(--aureon-color-link);
	}
}

/* Variation swatches ------------------------------------------------------- */

/* Progressive enhancement (variation-swatches.js): each attribute <select> is
 * visually hidden — but kept for WooCommerce's variation matching — and
 * mirrored by a row of swatch buttons. The clip pattern keeps the select in the
 * a11y/AJAX flow while hiding it visually. */
.woocommerce .variations select.aureon-swatched-select {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

/* Attribute rows read as clean stacked fields — drop WooCommerce's table
 * chrome so each attribute label sits directly above its swatch group, instead
 * of a label column beside tall table cells. */
.woocommerce .variations,
.woocommerce .variations tbody,
.woocommerce .variations tr,
.woocommerce .variations th,
.woocommerce .variations td {
	display: block;
	width: auto;
	padding: 0;
	border: 0;
	background: none;
}

.woocommerce .variations tr {
	margin-bottom: var(--aureon-space-md);
}

.woocommerce .variations th.label,
.woocommerce .variations th.label label {
	display: block;
	margin: 0 0 var(--aureon-space-xs);
	color: var(--aureon-color-heading);
	font-size: var(--aureon-font-size-sm);
	font-weight: 600;
	line-height: 1.3;
	text-align: left;
}

/* "Clear" reset link, revealed once a variation is chosen. */
.woocommerce .variations .reset_variations {
	display: inline-block;
	margin-top: var(--aureon-space-xs);
	color: var(--aureon-color-text-muted);
	font-size: var(--aureon-font-size-xs);
	text-decoration: underline;
}

.woocommerce .variations .reset_variations:hover {
	color: var(--aureon-color-link);
}

.aureon-swatches {
	display: flex;
	flex-wrap: wrap;
	gap: var(--aureon-space-xs);
}

/* Text swatch — the default when a term carries no swatch colour. */
.aureon-swatch {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.75rem;
	min-height: 2.75rem;
	padding: 0.35em 0.95em;
	border: 1.5px solid var(--aureon-color-border);
	border-radius: var(--aureon-btn-radius, var(--aureon-radius-md));
	background: var(--aureon-color-background);
	color: var(--aureon-color-text);
	font-size: var(--aureon-font-size-sm);
	font-weight: 500;
	line-height: 1.2;
	cursor: pointer;
	transition:
		border-color 0.15s ease,
		background-color 0.15s ease,
		color 0.15s ease,
		box-shadow 0.15s ease;
}

.aureon-swatch:hover {
	border-color: var(--aureon-color-primary);
	background: color-mix(in srgb, var(--aureon-color-primary) 8%, transparent);
}

.aureon-swatch.is-selected {
	border-color: var(--aureon-color-primary);
	background: var(--aureon-color-primary);
	color: var(--aureon-btn-text, var(--aureon-color-button-text));
	box-shadow: var(--aureon-shadow-sm);
}

/* Unavailable for the current attribute combination — WooCommerce disables the
 * matching <option>, which we mirror onto the swatch. */
.aureon-swatch:disabled {
	cursor: not-allowed;
	opacity: 0.45;
	text-decoration: line-through;
}

.aureon-swatch:focus-visible {
	outline: 2px solid var(--aureon-color-primary);
	outline-offset: 2px;
}

/* Colour chip — rendered when the term carries a swatch colour (per-term
 * meta, set on the attribute's term screen). The term name rides on the
 * button's title/aria-label since the chip shows no text. A gap-ring (a
 * page-colour border plus a thin outline) keeps pale chips visible on any
 * surface. */
.aureon-swatch--color {
	position: relative;
	width: 2.1rem;
	min-width: 0;
	height: 2.1rem;
	min-height: 0;
	padding: 0;
	border: 3px solid var(--aureon-color-background);
	border-radius: 50%;
	background-color: var(--aureon-swatch-color);
	background-clip: padding-box;
	box-shadow: 0 0 0 1px var(--aureon-color-border);
	transition: box-shadow 0.15s ease, transform 0.15s ease;
}

/* Keep the chip's own colour on hover — the base text-swatch hover tints the
 * background, which would otherwise paint over it. */
.aureon-swatch--color:hover {
	background-color: var(--aureon-swatch-color);
	transform: translateY(-1px);
	box-shadow: 0 0 0 2px var(--aureon-color-primary);
}

/* Keep the chip's own colour when selected (the base .is-selected fills with
 * the primary — wrong for a colour chip); mark it with a primary ring
 * instead. */
.aureon-swatch--color.is-selected {
	background-color: var(--aureon-swatch-color);
	box-shadow: 0 0 0 2px var(--aureon-color-primary);
}

/* Tick on the selected chip — white with a soft shadow so it reads on both
 * light and dark swatch colours. */
.aureon-swatch--color.is-selected::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 0.4rem;
	height: 0.72rem;
	border: solid #fff;
	border-width: 0 0.14rem 0.14rem 0;
	transform: translate(-50%, -58%) rotate(45deg);
	filter: drop-shadow(0 1px 1.5px rgb(0 0 0 / 55%));
}

.aureon-swatch--color:disabled {
	transform: none;
	text-decoration: none; /* line-through reads wrong on a colour chip */
}

/* Tooltip naming a swatch that shows no text of its own (colour and image
 * chips, single product page and loop card alike). Sits above the chip with a
 * caret pointing back down at it; hidden from assistive tech, which reads the
 * button's aria-label instead. */
.aureon-swatch-tip {
	position: absolute;
	bottom: calc(100% + 0.45rem);
	left: 50%;
	z-index: 3;
	padding: 0.4em 0.7em;
	border-radius: var(--aureon-radius-md, 0.5rem);
	background: var(--aureon-color-tooltip, #16181d);
	color: #fff;
	font-size: var(--aureon-font-size-xs, 0.75rem);
	font-weight: 500;
	line-height: 1.3;
	white-space: nowrap;
	text-decoration: none;
	transform: translateX(-50%);
	opacity: 0;
	transition: opacity 0.12s ease;
	pointer-events: none;
}

.aureon-swatch-tip::after {
	content: "";
	position: absolute;
	top: 100%;
	left: 50%;
	border: 0.3rem solid transparent;
	border-top-color: var(--aureon-color-tooltip, #16181d);
	transform: translateX(-50%);
}

.aureon-swatch:hover > .aureon-swatch-tip,
.aureon-swatch:focus-visible > .aureon-swatch-tip,
.aureon-loop-swatch:hover > .aureon-swatch-tip,
.aureon-loop-swatch:focus-visible > .aureon-swatch-tip {
	opacity: 1;
}

/* Forms + tables (cart, checkout, my-account) ----------------------------- */

.woocommerce table.shop_table,
.woocommerce table.shop_table th,
.woocommerce table.shop_table td {
	border-color: var(--aureon-color-border);
}

.woocommerce table.shop_table {
	border-radius: var(--aureon-radius-sm);
}

.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce table.shop_table td.product-quantity .qty,
.woocommerce .quantity .qty {
	padding: 0.5em 0.75em;
	border: 1px solid var(--aureon-color-border);
	border-radius: var(--aureon-radius-sm);

	/* Stated rather than left to the UA's white: select2 draws its own box
	 * from `--aureon-color-surface`, and only a shared token keeps the two
	 * agreeing once the surface stops being white. */
	background: var(--aureon-color-surface, #fff);
}

/* Form controls carry the browser's own control font unless told otherwise —
 * 13.3px in Chrome — while select2 renders the country and state pickers as
 * plain `div`s that inherit the page's 1rem. Identical `0.5em` padding then
 * resolved against two different fonts, so a text field came out 31px tall
 * beside a 45px country picker. Stating the page's type on the controls is
 * what makes the rows agree; the padding was never the difference.
 *
 * `font: inherit` rather than `font-size`, because the line-height differs too
 * (`normal` on a control vs the page's 1.7) and both feed the height.
 *
 * The quantity steppers are deliberately absent: that control is sized to the
 * add-to-cart row, not to a form column. */
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select {
	font: inherit;
}

/* Only reachable with JavaScript off — select2 replaces these with a `div` it
 * styles itself. Given the same box as the text fields so the fallback is not
 * the one shape in the form that looks wrong. */
.woocommerce form .form-row select {
	padding: 0.5em 0.75em;
	border: 1px solid var(--aureon-color-border);
	border-radius: var(--aureon-radius-sm);
}

.woocommerce form .form-row input.input-text:focus,
.woocommerce form .form-row textarea:focus,
.woocommerce .quantity .qty:focus {
	border-color: var(--aureon-color-primary);
	outline: none;
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--aureon-color-primary) 15%, transparent);
}

/* Quantity −/+ stepper. quantity.js wraps the native number input with −/+
 * buttons and adds `.aureon-qty` to the `.quantity` container; the native
 * spinner arrows are hidden so only the buttons drive the value. Buttons and
 * input form one segmented control with shared (non-doubled) borders. */
.woocommerce .quantity .qty::-webkit-outer-spin-button,
.woocommerce .quantity .qty::-webkit-inner-spin-button {
	appearance: none;
	margin: 0;
}

.woocommerce .quantity.aureon-qty {
	display: inline-flex;
	// Stretch to the add-to-cart row's height so the stepper and add-to-cart
	// line up at the same height. Only
	// takes effect when the `.quantity` is a flex item, e.g. the single-product
	// form row — inert in the cart table.
	align-self: stretch;
	align-items: stretch;
	vertical-align: middle;

	.qty {
		width: 3em;
		padding-block: 0;
		padding-inline: 0.25em;
		border-radius: 0;
		text-align: center;
		appearance: textfield; // Firefox: drop the spinner.
	}
}

.aureon-qty-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.4em;
	padding: 0;
	border: 1px solid var(--aureon-color-border);
	background: var(--aureon-color-background);
	color: var(--aureon-color-text);
	font-size: 1.1em;
	line-height: 1;
	cursor: pointer;
}

.aureon-qty-btn:hover {
	border-color: var(--aureon-color-primary);
	color: var(--aureon-color-link);
}

// Rounded outer corners; drop the border shared with the input so the seam is
// a single line rather than a doubled one.
.aureon-qty-minus {
	border-radius: var(--aureon-radius-sm) 0 0 var(--aureon-radius-sm);
	border-inline-end: 0;
}

.aureon-qty-plus {
	border-radius: 0 var(--aureon-radius-sm) var(--aureon-radius-sm) 0;
	border-inline-start: 0;
}

/* Notices ------------------------------------------------------------------ */

.woocommerce-message,
.woocommerce-error,
.woocommerce-info {
	padding: var(--aureon-space-sm) var(--aureon-space-md);
	border: 1px solid var(--aureon-color-border);
	border-radius: var(--aureon-radius-sm);
}

// Loop: anchor absolutely positioned overlays (the sale badge) to the card.
.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product {
	position: relative;
}

/* Single product: quantity stepper, add-to-cart and anything a plugin adds on
 * `woocommerce_after_add_to_cart_button` on one row. Grouped products keep their product table
 * untouched (`form.cart.grouped_form` is excluded); the variable form flexes
 * its inner button wrap rather than the whole variations form, which also holds
 * the variation table. A too-wide extra simply wraps to the next line via
 * `flex-wrap`. */
.woocommerce div.product form.cart:not(.grouped_form):not(.variations_form),
.woocommerce div.product form.cart .woocommerce-variation-add-to-cart {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--aureon-space-sm);
}

/* Toast notifications ------------------------------------------------------ *
 * Storefront feedback cards (see toast.js), modelled on the "simple" Tailwind
 * notification: icon + title + optional message + close, stacked top-right and
 * sliding in from the edge. Fixed region, above everything. */

.aureon-toast-region {
	position: fixed;
	inset-block-start: var(--aureon-space-md, 1rem);
	inset-inline-end: var(--aureon-space-md, 1rem);
	z-index: 9999;
	display: flex;
	flex-direction: column;
	gap: var(--aureon-space-sm, 0.75rem);
	width: min(24rem, calc(100vw - 2rem));
	pointer-events: none; // let clicks through the gaps; toasts re-enable it.
}

// Clear the WordPress admin bar when it's showing (logged-in front end).
.admin-bar .aureon-toast-region {
	inset-block-start: calc(var(--aureon-space-md, 1rem) + 32px);
}

@media screen and (max-width: 782px) {

	.admin-bar .aureon-toast-region {
		inset-block-start: calc(var(--aureon-space-md, 1rem) + 46px);
	}
}

.aureon-toast {
	pointer-events: auto;
	display: flex;
	align-items: flex-start;
	gap: var(--aureon-space-sm, 0.75rem);
	padding: var(--aureon-space-sm, 0.85rem) var(--aureon-space-md, 1rem);
	border: 1px solid var(--aureon-color-border, rgba(0, 0, 0, 0.08));
	border-radius: var(--aureon-radius-md, 0.6rem);
	background: var(--aureon-color-background, #fff);
	color: var(--aureon-color-text, #1a1a1a);
	box-shadow: var(--aureon-shadow-lg, 0 10px 30px rgba(0, 0, 0, 0.14));
	// Enter/leave: slide in from the right and fade.
	opacity: 0;
	transform: translateX(1rem);
	transition: opacity 0.25s ease, transform 0.25s ease;

	&.is-visible {
		opacity: 1;
		transform: translateX(0);
	}

	&.is-leaving {
		opacity: 0;
		transform: translateX(1rem);
	}

	&__icon {
		flex: none;
		display: inline-flex;
		line-height: 0;
		// Success/error tint on the glyph only; card stays neutral.
		color: var(--aureon-color-primary, #1a1a1a);
	}

	&--success &__icon {
		color: #16a34a;
	}

	&--error &__icon {
		color: #dc2626;
	}

	&__content {
		flex: 1 1 auto;
		min-width: 0;
	}

	&__title {
		margin: 0;
		font-size: var(--aureon-font-size-sm, 0.9rem);
		font-weight: 600;
		line-height: 1.35;
		color: var(--aureon-color-heading, inherit);
	}

	&__message {
		margin: 0.15em 0 0;
		font-size: var(--aureon-font-size-sm, 0.85rem);
		line-height: 1.4;
		color: var(--aureon-color-text-muted, rgba(0, 0, 0, 0.6));
		overflow-wrap: anywhere;
	}

	// A real link moved in as-is (e.g. WooCommerce's own "Undo?" on the cart
	// page's item-removed toast) — styled as the toast's one call to action,
	// not another line of muted copy.
	&__action {
		display: inline-block;
		margin: 0.35em 0 0;
		font-size: var(--aureon-font-size-sm, 0.85rem);
		font-weight: 600;
		color: var(--aureon-color-link);
		text-decoration: none;

		&:hover,
		&:focus-visible {
			text-decoration: underline;
		}
	}

	&__close {
		flex: none;
		display: inline-flex;
		align-items: center;
		justify-content: center;
		margin: -0.25em -0.35em -0.25em 0;
		padding: 0.25em;
		border: 0;
		border-radius: var(--aureon-radius-sm, 0.35rem);
		background: none;
		color: var(--aureon-color-text-muted, rgba(0, 0, 0, 0.5));
		line-height: 0;
		cursor: pointer;
		transition: color 0.15s ease, background-color 0.15s ease;

		&:hover {
			color: var(--aureon-color-text, #1a1a1a);
			background: color-mix(in srgb, currentcolor 12%, transparent);
		}
	}
}

@media (prefers-reduced-motion: reduce) {

	.aureon-toast {
		transition: opacity 0.2s ease;
		transform: none;

		&.is-visible,
		&.is-leaving {
			transform: none;
		}
	}
}

/* -------------------------------------------------------------------------
 * Shop display settings (driven by body classes from the WooCommerce module)
 * ---------------------------------------------------------------------- */

/* Sale badge — position + shape. WooCommerce prints `span.onsale`; the theme
 * moves it inside the product image (the card's image link/slider in the loop,
 * the gallery wrapper on a single product — see `WooCommerce::loop_image()` and
 * `rebind_single_sale_flash()`), so all four corners refer to the image rather
 * than to a card that is taller than it. Colours come from the WooCommerce
 * module's inline `--aureon-sale-badge-*` variables, falling back to the theme's
 * sale red when the store owner hasn't picked one — a badge that matches the
 * palette's accent stops reading as a discount flag. */
.woocommerce ul.products li.product .onsale,
.woocommerce span.onsale {
	position: absolute;
	z-index: 3;
	margin: 0;
	min-height: auto;
	min-width: auto;
	line-height: 1.4;
	padding: 0.25em 0.7em;
	background: var(--aureon-sale-badge-bg, #ef4444);
	color: var(--aureon-sale-badge-color, #fff);
}

/* One corner, as the four offsets it takes — `auto` on the two it doesn't set,
 * so switching corners never leaves the previous one's offset standing. */
@mixin badge-corner($corner) {

	@if $corner == top-left or $corner == bottom-left {
		inset-inline-start: var(--aureon-space-sm);
		inset-inline-end: auto;
	} @else {
		inset-inline-end: var(--aureon-space-sm);
		inset-inline-start: auto;
	}

	@if $corner == top-left or $corner == top-right {
		top: var(--aureon-space-sm);
		bottom: auto;
	} @else {
		top: auto;
		bottom: var(--aureon-space-sm);
	}
}

/* The badge's shape, as the radius (and, for a disc, the size) it takes. */
@mixin badge-shape($shape) {

	@if $shape == pill {
		border-radius: 999px;
	} @else if $shape == rounded {
		border-radius: var(--aureon-radius-sm, 6px);
	} @else if $shape == square {
		border-radius: 0;
	} @else {
		// A disc also fixes the badge's size, so a short label centres in it.
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: 3em;
		height: 3em;
		padding: 0;
		border-radius: 50%;
	}
}

/* The single-product badge's box. PHP renders it inside the gallery, and
 * `single-badge.js` moves it into flexslider's `.flex-viewport` — the photo
 * alone — once that exists, so a bottom corner doesn't sink to the bottom of
 * the thumbnail strip. Core styles the gallery itself as positioned; the
 * viewport it builds is not, so that's declared here. */
.woocommerce div.product .woocommerce-product-gallery > .flex-viewport {
	position: relative;
}

/* WooCommerce core positions the badge itself — `.woocommerce span.onsale`
 * (top/left) and, more specifically, `.woocommerce ul.products li.product
 * .onsale { top:0; right:0; left:auto }` (specificity 0,4,2). The theme's
 * corner rules must out-specify both, or switching the position setting has no
 * effect. WooCommerce sets the `.woocommerce` class on <body> itself (not a
 * wrapper), so the badge body class already lives on the same element — the
 * loop selector carries the full `ul.products li.product` context (0,4,3) to
 * beat core's loop rule, and a `span.onsale` variant (0,2,2) covers every other
 * badge on the page.
 *
 * `aureon-badge-*` is the shop-wide choice; `aureon-sbadge-*` is the product
 * page's own (printed only there, already resolved through `inherit` in
 * `WooCommerce::body_class()`), scoped to the gallery so it restyles that one
 * badge and leaves the related-products cards on the same page alone. It comes
 * second, and carries the extra gallery class, so it wins both ways. */
@each $corner in top-left, top-right, bottom-left, bottom-right {

	body.aureon-badge-#{$corner} ul.products li.product .onsale,
	body.aureon-badge-#{$corner} span.onsale {

		@include badge-corner($corner);
	}

	body.aureon-sbadge-#{$corner} .woocommerce-product-gallery span.onsale {

		@include badge-corner($corner);
	}
}

@each $shape in pill, rounded, square, circle {

	body.aureon-badge-#{$shape} .onsale {

		@include badge-shape($shape);
	}

	body.aureon-sbadge-#{$shape} .woocommerce-product-gallery .onsale {

		@include badge-shape($shape);
	}
}

/* Single product, the same clash one level up: WooCommerce pins the PhotoSwipe
 * zoom trigger to the image's top-right corner, so a badge in that corner lands
 * under the magnifier. Drop it below the button. `:has()` keeps this to galleries that
 * actually have the trigger — with zoom switched off (see "Zoom" in
 * WooCommerce → Single Product) the corner is free and the badge stays put. */
body.aureon-sbadge-top-right
.woocommerce-product-gallery:has(> .woocommerce-product-gallery__trigger)
.onsale {
	// The trigger's own inset (1rem) plus its box (2.25rem), then a gap.
	top: calc(1rem + 2.25rem + var(--aureon-space-sm));
}

/* Product columns per breakpoint. The theme drives all three tiers from body
 * classes (desktop / tablet / mobile), so the grid is authoritative regardless
 * of WooCommerce's own column handling. The list design overrides these below
 * with a single full-width column. */
@for $i from 1 through 6 {

	body.aureon-cols-d-#{$i} ul.products {
		grid-template-columns: repeat(#{$i}, minmax(0, 1fr));
	}
}

@media (max-width: 1024px) {

	@for $i from 1 through 6 {

		body.aureon-cols-t-#{$i} ul.products {
			grid-template-columns: repeat(#{$i}, minmax(0, 1fr));
		}
	}
}

@media (max-width: 640px) {

	@for $i from 1 through 6 {

		body.aureon-cols-m-#{$i} ul.products {
			grid-template-columns: repeat(#{$i}, minmax(0, 1fr));
		}
	}
}

/* Related products take their own column count
 * (single.related_columns, passed through as WooCommerce's `columns-N`) on
 * desktop, rather than the shop's; they step down with the default rules. */
@media (min-width: 1025px) {

	@for $i from 1 through 6 {

		.woocommerce .related ul.products.columns-#{$i} {
			grid-template-columns: repeat(#{$i}, minmax(0, 1fr));
		}
	}
}

/* Loop card additions */
.aureon-loop-category {
	display: block;
	margin-bottom: 0.25em;
	font-size: var(--aureon-font-size-xs, 0.75rem);
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--aureon-color-text-muted, var(--aureon-color-text));

	/* The term links would otherwise take the accent link colour and compete
	 * with the title for attention — this line is supporting text. */
	a {
		color: inherit;
		text-decoration: none;

		&:hover,
		&:focus-visible {
			text-decoration: underline;
		}
	}
}

.aureon-loop-excerpt {
	margin: 0.35em 0 0.5em;
	font-size: var(--aureon-font-size-sm);
	color: var(--aureon-color-text-muted, var(--aureon-color-text));

	p {
		margin: 0;
	}
}

/* Single product: the gallery / summary skeleton ---------------------------
 *
 * WooCommerce floats the gallery and summary at 48% each and lets the tabs and
 * related rails clear beneath them. The theme replaces that with a two-track
 * grid: the gallery takes the fluid track, the summary a bounded one, and every
 * other child of `div.product` (tabs, related, up-sells) spans both.
 *
 * Both are placed on row 1 explicitly rather than left to auto-placement, so
 * flipping the gallery to the right is a column swap instead of a reflow —
 * auto-placement never moves an item back to an earlier column in the same row.
 * The sale badge is absolutely positioned (see the badge rules above), so it
 * stays out of the grid and never claims a track.
 *
 * The summary track is capped as a share of the container as well as in rems,
 * so a product page inside a sidebar layout still gives the gallery the larger
 * half instead of handing 26rem to the details column.
 *
 * Below the breakpoint the grid collapses to a single column and the source
 * order — gallery, then summary — is what ships. */
@media (min-width: 783px) {

	body.woocommerce div.product {
		display: grid;
		grid-template-columns: minmax(0, 1fr) minmax(0, min(var(--aureon-single-summary, 26rem), 42%));
		align-items: start;
		column-gap: var(--aureon-space-xl, 2.5rem);

		> * {
			grid-column: 1 / -1;
			min-width: 0;
		}

		> div.images,
		> div.woocommerce-product-gallery {
			grid-column: 1;
			grid-row: 1;
		}

		> div.summary,
		> div.entry-summary {
			grid-column: 2;
			grid-row: 1;
		}
	}

	/* Undoing core's floats and 48% widths needs its own rule, because core
	 * declares them through a selector *list* whose strongest member carries an
	 * ID: `.woocommerce #content div.product div.images` (1,3,3) alongside the
	 * plain `.woocommerce div.product div.images` (0,3,2). Chrome weighs the
	 * matching member, and the theme renders its content wrapper as
	 * `<div id="content">` — so the ID variant matches and beats any selector of
	 * ours that only stacks classes. Mirroring core's pair (one `#content`
	 * variant, one without) out-specifies whichever member matched, and keeps
	 * working on a layout that has no `#content` wrapper. Get this wrong and the
	 * gallery silently keeps 48% of its own track — the grid looks applied
	 * because placement lands, while the item renders at half width. */
	body.woocommerce div.product,
	body.woocommerce #content div.product {

		> div.images,
		> div.woocommerce-product-gallery,
		> div.summary,
		> div.entry-summary {
			float: none;
			width: auto;
			margin: 0;
		}
	}

	/* Gallery on the right — swap the two tracks, leaving source order alone so
	 * the summary still follows the images for screen readers. */
	body.woocommerce.aureon-gallery-right div.product {

		/* Mirror the tracks as well as the placement. Swapping only the columns
		 * would hand the gallery the bounded track and the summary the fluid one,
		 * leaving the images narrower than the text they illustrate. */
		grid-template-columns: minmax(0, min(var(--aureon-single-summary, 26rem), 42%)) minmax(0, 1fr);

		> div.images,
		> div.woocommerce-product-gallery {
			grid-column: 2;
		}

		> div.summary,
		> div.entry-summary {
			grid-column: 1;
		}
	}
}

/* Single product: the thumbnail row beneath the main image (the default
 * "Thumbnail layout", and what the rail below falls back to on narrow
 * screens). WooCommerce floats four thumbs at 25% each with no gap between
 * them; this lays them out as the rail's own squares instead — same size,
 * rounding, dimmed-until-active treatment — in a row that scrolls sideways
 * rather than wrapping when a product has more images than fit. Scoped as
 * deep as WooCommerce's `.woocommerce div.product div.images
 * .flex-control-thumbs li` so its 25% width and float lose. */
$gallery-thumb-size: 5.5rem;

@mixin gallery-thumb {
	display: block;
	width: 100%;
	aspect-ratio: 1;
	object-fit: cover;
	border: 1px solid transparent;
	border-radius: var(--aureon-radius-sm, 4px);
	opacity: 0.6;
	cursor: pointer;
	transition: opacity 0.15s ease, border-color 0.15s ease;

	&:hover {
		opacity: 1;
	}

	&.flex-active {
		opacity: 1;
		border-color: var(--aureon-color-primary);
	}
}

body.woocommerce div.product div.images .flex-control-thumbs {
	display: flex;
	flex-wrap: nowrap;
	gap: var(--aureon-space-sm, 0.75rem);
	margin: var(--aureon-space-sm, 0.75rem) 0 0;
	padding: 0;
	overflow-x: auto;
	scrollbar-width: thin;

	li {
		flex: 0 0 $gallery-thumb-size;
		width: $gallery-thumb-size;
		float: none;
		clear: none;
	}

	img {

		@include gallery-thumb;
	}
}

/* Single product: vertical thumbnail rail — an opt-in alternative to
 * WooCommerce's thumbnail row beneath the main image (see "Thumbnail layout"
 * in WooCommerce → Single Product). The gallery's flexslider always renders
 * the same two pieces as direct children of `.woocommerce-product-gallery`:
 * `.flex-viewport` (the big image) and `.flex-control-nav.flex-control-thumbs`
 * (the thumb strip) — so turning the row into a column beside the image is a
 * flex layout on that one element, nothing to rewrite. `row-reverse` (rather
 * than an explicit `order`) puts the first child — the viewport — at the
 * main-axis end, which for a row is the right, so the rail lands on the left
 * for free. A single-image product never gets a `.flex-viewport` wrapper
 * (flexslider only initializes past one image); the fallback rule below
 * still gives that lone `.woocommerce-product-gallery__wrapper` the flexed
 * width, so it renders exactly as it would outside rail mode.
 *
 * Reuses the gallery/summary grid's own breakpoint: a rail needs width to
 * spare that a narrow viewport doesn't have, so mobile keeps WooCommerce's
 * row regardless of the setting. */
@media (min-width: 783px) {

	body.aureon-thumbs-rail .woocommerce-product-gallery {
		display: flex;
		flex-direction: row-reverse;
		align-items: stretch;
		gap: var(--aureon-space-sm, 0.75rem);

		> .flex-viewport,
		> .woocommerce-product-gallery__wrapper {
			flex: 1 1 auto;
			min-width: 0;
		}
	}

	// Reset core's row layout (25%-wide floated `li`s) for a scrollable
	// column instead. Overflow only bites when the rail is shorter than the
	// thumbnail stack it holds — a product with more images than fit beside
	// the main photo — and scrolls in place rather than growing the page.
	// Scoped as deep as WooCommerce's own `.woocommerce div.product div.images
	// .flex-control-thumbs li { width: 25% }` and one step further, or that
	// rule wins and shrinks every thumb to a quarter of the rail.
	body.aureon-thumbs-rail div.product div.images .flex-control-thumbs {
		display: flex;
		flex: 0 0 auto;
		flex-direction: column;
		width: $gallery-thumb-size;
		max-height: 100%;
		margin: 0;
		padding: 0;
		gap: var(--aureon-space-sm, 0.75rem);
		overflow-x: hidden;
		overflow-y: auto;

		li {
			flex: 0 0 auto;
			width: auto;
		}
	}
}

/* Single product: gallery image crop. `auto` (the default) sets no variable, so
 * images keep their uploaded proportions and this costs nothing. Any other
 * choice crops every gallery image to one shape, so a product whose uploads are
 * a mix of portrait and square still lines up. */
body.aureon-ratio-1-1 {
	--aureon-single-ratio: 1;
}

body.aureon-ratio-4-5 {
	--aureon-single-ratio: 4 / 5;
}

body.aureon-ratio-3-4 {
	--aureon-single-ratio: 3 / 4;
}

.woocommerce div.product .woocommerce-product-gallery__image img {
	aspect-ratio: var(--aureon-single-ratio, auto);
	object-fit: cover;
}

/* Single product: full-screen-gallery trigger. WooCommerce already places
 * `.woocommerce-product-gallery__trigger` (the magnifier button that opens
 * the PhotoSwipe lightbox) top-right of the image with its own drawn-in-CSS
 * glyph — it ships as a flat white circle with no relationship to the rest of
 * the theme. These rules give it an icon-button treatment: a translucent
 * surface tint,
 * blur and shadow at rest, the full surface colour on hover, and a visible
 * focus ring — without touching WooCommerce's own positioning or the glyph's
 * two pseudo-elements beyond recolouring them to match. */
.woocommerce-product-gallery__trigger {
	background: color-mix(in srgb, var(--aureon-color-surface, #fff) 90%, transparent);
	box-shadow: var(--aureon-shadow-sm, 0 1px 3px rgba(0, 0, 0, 0.15));
	backdrop-filter: blur(2px);
	transition: background-color 0.15s ease, transform 0.15s ease;

	&:hover {
		background: var(--aureon-color-surface, #fff);
		transform: scale(1.06);
	}

	&:focus-visible {
		outline: 2px solid var(--aureon-color-primary);
		outline-offset: 2px;
	}

	&::before {
		border-color: var(--aureon-color-text, #000);
	}

	&::after {
		background: var(--aureon-color-text, #000);
	}
}

/* Full-screen lightbox (PhotoSwipe) chrome. WooCommerce ships PhotoSwipe's
 * stock skin — hard-edged square hit-plates, no hover feedback beyond a
 * plain opacity fade. The button glyphs themselves are a sprite baked into
 * `default-skin.svg` and are left alone; only the surrounding chrome — the
 * hover plate, arrow-button corners, caption width and counter/caption type —
 * is restyled here, reusing the theme's own radius and font-size tokens. */
.pswp__button--zoom,
.pswp__button--fs,
.pswp__button--share,
.pswp__button--close {
	border-radius: 50%;
	transition: background-color 0.15s ease;

	&:hover,
	&:focus-visible {
		background-color: rgba(255, 255, 255, 0.15);
	}
}

.pswp__button--arrow--left::before,
.pswp__button--arrow--right::before {
	border-radius: var(--aureon-radius-sm, 4px);
	transition: background-color 0.15s ease;
}

.pswp__button--arrow--left:hover::before,
.pswp__button--arrow--right:hover::before {
	background-color: rgba(0, 0, 0, 0.55);
}

.pswp__counter {
	font-size: var(--aureon-font-size-sm, 0.875rem);
}

.pswp__caption__center {
	max-width: 40rem;
	font-size: var(--aureon-font-size-sm, 0.875rem);
}

/* Single product: sticky add-to-cart bar — a fixed footer bar carrying the
 * product's thumbnail, name, price and buy button, revealed by sticky-cart.js
 * once the real buying row scrolls out of view.
 *
 * This is a fixed bar rather than a pinned summary column. `position: sticky`
 * on the column travels for the height of its containing block — the product
 * grid, which also holds the tabs and related rails — so the pinned column
 * scrolled down over them. A fixed bar owns its own layer and overlaps nothing.
 *
 * It sits below the mini-cart drawer in the stack, so adding from the bar still
 * opens the drawer over it. */
.aureon-atc-bar {
	position: fixed;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 90;
	padding: var(--aureon-space-sm) var(--aureon-space-md);
	border-top: 1px solid var(--aureon-color-border);
	background: var(--aureon-color-background);
	box-shadow: 0 -4px 16px rgb(0 0 0 / 8%);
	transform: translateY(100%);
	visibility: hidden;
	transition:
		transform 0.25s ease,
		visibility 0.25s;

	&.is-visible {
		transform: translateY(0);
		visibility: visible;
	}

	// A visitor who prefers less motion gets the same bar without the slide.
	@media (prefers-reduced-motion: reduce) {
		transition: none;
	}

	&__inner {
		display: flex;
		align-items: center;
		gap: var(--aureon-space-sm);
		max-width: var(--aureon-container-width, 1200px);
		margin: 0 auto;
	}

	&__thumb {
		flex-shrink: 0;
		width: 3rem;
		height: 3rem;
		border-radius: var(--aureon-radius-sm);
		object-fit: cover;

		// The thumbnail is decoration beside the name; it's the first thing to
		// go when the row is tight.
		@media (max-width: 480px) {
			display: none;
		}
	}

	&__meta {
		display: flex;
		flex: 1;
		flex-direction: column;
		min-width: 0;
		line-height: 1.3;
	}

	&__title {
		overflow: hidden;
		color: var(--aureon-color-heading);
		font-size: var(--aureon-font-size-sm);
		font-weight: 600;
		text-overflow: ellipsis;
		white-space: nowrap;
	}

	&__price {
		color: var(--aureon-color-text-muted, var(--aureon-color-text));
		font-size: var(--aureon-font-size-sm);

		// 0.7 everywhere a struck-through price appears — see the
		// `regular-price-decoration` mixin for the ladder this sits on.
		del {
			opacity: 0.7;
		}
	}

	&__button {
		flex-shrink: 0;
		white-space: nowrap;
	}
}

/* Single product: category list rendered inside the summary (a reorderable
 * summary element). */
.aureon-single-category {
	display: block;
	margin-bottom: var(--aureon-space-sm);
	font-size: var(--aureon-font-size-sm);
	color: var(--aureon-color-text-muted, var(--aureon-color-text));

	a {
		color: inherit;
	}
}

/* Loop card: the theme rebuilds the product card as one ordered render, so the
 * image and title become sibling links. Keep the image link a block so the
 * thumbnail sits on its own line, and a positioned box — the sale badge is
 * rendered inside it (see `WooCommerce::loop_image()`) precisely so its corners
 * mean the image's corners, not the whole card's. */
.woocommerce ul.products li.product > :is(a.woocommerce-LoopProduct-link, .aureon-loop-slider) {
	display: block;
	position: relative;
}

/* Product-card content alignment (shop body class). WooCommerce centres loop
 * text by default; these let the store owner pick. */
body.aureon-shop-align-left ul.products li.product {
	text-align: left;
}

body.aureon-shop-align-center ul.products li.product {
	text-align: center;
}

body.aureon-shop-align-right ul.products li.product {
	text-align: right;
}

/* ---------------------------------------------------------------------------
 * Product card designs
 *
 * The design rides the loop *container* (`ul.products.aureon-cards--{x}`), not
 * the body, so one page can show two designs at once — catalog cards in the
 * shop loop and a different design in the up-sell rail (see
 * WooCommerce::loop_design_class()). It also means the live preview repaints by
 * swapping a single class on the rendered list.
 *
 * Every design is token-driven, so light and dark mode come free; there are no
 * paired light/dark variants to maintain.
 * ------------------------------------------------------------------------- */

/* Shared card shell. The flex column is what makes add-to-cart buttons line up
 * across a row: the card fills its grid cell, and the button's auto top margin
 * eats the slack left by shorter titles, so every button sits on the same line
 * regardless of how much text sits above it. */
ul.products.aureon-cards li.product {
	display: flex;
	flex-direction: column;
	height: 100%;
	margin-bottom: 0;

	> * {
		flex: 0 0 auto;
	}

	> .button,
	> .added_to_cart {
		margin-top: auto;
		margin-bottom: 0;
	}

	/* Card typography, tightened against WooCommerce's defaults so the title
	 * reads as a label above the price rather than a heading competing with it. */
	.woocommerce-loop-product__title {
		margin: 0.75em 0 0.15em;
		padding: 0;
		font-size: var(--aureon-font-size-base, 1rem);
		font-weight: 600;
		line-height: 1.35;
	}

	.price {
		margin: 0;
		font-size: var(--aureon-font-size-base, 1rem);
		font-weight: 600;
		color: var(--aureon-color-heading, var(--aureon-color-text));
	}

	.aureon-loop-category {
		margin-bottom: 0;
	}

	.woocommerce-loop-product__link {
		text-decoration: none;
	}
}

/* A consistent, cropped, softly-rounded thumbnail is most of what separates a
 * polished catalog from a ragged one — source images are never the same shape.
 * Designs below vary only --aureon-card-ratio. */
ul.products.aureon-cards li.product > :is(a.woocommerce-LoopProduct-link, .aureon-loop-slider) {
	display: block;
	overflow: hidden;
	border-radius: var(--aureon-radius-md, 0.5rem);
}

ul.products.aureon-cards li.product > :is(a.woocommerce-LoopProduct-link, .aureon-loop-slider) img {
	display: block;
	width: 100%;
	height: auto;
	margin: 0;
	object-fit: cover;
	aspect-ratio: var(--aureon-card-ratio, 1);
	transition: transform 0.3s ease;
}

ul.products.aureon-cards li.product:hover > :is(a.woocommerce-LoopProduct-link, .aureon-loop-slider) img {
	transform: scale(1.03);
}

@media (prefers-reduced-motion: reduce) {

	ul.products.aureon-cards li.product > :is(a.woocommerce-LoopProduct-link, .aureon-loop-slider) img,
	ul.products.aureon-cards li.product:hover > :is(a.woocommerce-LoopProduct-link, .aureon-loop-slider) img {
		transform: none;
		transition: none;
	}
}

/* ---------------------------------------------------------------------------
 * Product-card image slider
 *
 * Optional (see the "Image slider" setting): a card whose product has gallery
 * images shows them in place of the lone thumbnail. The container stands in for
 * the thumbnail link in every card design — it carries the same crop, radius
 * and hover zoom, because the design rules above match either box.
 *
 * The track translates rather than scrolls, so the arrows and dots can sit over
 * the image without joining a scroll container, and "which slide" stays one
 * number (loop-image-slider.js owns it).
 * ------------------------------------------------------------------------- */
.aureon-loop-slider {
	position: relative;
	overflow: hidden;
}

.aureon-loop-slider__track {
	display: flex;
	transition: transform 0.35s ease;
}

.aureon-loop-slider__slide {
	display: block;
	flex: 0 0 100%;
	min-width: 0;
}

/* Arrows stay out of the way until the card is hovered or something inside it
 * takes focus — on touch, where there's no hover, they're always there. */
.aureon-loop-slider__nav {
	position: absolute;
	top: 50%;
	z-index: 2;
	display: grid;
	place-items: center;
	width: 2rem;
	height: 2rem;
	padding: 0;
	transform: translateY(-50%);
	border: 0;
	border-radius: 50%;
	background: var(--aureon-color-surface, #fff);
	color: var(--aureon-color-text, #111);
	box-shadow: 0 1px 6px rgb(0 0 0 / 18%);
	opacity: 0;
	cursor: pointer;
	transition: opacity 0.2s ease;

	svg {
		width: 1rem;
		height: 1rem;
	}

	&:focus-visible {
		opacity: 1;
		outline: 2px solid var(--aureon-color-primary, currentcolor);
		outline-offset: 2px;
	}
}

.aureon-loop-slider__nav--prev {
	inset-inline-start: 0.5rem;
}

.aureon-loop-slider__nav--next {
	inset-inline-end: 0.5rem;
}

li.product:hover .aureon-loop-slider__nav,
li.product:focus-within .aureon-loop-slider__nav {
	opacity: 1;
}

@media (hover: none) {

	.aureon-loop-slider__nav {
		opacity: 1;
	}
}

.aureon-loop-slider__dots {
	position: absolute;
	inset-inline: 0;
	bottom: 0.5rem;
	z-index: 2;
	display: flex;
	gap: 0.3rem;
	justify-content: center;
	pointer-events: none;
}

.aureon-loop-slider__dot {
	width: 0.4rem;
	height: 0.4rem;
	padding: 0;
	border: 0;
	border-radius: 50%;

	/* Product shots are as often near-white as they are dark, so a dot needs to
	 * carry its own contrast: a light fill with a dark hairline reads on both. */
	background: rgb(255 255 255 / 85%);
	box-shadow: 0 0 0 1px rgb(0 0 0 / 30%);
	cursor: pointer;
	pointer-events: auto;
	transition: background 0.2s ease, transform 0.2s ease;

	&.is-active {
		background: var(--aureon-color-primary, #111);
		transform: scale(1.4);
	}

	&:focus-visible {
		outline: 2px solid var(--aureon-color-primary, currentcolor);
		outline-offset: 2px;
	}
}

@media (prefers-reduced-motion: reduce) {

	.aureon-loop-slider__track,
	.aureon-loop-slider__dot,
	.aureon-loop-slider__nav {
		transition: none;
	}
}

/* Grid — the default. Square crop, actions aligned by the shared shell. */
ul.products.aureon-cards--grid li.product {
	--aureon-card-ratio: 1;
}

/* Tall images: portrait crop, for apparel and posters. */
ul.products.aureon-cards--tall li.product {
	--aureon-card-ratio: 3 / 4;
}

/* Inline price: the renderer wraps the title and price in a headline row (see
 * WooCommerce::render_loop_card()), so they share a baseline with the price
 * pushed to the right. */
ul.products.aureon-cards--inline-price li.product {
	--aureon-card-ratio: 1;
}

.aureon-loop-headline {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: var(--aureon-space-sm);
	width: 100%;

	.woocommerce-loop-product__link {
		min-width: 0;
	}

	.price {
		flex: 0 0 auto;
		white-space: nowrap;
	}
}

/* Image overlay: the add-to-cart shares the image's grid cell and rises into
 * view on hover or keyboard focus. */
ul.products.aureon-cards--overlay li.product {
	--aureon-card-ratio: 1;
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	align-content: start;

	> :is(a.woocommerce-LoopProduct-link, .aureon-loop-slider),
	> .button,
	> .added_to_cart {
		grid-area: 1 / 1;
	}

	> .button,
	> .added_to_cart {
		z-index: 1;
		align-self: end;
		justify-self: stretch;
		margin: var(--aureon-space-sm);
		opacity: 0;
		transform: translateY(0.5rem);
		transition: opacity 0.2s ease, transform 0.2s ease;
	}

	&:hover,
	&:focus-within {

		> .button,
		> .added_to_cart {
			opacity: 1;
			transform: none;
		}
	}
}

/* Touch users never get a hover, so the button stays put. */
@media (hover: none) {

	ul.products.aureon-cards--overlay li.product > .button,
	ul.products.aureon-cards--overlay li.product > .added_to_cart {
		opacity: 1;
		transform: none;
	}
}

@media (prefers-reduced-motion: reduce) {

	ul.products.aureon-cards--overlay li.product > .button,
	ul.products.aureon-cards--overlay li.product > .added_to_cart {
		transition: none;
	}
}

/* Border grid: cells butt together, separated by hairlines. The container owns
 * the top and left edges so the rules never double up. */
ul.products.aureon-cards--bordered {
	gap: 0;
	border-top: 1px solid var(--aureon-color-border);
	border-left: 1px solid var(--aureon-color-border);
}

ul.products.aureon-cards--bordered li.product {
	--aureon-card-ratio: 1;
	padding: var(--aureon-space-lg);
	border-right: 1px solid var(--aureon-color-border);
	border-bottom: 1px solid var(--aureon-color-border);
}

/* Detail card: a bordered, padded card. The image runs flush to the card edge
 * by cancelling the padding it would otherwise sit inside. */
ul.products.aureon-cards--detail li.product {
	--aureon-card-ratio: 4 / 3;
	padding: var(--aureon-space-lg);
	overflow: hidden;
	border: 1px solid var(--aureon-color-border);
	border-radius: var(--aureon-radius-lg, 0.75rem);
	background: var(--aureon-color-surface, transparent);

	> :is(a.woocommerce-LoopProduct-link, .aureon-loop-slider) {
		margin: calc(var(--aureon-space-lg) * -1) calc(var(--aureon-space-lg) * -1) var(--aureon-space-md);
		border-radius: 0;
	}

	> .button,
	> .added_to_cart {
		width: 100%;
		margin-top: auto;
		text-align: center;
	}

	.aureon-loop-excerpt {
		display: block;
	}
}

/* Showcase: the price sits over the foot of the image on a gradient scrim, the
 * title and its supporting line read quietly beneath, and a full-width action
 * closes the card.
 *
 * The price is a sibling of the image, not a child, so it's positioned against
 * a box that mirrors the image exactly — same top, same width, same aspect —
 * which keeps it pinned to the image's foot at every column count without
 * hard-coding a height. */
ul.products.aureon-cards--showcase li.product {
	--aureon-card-ratio: 4 / 5;
	position: relative;

	/* No card chrome: the price box is anchored to the card's own box, so any
	 * padding or border here would make it wider — and therefore taller, since
	 * its height comes from the aspect ratio — than the image it must sit on. */
	padding: 0;
	border: 0;
	background: none;

	> :is(a.woocommerce-LoopProduct-link, .aureon-loop-slider) {
		position: relative;

		/* Scrim: dark enough at the foot for white type to clear contrast, and
		 * fully transparent by the midpoint so the product stays unobscured. */
		&::after {
			content: "";
			position: absolute;
			inset: 0;
			border-radius: inherit;
			background: linear-gradient(to top, rgb(0 0 0 / 55%) 0%, rgb(0 0 0 / 18%) 28%, transparent 55%);
			pointer-events: none;
		}
	}

	> .price {
		position: absolute;
		inset: 0 0 auto 0;
		z-index: 1;
		display: flex;
		align-items: flex-end;
		justify-content: flex-end;
		aspect-ratio: var(--aureon-card-ratio);
		padding: var(--aureon-space-md);
		font-size: var(--aureon-font-size-xl, 1.5rem);
		font-weight: 700;
		color: #fff;
		pointer-events: none;

		/* WooCommerce marks a sale by striking the old price; keep both legible
		 * against the scrim. */
		del,
		ins {
			color: inherit;
			background: none;
		}

		del {
			margin-right: 0.4em;
			font-size: 0.7em;
			font-weight: 500;
			// Matches the struck-through price everywhere else — see the
			// `regular-price-decoration` mixin.
			opacity: 0.7;
		}
	}

	.woocommerce-loop-product__title {
		margin: var(--aureon-space-md) 0 0.15em;
		font-size: var(--aureon-font-size-sm, 0.875rem);
	}

	.aureon-loop-category,
	.aureon-loop-excerpt {
		font-size: var(--aureon-font-size-sm, 0.875rem);
		color: var(--aureon-color-text-muted, var(--aureon-color-text));
	}

	/* A quiet, full-width action — the product image is the loud element here. */
	> .button,
	> .added_to_cart {
		width: 100%;
		margin-top: auto;
		padding-block: 0.75em;
		border: 0;
		border-radius: var(--aureon-radius-md, 0.5rem);
		background: var(--aureon-color-surface-alt, rgb(0 0 0 / 4%));
		color: var(--aureon-color-heading, var(--aureon-color-text));
		font-weight: 600;
		text-align: center;

		&:hover,
		&:focus-visible {
			background: var(--aureon-color-border, rgb(0 0 0 / 8%));
			color: var(--aureon-color-heading, var(--aureon-color-text));
		}
	}

	/* The card's own top spacing comes from the button, so the swatches don't
	 * need to fight it. */
	.aureon-loop-swatches {
		margin-bottom: var(--aureon-space-sm);
	}
}

/* Showcase in a text-centred store: the price stays bottom-right on the image
 * (that's the design), but the copy below follows the alignment setting. */
body.aureon-shop-align-center ul.products.aureon-cards--showcase li.product > .price {
	justify-content: center;
}

body.aureon-shop-align-left ul.products.aureon-cards--showcase li.product > .price {
	justify-content: flex-end;
}

/* List: one product per row, image beside the details. A full-width row can
 * carry far more than a grid cell, so this design leans on the description and
 * gives the action its own column rather than stacking everything. */
ul.products.aureon-cards--list {
	grid-template-columns: minmax(0, 1fr) !important;
	gap: 0;
}

ul.products.aureon-cards--list li.product {
	--aureon-card-ratio: 1;
	display: grid;
	grid-template-columns: minmax(140px, 220px) minmax(0, 1fr) auto;
	column-gap: var(--aureon-space-xl);
	row-gap: 0;
	align-items: start;
	height: auto;

	/* A row, not a card — drop the per-cell chrome and separate rows with a
	 * single rule instead. */
	padding: var(--aureon-space-lg) 0;
	border: 0;
	border-bottom: 1px solid var(--aureon-color-border);
	border-radius: 0;
	background: none;
	text-align: left;

	/* The sale badge is absolutely positioned. An abspos child of a grid
	 * container resolves its offsets against its *grid area*, so the blanket
	 * `grid-column: 2` below would otherwise anchor it over the copy and the
	 * price. Pin it to the image cell. */
	> .onsale {
		grid-column: 1;
		grid-row: 1;
		inset-inline-start: var(--aureon-space-sm);
		inset-inline-end: auto;
	}

	/* Details stack in the middle column; the image claims the first and the
	 * action claims the third. */
	> * {
		grid-column: 2;
	}

	> :is(a.woocommerce-LoopProduct-link, .aureon-loop-slider) {
		grid-column: 1;
		grid-row: 1 / span 99;
		align-self: start;
	}

	.woocommerce-loop-product__title {
		margin: 0 0 0.25em;
		font-size: var(--aureon-font-size-lg, 1.25rem);
	}

	.aureon-loop-category {
		order: -1;
		margin-bottom: 0.35em;
	}

	/* The description earns its keep in a wide row. */
	.aureon-loop-excerpt {
		display: block;
		margin-block: 0.5em;
		max-width: 62ch;
	}

	.aureon-loop-swatches {
		margin-top: 0.6em;
	}

	/* Price and action share the right rail, so a scan down the page reads as a
	 * price column. */
	> .price {
		grid-column: 3;
		grid-row: 1;
		justify-self: end;
		font-size: var(--aureon-font-size-lg, 1.25rem);
		white-space: nowrap;
	}

	> .button,
	> .added_to_cart {
		grid-column: 3;
		grid-row: 2;
		justify-self: end;
		width: auto;
		margin-top: var(--aureon-space-sm);
	}
}

ul.products.aureon-cards--list li.product:last-child {
	border-bottom: 0;
}

/* The sale badge's corner rules — `body.aureon-badge-top-{right,left}
 * ul.products li.product .onsale` — weigh 0,4,3 and out-specify the block
 * above, which would leave the badge stranded over the price column. Restating
 * the start-anchoring through both container classes weighs 0,5,2, which wins
 * on class count. Both classes are genuinely on the list, so this buys weight
 * without inventing a selector. */
ul.products.aureon-cards.aureon-cards--list li.product > .onsale {
	inset-inline-start: var(--aureon-space-sm);
	inset-inline-end: auto;
}

/* A three-column row would crush the details on a narrow screen; drop to image
 * beside text, then to a plain stack. */
@media (max-width: 900px) {

	ul.products.aureon-cards--list li.product {
		grid-template-columns: minmax(120px, 180px) minmax(0, 1fr);

		> .price,
		> .button,
		> .added_to_cart {
			grid-column: 2;
			grid-row: auto;
			justify-self: start;
		}

		> .price {
			margin-top: 0.5em;
		}
	}
}

@media (max-width: 640px) {

	ul.products.aureon-cards--list li.product {
		grid-template-columns: minmax(0, 1fr);

		> *,
		> :is(a.woocommerce-LoopProduct-link, .aureon-loop-slider) {
			grid-column: 1;
		}

		> :is(a.woocommerce-LoopProduct-link, .aureon-loop-slider) {
			grid-row: auto;
			margin-bottom: var(--aureon-space-sm);
		}
	}
}

/* Loop variation swatches: one row per variation attribute, colour chips where
 * the terms carry a swatch colour and labelled pills otherwise (see
 * WooCommerce::loop_swatches()). Selectable — loop-swatches.js points the
 * card's add-to-cart at the picked variation. */
.aureon-loop-swatches {
	display: flex;
	flex-direction: column;
	gap: 0.5em;
	align-items: flex-start;
	margin-block: 0.75em var(--aureon-space-sm, 0.75rem);
}

.aureon-loop-swatch-group {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5em;
	align-items: center;
}

body.aureon-shop-align-center .aureon-loop-swatches {
	align-items: center;
}

body.aureon-shop-align-right .aureon-loop-swatches {
	align-items: flex-end;
}

/* Sized as a tap target, not a dot — a swatch is a control now. */
.aureon-loop-swatch {
	position: relative; /* anchors the tooltip */
	width: 1.5rem;
	height: 1.5rem;
	padding: 0;
	border: 1px solid var(--aureon-color-border);
	border-radius: 50%;
	background: var(--aureon-swatch, transparent);
	cursor: pointer;
	appearance: none;
	transition: box-shadow 120ms ease;

	/* A ring, not a scale — scaling the chip would scale its tooltip with it. */
	&:hover:not([disabled]) {
		box-shadow: 0 0 0 2px var(--aureon-color-primary);
	}

	/* Ring drawn outside the chip so a white swatch still reads as selected. */
	&.is-selected {
		box-shadow:
			0 0 0 2px var(--aureon-color-background, #fff),
			0 0 0 3px var(--aureon-color-heading, var(--aureon-color-text));
	}

	&:focus-visible {
		outline: 2px solid var(--aureon-color-primary, currentcolor);
		outline-offset: 2px;
	}

	/* No buyable variation offers this term alongside the other picks. */
	&.is-unavailable {
		cursor: default;
		opacity: 0.35;
	}
}

/* A term with no swatch colour (Size, Material, …) reads as a labelled pill. */
.aureon-loop-swatch--text {
	width: auto;
	height: 1.5rem;
	min-width: 1.5rem;
	padding-inline: 0.5em;
	border-radius: 999px;
	background: none;
	font-size: var(--aureon-font-size-sm, 0.875rem);
	line-height: 1;
	color: var(--aureon-color-text);

	&:hover:not([disabled]) {
		box-shadow: none;
		border-color: var(--aureon-color-heading, var(--aureon-color-text));
	}

	&.is-selected {
		box-shadow: none;
		border-color: var(--aureon-color-heading, var(--aureon-color-text));
		background: var(--aureon-color-heading, var(--aureon-color-text));
		color: var(--aureon-color-background, #fff);
	}
}

.aureon-loop-swatch-more {
	font-size: var(--aureon-font-size-xs, 0.75rem);
	line-height: 1;
	color: var(--aureon-color-text-muted, var(--aureon-color-text));
}

/* -------------------------------------------------------------------------
 * Sale-price presentation (WooCommerce module: format_sale_price + colour var)
 * ---------------------------------------------------------------------- */

/* The sale amount (`<ins>`) picks up the optional accent colour and drops the
 * default underline; the "Was/Now" labels are small and muted. */
.woocommerce .price ins,
.woocommerce ins .amount,
.wc-block-components-product-price ins {
	text-decoration: none;
	color: var(--aureon-sale-price-color, inherit);
}

.aureon-price-label {
	font-size: 0.8em;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	opacity: 0.7;
}

/* The optional wording either side of the sale amount ("Now $20", "$20 only").
 * Quieter than the price it frames — it's a label, not a number. */
.aureon-price-affix {
	font-size: 0.85em;
	font-weight: 500;
	opacity: 0.75;
}

/* The original price (`<del>`) takes its own colour, and its line can be
 * traded for a muted or plain look — `aureon-regprice-*` on <body>, emitted
 * only for the two non-default choices (see WooCommerce::body_class). */
.woocommerce .price del,
.woocommerce del .amount,
.wc-block-components-product-price del {
	color: var(--aureon-regular-price-color, inherit);
}

/* The two non-default decorations, which both have to overrule an opacity set
 * on `del` somewhere else — that fade is the whole difference between "muted"
 * and "plain text", so losing it collapses the two into the same look.
 *
 * Three rules already set one, each more specific than a plain
 * `body.aureon-regprice-* .price del` (0-2-2):
 *
 *   - the summary price further up this sheet (0-4-2, 0.7) — the single
 *     product page, where this was reported;
 *   - WooCommerce's own loop rule, `.woocommerce ul.products li.product .price
 *     del` (0-3-3, 0.5) — every product card;
 *   - the hero overlay's price (0.75) and the sticky add-to-cart bar's (0.6).
 *
 * Repeating the body class four times lifts these to 0-5-2, which beats all of
 * them outright. Deliberately not a tie at 0-4-2 broken by source order: the
 * theme sheet and WooCommerce's own are separate enqueues, and their order is
 * not ours to guarantee. `!important` would win too, but it would also shut
 * out a child theme, which this doesn't. */
@mixin regular-price-decoration($modifier) {
	$at: "body.#{$modifier}.#{$modifier}.#{$modifier}.#{$modifier}";

	// `del` itself, never the `.amount` span inside it: both the line and the
	// fade are the parent's — a descendant can neither undo a strike-through
	// nor claw back opacity, which multiplies down the tree.
	#{$at} .price del,
	#{$at} .wc-block-components-product-price del {
		text-decoration: none;
		@content;
	}
}

/* "Muted, no line": the line goes and the price steps back instead. Flat
 * across the store, where the struck-through default keeps whatever fade each
 * context tuned for itself. */
@include regular-price-decoration("aureon-regprice-dim") {
	opacity: 0.5;
}

/* "Plain text": the original price reads exactly like the text around it. */
@include regular-price-decoration("aureon-regprice-none") {
	opacity: 1;
}

/* -------------------------------------------------------------------------
 * Cart / checkout
 *
 * One design served twice. The classic (shortcode) edition is template-driven
 * — the theme owns `cart/cart.php`, `cart-totals.php` and `cart-empty.php`, so
 * its markup is the theme's own. The block edition is a React tree the theme
 * can't restructure, so every rule below that shapes a surface names both: the
 * classic selector and its `.wp-block-woocommerce-*` / `.wc-block-components-*`
 * counterpart. Anything that can only exist in one edition is commented as such.
 *
 * Body classes drive the options (see WooCommerce::body_class()):
 *   aureon-cart-style-{cards|table|compact}   aureon-cart-summary-{right|left}
 *   aureon-cart-img-{sm|md|lg}                aureon-cart-sticky
 *   aureon-checkout-{two-column|one-column}   aureon-checkout-summary-{right|left}
 *   aureon-checkout-density-{comfortable|compact|spacious}
 *   aureon-checkout-input-{outline|filled|underline}
 *   aureon-checkout-form-{default|narrow|wide}
 *   aureon-checkout-steps-{dots|numbers}  (only alongside `-steps`)
 *   aureon-checkout-{lean|float|sticky|steps|collapsible}
 *   aureon-checkout-no-{coupon|notes}         aureon-cart-no-cross-sells
 * ---------------------------------------------------------------------- */

/* Shared scale tokens. The cart thumbnail and the summary column width are the
 * two measurements every option below reads, so they live in one place.
 *
 * Declared on `body` specifically, not on any `.woocommerce-cart` /
 * `.woocommerce-checkout` element: WooCommerce puts `woocommerce-checkout` on
 * the checkout *form* as well as on the body, so an unqualified selector
 * re-declares the defaults halfway down the tree and the option modifiers below
 * — which only ever land on `body` — never reach the fields that read them. */
body.woocommerce-cart,
body.woocommerce-checkout {
	--aureon-cart-thumb: 5.5rem;
	// Compact cart rows shrink the thumbnail as a proportion of whatever size
	// the Cart panel picked, so the two options stay independent.
	--aureon-cart-thumb-scale: 1;
	--aureon-summary-width: 22rem;
	// The summary is a fixed 22rem where there's room, but never more than a
	// third of the row — a cart page carrying a theme sidebar leaves a narrow
	// container, and a rigid track would take more of it than the items do.
	--aureon-summary-track: min(var(--aureon-summary-width), 34%);
	--aureon-checkout-gap: var(--aureon-space-md);
	// The checkout summary's own thumbnail, kept separate from the cart's: the
	// cart picture is the subject of a row the customer is still editing, this
	// one only identifies a line on a receipt they are confirming.
	--aureon-review-thumb: 3.25rem;
}

/* Checkout only: the review column carries product rows, not just totals, so
 * it earns more of the row than the cart's totals-only sidebar — roughly a
 * 58/42 split instead of the shared 66/34 above. Declared after the shared
 * block specifically so the cascade (not `!important`) is what wins. */
body.woocommerce-checkout {
	--aureon-summary-width: 26rem;
	--aureon-summary-track: min(var(--aureon-summary-width), 42%);
	// The same gap as `--aureon-checkout-gap`, restated in the two measurements
	// the *block* checkout's components are spaced by: the run between fields
	// inside a band, and the run between the bands themselves. It has no
	// `.form-row`, so the one rule that carries the density setting on the
	// classic template reached nothing here at all. They are fractions of that
	// one gap rather than a scale of their own, which is what keeps the two
	// editions one design at each density instead of
	// two spacings that happen to share a name: `comfortable` lands exactly on
	// WooCommerce's own 12/24, and the other two halve and double it the way
	// the classic checkout's rows do. Both resolve against whatever
	// `--aureon-checkout-gap` computes to on `body`, which is where all three
	// density classes set it.
	--aureon-checkout-field-gap: calc(var(--aureon-checkout-gap) * 0.75);
	--aureon-checkout-step-gap: calc(var(--aureon-checkout-gap) * 1.5);
}

/* …except when the step strip is running, which is a promise that the cart and
 * the checkout are two views of one flow. Crossing between them is a page load
 * that cannot be avoided (two URLs, two templates), so what can be avoided is
 * it *looking* like one: with the strip drawn identically at the top of both,
 * the summary column jumping 30px sideways and growing 64px wider on arrival
 * is the tell that reads as "new page" rather than "next step". The cart takes
 * the checkout's proportions for the duration, and only the middle of the page
 * changes. Without the strip there is no such promise, and each page keeps the
 * split its own content argues for. */
body.woocommerce-cart.aureon-checkout-steps {
	--aureon-summary-width: 26rem;
	--aureon-summary-track: min(var(--aureon-summary-width), 42%);
}

body.aureon-cart-img-sm {
	--aureon-cart-thumb: 4rem;
}

body.aureon-cart-img-md {
	--aureon-cart-thumb: 5.5rem;
}

body.aureon-cart-img-lg {
	--aureon-cart-thumb: 7.5rem;
}

body.aureon-checkout-density-compact {
	--aureon-checkout-gap: var(--aureon-space-sm);
	--aureon-review-thumb: 2.5rem;
}

body.aureon-checkout-density-spacious {
	--aureon-checkout-gap: var(--aureon-space-lg);
	--aureon-review-thumb: 4rem;
}

/* Form width — the measure of the field column, not of the page. `default`
 * emits no measure at all and leaves the column to whatever the layout gives
 * it, which is why there's no rule for it here.
 *
 * `narrow` is the one that always bites: a checkout form is a single column of
 * short fields, and past roughly 34rem the eye has to travel further between a
 * label and its input than it does down the form. `wide` only shows up where
 * there's room to spend — on a one-column checkout, or a two-column one on a
 * very wide container. */
body.aureon-checkout-form-narrow {
	--aureon-checkout-measure: 34rem;
}

body.aureon-checkout-form-wide {
	--aureon-checkout-measure: 56rem;
}

/* Beside an order summary the measure is the wrong instrument. The field
 * column is whatever the split leaves it — around 36rem on a 1200px page —
 * so "Narrow" capped it and left dead space in the column, and "Wide" asked
 * for 56rem in a column that never gets near it and so did nothing at all.
 *
 * Here the setting moves the split instead: a narrower form is a wider
 * summary and the other way round, and the form always fills the column it is
 * given. Same three names, three visibly different layouts, no gaps. */

/* Declared on the form, not on the body, and for the same reason the sticky
 * offsets are declared outside their container query: `aureon-woo` names the
 * entry's content wrapper, so only elements *inside* it can be matched by a
 * rule wrapped in that query — the body never is. The form is, and it is also
 * where both properties are read (its own grid tracks, and the measure its
 * field column inherits). */
@container aureon-woo (min-width: 52rem) {

	body.aureon-checkout-two-column.aureon-checkout-form-narrow form.checkout,
	body.aureon-checkout-two-column.aureon-checkout-form-narrow .wc-block-checkout {
		--aureon-summary-width: 30rem;
		--aureon-summary-track: min(var(--aureon-summary-width), 50%);
		--aureon-checkout-measure: none;
	}

	body.aureon-checkout-two-column.aureon-checkout-form-wide form.checkout,
	body.aureon-checkout-two-column.aureon-checkout-form-wide .wc-block-checkout {
		--aureon-summary-width: 21rem;
		--aureon-summary-track: min(var(--aureon-summary-width), 32%);
		--aureon-checkout-measure: none;
	}
}

/* Form inputs — theme border, radius and focus ring, in both editions.
 *
 * The block selectors carry the same `.wc-block-components-form` ancestor
 * WooCommerce's own per-field-type rules do (one rule per input type, e.g.
 * `.wc-block-components-form .wc-block-components-text-input
 * input[type="email"]`, three classes deep) — plus that ancestor repeated,
 * a standard way to add a specificity point without `!important` or a
 * class the markup doesn't carry. Without the repeat this selector comes
 * out only as specific as WooCommerce's own (a tie, decided by stylesheet
 * order rather than anything this rule controls); without the ancestor at
 * all it's *less* specific and simply loses. Either way every field would
 * silently fall back to WooCommerce's default chrome (a 4px radius, a
 * near-black border) despite the `.woocommerce-checkout`/`.woocommerce-cart`
 * ancestor here structurally reaching the block markup just fine.
 *
 * The "filled"/"underline" input-style variants further down need the same
 * fix, for the same reason: this rule's specificity would otherwise beat
 * theirs and every field would keep rendering as this baseline "outline"
 * look regardless of which one the store picked. */
.woocommerce-cart,
.woocommerce-checkout {

	.input-text,
	input[type="text"],
	input[type="email"],
	input[type="tel"],
	input[type="password"],
	input[type="number"],
	textarea,
	select,
	.wc-block-components-form.wc-block-components-form .wc-block-components-text-input input,
	.wc-block-components-form.wc-block-components-form .wc-block-components-textarea,
	.wc-block-components-form.wc-block-components-form .wc-blocks-components-select__select {
		border: 1px solid var(--aureon-color-border);
		border-radius: var(--aureon-radius-md, 6px);
		background: var(--aureon-color-background);
		color: var(--aureon-color-text);

		&:focus {
			border-color: var(--aureon-color-primary);
			outline: 2px solid color-mix(in srgb, var(--aureon-color-primary) 30%, transparent);
			outline-offset: 1px;
		}
	}
}

/* -------------------------------------------------------------------------
 * Free-shipping progress meter (cart page, mini-cart drawer, block cart)
 * ---------------------------------------------------------------------- */

/* A goal the store is offering, not a status the page is reporting — so the
 * card is tinted with the accent the meter fills in rather than with the grey
 * every other panel on the page uses. Faint enough (6%) that it reads as warmth
 * behind the sentence rather than as a notice demanding an answer. */
.aureon-ship-bar {
	display: flex;
	flex-direction: column;
	gap: var(--aureon-space-sm);
	padding: var(--aureon-space-md) var(--aureon-space-lg);
	margin-bottom: var(--aureon-space-lg);
	border: 1px solid color-mix(in srgb, var(--aureon-color-primary) 22%, transparent);
	border-radius: var(--aureon-radius-lg, 10px);
	background: color-mix(in srgb, var(--aureon-color-primary) 6%, var(--aureon-color-background));
}

/* Sentence on one side, threshold on the other: the two answer "how far?" and
 * "how far to what?", and the meter under them is the line between. They share
 * a row until the card is too narrow to hold both, where the threshold drops
 * under the sentence rather than squeezing it. */
.aureon-ship-bar__text {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.35em 0.75em;
	margin: 0;
	font-size: var(--aureon-font-size-sm);
	color: var(--aureon-color-text);
}

/* A basis, not `auto`: at `auto` the sentence asks for the width it would take
 * unwrapped, and on a phone that is wider than the card — so the whole message
 * dropped to a line of its own and left the truck sitting alone above it. With
 * a basis it stays beside the glyph and wraps inside itself instead, and the
 * threshold is the one that drops when the row runs out of room. */
.aureon-ship-bar__message {
	flex: 1 1 8rem;
	min-width: 0;
}

/* The number the customer is actually reading. */
.aureon-ship-bar__amount {
	font-weight: 700;
	color: var(--aureon-color-link);
}

.aureon-ship-bar__note {
	flex: none;
	font-size: 0.9em;
	color: var(--aureon-color-text-muted, var(--aureon-color-text));
}

.aureon-ship-bar__icon {
	flex: none;
	width: 1.5em;
	height: 1.5em;
	color: var(--aureon-color-link);
}

.aureon-ship-bar__track {
	display: block;
	overflow: hidden;
	height: 8px;
	border-radius: 999px;
	background: color-mix(in srgb, var(--aureon-color-text) 12%, transparent);
}

.aureon-ship-bar__fill {
	display: block;
	height: 100%;
	border-radius: inherit;
	background: var(--aureon-color-primary);
	transition: width 0.3s ease;
}

.aureon-ship-bar.is-qualified {

	.aureon-ship-bar__fill {
		background: var(--aureon-color-accent, var(--aureon-color-primary));
	}
}

/* Inside the mini-cart drawer the meter is chrome, not a card — it sits flush
 * against the drawer's own padding. */
.aureon-ship-bar--drawer {
	padding: var(--aureon-space-sm) 0;
	margin-bottom: var(--aureon-space-sm);
	border: 0;
	border-bottom: 1px solid var(--aureon-color-border);
	border-radius: 0;
	background: none;
}

@media (prefers-reduced-motion: reduce) {

	.aureon-ship-bar__fill {
		transition: none;
	}
}

/* stylelint-disable selector-id-pattern -- `#order_review`, `#customer_details`
 * and `#order_review_heading` are WooCommerce's own template IDs; matching them
 * is the only way to style the classic checkout, and they can't be renamed. */

/* -------------------------------------------------------------------------
 * Cart page layout
 *
 * Classic: the shortcode wrapper becomes the grid, and `.cart-collaterals`
 * dissolves into it (`display: contents`) so the totals can sit beside the
 * items while the cross-sells still run full width beneath both.
 * Block: `.wc-block-cart` is already a two-column flex row; only the order and
 * the sidebar width need saying.
 *
 * The split is decided by a *container* query, not the viewport. A store that
 * leaves the theme sidebar switched on for cart/checkout hands these templates
 * a ~700px column on a 1440px screen, and a viewport query would happily split
 * that into two cramped ones. Asking the container means the second column
 * only appears where there is genuinely room for it, and browsers without
 * container queries fall back to the single-column stack.
 *
 * 43.75rem (700px) is not a number of the theme's own choosing: it is the
 * threshold WooCommerce's block cart/checkout already splits at
 * (`@container (max-width: 699px)` on `.wc-block-components-sidebar-layout`,
 * which resolves against this same container since the theme declares the
 * nearest one). The theme used to gate at 46rem (736px), which left a 36px
 * band where the block cart was visibly two-column while every theme rule
 * scoped to the split — the summary-side swap most obviously — was still
 * switched off. A store with the theme sidebar on lands its cart column at
 * ~720px, i.e. squarely inside that band, so "Summary position" read as
 * simply broken. One threshold, taken from core, removes the whole class of
 * mismatch.
 * ---------------------------------------------------------------------- */

.woocommerce-cart .aureon-entry__content,
.woocommerce-checkout .aureon-entry__content {
	container: aureon-woo / inline-size;
}

/* WooCommerce gives the block wrapper its own top padding (16px cart,
 * 24px checkout) — sized for a bare page. This theme already insets the
 * whole entry in its own padded card, so left alone the two stack into a
 * gap roughly 1.5x taller than every other side of that card. Both
 * classes are repeated to outrank WooCommerce's own single-class
 * selector rather than tie it, which would leave the winner decided by
 * stylesheet load order. */
.wp-block-woocommerce-cart.wc-block-cart,
.wp-block-woocommerce-checkout.wc-block-checkout {
	padding-top: 0;
}

/* WooCommerce floats the two collateral boxes at `width: 48%` from
 * `.woocommerce .cart-collaterals .cart_totals` — a three-class selector, so
 * the override has to match it class for class or the summary card renders at
 * half the width of the column it was given (and stays floated when the layout
 * stacks). Stated outside the container query because the float is wrong at
 * every width; only the grid placement below is width-dependent. */
.woocommerce .cart-collaterals .cart_totals,
.woocommerce .cart-collaterals .cross-sells {
	width: 100%;
	float: none;
}

@container aureon-woo (min-width: 43.75rem) {

	// Rows are pinned rather than auto-placed: `.cart_totals` has to share row 3
	// with the form (auto-placement is sparse and would push it below the
	// full-width cross-sells). The row gap is 0 for the same reason — the
	// notices wrapper is printed empty on most loads, and a gap around a
	// zero-height row would read as a hole above the cart. Each band carries
	// its own margin instead.
	.woocommerce-cart .woocommerce {
		display: grid;
		grid-template-columns: minmax(0, 1fr) minmax(0, var(--aureon-summary-track));
		gap: 0 var(--aureon-space-xl);
		align-items: start;
	}

	.woocommerce-cart .woocommerce > .woocommerce-notices-wrapper {
		grid-column: 1 / -1;
		grid-row: 1;
	}

	.woocommerce-cart .woocommerce > .aureon-ship-bar {
		grid-column: 1 / -1;
		grid-row: 2;
	}

	.woocommerce-cart .woocommerce-cart-form {
		grid-column: 1;
		grid-row: 3;
	}

	.cart-collaterals {
		display: contents;
	}

	// The widths and floats are undone unconditionally further up; the grid
	// owns the placement from here.
	.cart-collaterals .cart_totals {
		grid-column: 2;
		grid-row: 3;
	}

	.cart-collaterals .cross-sells {
		grid-column: 1 / -1;
		grid-row: 4;
		margin-top: var(--aureon-space-xl);
	}

	/* Summary on the left: swap the two tracks rather than the source order, so
	 * the reading order in a screen reader stays items-then-totals.
	 *
	 * `.woocommerce-cart` is compounded onto the body selector rather than left
	 * as a descendant step: it is a *body* class, so `body.x .woocommerce-cart`
	 * would look for a second, nested element that never exists — which left the
	 * items and the totals stacked in the same grid cell. */
	body.aureon-cart-summary-left.woocommerce-cart {

		.woocommerce {
			grid-template-columns: minmax(0, var(--aureon-summary-track)) minmax(0, 1fr);
		}

		.woocommerce-cart-form {
			grid-column: 2;
		}

		.cart-collaterals .cart_totals {
			grid-column: 1;
		}
	}

	/* Block cart. The card look (padding/border/radius/background) is
	 * scoped to this same two-column container query rather than stated
	 * unconditionally beside the classic card further down ("Order summary
	 * card") — deliberately: below this width the sidebar stacks under the
	 * cart items inside the *same* outer page card those items are already
	 * in, and a nested card there would be a box inside a box. Left flat,
	 * WooCommerce's own hairline row dividers do the separating instead,
	 * the same as every other stacked section on the page. */
	// WooCommerce gives `.wc-block-components-main` a flat `width: 65%`, sized
	// for its own default sidebar rather than for `--aureon-summary-width`, which
	// the store owner sets independently. Left alone the two only coincidentally
	// sum to 100%, and anywhere they don't the pair overflows the row — where
	// core's `flex-wrap: wrap` drops the item list onto its own line *under* the
	// summary. `flex: 1 1 0%` takes whatever the summary leaves instead. The
	// block checkout carries the same fix for the same reason; see
	// `.wc-block-checkout__main` further down.
	.wc-block-cart .wc-block-components-main {
		flex: 1 1 0%;
		width: auto;
	}

	.wc-block-cart__sidebar {
		flex: 0 1 var(--aureon-summary-width);
		max-width: var(--aureon-summary-track);
		padding: var(--aureon-space-lg);
		border: 1px solid var(--aureon-color-border);
		border-radius: var(--aureon-radius-lg, 10px);
		background: color-mix(in srgb, var(--aureon-color-background) 96%, var(--aureon-color-text));
	}

	body.aureon-cart-summary-left .wc-block-cart {
		flex-direction: row-reverse;
	}
}

/* Summary on the left, block cart: put the column gutter back between the two
 * columns.
 *
 * WooCommerce opens the gap with `padding-right` on the *main* column
 * (`.wc-block-components-sidebar-layout .wc-block-components-main`, 4.528% of
 * the container) — correct while the summary trails the items, and exactly
 * wrong once `row-reverse` moves it in front of them: the padding stays on the
 * main column's right, so the gap lands against the outer page edge and the
 * item table butts straight up against the summary card. Mirroring the same
 * percentage keeps both arrangements identically spaced. One class more
 * specific than core's own rule, which is what it takes to beat it.
 *
 * Gated on exactly the query that does the reversing, and no wider: flipping
 * the padding while the columns are still in source order would move the gap
 * to the wrong side, i.e. re-create this bug facing the other way. The block
 * checkout reverses at its own (wider) threshold, so its copy of this rule
 * lives with that one rather than here. */
@container aureon-woo (min-width: 43.75rem) {

	body.aureon-cart-summary-left .wc-block-cart .wc-block-components-main {
		padding-right: 0;
		padding-left: 4.5283018868%;
	}
}

/* The summary is a card, not a column: let it end where its content ends
 * rather than stretching to the height of the item list beside it. Flex's
 * default `stretch` made sense while the sidebar was unstyled — an invisible
 * box has no height to notice — but the card look above gives it a border and
 * a ground, which turns every row of the cart the totals don't fill into an
 * empty panel. Stated outside the container query: below the split the
 * sidebar is full-width and stacked, where `align-self` does nothing either
 * way. The sticky rule sets the same thing for its own reasons. */
.wc-block-cart__sidebar,
.wc-block-checkout__sidebar {
	align-self: flex-start;
}

/* Sticky totals / summary. Applies to both editions; `align-self: start` is
 * what lets a grid or flex child stick at all. Gated on the same container
 * width as the split above — a stacked summary has nothing to stick beside.
 *
 * The height cap is not decoration, it is what makes the setting true. A
 * sticky box can only travel inside its containing block, and the summary
 * *is* what sizes its own grid row — so an order long enough to out-measure
 * the form column left the box exactly as tall as the space it had to move
 * in, i.e. no travel at all, and the summary scrolled away like anything
 * else. Capped to the screen it always has room to move, and a summary that
 * cannot fit scrolls within itself instead of dragging the page past it. A
 * short order never reaches the cap and scrolls nothing. */

/* Declared outside the container query below, and it has to be: the container
 * named `aureon-woo` is the entry's content wrapper, which is a *descendant*
 * of `body` — so a `body` rule inside that query matches nothing, and both
 * offsets would resolve to an invalid `var()`, leaving the summary with
 * `top: auto` and nothing to stick to. */
body.aureon-checkout-sticky,
body.aureon-cart-sticky {
	--aureon-sticky-top: calc(var(--aureon-header-height, 80px) + var(--aureon-space-md));
	--aureon-sticky-max: calc(100vh - var(--aureon-sticky-top) - var(--aureon-space-md));
}

@container aureon-woo (min-width: 43.75rem) {

	body.aureon-checkout-sticky {

		#order_review,
		.wc-block-checkout__sidebar {
			position: sticky;
			top: var(--aureon-sticky-top);
			align-self: start;
			max-height: var(--aureon-sticky-max);
			overflow-y: auto;
			overscroll-behavior: contain;
		}
	}

	body.aureon-cart-sticky {

		.cart-collaterals .cart_totals,
		.wc-block-cart__sidebar {
			position: sticky;
			top: var(--aureon-sticky-top);
			align-self: start;
			max-height: var(--aureon-sticky-max);
			overflow-y: auto;
			overscroll-behavior: contain;
		}
	}
}

/* …and the switch has to answer "no" as plainly as it answers "yes", because
 * on the block checkout WooCommerce sticks the summary by itself: its React
 * component adds `is-sticky` to the sidebar whenever the summary is shorter
 * than the viewport — which is most orders — and core's own rule pins it at
 * `top: 24px`. Left alone the setting read as permanently on, and switching it
 * off changed nothing. The theme's switch is the one the store owner is shown,
 * so it owns both answers.
 *
 * Stated outside the container query above for the same reason the offsets
 * are: this is a `body` selector, and `body` is an ancestor of the named
 * container, never a descendant of it. Below the split core's own rule is
 * already switched off, so there is nothing to undo there either way. */
body.woocommerce-checkout:not(.aureon-checkout-sticky) .wc-block-checkout__sidebar.is-sticky {
	position: static;
}

/* -------------------------------------------------------------------------
 * Cart line items (classic only — the block cart renders its own rows, which
 * the block-parity section further down restyles to match)
 * ---------------------------------------------------------------------- */

.aureon-cart-items {
	display: flex;
	flex-direction: column;
	padding: 0;
	margin: 0;
	list-style: none;
}

/* Three tracks: thumbnail, body, and the corner remove control. The remove
 * column is `auto` so it collapses to the glyph's own width. */
.aureon-cart-item {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr) auto;
	gap: var(--aureon-space-md);
	padding: var(--aureon-space-md) 0;
	border-bottom: 1px solid var(--aureon-color-border);

	&:first-child {
		padding-top: 0;
	}

	// The hairline separates one row from the next; on the last row it has
	// nothing below it to separate from, and instead reads as a stray line
	// floating above whatever section follows (coupons, cross-sells).
	&:last-child {
		border-bottom: 0;
	}
}

/* Pinned to the top of the row so it aligns with the product name rather than
 * floating against the middle of the body. */
.aureon-cart-item__remove {
	align-self: start;
	line-height: 1;
}

/* Compact trades vertical space for width. Where `cards` stacks four bands —
 * name, meta, availability, stepper — compact folds the lower three onto one
 * line, so a row is two lines instead of four and a long cart stays scannable
 * without scrolling. The smaller thumbnail and tighter padding come with it.
 *
 * Only the measurements differ; the markup is identical to `cards`, which is
 * what keeps the two shapes one design rather than two. */
body.aureon-cart-style-compact {
	// Sized so the thumbnail is about as tall as the two lines of text beside
	// it. At the cards scale it overshoots them, and the row grows to fit the
	// picture while the text floats in the middle of the gap — which is what
	// made the dense shape read as loose and unresolved.
	--aureon-cart-thumb-scale: 0.55;

	// Everything on one band, vertically centred: with `start` alignment the
	// thumbnail, text and remove control each began at a different height and
	// the row had no single line to read along.
	.aureon-cart-item {
		align-items: center;
		gap: var(--aureon-space-md);
		padding: var(--aureon-space-sm) 0;
	}

	.aureon-cart-item__remove {
		align-self: center;
	}

	.aureon-cart-item__body {
		gap: 0.15em;
	}

	.aureon-cart-item__meta,
	.aureon-cart-item__stock {
		font-size: var(--aureon-font-size-xs);
	}

	.aureon-cart-item__foot {
		margin-top: 0;
	}

	// The stepper is the tallest thing on the folded line, so the row's height
	// is its height — shrink it back toward the cards figure rather than letting
	// compact end up taller per row than the shape it is meant to condense.
	.aureon-cart-item__foot .quantity {

		.aureon-qty-btn {
			min-width: 2rem;
			min-height: 2rem;
		}

		.qty {
			width: 2.5rem;
			min-height: 2rem;
		}
	}
}

/* The fold only happens where the three pieces genuinely fit side by side.
 * Asking the container rather than the viewport, for the same reason the cart's
 * two-column split does: a store running a sidebar on the cart hands these rows
 * a much narrower column than the screen suggests. */
@container aureon-woo (min-width: 34rem) {

	body.aureon-cart-style-compact {

		// The meta column takes the slack so the availability chip and the
		// stepper stay pinned to the same two positions on every row — with
		// `auto` columns they would drift with the length of each item's
		// attributes, and the list would read as ragged.
		.aureon-cart-item__body {
			display: grid;
			grid-template-columns: minmax(0, 1fr) auto auto;
			grid-template-areas:
				"head head head"
				"meta stock qty";
			align-items: center;
			gap: var(--aureon-space-xs) var(--aureon-space-md);
		}

		.aureon-cart-item__head {
			grid-area: head;
		}

		// Attributes and the unit price share the line rather than stacking —
		// stacking here would cost the row the third line compact just saved.
		.aureon-cart-item__meta {
			display: flex;
			flex-wrap: wrap;
			align-items: baseline;
			gap: 0 0.5em;
			grid-area: meta;
		}

		.aureon-cart-item__unit {
			display: inline;
		}

		// The same hairline the attributes are divided by, so the folded line
		// reads as one series of facts rather than two run together. Only where
		// attributes actually precede it.
		dl.variation ~ .aureon-cart-item__unit::before {
			content: "";
			display: inline-block;
			width: 1px;
			height: 1em;
			margin-inline-end: 0.75em;
			background: var(--aureon-color-border);
			vertical-align: -0.15em;
		}

		.aureon-cart-item__stock {
			grid-area: stock;
		}

		// Pushed to the far end of the line so the stepper sits under the
		// subtotal it changes, not adrift in the middle of the row.
		.aureon-cart-item__foot {
			grid-area: qty;
			justify-self: end;
			margin-top: 0;
		}
	}
}

.aureon-cart-item__thumb {
	display: block;
	width: calc(var(--aureon-cart-thumb) * var(--aureon-cart-thumb-scale, 1));

	img {
		display: block;
		width: 100%;
		height: auto;
		aspect-ratio: 1;
		object-fit: cover;
		border-radius: var(--aureon-radius-md, 6px);
	}
}

.aureon-cart-item__body {
	display: flex;
	flex-direction: column;
	gap: var(--aureon-space-xs);
	min-width: 0;
}

.aureon-cart-item__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: var(--aureon-space-md);
}

.aureon-cart-item__name {
	font-weight: 600;
	color: var(--aureon-color-heading, var(--aureon-color-text));

	a {
		color: inherit;
		text-decoration: none;

		&:hover {
			color: var(--aureon-color-link);
		}
	}
}

.aureon-cart-item__subtotal {
	flex: none;
	font-weight: 600;
	color: var(--aureon-color-heading, var(--aureon-color-text));
}

.aureon-cart-item__meta {
	font-size: var(--aureon-font-size-sm);
	color: var(--aureon-color-text-muted, var(--aureon-color-text));

	// WooCommerce's own variation list, read as "Sienna │ Large": the values
	// alone, divided by a hairline.
	dl.variation {
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		gap: 0 0.75em;
		margin: 0;

		// The labels are dropped from view, not from the document. "Sienna,
		// Large" is only self-evident with the garment in front of you; a screen
		// reader still gets "Color: Sienna". Sighted readers get the divider,
		// which does the same work in less space.
		dt {
			position: absolute;
			overflow: hidden;
			clip-path: inset(50%);
			width: 1px;
			height: 1px;
			white-space: nowrap;
		}

		dd {
			display: flex;
			align-items: center;
			gap: 0.75em;
			margin: 0;
		}

		dd p {
			margin: 0;
		}

		// `dd:not(:first-of-type)` rather than `dd + dd` — the hidden `dt` is
		// still between them in the DOM, so the adjacent-sibling combinator
		// would never match.
		dd:not(:first-of-type)::before {
			content: "";
			width: 1px;
			height: 1em;
			background: var(--aureon-color-border);
		}
	}

	p {
		margin: 0;
	}
}

.aureon-cart-item__unit {
	display: block;
}

/* Availability line — an icon plus WooCommerce's own wording. Green only for
 * the plain in-stock case; everything else (backorder, low stock, a store's own
 * "ships in 3–4 weeks") is a wait, and reads in the muted body colour so it
 * neither alarms nor reassures. */
.aureon-cart-item__stock {
	display: flex;
	align-items: center;
	gap: 0.4em;
	font-size: var(--aureon-font-size-sm);
	color: var(--aureon-color-text-muted, var(--aureon-color-text));

	&.in-stock {
		color: var(--aureon-color-success, #15803d);
	}
}

.aureon-cart-item__stock-icon {
	flex: none;
	width: 1em;
	height: 1em;
}

/* Struck-through pre-sale price, shown beside the price actually charged. */
.aureon-cart-item__was {
	margin-inline-end: 0.35em;
	color: var(--aureon-color-text-muted, var(--aureon-color-text));
	text-decoration: line-through;
}

/* The foot now carries the stepper alone — the remove control moved to the
 * row's top-right corner — so it aligns start rather than spreading. */
.aureon-cart-item__foot {
	display: flex;
	align-items: center;
	gap: var(--aureon-space-md);
	margin-top: var(--aureon-space-xs);
}

/* Quantity — WooCommerce's own `.quantity` block, already turned into a −/+
 * stepper by quantity.js. Only the surface is the theme's.
 *
 * The stepper is sized in `em` so it can stretch to the add-to-cart row on a
 * product page; in the cart there is no row to match and it collapses to about
 * 20px tall, which is under the 24px WCAG 2.2 minimum target and awkward to hit
 * on a phone. Both cart shapes get an explicit floor instead. */
.aureon-cart-item__foot .quantity,
.woocommerce table.cart td.product-quantity .quantity {
	margin: 0;

	.aureon-qty-btn {
		min-width: 2.5rem;
		min-height: 2.5rem;
	}

	.qty {
		width: 3rem;
		min-height: 2.5rem;
	}
}

/* Remove control — an icon plus a label that collapses to icon-only when the
 * row runs out of room. WooCommerce styles `a.remove` as a large red glyph
 * from `.woocommerce a.remove`, so the override has to out-specify that.
 *
 * Anchored on the form rather than on the card, because the table shape renders
 * the same control in a `td.product-remove` — one control, one rule. */
.woocommerce .woocommerce-cart-form a.remove,
.woocommerce-page .woocommerce-cart-form a.remove {
	display: inline-flex;
	align-items: center;
	justify-content: flex-start;
	gap: 0.4em;
	width: auto;
	height: auto;
	border-radius: 0;
	background: none;
	font-size: var(--aureon-font-size-sm);
	font-weight: 400;
	line-height: 1.4;
	// stylelint-disable-next-line declaration-no-important -- `.woocommerce
	// a.remove` sets the red with `!important`; nothing short of this reaches it.
	color: var(--aureon-color-text-muted, var(--aureon-color-text)) !important;
	text-decoration: none;

	&:hover {
		background: none;
		// stylelint-disable-next-line declaration-no-important -- as above.
		color: var(--aureon-color-link) !important;
	}
}

.aureon-cart-item__remove-icon {
	width: 1em;
	height: 1em;
}

/* In the card shapes the control is a corner glyph, so the word beside it is
 * redundant — the anchor's `aria-label` ("Remove <product> from cart") is what
 * carries the meaning to assistive tech either way. The table shape hides it
 * for the same reason further down: there, the column heading says it. */
.aureon-cart-item__remove .aureon-cart-item__remove-label {
	position: absolute;
	overflow: hidden;
	clip-path: inset(50%);
	width: 1px;
	height: 1px;
	white-space: nowrap;
}

/* A corner ✕ is a small target; give it some room to be hit. */
.aureon-cart-item__remove a.remove {
	padding: 0.25em;
	margin: -0.25em;
}

/* Cart actions row (just the update button now — the coupon field moved to
 * the order summary column, see cart/cart-totals.php). */
.aureon-cart-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--aureon-space-sm);
	padding-top: var(--aureon-space-md);
}

/* WooCommerce disables the update button until something changes; the stepper
 * clicks it programmatically, so it never needs to be seen. */
.aureon-cart-update[disabled] {
	opacity: 0.5;
}

/* -------------------------------------------------------------------------
 * Cart line items — table shape (classic only)
 *
 * The `table` option keeps WooCommerce's column grid, which means it also keeps
 * WooCommerce's own chrome: a bordered, rounded box, bold 9px-padded cells, a
 * 32px thumbnail, and an actions row whose update button is floated. The rules
 * below dress that grid in the same hairline-and-hairspace language the card
 * shape uses, so the two options read as one design.
 * ---------------------------------------------------------------------- */

.woocommerce .woocommerce-cart-form table.cart {
	border: 0;
	border-radius: 0;
	margin: 0;
	border-collapse: collapse;

	th {
		padding: 0 var(--aureon-space-sm) var(--aureon-space-sm);
		border: 0;
		border-bottom: 1px solid var(--aureon-color-border);
		font-size: var(--aureon-font-size-xs);
		font-weight: 600;
		letter-spacing: 0.02em;
		color: var(--aureon-color-text-muted, var(--aureon-color-text));
		text-transform: uppercase;
	}

	td {
		padding: var(--aureon-space-md) var(--aureon-space-sm);
		border: 0;
		border-bottom: 1px solid var(--aureon-color-border);
		vertical-align: middle;
	}

	// The two end cells hang off the edges of the band rather than carrying
	// their own gutter, so the row lines up with everything above and below it.
	th:first-child,
	td:first-child {
		padding-inline-start: 0;
	}

	th:last-child,
	td:last-child {
		padding-inline-end: 0;
	}

	td.product-name a {
		color: var(--aureon-color-heading, var(--aureon-color-text));
		font-weight: 600;
		text-decoration: none;

		&:hover {
			color: var(--aureon-color-link);
		}
	}

	// WooCommerce pins cart thumbnails at 32px; the Cart panel's image-size
	// option owns that measurement in this theme.
	td.product-thumbnail img {
		display: block;
		width: calc(var(--aureon-cart-thumb) * var(--aureon-cart-thumb-scale, 1));
		max-width: none;
		height: auto;
		aspect-ratio: 1;
		object-fit: cover;
		border-radius: var(--aureon-radius-md, 6px);
	}

	// The remove column is a column, so the word beside the icon is redundant.
	td.product-remove {
		width: 1em;

		.aureon-cart-item__remove-label {
			position: absolute;
			overflow: hidden;
			clip-path: inset(50%);
			width: 1px;
			height: 1px;
			white-space: nowrap;
		}
	}

	td.product-quantity .quantity {
		margin: 0;
	}

	// Actions row: WooCommerce floats its own `.button` right by default. The
	// cell keeps its table display (see cart.php) and the wrapper inside it is
	// the flex row — the same `.aureon-cart-actions` the card shape uses.
	td.actions {
		padding-inline: 0;
		border-bottom: 0;

		.button {
			float: none;
		}
	}
}

/* -------------------------------------------------------------------------
 * Order summary card — the cart totals and the checkout order review are the
 * same object, so they share every rule. The block counterparts share it
 * too, once they're a second column rather than a stacked section — see the
 * note just below.
 * ---------------------------------------------------------------------- */

/* `.wc-block-cart__sidebar` and `.wc-block-checkout__sidebar` carry
 * `.wc-block-components-sidebar` on the *same* element, not a child — so the
 * card is the sidebar itself.
 *
 * Classic only here — `#order_review`/`.cart_totals` sit beside the form as
 * their own column at every width the classic templates support, so the
 * card look is unconditional for them. The block editions get the same
 * look too, but only once they're actually a second column; see the note
 * beside `.wc-block-cart__sidebar` / `.wc-block-checkout__sidebar` further
 * down for why a stacked, single-column card is deliberately left flat. */
.cart-collaterals .cart_totals,
#order_review {
	padding: var(--aureon-space-lg);
	border: 1px solid var(--aureon-color-border);
	border-radius: var(--aureon-radius-lg, 10px);
	background: color-mix(in srgb, var(--aureon-color-background) 96%, var(--aureon-color-text));
}

.aureon-cart-summary__head h2,
#order_review_heading {
	margin: 0 0 var(--aureon-space-md);
	font-size: var(--aureon-font-size-lg);
	color: var(--aureon-color-heading, var(--aureon-color-text));
}

/* -------------------------------------------------------------------------
 * Cart summary coupon field (cart/cart-totals.php)
 *
 * Its own independent `<form>` — see the note there — so it needs the page's
 * field chrome restated rather than inherited; it doesn't sit inside
 * `.woocommerce-cart-form`, which is what the theme's generic
 * `.input-text` rules are scoped to. Styled to match the checkout's own
 * summary discount field (`.aureon-review-discount__*`) so the two read as
 * one control moved between pages, not two different designs.
 * ---------------------------------------------------------------------- */

.aureon-cart-summary__coupon {
	padding-bottom: var(--aureon-space-lg);
	border-bottom: 1px solid var(--aureon-color-border);
}

.aureon-cart-summary__coupon-label {
	display: block;
	margin-bottom: var(--aureon-space-xs);
	font-size: var(--aureon-font-size-sm, 0.875rem);
	font-weight: 500;
	color: var(--aureon-color-heading, var(--aureon-color-text));
}

.aureon-cart-summary__coupon-row {
	display: flex;
	gap: var(--aureon-space-sm);
	align-items: stretch;
}

// `min-width: 0` so a long code shrinks the field rather than pushing the
// button out of the card — inputs carry an intrinsic minimum otherwise.
.aureon-cart-summary__coupon-input {
	flex: 1 1 auto;
	min-width: 0;
	padding: 0.5em 0.75em;
	border: 1px solid var(--aureon-color-border);
	border-radius: var(--aureon-radius-sm, 4px);
	background: var(--aureon-color-background);
	font: inherit;
	color: var(--aureon-color-text);

	&:focus {
		border-color: var(--aureon-color-primary);
		outline: 2px solid color-mix(in srgb, var(--aureon-color-primary) 30%, transparent);
		outline-offset: 1px;
	}
}

// Bordered and quiet, not the button's primary colour — the control that
// matters in this column is Proceed to checkout.
.aureon-cart-summary__coupon-apply {
	flex: 0 0 auto;
	padding: 0.5em 1em;
	border: 1px solid var(--aureon-color-border);
	border-radius: var(--aureon-radius-sm, 4px);
	background: color-mix(in srgb, var(--aureon-color-text) 5%, var(--aureon-color-background));
	font: inherit;
	font-weight: 600;
	color: var(--aureon-color-heading, var(--aureon-color-text));
	cursor: pointer;
	transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;

	&:hover:not(:disabled) {
		border-color: var(--aureon-color-primary);
		background: color-mix(in srgb, var(--aureon-color-primary) 8%, var(--aureon-color-background));
		color: var(--aureon-color-link);
	}

	&:disabled {
		opacity: 0.6;
		cursor: default;
	}
}

.aureon-cart-summary__coupon-notice {
	margin-top: var(--aureon-space-xs);
	font-size: var(--aureon-font-size-sm, 0.875rem);
	line-height: 1.45;
	color: #dc2626;

	// A live region has to stay in the DOM to be announced, so it is emptied
	// rather than removed — and an empty one must not leave a gap.
	&:empty {
		display: none;
	}
}

/* The totals stay a `<table>` (shipping rows are generated as `<tr>` by
 * WooCommerce and its shipping extensions), so the card look is done by
 * flattening the table into rows here rather than by changing the markup. */
.cart-collaterals .cart_totals table.shop_table,
.woocommerce-checkout .woocommerce table.woocommerce-checkout-review-order-table {
	// `display: block` so the table tracks its container's width instead of
	// sizing to its own content — the rows are flex boxes, not table cells.
	display: block;
	width: 100%;
	border: 0;
	border-radius: 0;

	tbody,
	thead,
	tfoot {
		display: block;
	}

	tr {
		display: flex;
		align-items: baseline;
		justify-content: space-between;
		gap: var(--aureon-space-md);
		padding: 0.55em 0;
		border-bottom: 1px solid color-mix(in srgb, var(--aureon-color-border) 60%, transparent);
	}

	th,
	td {
		// WooCommerce pins the label column at `width: 35%`, which a flex row
		// reads as a basis and then overlaps the value against.
		width: auto;
		padding: 0;
		border: 0;
		font-weight: 400;
		color: var(--aureon-color-text-muted, var(--aureon-color-text));
	}

	th {
		flex: 0 0 auto;
		text-align: start;
	}

	td {
		flex: 1 1 auto;
		text-align: end;
		color: var(--aureon-color-text);
	}

	// The checkout review lists its line items as name/total cell pairs, so
	// the name is a `td` and would otherwise inherit the amount alignment.
	td.product-name {
		flex: 1 1 auto;
		text-align: start;
	}

	td.product-total {
		flex: 0 0 auto;
	}

	// The grand total is the one row that carries weight. The full-strength rule
	// above it closes the list of components off from the figure they add up to
	// — the hairlines between the components are deliberately lighter.
	tr.order-total {
		padding-top: 0.9em;
		padding-bottom: 0;
		border-top: 1px solid var(--aureon-color-border);
		border-bottom: 0;

		th,
		td {
			font-size: var(--aureon-font-size-lg);
			font-weight: 700;
			color: var(--aureon-color-heading, var(--aureon-color-text));
		}
	}

	// Shipping *options* are a stacked list, not a right-aligned amount — but a
	// settled rate is a figure like any other, so the exception is gated on the
	// cell actually holding a list of rates or the calculator form. Without the
	// `:has()` the one-rate case printed its amount hard against its own label,
	// the only row in the summary not to line up with the column of figures.
	tr.woocommerce-shipping-totals:has(ul, form) td,
	tr.shipping:has(ul, form) td {
		text-align: start;

		ul {
			padding: 0;
			margin: 0;
			list-style: none;
		}
	}

	// A row of rate *tiles* is a block of controls rather than a figure, so it
	// drops below its label and takes the full width of the card. Squeezed into
	// the value column beside "Shipping" — barely half of a 22rem summary — the
	// tiles wrap their own labels and stop reading as a row of choices.

	// Gated on the tiles actually being there: with one rate available the cell
	// holds a plain label (or a "no options available" sentence), which is a
	// value and belongs beside its label like every other row.
	tr.woocommerce-shipping-totals:has(.woocommerce-shipping-methods input[type="radio"]) {
		flex-wrap: wrap;
		gap: var(--aureon-space-xs);

		th,
		td {
			flex: 1 1 100%;
		}
	}
}

/* -------------------------------------------------------------------------
 * Delivery method cards (cart and checkout, classic edition)
 *
 * WooCommerce renders the shipping rates as a bare radio list inside the
 * totals table — the one place in the flow where the customer makes a choice
 * that changes what they pay, drawn with less weight than the rows around it.
 * Each rate becomes a tile instead, so the choice reads as a control.
 *
 * Only a *genuine* choice gets the tile. With a single rate available
 * WooCommerce emits a hidden input and a plain label, and a bordered card
 * around something the customer cannot change reads as a control that does
 * nothing — `:has(input[type="radio"])` is what tells the two cases apart.
 * ---------------------------------------------------------------------- */

.woocommerce-shipping-methods {
	display: flex;
	flex-direction: column;
	gap: var(--aureon-space-xs);
}

.woocommerce-shipping-methods li:has(input[type="radio"]) {
	display: flex;
	align-items: center;
	gap: var(--aureon-space-sm);
	padding: var(--aureon-space-sm) var(--aureon-space-md);
	border: 1px solid var(--aureon-color-border);
	border-radius: var(--aureon-radius-md, 6px);
	background: var(--aureon-color-background);
	transition: border-color 0.15s ease, box-shadow 0.15s ease;

	&:hover {
		border-color: color-mix(in srgb, var(--aureon-color-primary) 50%, var(--aureon-color-border));
	}

	// The second ring rather than a thicker border: a border change would shift
	// the tile's content by a pixel as the selection moves down the list.
	&:has(input:checked) {
		border-color: var(--aureon-color-primary);
		box-shadow: 0 0 0 1px var(--aureon-color-primary);
	}

	// The radio itself is the focus target, but the ring belongs on the tile —
	// that is the object the customer sees themselves moving through.
	&:has(input:focus-visible) {
		outline: 2px solid var(--aureon-color-primary);
		outline-offset: 2px;
	}

	// WooCommerce's float clearers, which a flex row turns into two stray items
	// on either side of the content. Nothing floats inside a tile.
	&::before,
	&::after {
		display: none;
	}

	input[type="radio"] {
		flex: none;
		width: auto;
		margin: 0;
		accent-color: var(--aureon-color-primary);
	}

	// Stretched to fill the tile so nearly all of it activates the radio — a
	// card shape that only responded to its 16px of label would misread.
	label {
		flex: 1 1 auto;
		margin: 0;
		cursor: pointer;
	}
}

/* Cart page only: the check-mark badge (added to the label by
 * `Cart_Checkout::delivery_label()` on `is_cart()`/`is_checkout()`) replaces
 * the native radio — an empty ring while the rate isn't picked, filled with
 * the check icon once it is. Scoped to `.woocommerce-cart` so the checkout
 * band's own corner-badge card treatment further down is untouched. */
.woocommerce-cart .woocommerce-shipping-methods li:has(input[type="radio"]) {
	position: relative;

	input[type="radio"] {
		position: absolute;
		opacity: 0;
		pointer-events: none;
	}

	// WooCommerce's own label was one string, "Flat rate: $5.00" — the colon
	// baked in. Splitting it into name/price spans (for the checkout card,
	// which stacks them instead) dropped that colon; put it back for the
	// cart's inline row, which still reads as one phrase.
	.aureon-delivery__name::after {
		content: ":";
	}

	// The label puts the badge last (name, price, check) — `order` pulls it
	// back to the radio's old spot instead of the markup needing to change.
	.aureon-delivery__check {
		position: static;
		order: -1;
		flex: none;
		opacity: 1;
		background: transparent;
		border: 1.5px solid var(--aureon-color-border);
		color: transparent;
		transition: background-color 0.15s ease, border-color 0.15s ease;
	}

	&:has(input:checked) .aureon-delivery__check {
		background: var(--aureon-color-primary);
		border-color: var(--aureon-color-primary);
		color: var(--aureon-color-button-text, #fff);
	}
}

// WooCommerce's own `#shipping_method li label{display:inline}` is an id
// selector — no number of classes outranks it, so the id has to be matched
// too (the checkout band's near-identical rule further down does the same).
.woocommerce-cart ul#shipping_method li:has(input[type="radio"]) label {
	display: flex;
	align-items: center;
	gap: var(--aureon-space-sm);
}

@media (prefers-reduced-motion: reduce) {

	.woocommerce-shipping-methods li:has(input[type="radio"]),
	.woocommerce-checkout #payment li.wc_payment_method,
	.woocommerce-checkout #payment .aureon-payment-method__check {
		transition: none;
	}
}

/* -------------------------------------------------------------------------
 * Delivery method band (classic checkout)
 *
 * The rates, moved out of the summary and into the form by cart-checkout.js.
 * Same tile as above, laid out as a row of choices rather than a stack, with
 * the name and the price on lines of their own — a card wide enough to hold a
 * sentence should not spend its width on a colon.
 *
 * The band is only ever populated when there are two or more rates, so
 * everything here can assume a genuine choice.
 * ---------------------------------------------------------------------- */

.aureon-delivery {
	// Last thing in the customer-details column, under whatever WooCommerce
	// floated above it in a store that keeps the default column layout.
	clear: both;
	margin-block: var(--aureon-space-lg);
}

.aureon-delivery[hidden] {
	display: none;
}

.aureon-delivery__title {
	margin-block-end: var(--aureon-space-sm);
}

/* `auto-fit` rather than a fixed count: two rates make two cards, five make as
 * many as the column fits and wrap the rest, and a narrow screen lands on one
 * per row without a breakpoint. */
.aureon-delivery .woocommerce-shipping-methods {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
	gap: var(--aureon-space-sm);
}

.aureon-delivery .woocommerce-shipping-methods li:has(input[type="radio"]) {
	position: relative;
	align-items: stretch;
	padding: var(--aureon-space-md);

	// The radio is the accessible control and stays in the tab order, focusable
	// and labelled — it is only taken out of the picture, because the tile's own
	// border and the check badge already say which rate is selected. `opacity`
	// rather than `display: none`, which would drop it from the tab order and
	// from the form.
	input[type="radio"] {
		position: absolute;
		opacity: 0;
		pointer-events: none;
	}

	label {
		flex-direction: column;
		gap: 2px;
		// Room for the badge, so a long rate name doesn't run underneath it.
		padding-inline-end: var(--aureon-space-lg);
	}
}

/* The `display` is out on its own, carrying the list's id, because WooCommerce
 * sets `display: inline` on the same label from `.woocommerce ul#shipping_method
 * li label` — an id, which no number of classes can outweigh. The id is on the
 * `<ul>` WooCommerce renders (and repeats per package, so this matches every
 * list in the band, not just the first). */
.aureon-delivery ul#shipping_method li:has(input[type="radio"]) label {
	display: flex;
}

.aureon-delivery__name {
	font-weight: 600;
	color: var(--aureon-color-heading, var(--aureon-color-text));
}

.aureon-delivery__price {
	color: var(--aureon-color-text-muted);

	.tax_label {
		font-size: var(--aureon-font-size-sm);
	}
}

/* Drawn at full size whether or not it is showing, so selecting a rate changes
 * nothing about the tile's geometry. */
.aureon-delivery__check {
	position: absolute;
	inset-block-start: var(--aureon-space-md);
	inset-inline-end: var(--aureon-space-md);
	display: grid;
	place-items: center;
	width: 1.25rem;
	height: 1.25rem;
	border-radius: 50%;
	background: var(--aureon-color-primary);
	color: var(--aureon-color-button-text, #fff);
	opacity: 0;
	transition: opacity 0.15s ease;
}

.aureon-delivery__check-icon {
	width: 0.75rem;
	height: 0.75rem;
}

.aureon-delivery .woocommerce-shipping-methods li:has(input:checked) .aureon-delivery__check {
	opacity: 1;
}

/* The address the rates were quoted for — a footnote to the row of cards. */
.aureon-delivery .woocommerce-shipping-destination {
	margin-block: var(--aureon-space-sm) 0;
	font-size: var(--aureon-font-size-sm);
	color: var(--aureon-color-text-muted);
}

@media (prefers-reduced-motion: reduce) {

	.aureon-delivery__check {
		transition: none;
	}
}

/* -------------------------------------------------------------------------
 * Editable order review — Edit / Remove (classic checkout only)
 *
 * `woocommerce.checkout.editable_items`. The static quantity and the stepper
 * "Edit" reveals are siblings inside the same `.aureon-review-item__body`;
 * cart-checkout.js toggles which one carries `hidden`. Guarded with
 * `:not([hidden])` throughout — an unconditional `display` here would beat
 * the browser's own `[hidden] { display: none }` rule regardless of
 * specificity, since author styles always outrank the user-agent sheet.
 * ---------------------------------------------------------------------- */

.aureon-review-item__qty-display:not([hidden]) {
	display: block;
}

.aureon-review-item__qty-edit:not([hidden]) {
	display: block;
	margin-top: 0.3em;

	// The bare `.aureon-qty` stepper sizes its buttons and input off the
	// row's own font-size, which in the summary column's small type comes out
	// visibly thinner than every other control on the page. Floored to the
	// same height the cart page already gives its stepper.
	.quantity.aureon-qty {
		min-height: 2.5rem;
	}

	.aureon-qty-btn {
		min-width: 2.5rem;
		min-height: 2.5rem;
	}

	.qty {
		min-height: 2.5rem;
	}
}

.aureon-review-item__actions {
	display: flex;
	align-items: center;
	gap: 0.5em;
	margin-top: 0.35em;
}

/* Text actions, not buttons — the same weight as the "Have a coupon?"
 * disclosure link, so the row reads as a quiet affordance rather than a
 * second set of controls competing with Place order. */
.aureon-review-item__edit,
.aureon-review-item__remove {
	padding: 0;
	border: 0;
	background: none;
	font: inherit;
	font-size: var(--aureon-font-size-sm);
	font-weight: 600;
	color: var(--aureon-color-link);
	cursor: pointer;

	&:hover,
	&:focus-visible {
		text-decoration: underline;
	}

	&:disabled {
		opacity: 0.6;
		cursor: default;
		text-decoration: none;
	}
}

.aureon-review-item__divider {
	color: var(--aureon-color-border);
	font-size: var(--aureon-font-size-sm);
}

/* Block checkout: same measurement, so the two editions read as one design. */
.wc-block-components-order-summary-item__image img {
	width: var(--aureon-review-thumb);
	border-radius: var(--aureon-radius-md, 6px);
}

.wc-block-components-totals-item__value,
.woocommerce-cart .order-total .amount,
.woocommerce-checkout .order-total .amount {
	color: var(--aureon-color-heading, var(--aureon-color-text));
}

/* A pending figure is set in the muted colour so it does not read as an amount
 * the customer is being asked to accept. */
.aureon-cart-summary__estimate td {
	// stylelint-disable-next-line declaration-no-important -- out-specifies the
	// `td` colour set in the shared totals block above, which is two classes deep.
	color: var(--aureon-color-text-muted, var(--aureon-color-text)) !important;
	font-size: var(--aureon-font-size-sm);
}

/* Hint affordance on a provisional totals row. The bubble is positioned against
 * the hint, so the row needs no stacking context of its own. */
.aureon-summary-hint {
	position: relative;
	display: inline-flex;
	align-items: center;
	vertical-align: middle;
	margin-inline-start: 0.3em;
	color: var(--aureon-color-text-muted, var(--aureon-color-text));
	cursor: help;

	&:focus-visible {
		outline: 2px solid var(--aureon-color-primary);
		outline-offset: 2px;
		border-radius: 50%;
	}

	&:hover,
	&:focus-visible {

		.aureon-summary-hint__bubble {
			opacity: 1;
			visibility: visible;
		}
	}
}

.aureon-summary-hint__icon {
	width: 1em;
	height: 1em;
}

/* `visibility` rather than `display` so the bubble can transition, and so it
 * stays out of the accessibility tree while hidden — the sentence is already on
 * the hint's `aria-label`, and announcing it twice is noise. */
.aureon-summary-hint__bubble {
	position: absolute;
	z-index: 2;
	bottom: calc(100% + 0.5em);
	inset-inline-start: 50%;
	width: max-content;
	max-width: 15rem;
	padding: 0.5em 0.7em;
	border-radius: var(--aureon-radius-md, 6px);
	background: var(--aureon-color-heading, var(--aureon-color-text));
	color: var(--aureon-color-background);
	font-size: var(--aureon-font-size-xs);
	font-weight: 400;
	line-height: 1.4;
	text-align: start;
	white-space: normal;
	opacity: 0;
	visibility: hidden;
	transform: translateX(-50%);
	transition: opacity 0.15s ease, visibility 0.15s ease;
}

/* Near the summary card's edge the centred bubble would overflow it; the last
 * row's hint is the common case, so clamp the bubble to the card instead. */
@media (max-width: 30rem) {

	.aureon-summary-hint__bubble {
		inset-inline-start: auto;
		inset-inline-end: 0;
		transform: none;
	}
}

/* "Continue shopping" under the checkout button: the quiet alternative to
 * committing, so it is centred beneath the CTA and carries no button weight. */
.wc-proceed-to-checkout .aureon-continue-shopping {
	display: flex;
	justify-content: center;
	margin-top: var(--aureon-space-sm);
}

/* Proceed-to-checkout / place-order / block submit — one full-width button. */
.wc-proceed-to-checkout,
.woocommerce-checkout #place_order,
.wc-block-cart__submit-container {
	margin-top: var(--aureon-space-md);
}

.wc-proceed-to-checkout .button,
.woocommerce-checkout #place_order,
.wc-block-cart__submit-button,
.wc-block-components-checkout-place-order-button {
	display: block;
	width: 100%;
	// Taller than the generic `.button` padding — the one full-width button
	// that actually commits the order reads as the page's primary action
	// only if it carries more weight than a "Continue shopping" link.
	padding-block: 0.95em;
	border-radius: var(--aureon-radius-md, 6px);
	font-size: var(--aureon-font-size-md, 1rem);
	text-align: center;
}

.wc-block-components-button {
	border-radius: var(--aureon-radius-md, 6px);
}

/* -------------------------------------------------------------------------
 * Block cart line items
 *
 * The block cart owns its own row markup, so the classic card rules can't
 * reach it. These give it the same measurements: the thumbnail scale from the
 * Cart panel, the theme's hairline between rows, and the same title weight.
 * ---------------------------------------------------------------------- */

.wc-block-cart-items {
	border: 0;

	th {
		border-bottom: 1px solid var(--aureon-color-border);
		font-size: var(--aureon-font-size-xs);
		color: var(--aureon-color-text-muted, var(--aureon-color-text));
	}
}

.wc-block-cart-items__row {
	border-bottom: 1px solid var(--aureon-color-border);

	// Same reasoning as `.aureon-cart-item:last-child` above: the hairline
	// separates rows from each other, not the last row from whatever
	// unrelated section (coupons) happens to follow the table.
	&:last-child {
		border-bottom: 0;
	}

	td {
		padding-top: var(--aureon-space-md);
		padding-bottom: var(--aureon-space-md);
		border: 0;
	}
}

body.aureon-cart-style-compact .wc-block-cart-items__row td {
	padding-top: var(--aureon-space-sm);
	padding-bottom: var(--aureon-space-sm);
}

/* Thumbnail size (`aureon-cart-img-{sm|md|lg}`) on the block cart.
 *
 * The image cell and the image itself both have to be said, and both at
 * WooCommerce's own specificity: core sizes the cell from
 * `.wc-block-cart__main .wc-block-cart-items .wc-block-cart-item__image`
 * (0,3,0) and the image from `table.wc-block-cart-items
 * .wc-block-cart-items__row .wc-block-cart-item__image img` (0,3,1) at
 * `width: 100%`. A plain `.wc-block-cart-item__image img` rule (0,2,0) lost
 * to both, which is why the setting moved the classic cart's thumbnails but
 * did nothing at all here. The cell carries core's own 16px right padding on
 * top of the thumbnail width, so it stays a gutter rather than eating into
 * the image. */
.wc-block-cart__main .wc-block-cart-items .wc-block-cart-item__image,
table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__image {
	width: calc(var(--aureon-cart-thumb) + 16px);
}

.wc-block-cart-item__image img,
table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__image img {
	width: var(--aureon-cart-thumb);
	max-width: none;
	aspect-ratio: 1;
	object-fit: cover;
	border-radius: var(--aureon-radius-md, 6px);
}

.wc-block-components-product-name {
	font-weight: 600;
	color: var(--aureon-color-heading, var(--aureon-color-text));
}

/* Block quantity stepper. WooCommerce draws the −/1/+ control as a single
 * bordered box (the buttons and input carry no border of their own), so
 * unlike the classic `.aureon-qty` segmented control above, only that one
 * wrapper needs reskinning: its `currentColor`-derived border and constant
 * 0.6 button opacity (even when enabled) read as a disabled, unstyled
 * control next to the theme's fully-opaque, theme-bordered fields. Scoped
 * under the page class rather than matched bare, since WooCommerce's own
 * selector is a single class too and a bare match would tie it. */
.woocommerce-cart .wc-block-components-quantity-selector,
.woocommerce-checkout .wc-block-components-quantity-selector {
	border-color: var(--aureon-color-border);
	border-radius: var(--aureon-radius-sm);
	background: var(--aureon-color-background);

	.wc-block-components-quantity-selector__button {
		opacity: 1;
		color: var(--aureon-color-text);

		&:hover:not(:disabled),
		&:focus:not(:disabled) {
			color: var(--aureon-color-link);
		}

		&:disabled {
			opacity: 0.35;
		}
	}

	.wc-block-components-quantity-selector__input {
		color: var(--aureon-color-text);
	}
}

/* The sidebar itself is the card (see the order-summary rules above), so the
 * order-summary block nested inside it must not draw a second one. */
.wc-block-checkout__sidebar .wp-block-woocommerce-checkout-order-summary-block,
.wc-block-cart__sidebar .wp-block-woocommerce-cart-order-summary-block {
	padding: 0;
	border: 0;
	background: none;
}

.wc-block-cart__totals-title,
.wc-block-components-checkout-order-summary__title {
	margin-bottom: var(--aureon-space-sm);
	font-size: var(--aureon-font-size-lg);
	color: var(--aureon-color-heading, var(--aureon-color-text));
}

/* On narrow viewports this same title doubles as the collapsible summary's
 * own disclosure row, and WooCommerce draws it with a border-top *and*
 * border-bottom of its own (`.wp-block-woocommerce-checkout-order-summary-
 * block .wc-block-components-checkout-order-summary__title`, two classes
 * deep). The top one sits a few pixels from the card's own top edge — two
 * near-parallel lines reading as a doubled frame. A background fill in
 * place of both was tried next, but at full row width with WooCommerce's
 * own 20px vertical padding it read as an oversized, disproportionately
 * heavy block above the form, and worse, stayed applied at the two-column
 * width where the title is a static (non-collapsible) card heading rather
 * than a toggle. Dropping only the top border removes the doubled line
 * while keeping the bottom one — still a single hairline, the same
 * language as every row divider elsewhere on this page, but enough on its
 * own to set the row apart from the plain-text headings above it.
 * WooCommerce already drops its own border-bottom via `.is-open` once the
 * panel is expanded, so that hand-off is left alone. The block class is
 * repeated to outrank WooCommerce's own selector rather than tie it —
 * matching it class for class would leave the winner decided by
 * stylesheet order, not this rule. */
.wp-block-woocommerce-checkout-order-summary-block.wp-block-woocommerce-checkout-order-summary-block .wc-block-components-checkout-order-summary__title {
	border-top: 0;
}

/* -------------------------------------------------------------------------
 * Reassurance row (trust line + payment chips)
 * ---------------------------------------------------------------------- */

.aureon-checkout-reassurance {
	display: flex;
	flex-direction: column;
	gap: var(--aureon-space-sm);
	margin-top: var(--aureon-space-md);
}

/* Above the classic place-order button the row reads as a preface, so it needs
 * bottom space instead of top. */
#order_review .aureon-checkout-reassurance {
	margin: 0 0 var(--aureon-space-md);
}

.aureon-trust-badge {
	display: flex;
	align-items: center;
	gap: 0.5em;
	margin: 0;
	font-size: var(--aureon-font-size-sm);
	color: var(--aureon-color-text-muted, var(--aureon-color-text));
}

.aureon-trust-badge__icon {
	flex: none;
	width: 1.1em;
	height: 1.1em;
	color: var(--aureon-color-link);
}

.aureon-payment-icons {
	display: flex;
	flex-wrap: wrap;
	gap: var(--aureon-space-xs);
	padding: 0;
	margin: 0;
	list-style: none;
}

.aureon-payment-icons__item {
	display: inline-flex;
	align-items: center;
	gap: 0.35em;
	padding: 0.3em 0.6em;
	border: 1px solid var(--aureon-color-border);
	border-radius: var(--aureon-radius-sm);
	font-size: var(--aureon-font-size-xs);
	color: var(--aureon-color-text-muted, var(--aureon-color-text));
}

.aureon-payment-icons__icon {
	width: 1em;
	height: 1em;
}

/* The gateway's own branded artwork (`WC_Payment_Gateway::get_icon()`), in
 * place of the generic glyph above — sized against the chip's line rather
 * than left at whatever pixel height the gateway chose. */
.aureon-payment-icons__logo img {
	display: block;
	width: auto;
	max-width: 100%;
	max-height: 1.1em;
}

/* -------------------------------------------------------------------------
 * "Continue shopping" and the empty cart
 * ---------------------------------------------------------------------- */

.aureon-continue-shopping {
	display: inline-flex;
	align-items: center;
	gap: 0.4em;
	margin-top: var(--aureon-space-md);
	font-size: var(--aureon-font-size-sm);
	color: var(--aureon-color-text-muted, var(--aureon-color-text));
	text-decoration: none;

	&:hover {
		color: var(--aureon-color-link);
	}
}

.aureon-continue-shopping__icon {
	width: 1em;
	height: 1em;
}

.aureon-cart-empty {
	// The cart grid is on the shortcode wrapper, which is still there when the
	// cart is empty — without this the empty state lands in the (now itemless)
	// summary column.
	grid-column: 1 / -1;
	padding: var(--aureon-space-xl) var(--aureon-space-md);
	text-align: center;
}

/* WooCommerce's own "your cart is currently empty" notice says the same thing
 * as the heading above. It stays in the DOM because cart.js looks for
 * `.wc-empty-cart-message` when it swaps in an emptied cart — it just doesn't
 * need to be seen twice. */
.woocommerce-cart .woocommerce:has(.aureon-cart-empty) .wc-empty-cart-message {
	display: none;
}

.aureon-cart-empty__icon {
	width: 3rem;
	height: 3rem;
	color: var(--aureon-color-text-muted, var(--aureon-color-text));
	opacity: 0.5;
}

.aureon-cart-empty__heading {
	margin: var(--aureon-space-md) 0 var(--aureon-space-xs);
	font-size: var(--aureon-font-size-xl);
}

.aureon-cart-empty__text {
	margin: 0 0 var(--aureon-space-lg);
	color: var(--aureon-color-text-muted, var(--aureon-color-text));
}

/* -------------------------------------------------------------------------
 * Checkout step strip
 * ---------------------------------------------------------------------- */

/* `nav.` matters: `aureon-checkout-steps` is also the body class that says the
 * strip is on (see `WooCommerce::body_class()`), so the bare class selector
 * matches `<body>` too — and did, giving the whole page a stray bottom margin
 * whenever a store switched the strip on. Every other selector in this section
 * carries the `__element` suffix and so can only ever match the strip itself. */
nav.aureon-checkout-steps {
	margin-bottom: var(--aureon-space-xl);
}

.aureon-checkout-steps__list {
	display: flex;
	flex-wrap: wrap;
	// `stretch`, so the numbered style's underlines land on one line however
	// many lines of label each step carries.
	align-items: stretch;
	gap: var(--aureon-space-sm) var(--aureon-space-md);
	width: 100%;
	padding: 0;
	margin: 0;
	list-style: none;
	counter-reset: none;
}

.aureon-checkout-steps__item {
	display: flex;
	flex: 1 1 0;
	align-items: center;
	gap: 0.5em;
	padding-bottom: var(--aureon-space-xs);
	border-bottom: 2px solid var(--aureon-color-border);
	font-size: var(--aureon-font-size-sm);
	color: var(--aureon-color-text-muted, var(--aureon-color-text));

	&.is-current {
		border-bottom-color: var(--aureon-color-primary);
		color: var(--aureon-color-heading, var(--aureon-color-text));
	}

	&.is-done {
		border-bottom-color: color-mix(in srgb, var(--aureon-color-primary) 50%, transparent);
	}
}

.aureon-checkout-steps__link {
	display: inline-flex;
	align-items: center;
	gap: 0.5em;
	color: inherit;
	text-decoration: none;

	&:hover {
		color: var(--aureon-color-link);
	}
}

.aureon-checkout-steps__marker {
	display: inline-flex;
	flex: none;
	position: relative;
}

/* Glyph and wording travel together as one block, so the pair can be centred
 * under a dot or set beside a number without either arrangement needing to
 * know how wide the other half is. */
.aureon-checkout-steps__body {
	display: inline-flex;
	align-items: center;
	gap: 0.5em;
	min-width: 0;
}

.aureon-checkout-steps__text {
	display: flex;
	flex-direction: column;
	gap: 0.1em;
	min-width: 0;
	// Start, not centre: the two lines are a heading and its gloss, and a
	// ragged left edge between them reads as two unrelated fragments.
	text-align: start;
}

/* Every step's name is set in full ink, the current one included: the strip is
 * a map of the flow, and greying out the names of the places the customer has
 * not reached yet makes it a worse one. The dot, its halo and the filled track
 * are what say where they are. */
.aureon-checkout-steps__label {
	font-weight: 600;
	line-height: 1.3;
	color: var(--aureon-color-heading, var(--aureon-color-text));
}

/* The gloss: what the step will ask for. Quieter than the label in both size
 * and colour, so the row still scans as three words. */
.aureon-checkout-steps__sub {
	font-size: 0.85em;
	font-weight: 400;
	line-height: 1.3;
	color: var(--aureon-color-text-muted, var(--aureon-color-text));
}

.aureon-checkout-steps__icon {
	flex: none;
	width: 1.5em;
	height: 1.5em;
	color: var(--aureon-color-text-muted, var(--aureon-color-text));
}

/* The step in hand owns its glyph; the ones around it keep the muted tone the
 * rest of their text is set in. */
.aureon-checkout-steps__item.is-current .aureon-checkout-steps__icon {
	color: var(--aureon-color-link);
}

.aureon-checkout-steps__num,
.aureon-checkout-steps__check {
	display: inline-flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 1.6em;
	height: 1.6em;
	border-radius: 999px;
	background: var(--aureon-color-border);
	font-size: 0.85em;
	line-height: 1;
}

/* Each step carries both markers (see `Cart_Checkout::steps_markup()`) and its
 * state picks one: the tick for a step behind the customer, the number for the
 * one they're on and the ones ahead — so the tick starts hidden and the two
 * rules below swap the pair over. It has to be the class that decides, because
 * on a stepped checkout a step becomes done while the page stands still —
 * `renderStepStrip()` in cart-checkout.js moves `is-done` and nothing else —
 * and a marker chosen when the page was built would still read "Details,
 * step 2" after the customer had finished it. */
.aureon-checkout-steps__check {
	display: none;
	padding: 0.35em;
	background: var(--aureon-color-primary);
	color: var(--aureon-color-button-text, #fff);
}

.aureon-checkout-steps__item.is-done .aureon-checkout-steps__check {
	display: inline-flex;
}

.aureon-checkout-steps__item.is-done .aureon-checkout-steps__num {
	display: none;
}

/* The current step's number is filled rather than outlined — the same weight
 * the ticks behind it carry, so the strip reads as one run of progress. */
.aureon-checkout-steps__item.is-current .aureon-checkout-steps__num {
	background: var(--aureon-color-primary);
	color: var(--aureon-color-button-text, #fff);
}

/* Numbered style: the number *is* the marker, so a glyph beside it is a second
 * mark for the same step — two icons and a word in a row that has three of
 * these to get through. The dots style has no such mark and keeps it. */
body.aureon-checkout-steps-numbers .aureon-checkout-steps__icon {
	display: none;
}

/* Dots — the same strip drawn as a connected track: a marker per step, joined
 * by a rule that fills in behind the steps already passed.
 *
 * The connector is what makes this read as progress rather than as a bulleted
 * list, which is all a row of loose dots and labels ever amounted to. It is
 * drawn as a pseudo-element on each item reaching *back* to the previous one
 * rather than as a single line behind the row: the items are flex children of
 * unequal width (their labels differ), so only the item itself knows where its
 * own marker sits, and only the segment behind a passed step should be filled.
 * `:first-child` has nothing behind it and draws none.
 *
 * Everything here reshapes the markup `Cart_Checkout::steps_markup()` already
 * emits — the number is hidden rather than not rendered, so the strip stays a
 * single template and a store can switch styles without a markup change. The
 * number text is hidden with `font-size: 0` rather than `display: none` so the
 * circle it lives in survives as the dot — which is also why the dot is sized
 * in `rem` and not the `em` the numbered variant uses, since `em` would
 * resolve against that zeroed font size and collapse the circle to nothing. */
body.aureon-checkout-steps-dots {

	// The marker moves above its label so the markers share one horizontal
	// line for the connector to run along — with the label beside it there is
	// no such line, only a row of dots at whatever height each label leaves.
	// Big enough to carry the 2px ring and still read as a marker rather than
	// a bullet: at 0.75rem the ring took two thirds of the dot and the whole
	// strip sat below the weight of its own labels.
	--aureon-step-dot: 1.375rem;

	.aureon-checkout-steps__list {
		gap: 0;
	}

	.aureon-checkout-steps__item {
		position: relative;
		// Equal widths are what let each connector be drawn from one item:
		// "half an item to the left" is then exactly the previous marker.
		flex: 1 1 0;
		justify-content: center;
		padding-bottom: 0;
		border-bottom: 0;
	}

	// Marker over the wording, both centred on the item's midline — which is
	// where the connector expects to find the dot.
	.aureon-checkout-steps__link {
		flex-direction: column;
		align-items: center;
		gap: var(--aureon-space-sm);
		width: 100%;
	}

	// …except at the two ends, which sit against the edges of the strip rather
	// than in the middle of their own third. That is what makes the track span
	// the full width instead of stopping a sixth short at each end, where it
	// read as a short rule floating in a wide box. Each end's wording follows
	// its dot, so nothing overhangs the strip.
	.aureon-checkout-steps__item:first-child .aureon-checkout-steps__link {
		align-items: flex-start;
	}

	.aureon-checkout-steps__item:last-child .aureon-checkout-steps__link {
		align-items: flex-end;
	}

	// The run of track from the previous marker to this one. Drawn per item
	// rather than as one line behind the row so each segment can report the
	// step it leads to: filled once that step has been reached, plain while
	// it is still ahead.
	.aureon-checkout-steps__item + .aureon-checkout-steps__item::before {
		content: "";
		position: absolute;
		top: calc(var(--aureon-step-dot) / 2);
		inset-inline: -50% 50%;
		height: 3px;
		margin-top: -1.5px;
		border-radius: 999px;
		background: var(--aureon-color-border);
	}

	// The two segments that meet an end dot are shorter or longer than a
	// centre-to-centre run by exactly the half-item the dot moved, minus its
	// own radius. Written as two one-sided rules rather than one combined
	// declaration so they compose: with only two steps, the single connector
	// is both the second and the last and needs both halves adjusted.
	.aureon-checkout-steps__item:nth-child(2)::before {
		inset-inline-start: calc(-100% + var(--aureon-step-dot) / 2);
	}

	.aureon-checkout-steps__item:last-child::before {
		inset-inline-end: calc(var(--aureon-step-dot) / 2);
	}

	.aureon-checkout-steps__item.is-done::before,
	.aureon-checkout-steps__item.is-current::before {
		background: var(--aureon-color-primary);
	}

	// The segment *leaving* the step in hand: started, not finished. A short
	// run of colour out of the current dot says the flow continues through it
	// rather than stopping there, which a flat grey line ahead of a filled dot
	// reads as. (rtlcss mirrors the gradient with the rest of the sheet.)
	.aureon-checkout-steps__item.is-current + .aureon-checkout-steps__item::before {
		background: linear-gradient(to right, var(--aureon-color-primary) 0 32%, var(--aureon-color-border) 32% 100%);
	}

	.aureon-checkout-steps__num,
	.aureon-checkout-steps__check {
		position: relative;
		z-index: 1;
		width: var(--aureon-step-dot);
		height: var(--aureon-step-dot);
		padding: 0;
		// A ring, not a disc: an upcoming step reads as an outline the track
		// has not filled in yet. The solid centre also hides the connector
		// running underneath.
		border: 2px solid var(--aureon-color-border);
		background: var(--aureon-color-background);
		font-size: 0;
	}

	// Wording centred as a block under the dot, but set left within itself —
	// the label and its gloss share an edge, the way they do in the numbered
	// style.
	.aureon-checkout-steps__body {
		align-items: center;
		justify-content: center;
		max-width: 100%;
	}

	// The tick is an inline SVG, so zeroing the font size doesn't hide it the
	// way it hides the number's text node — and the class sits on the `<svg>`
	// itself (`UI_Icons::markup()` takes no wrapper), which is the element
	// being drawn as the dot. So it is the glyph inside that goes: a passed
	// step is a filled dot here, the same mark as the current one, and a tick
	// squeezed into 18px only reads as grit on the track.
	.aureon-checkout-steps__check > * {
		display: none;
	}

	// A passed step is a filled disc — the tick it would show in the numbered
	// style is hidden here, so the circle around it is the whole marker.
	.aureon-checkout-steps__check,
	.aureon-checkout-steps__item.is-current .aureon-checkout-steps__num {
		border-color: var(--aureon-color-primary);
		background: var(--aureon-color-primary);
	}

	// The step the customer is on is the one to find at a glance: a halo in two
	// falls rather than one flat ring, which is what keeps it reading as a glow
	// around the dot instead of a third, paler dot drawn behind it.
	.aureon-checkout-steps__item.is-current .aureon-checkout-steps__num {
		box-shadow:
			0 0 0 5px color-mix(in srgb, var(--aureon-color-primary) 20%, transparent),
			0 0 0 10px color-mix(in srgb, var(--aureon-color-primary) 8%, transparent);
	}
}

/* Narrow: three glosses at a third of a phone's width each is four lines of
 * two-word fragments, which is less legible than the three names on their own —
 * so the gloss goes and the names stay. The glyph goes with it in the dots
 * style: on one line beside the name it has room, stacked under a dot it does
 * not. */
@media (max-width: 48rem) {

	.aureon-checkout-steps__sub {
		display: none;
	}

	body.aureon-checkout-steps-dots .aureon-checkout-steps__icon {
		display: none;
	}
}

/* -------------------------------------------------------------------------
 * Enhanced country / state dropdowns (select2)
 *
 * WooCommerce swaps the country and state `<select>`s for select2, which hides
 * the native control and draws its own — so every rule the theme wrote for
 * `select` stops applying and the field reverts to select2's stock grey box.
 * These restate the theme's input chrome on select2's own elements. The
 * dropdown panel is appended to `<body>`, outside the form, so it is matched at
 * the top level rather than under a checkout ancestor.
 * ---------------------------------------------------------------------- */

.select2-container--default .select2-selection--single {
	height: auto;
	padding: 0.5em 0.75em;
	border: 1px solid var(--aureon-color-border);
	// Matches every other field on the form. `.input-text` and the plain
	// `select` fallback both round to `--aureon-radius-sm` and sit on the
	// surface colour, so this has to name the same two tokens — pointing at
	// `radius-md` and the *page* background instead left the country picker
	// as the one control in the form with rounder corners and a tinted fill.
	border-radius: var(--aureon-radius-sm);
	background: var(--aureon-color-surface, var(--aureon-color-background));
	transition: border-color 0.15s ease;

	.select2-selection__rendered {
		padding: 0;
		color: var(--aureon-color-text);
		line-height: inherit;
	}

	.select2-selection__placeholder {
		color: var(--aureon-color-text-muted, var(--aureon-color-text));
	}

	// select2 draws the caret as a bordered pseudo-triangle pinned to a 26px
	// box; re-centre it against the taller themed field.
	.select2-selection__arrow {
		top: 50%;
		height: auto;
		inset-inline-end: 0.6em;
		transform: translateY(-50%);

		b {
			border-top-color: var(--aureon-color-text-muted, var(--aureon-color-text));
		}
	}
}

// select2 hides the native `<select>` and re-implements it as this div, so
// it never receives `:hover`/`:focus` from a real form control — matched
// here the same way select2 itself signals state, with a container class.
.select2-container--default:hover .select2-selection--single {
	border-color: color-mix(in srgb, var(--aureon-color-primary) 50%, var(--aureon-color-border));
}

.select2-container--default.select2-container--open .select2-selection--single,
.select2-container--default.select2-container--focus .select2-selection--single {
	border-color: var(--aureon-color-primary);
	// A crisp ring rather than a soft glow — the same weight
	// `.input-text:focus` draws with `outline`, restated as `box-shadow`
	// because select2's div can't be given a real `outline` that tracks its
	// rounded corners.
	box-shadow: 0 0 0 2px color-mix(in srgb, var(--aureon-color-primary) 30%, transparent);
}

.select2-container--default .select2-dropdown {
	border: 1px solid var(--aureon-color-border);
	border-radius: var(--aureon-radius-md, 6px);
	background: var(--aureon-color-background);
	box-shadow: var(--aureon-shadow-md, 0 8px 24px rgb(0 0 0 / 12%));
	overflow: hidden;
}

.select2-container--default .select2-search--dropdown .select2-search__field {
	padding: 0.5em 0.75em;
	border: 1px solid var(--aureon-color-border);
	border-radius: var(--aureon-radius-sm);
	background: var(--aureon-color-background);
	color: var(--aureon-color-text);

	&:focus {
		border-color: var(--aureon-color-primary);
		outline: none;
		box-shadow: 0 0 0 2px color-mix(in srgb, var(--aureon-color-primary) 30%, transparent);
	}
}

// A little breathing room around the list so each option's rounded corners
// (below) actually read as a pill rather than butting against the panel edge
// and each other.
.select2-container--default .select2-results > .select2-results__options {
	padding: 0.3em;
}

.select2-container--default .select2-results__option {
	padding: 0.5em 0.75em;
	border-radius: var(--aureon-radius-sm);
	color: var(--aureon-color-text);

	+ .select2-results__option {
		margin-top: 2px;
	}
}

.select2-container--default .select2-results__option--highlighted[aria-selected],
.select2-container--default .select2-results__option--highlighted[data-selected] {
	background: var(--aureon-color-primary);
	color: var(--aureon-color-button-text, #fff);
}

.select2-container--default .select2-results__option[aria-selected="true"],
.select2-container--default .select2-results__option[data-selected="true"] {
	background: color-mix(in srgb, var(--aureon-color-primary) 12%, transparent);
	color: var(--aureon-color-heading, var(--aureon-color-text));
}

/* -------------------------------------------------------------------------
 * Country flags (select2) + phone country-code prefix
 *
 * Both are opt-in (`woocommerce.checkout.country_flags` /
 * `.phone_country_code`) and share the same flag artwork — one small 4:3 SVG
 * per WooCommerce country code, rendered into place by cart-checkout.js's
 * `enhanceCountryFlags()` / `updatePhonePrefix()`.
 * ---------------------------------------------------------------------- */

.aureon-flag-option {
	display: flex;
	align-items: center;
	gap: 0.5em;
}

.aureon-flag-option__icon {
	flex: none;
	width: 1.25em;
	height: auto;
	border-radius: 2px;
	box-shadow: 0 0 0 1px rgb(0 0 0 / 10%);
}

// select2's own selection box already pads and colours the text; the flag row
// just needs to sit inline with it, at the same size as in the open list.
.select2-selection__rendered .aureon-flag-option {
	display: inline-flex;
}

// The *closed* box can't use the row above — its select2 build always
// renders `templateSelection` as plain text, so cart-checkout.js's
// `paintClosedFlag()` inserts this icon directly as a sibling of that text
// instead, rather than through select2's own template hooks.
.select2-selection__rendered > .aureon-flag-option__icon {
	vertical-align: middle;
	margin-inline-end: 0.5em;
}

[id$="_phone_field"] .woocommerce-input-wrapper {
	position: relative;
}

.aureon-phone-code {
	position: absolute;
	inset-block: 0;
	inset-inline-start: 0.75em;
	display: flex;
	align-items: center;
	gap: 0.4em;
	// Decorative — the paired country select is what a screen reader and a
	// click both belong to; a click landing here should still reach the
	// input underneath.
	pointer-events: none;
	color: var(--aureon-color-text-muted, var(--aureon-color-text));
}

.aureon-phone-code__flag {
	width: 1.15em;
	height: auto;
	border-radius: 2px;
	box-shadow: 0 0 0 1px rgb(0 0 0 / 10%);
}

.aureon-phone-code__dial {
	font-size: 0.9em;
	white-space: nowrap;
}

// The room the prefix needs is set inline, in px, straight onto the input
// (see `updatePhonePrefix()` in cart-checkout.js) — a fixed value here
// couldn't win against the theme's own base input padding without matching
// its selector shape exactly, and couldn't fit every dial code's width
// either way: they run from one digit to seven (Guernsey's +441481).

/* -------------------------------------------------------------------------
 * Option flags that can only be expressed as "hide this"
 *
 * The classic templates unregister these pieces in PHP; the block editions
 * have no such hook, so the same settings hide their block counterparts here.
 * ---------------------------------------------------------------------- */

body.aureon-cart-no-cross-sells {

	.cross-sells,
	.wp-block-woocommerce-cart-cross-sells-block {
		display: none;
	}
}

body.aureon-checkout-no-coupon {

	.wp-block-woocommerce-checkout-order-summary-coupon-form-block,
	.wc-block-components-totals-coupon,
	.woocommerce-form-coupon-toggle,
	form.checkout_coupon {
		display: none;
	}
}

/* The classic field is unregistered in PHP (see `WooCommerce::order_notes()`),
 * so on a real render this rule has nothing left to hide there — it is what
 * lets the setting repaint in the preview, where the field is already on the
 * page and only the body class changes. The block counterpart beside it is the
 * one doing the hiding on both. */
body.aureon-checkout-no-notes {

	#order_comments_field,
	.wp-block-woocommerce-checkout-order-note-block {
		display: none;
	}
}

/* -------------------------------------------------------------------------
 * Single-product data tabs (Description / Additional information / Reviews)
 *
 * Replace WooCommerce's rounded "folder tab" chrome with a flat underline
 * strip that reads like the rest of the theme: muted labels, a primary
 * underline under the active tab, and no card/border decoration.
 * ---------------------------------------------------------------------- */

.woocommerce div.product .woocommerce-tabs {
	margin-top: var(--aureon-space-xl);
}

.woocommerce div.product .woocommerce-tabs ul.tabs {
	display: flex;
	flex-wrap: wrap;
	gap: var(--aureon-space-lg);
	padding: 0;
	margin: 0 0 var(--aureon-space-lg);
	border-bottom: 1px solid var(--aureon-color-border);

	// Drop WooCommerce's decorative long bottom line — the flex strip's own
	// border-bottom owns the underline now.
	&::before {
		display: none;
	}

	li {
		margin: 0;
		padding: 0;
		border: 0;
		border-radius: 0;
		background: none;

		// …and the rounded tab-corner pseudo-elements.
		&::before,
		&::after {
			display: none;
		}

		a {
			display: block;
			padding: var(--aureon-space-sm) 0;
			margin-bottom: -1px; // overlap the strip's border with the active underline
			border-bottom: 2px solid transparent;
			color: var(--aureon-color-text-muted, var(--aureon-color-text));
			font-size: var(--aureon-font-size-md);
			font-weight: 600;
			line-height: 1.3;
			text-decoration: none;
			transition:
				color 0.15s ease,
				border-color 0.15s ease;
		}

		a:hover {
			color: var(--aureon-color-link);
		}

		// The active tab is named by colour as well as by the underline, so the
		// strip still reads at a glance in a monochrome screenshot.
		&.active a {
			color: var(--aureon-color-link);
			border-bottom-color: var(--aureon-color-primary);
		}
	}

	// Neutralise WooCommerce's white active-tab fill (matched at its own
	// specificity) — the underline alone marks the active tab.
	li.active {
		background: none;
	}

	// Wrapping three or four labels stacks a second row above the underline
	// strip; scroll the strip sideways instead, so the tabs stay one row.
	@media (max-width: 600px) {
		flex-wrap: nowrap;
		overflow-x: auto;
		gap: var(--aureon-space-md);
		scrollbar-width: none; // the labels themselves are the affordance
		-webkit-overflow-scrolling: touch;

		&::-webkit-scrollbar {
			display: none;
		}

		li a {
			white-space: nowrap;
		}
	}
}

/* Description panel — the one tab holding authored copy, so it gets a measured
 * line length and real list indents rather than WooCommerce's bare defaults. */
.woocommerce div.product .woocommerce-tabs #tab-description {
	max-width: 46rem;
	line-height: 1.7;

	h2,
	h3,
	h4 {
		margin: var(--aureon-space-lg) 0 var(--aureon-space-sm);
		color: var(--aureon-color-heading);

		&:first-child {
			margin-top: 0;
		}
	}

	ul,
	ol {
		padding-left: 1.25em;
		margin: 0 0 var(--aureon-space-md);
	}

	li {
		margin-bottom: 0.4em;
	}

	img {
		height: auto;
		max-width: 100%;
		border-radius: var(--aureon-radius-md);
	}
}

/* Panel body — tame WooCommerce's oversized panel/review headings (they
 * duplicate the active tab label) down to a normal section heading. */
.woocommerce div.product .woocommerce-tabs .panel {
	margin: 0;
	padding: 0;

	> h2:first-child,
	.woocommerce-Reviews-title,
	#reply-title {
		display: block;
		margin: 0 0 var(--aureon-space-md);
		color: var(--aureon-color-heading);
		font-size: var(--aureon-font-size-lg);
		font-weight: 700;
		line-height: 1.25;
	}

	> p:last-child {
		margin-bottom: 0;
	}
}

/* Additional-information attribute table — drop the italic values and heavy
 * borders for clean, quietly striped rows that match the theme's tables. */
.woocommerce div.product .shop_attributes {
	width: 100%;
	margin: 0;
	border: 1px solid var(--aureon-color-border);
	border-radius: var(--aureon-radius-sm);
	border-collapse: collapse;
	overflow: hidden;

	th,
	td {
		padding: var(--aureon-space-sm) var(--aureon-space-md);
		border: 0;
		border-bottom: 1px solid var(--aureon-color-border);
		text-align: left;
		vertical-align: top;
		line-height: 1.5;
	}

	tr:last-child th,
	tr:last-child td {
		border-bottom: 0;
	}

	tr:nth-child(even) th,
	tr:nth-child(even) td {
		background: color-mix(in srgb, var(--aureon-color-text) 3%, transparent);
	}

	th {
		width: 30%;
		color: var(--aureon-color-heading);
		font-weight: 600;
	}

	td,
	td p {
		margin: 0;
		color: var(--aureon-color-text);
		font-style: normal; // WooCommerce italicises attribute values by default
	}
}

/* Product details as an accordion (WooCommerce::render_details_accordion())
 * — the alternative to the tab strip above. Native `<details>` elements, so
 * open/close works without script (product-details.js adds the slide): hairline-separated rows, the section title on
 * the left and a plus that becomes a minus on the right. */
.aureon-product-details {
	margin-top: var(--aureon-space-xl);
	border-top: 1px solid var(--aureon-color-border);
	// One section collapsing above another that's opening shouldn't make the
	// browser shift the page to keep its place.
	overflow-anchor: none;

	&__section {
		border-bottom: 1px solid var(--aureon-color-border);
	}

	&__summary {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: var(--aureon-space-md);
		padding: var(--aureon-space-md) 0;
		color: var(--aureon-color-heading);
		font-size: var(--aureon-font-size-md);
		font-weight: 600;
		line-height: 1.3;
		cursor: pointer;
		list-style: none; // Firefox / spec marker

		// Safari and Chrome draw their own disclosure triangle through a
		// pseudo-element rather than `list-style`, so it needs its own reset.
		&::-webkit-details-marker {
			display: none;
		}

		&:hover {
			color: var(--aureon-color-link);
		}

		&:focus-visible {
			outline: 2px solid var(--aureon-color-primary);
			outline-offset: 2px;
		}
	}

	&__icon {
		flex-shrink: 0;
		color: var(--aureon-color-text-muted, var(--aureon-color-text));
	}

	/* The plus's vertical bar turns flat once the section is open, leaving a
	 * minus — one icon covering both states, no swap. It turns back as soon
	 * as a close starts (`is-closing`, see product-details.js), not when the
	 * slide ends. */
	.aureon-product-details__bar {
		transform-origin: center;
		transform-box: fill-box;
		transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
	}

	&__section[open]:not(.is-closing) &__icon .aureon-product-details__bar {
		transform: rotate(90deg);
	}

	&__panel {
		// Its own formatting context, so its content's margins stay inside it
		// whether or not the slide (which clips it) is running — otherwise the
		// panel would change height the moment a slide ended.
		display: flow-root;
		padding-bottom: var(--aureon-space-lg);
		line-height: 1.7;

		> :last-child {
			margin-bottom: 0;
		}

		/* The panels reuse the tab callbacks, whose first heading repeats the
		 * section title the customer just clicked. */
		> h2:first-child {
			display: none;
		}

		ul,
		ol {
			padding-left: 1.25em;
			margin: 0 0 var(--aureon-space-md);
		}
	}
}

/* Rating breakdown at the head of the reviews tab
 * (WooCommerce::review_summary()): the average score beside the per-star
 * distribution, stacking on narrow panels. Rendered only when the product has
 * ratings, so there is no empty state to style. */
.aureon-review-summary {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	align-items: center;
	gap: var(--aureon-space-lg);
	padding: var(--aureon-space-md);
	margin: 0 0 var(--aureon-space-lg);
	border: 1px solid var(--aureon-color-border);
	border-radius: var(--aureon-radius-md);

	@media (max-width: 600px) {
		grid-template-columns: minmax(0, 1fr);
		gap: var(--aureon-space-md);
	}

	&__score {
		display: flex;
		flex-direction: column;
		align-items: center;
		gap: var(--aureon-space-xs, 0.5rem);
		min-width: 8rem;
		text-align: center;
	}

	&__average {
		color: var(--aureon-color-heading);
		font-size: var(--aureon-font-size-2xl, 2.25rem);
		font-weight: 700;
		line-height: 1;
	}

	/* WooCommerce's star markup floats and carries its own margin inside a
	 * paragraph; neither suits a centred column. */
	.star-rating {
		float: none;
		margin: 0;
		color: var(--aureon-color-accent);
	}

	&__count {
		color: var(--aureon-color-text-muted, var(--aureon-color-text));
		font-size: var(--aureon-font-size-sm);
	}

	&__bars {
		display: grid;
		gap: 0.35rem;
		padding: 0;
		margin: 0;
		list-style: none;
	}

	&__row {
		display: grid;
		grid-template-columns: 4.5rem minmax(0, 1fr) 2.5rem;
		align-items: center;
		gap: var(--aureon-space-sm, 0.75rem);
		margin: 0;
		font-size: var(--aureon-font-size-sm);
	}

	&__label,
	&__value {
		color: var(--aureon-color-text-muted, var(--aureon-color-text));
	}

	&__value {
		text-align: right;
	}

	&__track {
		height: 8px;
		overflow: hidden;
		border-radius: 999px;
		background: color-mix(in srgb, var(--aureon-color-text) 10%, transparent);
	}

	&__fill {
		display: block;
		height: 100%;
		border-radius: inherit;
		background: var(--aureon-color-accent);
	}
}

/* Reviews tab — themed review cards and a tidy "Add a review" block. */
.woocommerce #reviews {

	// "There are no reviews yet." intro line.
	.woocommerce-noreviews {
		margin: 0 0 var(--aureon-space-lg);
		color: var(--aureon-color-text-muted, var(--aureon-color-text));
	}

	/* Existing reviews. Hairline-separated rows rather than bordered cards: a
	 * review is a voice in a list, and three stacked boxes read as three
	 * unrelated notices.
	 *
	 * WooCommerce emits the stars, then the author/date line, then the copy.
	 * The reference reading order is the other way round — who wrote it, then
	 * how they rated it, then what they said — so the column reorders them with
	 * flex `order` instead of a template override. */
	#comments ol.commentlist {
		padding: 0;
		margin: 0 0 var(--aureon-space-lg);
		list-style: none;

		li {
			padding: var(--aureon-space-lg) 0;
			margin: 0;
			border: 0;
			border-bottom: 1px solid var(--aureon-color-border);
			background: none;

			&:first-child {
				padding-top: 0;
			}

			.comment_container {
				display: flex;
				align-items: flex-start;
				gap: var(--aureon-space-md, 1rem);
			}

			img.avatar {
				position: static;
				flex-shrink: 0;
				width: 3rem;
				height: 3rem;
				padding: 0;
				border: 0;
				border-radius: 50%;
			}

			.comment-text {
				display: flex;
				flex: 1;
				flex-direction: column;
				min-width: 0;
				padding: 0;
				margin: 0;
				border: 0;
			}

			p.meta {
				order: 1;
				margin: 0;
				color: var(--aureon-color-text-muted, var(--aureon-color-text));
				font-size: var(--aureon-font-size-sm);
				line-height: 1.4;
			}

			// Author on its own line above the date, as a name heading rather
			// than a run-on sentence with the timestamp.
			.woocommerce-review__author {
				display: block;
				color: var(--aureon-color-heading);
				font-size: var(--aureon-font-size-md);
				font-weight: 600;
			}

			.woocommerce-review__dash {
				display: none;
			}

			.star-rating {
				order: 2;
				float: none;
				margin: var(--aureon-space-xs, 0.5rem) 0 0;
				color: var(--aureon-color-accent);
			}

			.description {
				order: 3;
				margin-top: var(--aureon-space-sm);
				line-height: 1.7;

				> :last-child {
					margin-bottom: 0;
				}
			}
		}
	}

	// "Add a review" form: field spacing and bold labels. The inputs keep the
	// theme's shared form styling; only the layout needs tidying here.
	#respond {
		margin-top: var(--aureon-space-md);

		.comment-form-rating,
		.comment-form-comment,
		.comment-form-author,
		.comment-form-email {
			margin-bottom: var(--aureon-space-md);
		}

		.comment-form label {
			display: block;
			margin-bottom: var(--aureon-space-xs);
			color: var(--aureon-color-heading);
			font-size: var(--aureon-font-size-sm);
			font-weight: 600;
		}

		textarea {
			width: 100%;
			border-radius: var(--aureon-radius-sm);
		}
	}
}

/* stylelint-enable selector-id-pattern */

/* ---------------------------------------------------------------------------
 * Category tiles
 *
 * WooCommerce renders a category as `li.product-category` inside the same
 * `ul.products` grid as the products, so a tile sits in the same track as a
 * product card — but it is a different object: one picture, one name, one
 * count, and nothing to buy. These rules give it a shell of its own rather
 * than letting it inherit a card built around a price and an add-to-cart
 * button.
 *
 * `.woocommerce` leads most selectors below purely for weight: WooCommerce's
 * own `.woocommerce ul.products li.product a img { width: 100% }` is one
 * element more specific than the same selector without it, so a theme rule
 * sizing the thumbnail loses to it otherwise — which is exactly what left the
 * `inline` layout rendering a full-width picture with the title squeezed
 * against the right edge.
 *
 * Four layouts, one class each on the loop container (see
 * WooCommerce::category_tile_class()), with the image ratio a second,
 * independent class on top.
 * ------------------------------------------------------------------------- */

.woocommerce ul.products li.product-category {
	display: flex;
	flex-direction: column;
	margin-bottom: 0;

	/* Left, like the product cards these sit beside in the same grid — a
	 * centred tile name among left-aligned product names reads as a mistake.
	 * The title-only layout is the exception and centres itself below. */
	text-align: start;

	/* A category tile borrows `li.product` from whichever card design the shop
	 * is on, and several of those draw their own border and padding. The tile
	 * carries its own shell on the link below — which is where the hover and
	 * the focus ring belong — so the inherited one is cleared rather than
	 * nested inside it as a box in a box.
	 *
	 * `height` included: the card shell sets `height: 100%` to level cards
	 * across a row, and a percentage height on a grid item feeds back into the
	 * row's own content sizing — on a tile, whose content is one short row,
	 * that measured ~50px taller than anything in it and left every card
	 * half empty. Grid stretches the item to the row regardless, so the rows
	 * still come out level without it. */
	height: auto;
	padding: 0;
	border: 0;
	background: none;
	box-shadow: none;

	> a {
		display: flex;
		flex-direction: column;
		height: 100%;
		padding: var(--aureon-space-sm);
		border: 1px solid var(--aureon-color-border);
		border-radius: var(--aureon-radius-md);
		background: var(--aureon-color-surface, transparent);
		color: inherit;
		text-decoration: none;
		transition:
			border-color 0.15s ease,
			box-shadow 0.15s ease,
			transform 0.15s ease;
	}

	> a:hover,
	> a:focus-visible {
		border-color: var(--aureon-color-primary);
		box-shadow: 0 6px 20px rgb(0 0 0 / 7%);
		transform: translateY(-2px);
	}

	/* `> a img`, not `img`: WooCommerce's own `.woocommerce ul.products
	 * li.product a img` sets `width: 100%` and `margin: 0 0 1em`, and is one
	 * element more specific than the same rule written without the link — so
	 * a plain `img` here loses both the width and the margin reset to it.
	 *
	 * `auto` (the default crop) sets no variable, so images keep their
	 * uploaded proportions and the ratio setting costs nothing — same
	 * arrangement as the single-product gallery crop above. Any other choice
	 * crops every tile to one shape, so a store whose category images are a
	 * mix of sizes still lines up in a grid. */
	> a img {
		display: block;
		width: 100%;
		height: auto;
		margin: 0;
		border-radius: var(--aureon-radius-sm);
		aspect-ratio: var(--aureon-cat-ratio, auto);
		object-fit: cover;
	}

	.woocommerce-loop-category__title {
		margin: 0;
		padding: var(--aureon-space-sm) var(--aureon-space-xs) var(--aureon-space-xs);
		color: var(--aureon-color-heading);
		font-size: var(--aureon-font-size-base, 1rem);
		font-weight: 600;
		line-height: 1.35;
	}

	/* Core wraps the count in `<mark>`, which every browser paints with a
	 * yellow highlight — correct for a search hit, wrong for "(13)" after a
	 * category name. Reset to a quiet, smaller companion to the title. */
	.count {
		background: none;
		color: var(--aureon-color-text-muted, inherit);
		font-size: var(--aureon-font-size-sm);
		font-weight: 400;
		opacity: 0.75;
	}
}

@media (prefers-reduced-motion: reduce) {

	.woocommerce ul.products li.product-category > a,
	.woocommerce ul.products li.product-category > a:hover {
		transform: none;
		transition: none;
	}
}

/* Thumbnail left, title and count beside it — a denser row for a store with
 * many categories, where a full-width picture each pushes the list down the
 * page. */
.woocommerce ul.products.aureon-cats--inline li.product-category {
	text-align: start;

	/* No padding on the link and no gap: the picture runs edge to edge down
	 * the leading side of the card, and `overflow` clips its corners to the
	 * card's own radius. A thumbnail floating inside padding left the tile
	 * looking like a picture dropped on a panel — flush, it reads as one
	 * object split into a picture half and a text half, which is also what
	 * makes the space beside a short name read as the text half's margin
	 * rather than as a hole in the row. */
	> a {
		flex-direction: row;
		gap: 0;
		align-items: center;
		padding: 0;
		overflow: hidden;
	}

	/* Square by default: this is a fixed-width column, so an uncropped image
	 * would otherwise set the row's height from its own proportions — a tall
	 * portrait making one row three times the height of its neighbours. The
	 * image is also what gives the card its height, the text being far
	 * shorter.
	 *
	 * Sized as a share of the tile, so the picture grows with the card
	 * instead of a fixed width leaving a wide tile half empty beside it. The
	 * share lands at ~150px in a three-up desktop grid, the size this layout
	 * is drawn around; the clamp then keeps it readable in a narrow phone
	 * column and stops it crowding out the name in a full-width one. */
	> a img {
		flex: 0 0 auto;
		width: clamp(112px, 45%, 220px);
		border-radius: 0;
		aspect-ratio: var(--aureon-cat-ratio, 1);
	}

	/* The text half. Its own padding (rather than the link's) is what sets it
	 * off from the picture, and it steps up a size to hold its own beside a
	 * picture this big. `balance` keeps a two-word category from breaking to
	 * a lone trailing word. */
	.woocommerce-loop-category__title {
		flex: 1 1 auto;
		padding: var(--aureon-space-md) var(--aureon-space-lg);
		font-size: var(--aureon-font-size-lg);
		text-wrap: balance;
	}

	/* Below the name rather than trailing it: at this size the two sit
	 * comfortably as a stacked pair, and the count stops competing with the
	 * name for the end of the line. */
	.count {
		display: block;
		margin-top: 2px;
	}
}

/* Title over the image: the tile is the picture, so the card shell steps back
 * and the title rides a scrim along the bottom edge. */
.woocommerce ul.products.aureon-cats--overlay li.product-category {

	> a {
		position: relative;
		padding: 0;
		border-color: transparent;
		overflow: hidden;
	}

	> a img {
		border-radius: 0;
	}

	.woocommerce-loop-category__title {
		position: absolute;
		inset-inline: 0;
		bottom: 0;
		padding: var(--aureon-space-md);
		background: linear-gradient(to top, rgb(0 0 0 / 72%), rgb(0 0 0 / 0%));
		color: #fff;
		font-size: var(--aureon-font-size-lg);
		text-align: start;
	}

	.count {
		color: inherit;
	}
}

/* Title-only tiles. The thumbnail is dropped server-side (see
 * apply_category_settings()), so this only has to centre what's left and give
 * the tile a height of its own — a bare `<h2>` would otherwise read as a list
 * of links rather than a grid of tiles. */
.woocommerce ul.products.aureon-cats--text li.product-category {

	text-align: center;

	> a {
		align-items: center;
		justify-content: center;
		min-height: 76px;
		padding: var(--aureon-space-md);
	}

	.woocommerce-loop-category__title {
		padding: 0;
	}
}

/* Category thumbnail crop, read by the `img` rules above. */
ul.products.aureon-cats--ratio-1-1 {
	--aureon-cat-ratio: 1;
}

ul.products.aureon-cats--ratio-4-5 {
	--aureon-cat-ratio: 4 / 5;
}

ul.products.aureon-cats--ratio-3-4 {
	--aureon-cat-ratio: 3 / 4;
}

ul.products.aureon-cats--overlay li.product-category {
	position: relative;
	overflow: hidden;
	border-radius: var(--aureon-radius-md);

	> a {
		display: block;
	}

	img {
		display: block;
		width: 100%;
		margin: 0;
		border-radius: 0;
	}

	/* The title (and its count) lifted off the flow and laid over the image,
	 * on a scrim dark enough to keep the text legible over any photograph. */
	.woocommerce-loop-category__title {
		position: absolute;
		inset-inline: 0;
		bottom: 0;
		margin: 0;
		padding: var(--aureon-space-md);
		background: linear-gradient(to top, rgb(0 0 0 / 72%), rgb(0 0 0 / 0%));
		color: #fff;
		font-size: var(--aureon-font-size-lg);
		font-weight: 600;
	}

	.count {
		background: none;
		color: inherit;
		opacity: 0.8;
	}
}
