/*
 * Subud Books — supplementary stylesheet.
 *
 * Bespoke layer ONLY. Everything expressible as a design token lives in
 * theme.json; this file holds presentation the block system cannot yet describe
 * declaratively: cover-led product cards, the WooCommerce archive grid, refined
 * hover/focus states, header/footer detailing, and accessibility hardening.
 * All values reference theme.json CSS custom properties so the token system
 * stays the single source of truth.
 */

:root {
	--sb-cover-radius: 2px;
	--sb-ease: cubic-bezier(0.2, 0.6, 0.2, 1);
}

/* ---------------------------------------------------------------------------
 * Global rhythm + accessibility
 * ------------------------------------------------------------------------- */

html {
	-webkit-text-size-adjust: 100%;
	text-rendering: optimizeLegibility;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

body {
	font-feature-settings: "kern" 1, "liga" 1, "calt" 1;
	overflow-x: hidden; /* contain the off-canvas WooCommerce mini-cart drawer */
}

/* Visible, generous focus ring for keyboard users (WCAG 2.2). */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: 2px solid var(--wp--preset--color--primary-deep);
	outline-offset: 3px;
	border-radius: 2px;
}

/* Skip link */
.skip-link.screen-reader-text {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 100000;
	background: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--paper);
	padding: 0.75rem 1.25rem;
	font-family: var(--wp--preset--font-family--sans);
	font-size: var(--wp--preset--font-size--small);
}
.skip-link.screen-reader-text:focus {
	left: 1rem;
	top: 1rem;
}

::selection {
	background: var(--wp--preset--color--primary-soft);
	color: var(--wp--preset--color--ink);
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
	}
}

/* ---------------------------------------------------------------------------
 * Header
 * ------------------------------------------------------------------------- */

.sb-header {
	border-bottom: 1px solid var(--wp--preset--color--stone-line);
}

/* SPI logo mark, top-left beside the wordmark */
.sb-brand {
	align-items: center;
}
.sb-logo {
	display: inline-flex;
	align-items: center;
	line-height: 0;
	flex: 0 0 auto;
}
.sb-logo img {
	display: block;
	height: 2.75rem;       /* ~44px, aligns with the two-line wordmark */
	width: auto;
	max-width: none;
}
@media (max-width: 600px) {
	.sb-logo img { height: 2.25rem; }
	.sb-brand { gap: 0.625rem !important; }
}

.sb-header .wp-block-site-title a {
	transition: color 0.2s var(--sb-ease);
}

/* The small eyebrow under the wordmark */
.sb-wordmark-sub {
	font-family: var(--wp--preset--font-family--sans);
	font-size: 0.6875rem;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: var(--wp--preset--color--muted);
	line-height: 1;
	margin-top: 0.35rem;
}

/* Navigation underline-on-hover, no chrome */
.sb-header .wp-block-navigation-item__content {
	position: relative;
	padding-bottom: 2px;
}
.sb-header .wp-block-navigation-item__content::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: -2px;
	height: 1px;
	background: var(--wp--preset--color--primary);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform 0.25s var(--sb-ease);
}
.sb-header .wp-block-navigation-item:hover .wp-block-navigation-item__content::after,
.sb-header .current-menu-item .wp-block-navigation-item__content::after {
	transform: scaleX(1);
}

/* "Members" gets a quiet key on it */
.sb-nav-members .wp-block-navigation-item__label::after {
	content: "›";
	margin-left: 0.3rem;
	color: var(--wp--preset--color--primary);
}

/* Cart icon link — accessible name supplied in markup */
.sb-cart-link {
	font-family: var(--wp--preset--font-family--sans);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 500;
	text-decoration: none;
	color: var(--wp--preset--color--ink);
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	min-height: 24px;
	padding: 0.35rem 0.2rem;
	transition: color 0.2s var(--sb-ease);
}
.sb-cart-link:hover { color: var(--wp--preset--color--primary); }
.sb-cart-link .wp-block-woocommerce-mini-cart__button { all: unset; cursor: pointer; }

/* ---------------------------------------------------------------------------
 * Sectioning + eyebrow labels
 * ------------------------------------------------------------------------- */

.sb-eyebrow {
	font-family: var(--wp--preset--font-family--sans);
	font-size: var(--wp--preset--font-size--caption);
	font-weight: 600;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--wp--preset--color--primary);
}

.sb-rule {
	height: 1px;
	background: var(--wp--preset--color--stone-line);
	border: 0;
	width: 100%;
}

.sb-section-paper { background: var(--wp--preset--color--paper); }
.sb-section-surface { background: var(--wp--preset--color--surface); }

/* ---------------------------------------------------------------------------
 * COVER ART AS HERO — the product card
 * Applies to WooCommerce archive grids and the All-Products / Products blocks.
 * ------------------------------------------------------------------------- */

/* Force-override WooCommerce's .columns-N float layout with a real grid.
 * Woo applies width:30.75% + float to li.product; we reset that and grid the ul. */
ul.products,
.wc-block-grid__products,
.wp-block-woocommerce-product-template {
	list-style: none;
	margin: 0 !important;
	padding: 0;
	display: grid;
	gap: clamp(2.25rem, 4vw, 3.5rem) clamp(1.5rem, 2.5vw, 2.25rem);
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 640px) {
	ul.products,
	.wc-block-grid__products,
	.wp-block-woocommerce-product-template {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}
@media (min-width: 1000px) {
	ul.products,
	.wc-block-grid__products,
	.wp-block-woocommerce-product-template {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

/* The empty-cart "New in store" cross-sell row renders the legacy
 * .wc-block-grid__products inside a centred wrapper. Use auto-fit so cards keep
 * a usable minimum width and the button label never stacks vertically. */
.wc-block-grid__products,
.cross-sells ul.products,
.wp-block-woocommerce-cart ul.products,
.woocommerce-cart ul.products {
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}
/* Belt-and-braces: the block-grid add-to-cart button must keep its label on
 * one readable line, never collapse to per-character vertical text. */
.wc-block-grid__product .wp-block-button__link,
.wc-block-grid__product-add-to-cart a {
	display: inline-block !important;
	width: auto !important;
	min-width: max-content;
	white-space: nowrap !important;
	word-break: normal !important;
}
.wc-block-grid__product { min-width: 0; text-align: left; }
/* Block-grid covers: show the whole small cover inside the calm mat, not a
 * cropped corner. These thumbnails don't fill the 3:4 frame, so relax it. */
.wc-block-grid__product .wc-block-grid__product-link,
.wc-block-grid__product-image {
	display: block;
	aspect-ratio: auto;
	padding: 0.75rem;
}
.wc-block-grid__product-image img {
	width: 100%;
	height: auto;
	max-height: none;
	object-fit: contain;
}

/* Individual card: strip Woo float chrome, lead with the cover.
 * EQUAL-HEIGHT CARDS — every li is a full-height flex column so the
 * add-to-cart button can be pinned to the bottom and align across the row. */
ul.products li.product,
.wc-block-grid__product,
.wp-block-woocommerce-product-template li,
.wp-block-post {
	list-style: none;
	width: auto !important;
	float: none !important;
	clear: none !important;
	margin: 0 !important;
	padding: 0;
	text-align: left;
	position: relative;
	display: flex;
	flex-direction: column;
	height: 100%;   /* fill the grid row so siblings match height */
}

ul.products li.product::before,
ul.products li.product::after { content: none !important; display: none; }

/* The cover LINK wraps the image (and, in the classic loop, the title+price).
 * Keep it a simple block so the text flows normally underneath the framed mat. */
li.product > a.woocommerce-LoopProduct-link,
li.product > a:first-child {
	display: block;
	text-decoration: none;
	color: inherit;
}

/* CONSISTENT COVER MAT — a fixed 3:4 frame on the IMAGE itself, object-fit
 * contain, so NO cover is ever cropped top/bottom and every card matches.
 * The mat is a calm neutral field; portrait, square and landscape covers all
 * sit centred inside the same frame. */
li.product .wp-post-image,
li.product img.attachment-woocommerce_thumbnail,
.wc-block-grid__product-image img,
.wp-block-post .wp-block-post-featured-image img {
	display: block;
	width: 100%;
	aspect-ratio: 3 / 4;
	height: auto;
	object-fit: contain;
	background: linear-gradient(180deg, #FBFAF7 0%, #EFE9DF 100%);
	border: 1px solid var(--wp--preset--color--stone-line);
	border-radius: 3px;
	padding: clamp(0.9rem, 2.2vw, 1.6rem);
	box-sizing: border-box;
	box-shadow: var(--wp--preset--shadow--cover);
	margin-bottom: 1.1rem;
	transition: transform 0.4s var(--sb-ease), box-shadow 0.4s var(--sb-ease);
}

/* gentle lift on hover */
li.product:hover .wp-post-image,
.wp-block-post:hover .wp-block-post-featured-image img {
	transform: translateY(-4px);
	box-shadow: var(--wp--preset--shadow--cover-hover);
}

/* Title — serif, quiet. Flex to fill the gap so prices/buttons align. */
li.product .woocommerce-loop-product__title,
.wc-block-grid__product-title,
.wp-block-post .wp-block-post-title {
	font-family: var(--wp--preset--font-family--serif) !important;
	font-size: 1.0625rem !important;
	font-weight: 440;
	line-height: 1.3;
	letter-spacing: -0.005em;
	color: var(--wp--preset--color--ink);
	margin: 0 0 0.35rem;
	padding: 0;
}
li.product .woocommerce-loop-product__title a,
.wp-block-post .wp-block-post-title a {
	text-decoration: none;
	color: inherit;
}
li.product:hover .woocommerce-loop-product__title { color: var(--wp--preset--color--primary-deep); }

/* Price — sans, restrained. Pin the price to the bottom of the cover-link's
 * flowing text so the button below it sits at a consistent baseline. */
li.product .price,
.wc-block-grid__product-price,
.wp-block-post .wp-block-woocommerce-product-price {
	font-family: var(--wp--preset--font-family--sans) !important;
	font-size: var(--wp--preset--font-size--small) !important;
	font-weight: 500;
	color: var(--wp--preset--color--muted);
	margin: 0.15rem 0 0.9rem;
}

/* The cover link holds img + title + price; let it grow so the sibling button
 * is pushed to the bottom of the card (equal-height alignment across the row). */
li.product > a.woocommerce-LoopProduct-link { flex: 1 1 auto; }
/* Pin the add-to-cart button to the bottom of every card. */
li.product > .button,
li.product > .added_to_cart { margin-top: auto; align-self: flex-start; }
li.product .price ins { text-decoration: none; color: var(--wp--preset--color--ink); }
li.product .price del { color: var(--wp--preset--color--muted); opacity: 0.7; margin-right: 0.4rem; }

/* Add to cart on the card — a quiet ghost button, not a loud buy bar.
 * white-space:normal + nowrap-safe width so the label never stacks vertically
 * in narrow cross-sell columns (empty-cart "New in store"). */
li.product .button,
li.product .added_to_cart,
.wp-block-post .wp-block-button__link {
	display: inline-block;
	width: auto;
	max-width: 100%;
	white-space: normal;
	text-align: center;
	font-family: var(--wp--preset--font-family--sans) !important;
	font-size: var(--wp--preset--font-size--caption) !important;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--wp--preset--color--primary-deep) !important;
	background: transparent !important;
	border: 1px solid var(--wp--preset--color--stone-line) !important;
	border-radius: 2px;
	padding: 0.55rem 1rem !important;
	min-height: 24px;
	text-decoration: none;
	transition: all 0.2s var(--sb-ease);
}
li.product .button:hover,
.wp-block-post .wp-block-button__link:hover {
	background: var(--wp--preset--color--primary-deep) !important;
	color: var(--wp--preset--color--ink-invert) !important;
	border-color: var(--wp--preset--color--primary-deep) !important;
}
li.product .added_to_cart { margin-left: 0.5rem; }

/* Placeholder (no cover) — a tasteful branded mat, NOT a faint/empty square.
 * We hide WooCommerce's grey placeholder pixels but keep the framed mat, then
 * lay a quiet "SPI" wordmark over it via the cover link, so no-cover products
 * (audio/video/CD/talk items) read as intentional rather than empty/indented.
 * This is what fixed the "empty first slot" on desktop: the first product had
 * no cover and the old faint placeholder made the whole card look blank. */
li.product img[src*="woocommerce-placeholder"],
li.product img[src*="placeholder"] {
	/* keep the 3:4 mat (frame/background/padding from the cover rule above)
	   but blank the grey camera glyph */
	object-fit: contain;
	color: transparent;
	text-indent: -9999px;
}
li.product > a.woocommerce-LoopProduct-link {
	position: relative;
}
/* Branded glyph only when the card is using the placeholder image. */
li.product.sb-no-cover > a.woocommerce-LoopProduct-link::before {
	content: "SPI";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	/* sit over the 3:4 mat region only (matches the image area, not the text) */
	aspect-ratio: 3 / 4;
	display: flex;
	align-items: center;
	justify-content: center;
	font-family: var(--wp--preset--font-family--sans);
	font-weight: 700;
	font-size: clamp(1.5rem, 4vw, 2.25rem);
	letter-spacing: 0.18em;
	color: var(--wp--preset--color--primary-soft);
	opacity: 0.55;
	pointer-events: none;
}

/* Sale flash — turned into a small quiet caption, not a loud ribbon */
.onsale {
	position: absolute;
	top: 0.6rem;
	left: 0.6rem;
	background: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--ink);
	font-family: var(--wp--preset--font-family--sans);
	font-size: 0.6875rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	padding: 0.25rem 0.55rem;
	border-radius: 2px;
	min-height: 0;
	min-width: 0;
	line-height: 1.2;
}

/* ---------------------------------------------------------------------------
 * Archive header — collection intro, not an algorithmic feed
 * ------------------------------------------------------------------------- */

/* Our block template supplies the centred .sb-archive-intro. WooCommerce's
 * legacy template ALSO prints its own page title; suppress it so we never get
 * a duplicate "Shop" heading under our intro. */
.woocommerce-products-header {
	display: none !important;
}
.post-type-archive-product .woocommerce-breadcrumb,
.tax-product_cat .woocommerce-breadcrumb {
	display: none;
}
.sb-archive-intro {
	max-width: 720px;
	margin: 0 auto;
}
.term-description {
	font-size: var(--wp--preset--font-size--lead);
	line-height: 1.55;
	color: var(--wp--preset--color--muted);
	max-width: 60ch;
	margin: 1rem auto 0;
	text-align: center;
}

/* Result count + ordering — quiet utility row */
.woocommerce-result-count,
.woocommerce-ordering select {
	font-family: var(--wp--preset--font-family--sans);
	font-size: var(--wp--preset--font-size--caption);
	color: var(--wp--preset--color--muted);
}
.woocommerce-ordering select {
	border: 1px solid var(--wp--preset--color--stone-line);
	background: var(--wp--preset--color--surface);
	padding: 0.5rem 0.75rem;
	border-radius: 2px;
	min-height: 36px;
}

/* ---------------------------------------------------------------------------
 * SINGLE PRODUCT — large cover, serif title, dignified add-to-cart
 * ------------------------------------------------------------------------- */

.single-product div.product {
	display: grid;
	grid-template-columns: 1fr;
	gap: clamp(2rem, 5vw, 4rem);
	align-items: start;
}
@media (min-width: 900px) {
	.single-product div.product {
		grid-template-columns: minmax(0, 0.85fr) minmax(0, 1fr);
	}
}

/* Override WooCommerce's floated gallery so it sits cleanly in the grid cell
 * and never pushes the summary off the page. */
.single-product div.product .woocommerce-product-gallery {
	float: none !important;
	width: 100% !important;
	max-width: 100% !important;
	margin: 0 !important;
	padding: clamp(1.5rem, 3vw, 2.5rem);
	background: linear-gradient(180deg, #FBFAF7 0%, #EFE9DF 100%);
	border: 1px solid var(--wp--preset--color--stone-line);
	border-radius: 4px;
	box-sizing: border-box;
}
.single-product div.product .woocommerce-product-gallery__wrapper {
	margin: 0;
	transform: none !important;
	width: 100% !important;
}
/* Tame the zoom magnifier so it doesn't crowd the cover corner */
.single-product .woocommerce-product-gallery__trigger {
	top: 1rem;
	right: 1rem;
	opacity: 0.7;
}
.single-product .woocommerce-product-gallery img {
	border-radius: var(--sb-cover-radius);
	box-shadow: var(--wp--preset--shadow--cover);
}

.single-product div.product .summary {
	float: none !important;
	width: 100% !important;
	margin: 0;
}

.single-product .product_title {
	font-family: var(--wp--preset--font-family--serif);
	font-size: var(--wp--preset--font-size--headline);
	font-weight: 400;
	line-height: 1.1;
	letter-spacing: -0.012em;
	color: var(--wp--preset--color--ink);
	margin: 0 0 1rem;
	overflow-wrap: break-word;
	hyphens: auto;
}

/* Mobile containment: keep the framed gallery and all product chrome inside
 * the viewport. WooCommerce sets an inline px width on the gallery + wrapper
 * (flexslider) that overflows a narrow column, so we clamp hard. */
@media (max-width: 899px) {
	.single-product div.product {
		grid-template-columns: minmax(0, 1fr);
		width: 100%;
		max-width: 100%;
	}
	.single-product div.product > * {
		min-width: 0;
		max-width: 100%;
		box-sizing: border-box;
	}
	.single-product div.product .woocommerce-product-gallery,
	.single-product div.product .woocommerce-product-gallery__wrapper,
	.single-product div.product .woocommerce-product-gallery__image,
	.single-product div.product .woocommerce-product-gallery__image a,
	.single-product div.product .woocommerce-product-gallery img,
	.single-product div.product .summary {
		width: 100% !important;
		max-width: 100% !important;
		box-sizing: border-box;
	}
	.single-product form.cart { gap: 0.5rem; }
}

.single-product .summary .price {
	font-family: var(--wp--preset--font-family--sans);
	font-size: var(--wp--preset--font-size--title);
	font-weight: 400;
	color: var(--wp--preset--color--ink);
	margin: 0 0 1.5rem;
}
.single-product .summary .price del { color: var(--wp--preset--color--muted); opacity: 0.6; margin-right: 0.6rem; }
.single-product .summary .price ins { text-decoration: none; }

.single-product .woocommerce-product-details__short-description {
	font-size: var(--wp--preset--font-size--lead);
	line-height: 1.6;
	color: var(--wp--preset--color--ink);
	max-width: 60ch;
	margin-bottom: 1.75rem;
}

/* The add-to-cart cluster */
.single-product form.cart {
	display: flex;
	align-items: stretch;
	gap: 0.75rem;
	margin: 1.5rem 0 2rem;
	flex-wrap: wrap;
}
.single-product form.cart .quantity input.qty {
	width: 4rem;
	height: 100%;
	min-height: 48px;
	border: 1px solid var(--wp--preset--color--stone-line);
	border-radius: 3px;
	background: var(--wp--preset--color--surface);
	font-family: var(--wp--preset--font-family--sans);
	font-size: var(--wp--preset--font-size--body);
	text-align: center;
	color: var(--wp--preset--color--ink);
}
.single-product form.cart button.single_add_to_cart_button {
	font-family: var(--wp--preset--font-family--sans);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	letter-spacing: 0.03em;
	color: var(--wp--preset--color--ink-invert);
	background: var(--wp--preset--color--primary-deep);
	border: 1px solid var(--wp--preset--color--primary-deep);
	border-radius: 3px;
	padding: 0 2.25rem;
	min-height: 48px;
	cursor: pointer;
	transition: background 0.2s var(--sb-ease);
}
.single-product form.cart button.single_add_to_cart_button:hover {
	background: var(--wp--preset--color--primary);
	border-color: var(--wp--preset--color--primary);
}

/* Product meta — quiet, editorial */
.single-product .product_meta {
	font-family: var(--wp--preset--font-family--sans);
	font-size: var(--wp--preset--font-size--caption);
	color: var(--wp--preset--color--muted);
	border-top: 1px solid var(--wp--preset--color--stone-line);
	padding-top: 1.25rem;
	margin-top: 1.5rem;
	line-height: 1.9;
}
.single-product .product_meta > span { display: block; }
.single-product .product_meta a { color: var(--wp--preset--color--primary-deep); }

/* Tabs — flatten the default Woo tab chrome into a clean editorial block */
.single-product .woocommerce-tabs {
	grid-column: 1 / -1;
	margin-top: clamp(2.5rem, 5vw, 4rem);
	border-top: 1px solid var(--wp--preset--color--stone-line);
	padding-top: 2rem;
}
.single-product .woocommerce-tabs ul.tabs {
	list-style: none;
	margin: 0 0 1.5rem;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 1rem 1.75rem;
	border: 0;
}
.single-product .woocommerce-tabs ul.tabs::before { display: none; }
.single-product .woocommerce-tabs ul.tabs li {
	background: transparent;
	border: 0;
	border-radius: 0;
	padding: 0;
	margin: 0;
}
.single-product .woocommerce-tabs ul.tabs li::before,
.single-product .woocommerce-tabs ul.tabs li::after { display: none; }
.single-product .woocommerce-tabs ul.tabs li a {
	font-family: var(--wp--preset--font-family--sans);
	font-size: var(--wp--preset--font-size--caption);
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--wp--preset--color--muted);
	padding: 0 0 0.5rem;
	border-bottom: 2px solid transparent;
}
.single-product .woocommerce-tabs ul.tabs li.active a {
	color: var(--wp--preset--color--ink);
	border-bottom-color: var(--wp--preset--color--primary);
}
.single-product .woocommerce-tabs .panel h2 {
	font-family: var(--wp--preset--font-family--serif);
	font-size: var(--wp--preset--font-size--subtitle);
	font-weight: 420;
}
.single-product .woocommerce-tabs .panel,
.single-product .woocommerce-Tabs-panel {
	font-size: var(--wp--preset--font-size--body);
	line-height: 1.7;
	color: var(--wp--preset--color--ink);
	max-width: 66ch;
}

/* Related products heading */
.related.products > h2,
.up-sells > h2 {
	grid-column: 1 / -1;
	font-family: var(--wp--preset--font-family--serif);
	font-size: var(--wp--preset--font-size--title);
	font-weight: 400;
	margin: clamp(3rem, 6vw, 5rem) 0 2rem;
}
.related.products,
.up-sells {
	grid-column: 1 / -1;
}

/* ---------------------------------------------------------------------------
 * Cart + Checkout — same dignity as the front
 * ------------------------------------------------------------------------- */

.woocommerce-cart table.cart,
.woocommerce-checkout .woocommerce {
	font-family: var(--wp--preset--font-family--sans);
}
.woocommerce table.shop_table {
	border: 1px solid var(--wp--preset--color--stone-line);
	border-radius: 4px;
	border-collapse: separate;
}
.woocommerce table.shop_table th {
	font-family: var(--wp--preset--font-family--sans);
	font-size: var(--wp--preset--font-size--caption);
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--wp--preset--color--muted);
}
.woocommerce .cart_totals h2,
.woocommerce-checkout h3 {
	font-family: var(--wp--preset--font-family--serif);
	font-weight: 420;
}
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce-checkout select,
.select2-container .select2-selection {
	border: 1px solid var(--wp--preset--color--stone-line) !important;
	border-radius: 3px !important;
	min-height: 44px;
	padding: 0.6rem 0.75rem;
	font-family: var(--wp--preset--font-family--sans);
	background: var(--wp--preset--color--surface);
}
.woocommerce #respond input#submit,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce .checkout-button {
	font-family: var(--wp--preset--font-family--sans);
	font-weight: 600;
	letter-spacing: 0.02em;
	background: var(--wp--preset--color--primary-deep);
	color: var(--wp--preset--color--ink-invert);
	border: 1px solid var(--wp--preset--color--primary-deep);
	border-radius: 3px;
	padding: 0.85rem 1.75rem;
	min-height: 44px;
}
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce .checkout-button:hover {
	background: var(--wp--preset--color--primary);
	border-color: var(--wp--preset--color--primary);
}
.woocommerce a.button.alt,
.woocommerce button.button.alt { background: var(--wp--preset--color--primary-deep); }

.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
	border-top-color: var(--wp--preset--color--primary) !important;
	font-family: var(--wp--preset--font-family--sans);
	border-radius: 3px;
}

/* Breadcrumb */
.sb-breadcrumb,
.woocommerce-breadcrumb {
	font-family: var(--wp--preset--font-family--sans);
	font-size: var(--wp--preset--font-size--caption);
	color: var(--wp--preset--color--muted);
	letter-spacing: 0.01em;
	margin-bottom: 1.5rem;
}
.woocommerce-breadcrumb a { color: var(--wp--preset--color--primary-deep); text-decoration: none; }
.woocommerce-breadcrumb a:hover { text-decoration: underline; }
.sb-crumb-sep { color: var(--wp--preset--color--stone-line); }

/* ---------------------------------------------------------------------------
 * Footer
 * ------------------------------------------------------------------------- */

.sb-footer {
	background: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--ink-invert);
}
.sb-footer a { color: var(--wp--preset--color--primary-soft); text-decoration: none; }
.sb-footer a:hover { color: var(--wp--preset--color--ink-invert); text-decoration: underline; }
.sb-footer h2, .sb-footer h3, .sb-footer .wp-block-site-title a {
	color: var(--wp--preset--color--ink-invert);
}
.sb-footer .sb-eyebrow { color: var(--wp--preset--color--primary-soft); }
.sb-footer p { color: rgba(246, 243, 238, 0.78); }

/* ---------------------------------------------------------------------------
 * Home — hero + featured shelf nuances
 * ------------------------------------------------------------------------- */

.sb-hero {
	border-bottom: 1px solid var(--wp--preset--color--stone-line);
}
.sb-hero-title {
	font-family: var(--wp--preset--font-family--serif);
	font-weight: 380;
	line-height: 1.04;
	letter-spacing: -0.02em;
}
.sb-hero-lede {
	font-size: var(--wp--preset--font-size--lead);
	line-height: 1.6;
	color: var(--wp--preset--color--muted);
	max-width: 46ch;
}

/* The hero cover shelf: three covers leaning together */
.sb-hero-shelf .wp-block-post-template,
.sb-hero-shelf ul {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: clamp(0.5rem, 2vw, 1rem);
	align-items: end;
	margin: 0;
	padding: 0;
	list-style: none;
}
.sb-hero-shelf li { margin: 0 !important; }
.sb-hero-shelf img {
	width: 100%;
	height: auto;
	border-radius: 2px;
	box-shadow: var(--wp--preset--shadow--cover);
}
/* Centre cover stands slightly proud */
.sb-hero-shelf li:nth-child(2) { transform: translateY(-0.75rem); }

@media (max-width: 781px) {
	.sb-hero { text-align: center; }
	.sb-hero-lede { margin-left: auto; margin-right: auto; }
	.sb-hero .wp-block-buttons { justify-content: center; }
	.sb-hero-shelf {
		max-width: 300px;
		margin: 2.5rem auto 0;
	}
	/* Core's grid post-template collapses to 1 column on mobile by default;
	 * keep the featured shelf as a tidy 2-up so the home page stays compact. */
	.wp-block-query .wp-block-post-template.is-layout-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
		gap: 1.5rem 1.25rem !important;
	}
}

/* Collection cards on the home page (route tiles) */
.sb-route-card {
	border: 1px solid var(--wp--preset--color--stone-line);
	border-radius: 4px;
	background: var(--wp--preset--color--surface);
	transition: border-color 0.25s var(--sb-ease), transform 0.25s var(--sb-ease);
	height: 100%;
}
.sb-route-card:hover {
	border-color: var(--wp--preset--color--primary-soft);
	transform: translateY(-3px);
}
.sb-route-card h3 a { text-decoration: none; }

/* A members panel that reads as a quiet invitation, not a paywall */
.sb-members-panel {
	background: var(--wp--preset--color--primary-deep);
	color: var(--wp--preset--color--ink-invert);
	border-radius: 6px;
}
.sb-members-panel h2, .sb-members-panel h3 { color: var(--wp--preset--color--ink-invert); }
.sb-members-panel p { color: rgba(246, 243, 238, 0.82); }
.sb-members-panel .wp-block-button__link {
	background: var(--wp--preset--color--paper);
	color: var(--wp--preset--color--ink);
	border-color: var(--wp--preset--color--paper);
}
.sb-members-panel .wp-block-button__link:hover {
	background: var(--wp--preset--color--surface);
	border-color: var(--wp--preset--color--surface);
}

/* ---------------------------------------------------------------------------
 * Prose pages (About, etc.)
 * ------------------------------------------------------------------------- */

.sb-prose p { margin-bottom: 1.25rem; line-height: 1.7; }
.sb-prose .wp-block-post-title,
.sb-prose h1 { margin-bottom: 2rem; }

/* 404 + search */
.sb-utility-page {
	min-height: 50vh;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	text-align: center;
}
