/*
Theme Name: SideQuest
Theme URI: https://github.com/heydemoura/sidequest-theme
Author: Heyde Moura
Author URI: https://github.com/heydemoura
Description: A dark WooCommerce block theme for a trading card game store. Built on the Nocturne design system — black and white ground, gold as a mark and a rule, purple for interaction. Singles are WooCommerce variable products (Condition × Finish); sealed products are simple products.
Requires at least: 6.5
Tested up to: 6.7
Requires PHP: 7.4
Version: 0.0.8
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: sidequest
Tags: e-commerce, block-patterns, block-styles, full-site-editing, dark
WC requires at least: 8.0
*/

/* ═══════════════════════════════════════════════════════════════════════
   Nocturne foundations
   Tokens live in theme.json; this file paints the pieces block markup
   can't reach: fading rules, the buy box, Woo form controls, badges.
   ═══════════════════════════════════════════════════════════════════ */

body {
	-webkit-font-smoothing: antialiased;
}

:focus {
	outline: none;
}

:focus-visible {
	outline: 2px solid var(--wp--preset--color--accent);
	outline-offset: 2px;
}

::selection {
	background: color-mix(in srgb, var(--wp--preset--color--accent) 30%, transparent);
}

/* — fading rules — a Nocturne signature: freestanding rules fade to
   transparent at both ends (48px ramp); box outlines stay solid. */
hr.wp-block-separator {
	height: 1px;
	border: 0;
	background: linear-gradient(
		to right,
		transparent,
		var(--wp--custom--divider) 48px,
		var(--wp--custom--divider) calc(100% - 48px),
		transparent
	);
}

.sq-rule-top {
	background:
		linear-gradient(
			to right,
			transparent,
			var(--wp--custom--divider) 48px,
			var(--wp--custom--divider) calc(100% - 48px),
			transparent
		)
		no-repeat top / 100% 1px;
}

/* — gold kicker: short solid gold mark + uppercase label — */
.sq-kicker {
	display: flex;
	align-items: center;
	gap: 9px;
	font-size: 10.5px;
	font-weight: 500;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--wp--preset--color--gold);
}

.sq-kicker::before {
	content: "";
	width: 26px;
	height: 2px;
	background: var(--wp--preset--color--gold);
}

/* — brand: "Side" in text color, "Quest" in gold — */
.sq-brand .wp-block-site-title a,
.wp-block-site-title.sq-brand a {
	text-decoration: none;
	letter-spacing: -0.02em;
}

/* ═══════════════════════════════════════════════════════════════════════
   Header
   ═══════════════════════════════════════════════════════════════════ */

.sq-header {
	border-bottom: 1px solid var(--wp--custom--divider);
}

.sq-header .wp-block-navigation .wp-block-navigation-item__label {
	font-size: 13.5px;
}

/* Button-inside search: the wrapper is the control — surface pill with a
   hairline border; the input and icon button inside stay transparent. */
.sq-header .wp-block-search__inside-wrapper {
	background: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--custom--divider);
	border-radius: var(--wp--custom--radius--md);
	overflow: hidden;
}

.sq-header .wp-block-search__inside-wrapper:focus-within {
	border-color: var(--wp--preset--color--accent);
}

.sq-header .wp-block-search__input,
.sq-header .wp-block-search__button-inside .wp-block-search__inside-wrapper .wp-block-search__input {
	background: transparent;
	border: none;
	color: var(--wp--preset--color--contrast);
	font-size: 13px;
	min-height: 36px;
	padding: 6px 10px;
}

.sq-header .wp-block-search__input:focus-visible {
	outline: none;
}

.sq-header .wp-block-search__input::placeholder {
	color: color-mix(in srgb, var(--wp--preset--color--contrast) 45%, transparent);
}

.sq-header .wp-block-search__button {
	background: transparent;
	border: none;
	border-radius: 0;
	color: color-mix(in srgb, var(--wp--preset--color--contrast) 60%, transparent);
	padding: 0 8px;
}

.sq-header .wp-block-search__button:hover {
	background: color-mix(in srgb, var(--wp--preset--color--contrast) 7%, transparent);
	color: var(--wp--preset--color--contrast);
}

.sq-header .wp-block-search__button svg {
	fill: currentColor;
	width: 16px;
	height: 16px;
}

.wc-block-mini-cart__button,
.wp-block-woocommerce-customer-account a {
	color: var(--wp--preset--color--contrast);
}

.wc-block-mini-cart__badge {
	background: var(--wp--preset--color--accent-soft, #423a6a);
	color: #f5f4ff;
	border: none;
}

/* MTG Inventory storefront-search dropdown, mapped to Nocturne */
:root {
	--wmtg-ac-bg: var(--wp--preset--color--surface);
	--wmtg-ac-text: var(--wp--preset--color--contrast);
	--wmtg-ac-muted: color-mix(in srgb, var(--wp--preset--color--contrast) 50%, transparent);
	--wmtg-ac-border: var(--wp--custom--divider);
	--wmtg-ac-label: var(--wp--preset--color--gold);
	--wmtg-ac-accent: var(--wp--preset--color--accent);
	--wmtg-ac-hover: color-mix(in srgb, var(--wp--preset--color--accent) 10%, transparent);
	--wmtg-ac-thumb-bg: #1d1f31;
	--wmtg-ac-radius: 8px;
	--wmtg-ac-shadow: 0 6px 18px rgba(0, 0, 0, 0.55);
}

/* Nav items marked "soon" (One Piece, Yu-Gi-Oh!) */
.sq-nav-soon .wp-block-navigation-item__label {
	color: color-mix(in srgb, var(--wp--preset--color--contrast) 35%, transparent);
}

.sq-nav-soon .wp-block-navigation-item__label::after {
	content: " soon";
	font-size: 10px;
}

/* ═══════════════════════════════════════════════════════════════════════
   Hero + section grounds
   ═══════════════════════════════════════════════════════════════════ */

.sq-hero {
	background:
		radial-gradient(120% 150% at 8% 0%, var(--wp--preset--color--section) 0%, transparent 62%),
		var(--wp--preset--color--base);
}

.sq-game-hero {
	background: linear-gradient(
		115deg,
		var(--wp--preset--color--section) 0%,
		#191c33 55%,
		var(--wp--preset--color--base) 100%
	);
}

/* Card-art placeholder frames (hero, empty states) */
.sq-card-frame {
	aspect-ratio: 63 / 88;
	border-radius: var(--wp--custom--radius--md);
	border: 1px dashed color-mix(in srgb, var(--wp--preset--color--contrast) 20%, transparent);
	background: linear-gradient(160deg, #2a2d4b, #171927);
	display: grid;
	place-items: center;
	font-family: ui-monospace, Menlo, monospace;
	font-size: 9px;
	font-weight: 500;
	letter-spacing: 0.12em;
	color: color-mix(in srgb, var(--wp--preset--color--contrast) 32%, transparent);
}

/* Stat band: full-width strip bounded by fading rules, cells centered
   and divided by hairlines (divider ground showing through 1px gaps). */
.sq-stats-band {
	background:
		linear-gradient(
			to right,
			transparent,
			var(--wp--custom--divider) 48px,
			var(--wp--custom--divider) calc(100% - 48px),
			transparent
		)
		no-repeat top / 100% 1px,
		linear-gradient(
			to right,
			transparent,
			var(--wp--custom--divider) 48px,
			var(--wp--custom--divider) calc(100% - 48px),
			transparent
		)
		no-repeat bottom / 100% 1px;
	padding-top: 1px;
	padding-bottom: 1px;
}

.sq-stats {
	background: var(--wp--custom--divider);
}

.sq-stats > .wp-block-column {
	background: var(--wp--preset--color--base);
}

.sq-stat-value {
	font-size: 20px;
	font-weight: 500;
	color: var(--wp--preset--color--gold);
}

/* Shop-by-game cards: live games carry an inset gold ring */
.sq-game-card {
	border-radius: var(--wp--custom--radius--md);
	background: var(--wp--preset--color--surface);
	box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--wp--preset--color--gold) 35%, transparent);
}

.sq-game-card.is-soon {
	opacity: 0.5;
	box-shadow: none;
}

/* ═══════════════════════════════════════════════════════════════════════
   Product grids (Product Collection + legacy grids)
   ═══════════════════════════════════════════════════════════════════ */

/* Legacy grid blocks (New Products / Best Sellers rails): the block's own
   layout packs items flush — lay them out as a grid with real gaps. */
.wc-block-grid__products,
.wc-block-grid .wc-block-grid__products {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	gap: 14px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.wc-block-grid__product,
.wc-block-grid .wc-block-grid__products .wc-block-grid__product {
	width: auto;
	max-width: none;
	margin: 0;
}

.wc-block-grid__product,
.wc-block-product-template .wc-block-product {
	background: var(--wp--preset--color--surface);
	border-radius: var(--wp--custom--radius--md);
	box-shadow: 0 0 0 1px #3f424d;
	padding: 10px;
	text-align: left;
}

/* Card art keeps the 63:88 card ratio, never cropped */
.wc-block-grid__product-image img,
.wc-block-product-template .wc-block-components-product-image img {
	width: 100%;
	aspect-ratio: 63 / 88;
	object-fit: contain;
}

.wc-block-grid__product-image img,
.wc-block-product-template .wc-block-components-product-image img,
.wp-block-woocommerce-product-image img {
	border-radius: 6px;
}

.wc-block-grid__product-title,
.wc-block-product-template h3 {
	font-size: 13px;
	font-weight: 500;
	line-height: 1.25;
}

.wc-block-product-template h3 a {
	color: var(--wp--preset--color--contrast);
	text-decoration: none;
}

.wc-block-grid__product-price,
.wc-block-product-template .wc-block-components-product-price {
	font-size: 15px;
	font-weight: 500;
	color: var(--wp--preset--color--contrast);
}

/* Sale / foil / preorder badges read as gold marks */
.wc-block-components-product-sale-badge,
.wc-block-grid__product-onsale,
.woocommerce span.onsale {
	background: color-mix(in srgb, var(--wp--preset--color--gold) 90%, transparent);
	color: #1b1608;
	border: none;
	border-radius: 4px;
	font-size: 10px;
	padding: 2px 6px;
	text-transform: none;
	letter-spacing: 0.02em;
}

/* ═══════════════════════════════════════════════════════════════════════
   Buttons — Nocturne outline language
   primary: purple outline + purple text; hover fills at 12%.
   ═══════════════════════════════════════════════════════════════════ */

.wp-block-button__link,
.wc-block-components-button,
.wc-block-grid__product-add-to-cart .add_to_cart_button,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit,
.single_add_to_cart_button {
	background: transparent;
	border: 1px solid var(--wp--preset--color--accent);
	border-radius: var(--wp--custom--radius--md);
	color: var(--wp--preset--color--accent);
	font-weight: 500;
	font-size: 14px;
	line-height: 1.2;
	padding: 8px 14px;
	cursor: pointer;
	text-decoration: none;
}

.wp-block-button__link:hover,
.wc-block-components-button:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.single_add_to_cart_button:hover {
	background: color-mix(in srgb, var(--wp--preset--color--accent) 12%, transparent);
	color: var(--wp--preset--color--accent);
}

.is-style-outline > .wp-block-button__link,
.sq-btn-secondary {
	border-color: var(--wp--custom--divider);
	color: var(--wp--preset--color--contrast);
}

.is-style-outline > .wp-block-button__link:hover,
.sq-btn-secondary:hover {
	background: color-mix(in srgb, var(--wp--preset--color--contrast) 7%, transparent);
	color: var(--wp--preset--color--contrast);
}

/* ═══════════════════════════════════════════════════════════════════════
   Single product — the buy box (design 2d)
   Two dropdowns (Finish, Condition) resolving to one price + stock.
   ═══════════════════════════════════════════════════════════════════ */

.sq-buy-box {
	background: var(--wp--preset--color--surface);
	border-radius: var(--wp--custom--radius--md);
	box-shadow: 0 0 0 1px #595d6c, 0 6px 18px rgba(0, 0, 0, 0.55);
	padding: 18px;
}

.sq-buy-box .wc-block-components-product-price,
.sq-buy-box .price,
.single-product div.product > p.price {
	font-size: 30px;
	font-weight: 500;
	color: var(--wp--preset--color--contrast);
}

/* — the 2e variations table: finish toggle, one row per condition — */
.sq-vartable {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.sq-vartable-head {
	display: flex;
	align-items: center;
	gap: 12px;
}

.sq-vartable-sku {
	font-size: 12px;
	color: color-mix(in srgb, var(--wp--preset--color--contrast) 50%, transparent);
}

.sq-seg {
	display: inline-flex;
	align-items: stretch;
	overflow: hidden;
	padding: 0;
	border: 1px solid var(--wp--custom--divider);
	border-radius: var(--wp--custom--radius--md);
}

/* The .woocommerce-page prefix outranks Woo's `.woocommerce-page label
   { margin-bottom: .7em }`, whose stray margin inflated the seg box. */
.sq-seg-opt,
.woocommerce-page label.sq-seg-opt {
	display: inline-flex;
	align-items: center;
	align-self: stretch;
	box-sizing: border-box;
	margin: 0;
	padding: 7px 12px;
	font-size: 13px;
	line-height: 1.2;
	cursor: pointer;
}

.sq-seg-opt + .sq-seg-opt {
	border-left: 1px solid var(--wp--custom--divider);
}

.sq-seg-opt input {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
	pointer-events: none;
}

.sq-seg-opt.is-active {
	color: var(--wp--preset--color--accent);
	box-shadow: inset 0 0 0 1px var(--wp--preset--color--accent);
}

.sq-seg-opt:not(.is-active):hover {
	background: color-mix(in srgb, var(--wp--preset--color--contrast) 7%, transparent);
}

.sq-seg-opt:has(input:focus-visible) {
	outline: 2px solid var(--wp--preset--color--accent);
	outline-offset: -2px;
}

.sq-vartable-rows {
	display: flex;
	flex-direction: column;
}

.sq-vartable-rows[hidden] {
	display: none;
}

.sq-vartable-row {
	display: grid;
	grid-template-columns: 1fr 88px 74px 110px;
	gap: 8px;
	align-items: center;
	padding: 10px 8px;
	font-size: 13.5px;
}

/* Fading rule above every row except the first; the featured row's ring
   replaces its rule. */
.sq-vartable-row:not(:first-child):not(.is-featured) {
	background:
		linear-gradient(
			to right,
			transparent,
			color-mix(in srgb, var(--wp--preset--color--contrast) 8%, transparent) 20px,
			color-mix(in srgb, var(--wp--preset--color--contrast) 8%, transparent) calc(100% - 20px),
			transparent
		)
		no-repeat top / 100% 1px;
}

.sq-vartable-row.is-featured {
	border-radius: 6px;
	background: color-mix(in srgb, var(--wp--preset--color--accent) 10%, transparent);
	box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--wp--preset--color--accent) 50%, transparent);
}

.sq-vartable-row.is-featured .sq-vt-cond {
	font-weight: 500;
}

.sq-vartable-row.is-oos {
	opacity: 0.45;
}

.sq-vt-price {
	font-size: 15px;
	font-weight: 500;
}

.sq-vt-stock {
	font-size: 12px;
	color: color-mix(in srgb, var(--wp--preset--color--contrast) 60%, transparent);
}

.sq-vt-stock.is-low {
	color: var(--wp--preset--color--gold);
}

.sq-vt-add {
	margin: 0;
}

.sq-vt-btn {
	width: 100%;
	padding: 7px 10px;
	font-size: 13px;
	font-weight: 500;
	line-height: 1.2;
	cursor: pointer;
	background: transparent;
	border: 1px solid var(--wp--custom--divider);
	border-radius: var(--wp--custom--radius--md);
	color: var(--wp--preset--color--contrast);
}

.sq-vt-btn:hover:not(:disabled) {
	background: color-mix(in srgb, var(--wp--preset--color--contrast) 7%, transparent);
}

.sq-vt-btn.is-primary {
	border-color: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--accent);
}

.sq-vt-btn.is-primary:hover:not(:disabled) {
	background: color-mix(in srgb, var(--wp--preset--color--accent) 12%, transparent);
}

.sq-vt-btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.variations label {
	display: block;
	font-size: 12px;
	margin-bottom: 5px;
	color: color-mix(in srgb, var(--wp--preset--color--contrast) 70%, transparent);
}

.variations select,
.wc-block-components-quantity-selector input,
.cart .quantity .qty,
.woocommerce-page select,
select {
	background: var(--wp--preset--color--base);
	border: 1px solid var(--wp--custom--divider);
	border-radius: var(--wp--custom--radius--md);
	color: var(--wp--preset--color--contrast);
	font-size: 14px;
	min-height: 36px;
	padding: 6px 10px;
}

.variations select:focus-visible {
	border-color: var(--wp--preset--color--accent);
	outline-offset: 0;
}

/* Per-variation stock note picks up the gold rule treatment */
.woocommerce-variation-availability .stock,
p.stock {
	font-size: 12px;
	color: var(--wp--preset--color--gold);
}

p.stock.out-of-stock {
	color: color-mix(in srgb, var(--wp--preset--color--contrast) 45%, transparent);
}

/* ═══════════════════════════════════════════════════════════════════════
   Catalog filter rail (2c) — MTG Inventory catalog-filters mapped to
   Nocturne. Structure lives in the plugin CSS; colors come from these
   tokens.
   ═══════════════════════════════════════════════════════════════════ */

:root {
	--wmtg-cf-text: var(--wp--preset--color--contrast);
	--wmtg-cf-label: var(--wp--preset--color--gold);
	--wmtg-cf-accent: var(--wp--preset--color--accent);
	--wmtg-cf-border: var(--wp--custom--divider);
	--wmtg-cf-muted: color-mix(in srgb, var(--wp--preset--color--contrast) 60%, transparent);
	--wmtg-cf-count: color-mix(in srgb, var(--wp--preset--color--contrast) 40%, transparent);
	--wmtg-cf-row: color-mix(in srgb, var(--wp--preset--color--contrast) 80%, transparent);
	--wmtg-cf-input-bg: var(--wp--preset--color--surface);
	--wmtg-cf-chip-bg: #3f424d;
	--wmtg-cf-chip-text: #f3f5fe;
	--wmtg-cf-track: #3f424d;
	--wmtg-cf-thumb: var(--wp--preset--color--contrast);
	--wmtg-cf-active-bg: #423a6a;
	--wmtg-cf-active-text: #f5f4ff;
}

/* Chips-with-sort toolbar: fading rule underneath, per the design */
.sq-toolbar .woocommerce-ordering,
.sq-toolbar > form:last-child {
	margin-left: auto;
}

.sq-toolbar {
	padding-bottom: 14px;
	background:
		linear-gradient(
			to right,
			transparent,
			var(--wp--custom--divider) 48px,
			var(--wp--custom--divider) calc(100% - 48px),
			transparent
		)
		no-repeat bottom / 100% 1px;
	min-height: 46px;
}

/* ═══════════════════════════════════════════════════════════════════════
   Forms (checkout, account, coupon)
   ═══════════════════════════════════════════════════════════════════ */

.wc-block-components-text-input input,
.wc-block-components-form .wc-block-components-text-input input,
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
input[type="search"],
textarea {
	background: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--custom--divider);
	border-radius: var(--wp--custom--radius--md);
	color: var(--wp--preset--color--contrast);
	caret-color: var(--wp--preset--color--accent);
	font-size: 14px;
	min-height: 36px;
	padding: 6px 10px;
}

input:hover,
textarea:hover {
	border-color: color-mix(in srgb, var(--wp--preset--color--contrast) 45%, transparent);
}

input:focus-visible,
textarea:focus-visible {
	border-color: var(--wp--preset--color--accent);
	outline-offset: 0;
}

/* ═══════════════════════════════════════════════════════════════════════
   Cart (2g) — items table left, order-summary card right
   ═══════════════════════════════════════════════════════════════════ */

/* Items table: uppercase muted headers, fading row rules */
table.wc-block-cart-items,
.wc-block-cart-items {
	border-collapse: collapse;
	font-size: 14px;
}

.wc-block-cart-items th {
	font-size: 11px;
	font-weight: 500;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: color-mix(in srgb, var(--wp--preset--color--contrast) 60%, transparent);
	border: none;
	padding: 6px 8px;
}

.wc-block-cart-items thead tr {
	background:
		linear-gradient(
			to right,
			transparent,
			var(--wp--custom--divider) 48px,
			var(--wp--custom--divider) calc(100% - 48px),
			transparent
		)
		no-repeat bottom / 100% 1px;
}

.wc-block-cart-items td {
	border: none;
	padding: 12px 8px;
}

.wc-block-cart-items tbody tr,
.wc-block-cart-items .wc-block-cart-items__row {
	background:
		linear-gradient(
			to right,
			transparent,
			color-mix(in srgb, var(--wp--preset--color--contrast) 8%, transparent) 48px,
			color-mix(in srgb, var(--wp--preset--color--contrast) 8%, transparent) calc(100% - 48px),
			transparent
		)
		no-repeat bottom / 100% 1px;
}

.wc-block-cart-item__image img {
	max-width: 48px;
	border-radius: 4px;
}

/* — 2g columns: Item | Variation | Qty | Total —
   Cart PAGE only: the mini-cart drawer reuses these classes (its table
   adds .wc-block-mini-cart-items), so every selector here excludes it.
   The block nests chips and quantity inside the product cell; on wide
   screens the row becomes a grid and display:contents lifts them into
   their own columns. Header labels are synthesized: the block only
   ships three th cells. */
@media (min-width: 800px) {
	table.wc-block-cart-items:not(.wc-block-mini-cart-items),
	.wc-block-cart-items:not(.wc-block-mini-cart-items) thead,
	.wc-block-cart-items:not(.wc-block-mini-cart-items) tbody {
		display: block;
		width: 100%;
	}

	.wc-block-cart-items:not(.wc-block-mini-cart-items) tr.wc-block-cart-items__header,
	.wc-block-cart-items:not(.wc-block-mini-cart-items) tr.wc-block-cart-items__row {
		display: grid;
		grid-template-columns: 64px minmax(0, 1fr) 175px 135px 90px;
		column-gap: 12px;
		align-items: center;
	}

	.wc-block-cart-items:not(.wc-block-mini-cart-items) .wc-block-cart-items__header th > span {
		display: none;
	}

	.wc-block-cart-items:not(.wc-block-mini-cart-items) th.wc-block-cart-items__header-image {
		display: none;
	}

	.wc-block-cart-items:not(.wc-block-mini-cart-items) th.wc-block-cart-items__header-product,
	.wc-block-cart-items:not(.wc-block-mini-cart-items) th.wc-block-cart-items__header-total {
		display: contents;
	}

	.wc-block-cart-items:not(.wc-block-mini-cart-items) th.wc-block-cart-items__header-product::before,
	.wc-block-cart-items:not(.wc-block-mini-cart-items) th.wc-block-cart-items__header-product::after,
	.wc-block-cart-items:not(.wc-block-mini-cart-items) th.wc-block-cart-items__header-total::before,
	.wc-block-cart-items:not(.wc-block-mini-cart-items) th.wc-block-cart-items__header-total::after {
		font-size: 11px;
		font-weight: 400;
		letter-spacing: 0.08em;
		text-transform: uppercase;
		color: color-mix(in srgb, var(--wp--preset--color--contrast) 60%, transparent);
		padding: 6px 0;
	}

	.wc-block-cart-items:not(.wc-block-mini-cart-items) th.wc-block-cart-items__header-product::before {
		content: "Item";
		grid-column: 1 / 3;
		grid-row: 1;
	}

	.wc-block-cart-items:not(.wc-block-mini-cart-items) th.wc-block-cart-items__header-product::after {
		content: "Variation";
		grid-column: 3;
		grid-row: 1;
	}

	.wc-block-cart-items:not(.wc-block-mini-cart-items) th.wc-block-cart-items__header-total::before {
		content: "Qty";
		grid-column: 4;
		grid-row: 1;
		text-align: left;
	}

	.wc-block-cart-items:not(.wc-block-mini-cart-items) th.wc-block-cart-items__header-total::after {
		content: "Total";
		grid-column: 5;
		grid-row: 1;
		text-align: right;
	}

	.wc-block-cart-items:not(.wc-block-mini-cart-items) tr.wc-block-cart-items__row {
		padding: 10px 0;
	}

	.wc-block-cart-items:not(.wc-block-mini-cart-items) tr.wc-block-cart-items__row td {
		padding: 0;
		border: none !important;
	}

	.wc-block-cart-items:not(.wc-block-mini-cart-items) tr.wc-block-cart-items__header th {
		border: none !important;
	}

	.wc-block-cart-items:not(.wc-block-mini-cart-items) td.wc-block-cart-item__image {
		grid-column: 1;
		grid-row: 1;
	}

	/* Cards are the product — same 64px presence as the mini-cart
	   (Woo otherwise computes a tiny fixed width for the thumb) */
	.wc-block-cart-items:not(.wc-block-mini-cart-items) td.wc-block-cart-item__image img {
		width: 64px !important;
		max-width: none !important;
		height: auto !important;
		border-radius: 4px;
	}

	.wc-block-cart-items:not(.wc-block-mini-cart-items) td.wc-block-cart-item__product,
	.wc-block-cart-items:not(.wc-block-mini-cart-items) .wc-block-cart-item__wrap {
		/* !important: Woo's cart.css loads after the theme and re-flexes
		   the wrap */
		display: contents !important;
	}

	/* Anything unexpected in the wrap (badges, notices) files under Item */
	.wc-block-cart-items:not(.wc-block-mini-cart-items) .wc-block-cart-item__wrap > * {
		grid-column: 2;
	}

	.wc-block-cart-items:not(.wc-block-mini-cart-items) .wc-block-cart-item__wrap > .wc-block-components-product-name {
		grid-column: 2;
		grid-row: 1;
	}

	.wc-block-cart-items:not(.wc-block-mini-cart-items) .wc-block-cart-item__wrap > .wc-block-components-product-metadata {
		grid-column: 3;
		grid-row: 1;
		margin: 0;
	}

	.wc-block-cart-items:not(.wc-block-mini-cart-items) .wc-block-cart-item__wrap > .wc-block-cart-item__quantity {
		grid-column: 4;
		grid-row: 1;
	}

	/* Line total lives in the Total column; the unit price under the
	   name is noise the design doesn't carry */
	.wc-block-cart-items:not(.wc-block-mini-cart-items) .wc-block-cart-item__wrap > .wc-block-cart-item__prices {
		display: none !important;
	}

	.wc-block-cart-items:not(.wc-block-mini-cart-items) td.wc-block-cart-item__total {
		grid-column: 5;
		grid-row: 1;
		text-align: right;
	}
}

.wc-block-components-product-name {
	font-size: 14px;
	font-weight: 400;
	line-height: 1.4;
	color: var(--wp--preset--color--contrast);
	text-decoration: none;
}

.wc-block-components-product-name:hover {
	color: var(--wp--preset--color--accent);
}

/* Variation attributes as chips: hide the "Card Finish:" labels, show
   values as small neutral tags (design 2g's Variation column) */
.wc-block-components-product-details.wc-block-components-product-details {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin: 6px 0 0;
	padding: 0;
	list-style: none;
}

.wc-block-components-product-details__item {
	margin: 0;
}

/* Woo separates inline detail items with a literal " / " span; the
   chips don't need it */
.wc-block-components-product-details span[aria-hidden="true"],
.wc-block-components-product-details__item::after {
	display: none;
	content: none;
}

.wc-block-components-product-details__name {
	display: none;
}

/* Condition reads as plain text… */
.wc-block-components-product-details__value {
	font-size: 12.5px;
	color: var(--wp--preset--color--contrast);
}

/* …while the finish is a solid Nocturne neutral tag, shown first */
.wc-block-components-product-details > [class*="finish"] {
	order: -1;
}

.wc-block-components-product-details > [class*="finish"] .wc-block-components-product-details__value {
	display: inline-flex;
	align-items: center;
	padding: 3px 10px;
	font-size: 11px;
	letter-spacing: 0.02em;
	border-radius: 6px;
	background: #3f424d;
	color: #f3f5fe;
}

/* Quantity stepper: hairline bordered pill */
.wc-block-components-quantity-selector {
	border: 1px solid var(--wp--custom--divider);
	border-radius: var(--wp--custom--radius--md);
	background: transparent;
	overflow: hidden;
}

.wc-block-components-quantity-selector::after {
	display: none;
}

.wc-block-components-quantity-selector input.wc-block-components-quantity-selector__input,
.wc-block-components-quantity-selector .wc-block-components-quantity-selector__button {
	background: transparent;
	border: none;
	color: var(--wp--preset--color--contrast);
	min-height: 30px;
	font-size: 13.5px;
}

.wc-block-cart-item__quantity .wc-block-cart-item__remove-link,
.wc-block-cart-item__quantity svg {
	color: color-mix(in srgb, var(--wp--preset--color--contrast) 55%, transparent);
	fill: currentColor;
}

.wc-block-components-quantity-selector .wc-block-components-quantity-selector__button {
	opacity: 0.7;
}

.wc-block-components-quantity-selector .wc-block-components-quantity-selector__button:hover {
	opacity: 1;
	color: var(--wp--preset--color--accent);
}

.wc-block-cart-item__remove-link {
	font-size: 12px;
	color: color-mix(in srgb, var(--wp--preset--color--contrast) 55%, transparent);
	text-decoration: none;
}

.wc-block-cart-item__remove-link:hover {
	color: var(--wp--preset--color--accent);
}

.wc-block-cart-item__prices,
.wc-block-cart-item__total .wc-block-components-product-price {
	font-size: 14px;
	font-weight: 500;
	color: var(--wp--preset--color--contrast);
}

/* Order summary: a surface card with hairline ring (design's elev-sm) */
.wc-block-cart__sidebar {
	background: var(--wp--preset--color--surface);
	border-radius: var(--wp--custom--radius--md);
	box-shadow: 0 0 0 1px #3f424d;
	padding: 14px;
	height: fit-content;
}

.wc-block-cart__sidebar .wp-block-heading,
.wc-block-cart__sidebar .wc-block-components-title {
	font-size: 14px;
	font-weight: 500;
	margin: 0 0 9px;
}

/* The block's "Cart totals" heading reads "Order summary" in the design */
.wc-block-cart__totals-title {
	/* !important: Woo's later-loading cart.css restyles this heading */
	font-size: 0 !important;
	text-transform: none !important;
	letter-spacing: normal !important;
	border: none !important;
	text-align: left !important;
}

.wc-block-cart__totals-title::before {
	content: "Order summary";
	display: block;
	font-size: 14px;
	font-weight: 500;
	color: var(--wp--preset--color--contrast);
}

.wc-block-components-totals-item {
	font-size: 13px;
	padding: 3px 0;
	color: var(--wp--preset--color--contrast);
}

.wc-block-components-totals-item__label {
	color: color-mix(in srgb, var(--wp--preset--color--contrast) 65%, transparent);
	font-weight: 400;
}

/* Total row: fading rule above, 20px figure */
.wc-block-components-totals-footer-item {
	margin-top: 9px;
	padding-top: 9px;
	background:
		linear-gradient(
			to right,
			transparent,
			var(--wp--custom--divider) 14px,
			var(--wp--custom--divider) calc(100% - 14px),
			transparent
		)
		no-repeat top / 100% 1px;
}

.wc-block-components-totals-footer-item .wc-block-components-totals-item__label {
	font-size: 13px;
	font-weight: 400;
	color: var(--wp--preset--color--contrast);
}

.wc-block-components-totals-footer-item .wc-block-components-totals-item__value {
	font-size: 20px;
	font-weight: 500;
}

/* Coupon panel */
.wc-block-components-totals-coupon .wc-block-components-panel__button,
.wc-block-components-panel__button {
	color: var(--wp--preset--color--accent);
	font-size: 13px !important;
}

.wc-block-components-totals-coupon__button {
	border-color: var(--wp--custom--divider);
	color: var(--wp--preset--color--contrast);
}

/* Woo's floating-label text inputs (coupon, checkout fields) ship a
   white ground from later-loading block CSS; pin them to the search
   box's scheme: surface, hairline border, contrast text, accent focus. */
.wc-block-components-text-input input[type="text"],
.wc-block-components-text-input input[type="email"],
.wc-block-components-text-input input[type="tel"],
.wc-block-components-text-input input[type="url"],
.wc-block-components-text-input input[type="number"],
.wc-block-components-text-input input[type="password"] {
	background: var(--wp--preset--color--surface) !important;
	border: 1px solid var(--wp--custom--divider) !important;
	border-radius: var(--wp--custom--radius--md);
	color: var(--wp--preset--color--contrast) !important;
	caret-color: var(--wp--preset--color--accent);
}

.wc-block-components-text-input input:focus,
.wc-block-components-text-input input:focus-visible {
	background: var(--wp--preset--color--surface) !important;
	border-color: var(--wp--preset--color--accent) !important;
	box-shadow: none !important;
	outline: none;
}

.wc-block-components-text-input label {
	color: color-mix(in srgb, var(--wp--preset--color--contrast) 55%, transparent) !important;
}

/* Legacy shared rules kept for checkout panels */
.wc-block-components-sidebar .wc-block-components-panel,
.wc-block-components-order-summary,
.wc-block-components-totals-wrapper,
.wc-block-cart__sidebar .wp-block-woocommerce-cart-order-summary-block {
	background: var(--wp--preset--color--surface);
	border-radius: var(--wp--custom--radius--md);
}

.wc-block-components-radio-control__option {
	border-radius: var(--wp--custom--radius--md);
}

/* Woo blocks ship light-theme text colors in places; pin them */
.wc-block-components-product-name,
.wc-block-components-totals-item,
.wc-block-components-formatted-money-amount,
.wc-block-cart-items__row,
.wc-block-components-checkout-step__title,
.wc-block-components-title {
	color: var(--wp--preset--color--contrast);
}

/* Product details tabs: dark, gold-underlined active tab */
.wc-tabs-wrapper .wc-tabs,
.woocommerce-tabs ul.tabs {
	display: flex;
	gap: 0;
	margin: 0 0 16px;
	padding: 0;
	list-style: none;
	border-bottom: 1px solid var(--wp--custom--divider);
}

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

.woocommerce-tabs ul.tabs li::before,
.woocommerce-tabs ul.tabs li::after,
.woocommerce div.product .woocommerce-tabs ul.tabs li::before,
.woocommerce div.product .woocommerce-tabs ul.tabs li::after,
.woocommerce div.product .woocommerce-tabs ul.tabs::before {
	display: none;
}

.woocommerce-tabs ul.tabs li a,
.woocommerce div.product .woocommerce-tabs ul.tabs li a {
	display: inline-block;
	padding: 8px 16px;
	font-size: 13.5px;
	font-weight: 400;
	color: color-mix(in srgb, var(--wp--preset--color--contrast) 60%, transparent);
	text-decoration: none;
}

.woocommerce-tabs ul.tabs li.active,
.woocommerce div.product .woocommerce-tabs ul.tabs li.active {
	background: transparent;
}

.woocommerce-tabs ul.tabs li.active a,
.woocommerce div.product .woocommerce-tabs ul.tabs li.active a {
	background: transparent;
	color: var(--wp--preset--color--gold);
	box-shadow: inset 0 -2px 0 var(--wp--preset--color--gold);
}

.woocommerce-tabs .panel h2 {
	font-size: 20px;
}

.woocommerce table.shop_attributes {
	border: none;
	font-size: 13.5px;
}

.woocommerce table.shop_attributes th,
.woocommerce table.shop_attributes td {
	border: none;
	background: transparent;
	padding: 6px 12px 6px 0;
	color: var(--wp--preset--color--contrast);
}

.woocommerce table.shop_attributes th {
	color: color-mix(in srgb, var(--wp--preset--color--contrast) 55%, transparent);
	font-weight: 400;
}

/* ═══════════════════════════════════════════════════════════════════════
   Checkout (2h) — numbered gold sections, accent delivery rows, the
   order-review card. Shares totals/input styling with the cart.
   ═══════════════════════════════════════════════════════════════════ */

/* Step titles become the design's numbered gold uppercase labels */
.wc-block-checkout__form {
	counter-reset: sq-step;
}

.wc-block-components-checkout-step {
	counter-increment: sq-step;
}

.wc-block-components-checkout-step__title {
	font-size: 10px !important;
	font-weight: 500 !important;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--wp--preset--color--gold) !important;
}

.wc-block-components-checkout-step__title::before {
	content: counter(sq-step) " · ";
}

/* Delivery / payment options: rounded rows, accent ring when selected.
   Woo positions the radio input absolutely in a left gutter — keep it. */
.wc-block-components-radio-control__option {
	padding: 10px 12px 10px 46px !important;
	border: none !important;
	border-radius: var(--wp--custom--radius--md);
	box-shadow: inset 0 0 0 1px var(--wp--custom--divider);
	margin-bottom: 8px;
	font-size: 14px;
	color: var(--wp--preset--color--contrast);
}

.wc-block-components-radio-control__option-checked,
.wc-block-components-radio-control__option--checked-option-highlighted {
	box-shadow: inset 0 0 0 1px var(--wp--preset--color--accent) !important;
	background: color-mix(in srgb, var(--wp--preset--color--accent) 10%, transparent);
}

.wc-block-components-radio-control__input {
	border: 1.5px solid var(--wp--custom--divider) !important;
	background: transparent !important;
	width: 16px !important;
	height: 16px !important;
	left: 16px !important;
	top: 50% !important;
	transform: translateY(-50%);
	margin: 0 !important;
}

.wc-block-components-radio-control__input:checked {
	border-color: var(--wp--preset--color--accent) !important;
	background: var(--wp--preset--color--accent) !important;
	box-shadow: inset 0 0 0 3px var(--wp--preset--color--base);
}

.wc-block-components-radio-control__input:checked::before {
	display: none;
}

.wc-block-components-radio-control__secondary-label {
	font-size: 13px;
	font-weight: 400;
	text-transform: none;
	color: color-mix(in srgb, var(--wp--preset--color--contrast) 70%, transparent);
}

/* Checkboxes (billing toggle, order notes, terms) */
.wc-block-components-checkbox .wc-block-components-checkbox__input[type="checkbox"] {
	border: 1.5px solid var(--wp--custom--divider);
	background: transparent;
	border-radius: 4px;
}

.wc-block-components-checkbox .wc-block-components-checkbox__input[type="checkbox"]:checked {
	border-color: var(--wp--preset--color--accent);
	background: var(--wp--preset--color--accent);
}

.wc-block-components-checkbox .wc-block-components-checkbox__mark {
	fill: var(--wp--preset--color--base);
}

/* Sidebar: the design's order-review surface card */
.wc-block-checkout__sidebar {
	background: var(--wp--preset--color--surface);
	border: none !important;
	border-radius: var(--wp--custom--radius--md) !important;
	box-shadow: 0 0 0 1px #3f424d;
	padding: 14px;
}

/* The block's "Order summary" heading reads "Order review" in the design */
.wc-block-components-checkout-order-summary__title-text {
	font-size: 0 !important;
	margin: 0;
}

.wc-block-components-checkout-order-summary__title-text::before {
	content: "Order review";
	display: block;
	font-size: 14px;
	font-weight: 500;
	color: var(--wp--preset--color--contrast);
}

/* Country / state selects: same surface scheme as the text inputs */
.wc-blocks-components-select__container {
	background: var(--wp--preset--color--surface) !important;
	border: 1px solid var(--wp--custom--divider) !important;
	border-radius: var(--wp--custom--radius--md) !important;
}

.wc-blocks-components-select__select {
	background: transparent !important;
	color: var(--wp--preset--color--contrast) !important;
}

.wc-blocks-components-select__label {
	color: color-mix(in srgb, var(--wp--preset--color--contrast) 55%, transparent) !important;
}

.wc-blocks-components-select__expander {
	fill: var(--wp--preset--color--contrast);
}

.wc-block-checkout__sidebar .wc-block-components-order-summary-item {
	font-size: 12.5px;
	color: var(--wp--preset--color--contrast);
}

.wc-block-checkout__sidebar .wc-block-components-order-summary-item__image img {
	border-radius: 3px;
}

.wc-block-checkout__sidebar .wc-block-components-order-summary-item__quantity {
	display: grid;
	place-items: center;
	background: var(--wp--preset--color--base);
	border: 1px solid var(--wp--custom--divider);
	color: var(--wp--preset--color--contrast) !important;
	box-shadow: none;
	min-width: 20px;
	height: 20px;
	padding: 0 4px;
	font-size: 11px;
	line-height: 1;
	z-index: 2;
}

.wc-block-checkout__sidebar .wc-block-components-order-summary-item__quantity span[aria-hidden] {
	font-size: 11px;
	color: var(--wp--preset--color--contrast);
}

.wc-block-checkout__sidebar .wc-block-components-order-summary-item__individual-prices {
	display: none;
}

/* Place order: accent outline, full width */
.wc-block-components-checkout-place-order-button {
	width: 100%;
	background: transparent !important;
	border: 1px solid var(--wp--preset--color--accent) !important;
	border-radius: var(--wp--custom--radius--md) !important;
	color: var(--wp--preset--color--accent) !important;
	font-weight: 500;
}

.wc-block-components-checkout-place-order-button:hover {
	background: color-mix(in srgb, var(--wp--preset--color--accent) 12%, transparent) !important;
}

.wc-block-checkout__actions_row {
	justify-content: flex-end;
}

/* ═══════════════════════════════════════════════════════════════════════
   Mini-cart drawer
   Same item classes as the cart page but its own compact layout: dark
   ground, large card thumbnails, full − qty + stepper.
   ═══════════════════════════════════════════════════════════════════ */

.wc-block-mini-cart__drawer,
.wc-block-mini-cart__drawer .wc-block-components-drawer__content {
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--contrast);
}

.wc-block-mini-cart__drawer {
	border-left: 1px solid var(--wp--custom--divider);
}

.wc-block-mini-cart__drawer .wc-block-components-drawer__close {
	color: color-mix(in srgb, var(--wp--preset--color--contrast) 60%, transparent);
}

.wc-block-mini-cart__title,
.wc-block-mini-cart__title span {
	font-size: 18px !important;
	font-weight: 500;
}

/* Cards are the product — give the scans real presence */
.wc-block-mini-cart-items td.wc-block-cart-item__image img {
	width: 64px !important;
	max-width: none !important;
	height: auto !important;
	border-radius: 4px;
}

.wc-block-mini-cart-items td {
	border: none !important;
	vertical-align: top;
}

.wc-block-mini-cart-items tr.wc-block-cart-items__row {
	background:
		linear-gradient(
			to right,
			transparent,
			color-mix(in srgb, var(--wp--preset--color--contrast) 8%, transparent) 20px,
			color-mix(in srgb, var(--wp--preset--color--contrast) 8%, transparent) calc(100% - 20px),
			transparent
		)
		no-repeat bottom / 100% 1px;
}

/* The full stepper must always read: − value + */
.wc-block-mini-cart-items .wc-block-components-quantity-selector {
	display: inline-flex;
	align-items: stretch;
	width: auto;
	min-width: 96px;
}

.wc-block-mini-cart-items .wc-block-components-quantity-selector .wc-block-components-quantity-selector__button {
	flex: none;
	width: 28px;
	min-width: 28px;
	padding: 0;
}

.wc-block-mini-cart-items .wc-block-components-quantity-selector input.wc-block-components-quantity-selector__input {
	flex: 1 1 auto;
	width: 36px;
	min-width: 36px;
	text-align: center;
	padding: 0;
}

/* Footer: subtotal row + Nocturne buttons */
.wc-block-mini-cart__footer {
	background: var(--wp--preset--color--base);
	border-top: 1px solid var(--wp--custom--divider);
}

.wc-block-mini-cart__footer .wc-block-components-totals-item__label {
	font-size: 13px;
	color: color-mix(in srgb, var(--wp--preset--color--contrast) 65%, transparent);
}

.wc-block-mini-cart__footer .wc-block-components-totals-item__value {
	font-size: 20px;
	font-weight: 500;
	color: var(--wp--preset--color--contrast);
}

.wc-block-mini-cart__footer .wc-block-components-totals-item__description {
	font-size: 11.5px;
	color: color-mix(in srgb, var(--wp--preset--color--contrast) 50%, transparent);
}

.wc-block-mini-cart__footer .wc-block-components-button {
	background: transparent;
	border: 1px solid var(--wp--custom--divider);
	border-radius: var(--wp--custom--radius--md);
	color: var(--wp--preset--color--contrast);
	font-size: 14px;
	font-weight: 500;
}

.wc-block-mini-cart__footer .wc-block-mini-cart__footer-checkout {
	border-color: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--accent);
}

.wc-block-mini-cart__footer .wc-block-components-button:hover {
	background: color-mix(in srgb, var(--wp--preset--color--contrast) 7%, transparent);
	color: var(--wp--preset--color--contrast);
}

.wc-block-mini-cart__footer .wc-block-mini-cart__footer-checkout:hover {
	background: color-mix(in srgb, var(--wp--preset--color--accent) 12%, transparent);
	color: var(--wp--preset--color--accent);
}

/* ═══════════════════════════════════════════════════════════════════════
   Account tables, misc.
   ═══════════════════════════════════════════════════════════════════ */

.woocommerce-orders-table,
.wp-block-table table {
	border-collapse: collapse;
	font-size: 14px;
	width: 100%;
}

.woocommerce-orders-table th,
.wp-block-table th {
	text-align: left;
	font-size: 11px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: color-mix(in srgb, var(--wp--preset--color--contrast) 60%, transparent);
	border-bottom: 1px solid var(--wp--custom--divider);
	padding: 6px;
}

.woocommerce-orders-table td,
.wp-block-table td {
	border-bottom: 1px solid color-mix(in srgb, var(--wp--preset--color--contrast) 8%, transparent);
	padding: 6px;
}

.sq-footer {
	border-top: 1px solid var(--wp--custom--divider);
	font-size: 12px;
	color: color-mix(in srgb, var(--wp--preset--color--contrast) 50%, transparent);
}

.sq-muted {
	color: color-mix(in srgb, var(--wp--preset--color--contrast) 55%, transparent);
}
