/*
 * WooCommerce styling for Sebo Publishing.
 *
 * Loaded only on WooCommerce pages (see sebo_assets() in
 * functions.php). Covers the three surfaces theme.json cannot reach:
 *
 *   1. Woo's block cart/checkout, which ship their own component CSS.
 *   2. My Account, which has no block template — it renders through Woo's
 *      legacy templates, so it is styled by targeting that markup directly.
 *   3. Notices, forms, and the product gallery.
 *
 * All colour and spacing values come from theme.json custom properties, so
 * changing the brand in one place still changes it everywhere.
 */

/* -------------------------------------------------------------------------
   1. Shop archive — product cards
   ---------------------------------------------------------------------- */

/* archive-product.html opens with `wp:woocommerce/store-notices`, which
   renders an empty wrapper div when there's nothing to show (the normal
   case). That empty div still counts as a real element, so it knocks the
   hero band below it out of the ":first-child gets no top margin" rule every
   other page relies on — /store/ ended up with ~40px more white space above
   its heading than /shop/'s matching band, reported 2026-09-24. Zeroing the
   band's margin only when it directly follows the (empty) notices block
   leaves real notices, if one ever shows, unaffected. */
#sb-main > .wc-block-store-notices + .wp-block-group {
	margin-top: 0;
}

.wc-block-product-template,
.products.columns-3,
.products.columns-4 {
	gap: var(--wp--preset--spacing--30);
}

/* /shop/'s 16-product preview grid ("sb-shop-preview" wraps it). Real photos
   at real aspect ratios (portrait cards, square die-cuts, landscape shots)
   don't belong in a CSS Grid — a grid's row height is set by the tallest
   item in that row, so every shorter photo in the row ends up with a slab of
   dead space stretched in under it. Client asked for a Pinterest-style
   masonry instead, 2026-09-24: CSS multi-column layout (not CSS Grid) packs
   each card at its own natural height with no row-locking. `break-inside:
   avoid` keeps a card from being split across two columns; `column-gap`
   handles the horizontal gap, and each card supplies its own bottom margin
   for the vertical gap since multi-column has no row-gap equivalent.
   Earlier this was a forced 4-column CSS Grid (see git history) — replaced
   wholesale rather than patched. */
.sb-shop-preview .wc-block-product-template {
	display: block !important;
	column-count: 4;
	column-gap: var(--wp--preset--spacing--10);
}

@media (max-width: 1024px) {
	.sb-shop-preview .wc-block-product-template {
		column-count: 2;
	}
}

@media (max-width: 660px) {
	.sb-shop-preview .wc-block-product-template {
		column-count: 1;
	}
}

.sb-shop-preview .wc-block-product-template li.wc-block-product {
	display: block !important;
	break-inside: avoid;
	margin-bottom: var(--wp--preset--spacing--10);
}

.wc-block-product,
li.product {
	position: relative;
}

.wc-block-components-product-image img,
li.product img {
	border-radius: 3px 10px 10px 3px;
	box-shadow: var(--wp--preset--shadow--soft);
	transition: box-shadow var(--wp--custom--transition--base),
		transform var(--wp--custom--transition--base);
}

.wc-block-product:hover .wc-block-components-product-image img,
li.product:hover img {
	box-shadow: var(--wp--preset--shadow--book);
	transform: translateY(-4px);
}

/* sebo/product-image-or-title, used on /store/ so a product with no Square
   photo yet shows its name instead of the grey placeholder graphic —
   requested 2026-09-24. Same footprint as a real product image (aspect-ratio
   1:1, same border-radius) so the grid doesn't jump between the two. */
.sb-product-image {
	margin-bottom: var(--wp--preset--spacing--20);
}

.sb-product-image img {
	display: block;
	width: 100%;
	height: auto;
}

.sb-product-image--title-only {
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 1 / 1;
	padding: 1.5rem;
	background: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--preset--color--tint);
	border-radius: 3px 10px 10px 3px;
	text-align: center;
}

.sb-product-image--title-only a {
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--medium);
	color: var(--wp--preset--color--ink);
	text-decoration: none;
}

.sb-product-image--title-only a:hover {
	text-decoration: underline;
}

.wc-block-components-product-title,
li.product .woocommerce-loop-product__title {
	font-family: var(--wp--preset--font-family--heading) !important;
	font-size: var(--wp--preset--font-size--large) !important;
	font-weight: 500 !important;
	line-height: 1.25 !important;
	color: var(--wp--preset--color--ink);
}

.wc-block-components-product-title a,
li.product a {
	text-decoration: none;
}

.wc-block-components-product-price,
li.product .price {
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--medium);
	font-weight: 500;
	color: var(--wp--preset--color--ink);
}

/* Archive cart control (sebo/product-cart-control). Adding and
   viewing are separate actions, so the state is never ambiguous. */
.sb-pcc {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.5rem;
	margin-top: 0.25rem;
}

.sb-pcc__primary {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	background: var(--wp--preset--color--action);
	color: var(--wp--preset--color--base);
	border-radius: 999px;
	padding: 0.8rem 1.7rem;
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	letter-spacing: 0.03em;
	text-decoration: none;
	transition: background-color var(--wp--custom--transition--base),
		transform var(--wp--custom--transition--base);
}

.sb-pcc__primary:hover {
	background: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--base);
	transform: translateY(-1px);
}

.sb-pcc__count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 1.35rem;
	height: 1.35rem;
	padding: 0 0.35rem;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.22);
	font-size: 0.75rem;
	font-weight: 700;
	line-height: 1;
}

.sb-pcc__secondary {
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--wp--preset--color--action);
	text-decoration: none;
	border-bottom: 1px solid rgba(44, 97, 63, 0.35);
	padding-bottom: 1px;
}

.sb-pcc__secondary:hover {
	border-bottom-color: currentColor;
}

.sb-pcc--oos {
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--muted);
	text-align: center;
}

/* Stands in for the add-to-cart form on a browse-only product's own page. */
.sb-browse-only {
	display: inline-block;
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	color: var(--wp--preset--color--ink);
	background: var(--wp--preset--color--tint);
	border-radius: 999px;
	padding: 0.7rem 1.4rem;
}

/* The whole pill is the link, to /visit/. */
.sb-browse-only a {
	color: inherit;
	text-decoration: none;
}

.sb-browse-only:hover {
	background: var(--wp--preset--color--surface);
}

.sb-browse-only a:focus-visible {
	outline: 3px solid var(--wp--preset--color--action);
	outline-offset: 4px;
	border-radius: 999px;
}

/* A product with no photo: no grey placeholder square, and the details take the
   width the image would have had (same rule as /store/'s cards). */
.sb-no-product-image .wp-block-woocommerce-product-image-gallery {
	display: none;
}

.sb-no-product-image .wp-block-column:has(.wp-block-woocommerce-product-image-gallery) {
	display: none;
}

.sb-no-product-image .wp-block-columns:has(.wp-block-woocommerce-product-image-gallery) > .wp-block-column {
	flex-basis: 100% !important;
	max-width: 40rem;
	margin-inline: auto;
}

/* Woo's default "sale" flash is a harsh circle; make it a quiet pill. */
.wc-block-components-product-sale-badge,
span.onsale {
	background: var(--wp--preset--color--action) !important;
	color: var(--wp--preset--color--base) !important;
	border-radius: 999px !important;
	font-family: var(--wp--preset--font-family--body) !important;
	font-size: var(--wp--preset--font-size--x-small) !important;
	font-weight: 700 !important;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	padding: 0.3rem 0.75rem !important;
	min-height: 0 !important;
	min-width: 0 !important;
	line-height: 1.4 !important;
}

/* -------------------------------------------------------------------------
   2. Single product — the book page
   ---------------------------------------------------------------------- */

.woocommerce div.product .woocommerce-product-gallery__image img,
.wp-block-woocommerce-product-image-gallery img {
	border-radius: 3px 12px 12px 3px;
	box-shadow: var(--wp--preset--shadow--book);
}

.woocommerce div.product .woocommerce-product-gallery__wrapper {
	margin: 0;
}

/* Gallery thumbnails sit as a quiet row beneath the cover. */
.woocommerce div.product .flex-control-thumbs {
	display: flex;
	gap: 0.6rem;
	margin-top: 1rem;
	padding: 0;
	list-style: none;
}

.woocommerce div.product .flex-control-thumbs li {
	width: auto;
	flex: 0 0 auto;
	margin: 0;
}

.woocommerce div.product .flex-control-thumbs img {
	width: 68px;
	height: 68px;
	object-fit: cover;
	border-radius: 8px;
	box-shadow: none;
	opacity: 0.6;
	cursor: pointer;
	transition: opacity var(--wp--custom--transition--base);
}

.woocommerce div.product .flex-control-thumbs img:hover,
.woocommerce div.product .flex-control-thumbs img.flex-active {
	opacity: 1;
}

/* Price.
   The product-price block renders an inner .wc-block-components-product-price
   that carries Woo's own font sizing, so the outer wrapper alone is not
   enough — both need the rule. */
.woocommerce div.product p.price,
.woocommerce div.product span.price,
.wp-block-woocommerce-product-price,
.wp-block-woocommerce-product-price .wc-block-components-product-price,
.wp-block-woocommerce-product-price .wc-block-components-product-price__value {
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--x-large);
	font-weight: 500;
	line-height: 1.2;
	color: var(--wp--preset--color--ink);
}

/* Inside product cards and the cart the price must stay at body scale. */
.wc-block-product .wc-block-components-product-price,
.wc-block-cart-item__total .wc-block-components-product-price,
.wc-block-components-order-summary-item .wc-block-components-product-price {
	font-size: var(--wp--preset--font-size--medium);
}

.woocommerce div.product p.price del {
	color: var(--wp--preset--color--muted);
	font-size: 0.7em;
	opacity: 0.8;
}

/* Quantity + add to cart */
.woocommerce div.product form.cart {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem;
	margin: var(--wp--preset--spacing--20) 0;
}

/* Single-product quantity stepper — same pill as the block cart.
   .sb-qty is added by assets/js/quantity.js, which also injects the buttons;
   the un-enhanced .quantity fallback is styled first. */
.woocommerce .quantity input.qty {
	width: 5.5rem;
	padding: 0.8rem 0.5rem;
	text-align: center;
	border: 1.5px solid rgba(74, 78, 82, 0.22);
	border-radius: 8px;
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--medium);
}

.woocommerce .quantity.sb-qty {
	display: grid;
	grid-template-columns: 2.25rem minmax(2.25rem, 1fr) 2.25rem;
	align-items: stretch;
	width: 7.75rem;
	margin: 0;
	background: var(--wp--preset--color--base);
	border: 1.5px solid rgba(74, 78, 82, 0.22);
	border-radius: 999px;
	overflow: hidden;
}

.woocommerce .quantity.sb-qty input.qty {
	grid-column: 2;
	width: 100% !important;
	min-width: 0;
	padding: 0.5rem 0 !important;
	border: 0 !important;
	border-radius: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
	text-align: center;
	font-weight: 600;
	color: var(--wp--preset--color--ink);
	line-height: 1.4;
	-moz-appearance: textfield;
	appearance: textfield;
}

.woocommerce .quantity.sb-qty input.qty:focus {
	outline: 2px solid var(--wp--preset--color--action);
	outline-offset: -2px;
}

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

.sb-qty__button {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	padding: 0;
	margin: 0;
	border: 0;
	background: transparent;
	color: var(--wp--preset--color--ink);
	font-family: var(--wp--preset--font-family--body);
	font-size: 1.15rem;
	line-height: 1;
	opacity: 0.65;
	cursor: pointer;
	transition: opacity var(--wp--custom--transition--base),
		background-color var(--wp--custom--transition--base);
}

.sb-qty__button--minus {
	grid-column: 1;
}

.sb-qty__button--plus {
	grid-column: 3;
}

.sb-qty__button:hover:not(:disabled) {
	opacity: 1;
	background: var(--wp--preset--color--surface);
	color: var(--wp--preset--color--action);
}

.sb-qty__button:disabled {
	opacity: 0.28;
	cursor: not-allowed;
}

.woocommerce div.product form.cart .button,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit {
	background: var(--wp--preset--color--action);
	color: var(--wp--preset--color--base);
	border: 0;
	border-radius: 999px;
	padding: 0.9rem 1.9rem;
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	letter-spacing: 0.03em;
	line-height: 1.2;
	text-transform: none;
	transition: background-color var(--wp--custom--transition--base),
		transform var(--wp--custom--transition--base);
}

.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce div.product form.cart .button:hover,
.woocommerce #respond input#submit:hover {
	background: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--base);
	transform: translateY(-1px);
}

.woocommerce a.button.alt,
.woocommerce button.button.alt {
	background: var(--wp--preset--color--action);
}

/* Secondary/greyed buttons keep the shape but drop the fill. */
.woocommerce a.button.wc-backward {
	background: transparent;
	color: var(--wp--preset--color--action);
	border: 1.5px solid var(--wp--preset--color--action);
}

.woocommerce a.button.wc-backward:hover {
	background: var(--wp--preset--color--action);
	color: var(--wp--preset--color--base);
}

/* Product meta (SKU, category) reads as fine print, not body copy. */
.woocommerce div.product .product_meta {
	margin-top: var(--wp--preset--spacing--20);
	padding-top: var(--wp--preset--spacing--20);
	border-top: var(--wp--custom--rule--hairline);
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--x-small);
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--wp--preset--color--muted);
}

.woocommerce div.product .product_meta > span {
	display: block;
	margin-bottom: 0.3rem;
}

/* Tabs */
.woocommerce div.product .woocommerce-tabs ul.tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	padding: 0;
	margin: 0 0 var(--wp--preset--spacing--30);
	border-bottom: var(--wp--custom--rule--hairline);
}

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

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

.woocommerce div.product .woocommerce-tabs ul.tabs li a {
	display: block;
	padding: 0.7rem 1.1rem;
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	color: var(--wp--preset--color--muted);
	text-decoration: none;
	border-bottom: 2px solid transparent;
	margin-bottom: -1px;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li.active a,
.woocommerce div.product .woocommerce-tabs ul.tabs li a:hover {
	color: var(--wp--preset--color--action);
	border-bottom-color: var(--wp--preset--color--action);
}

.woocommerce div.product .woocommerce-tabs .panel > h2:first-child {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
}

/* -------------------------------------------------------------------------
   3. Notices
   ---------------------------------------------------------------------- */

.woocommerce-message,
.woocommerce-info,
.woocommerce-error,
.wc-block-components-notice-banner {
	border-radius: 10px !important;
	border: 0 !important;
	border-left: 3px solid var(--wp--preset--color--action) !important;
	background: var(--wp--preset--color--surface) !important;
	color: var(--wp--preset--color--ink) !important;
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--small);
	padding: 1rem 1.25rem !important;
	box-shadow: none !important;
}

.woocommerce-message::before,
.woocommerce-info::before {
	color: var(--wp--preset--color--action);
}

.woocommerce-error,
.wc-block-components-notice-banner.is-error {
	border-left-color: #a4341f !important;
	background: #fdf3f1 !important;
}

.woocommerce-error::before {
	color: #a4341f;
}

.wc-block-components-notice-banner > svg {
	fill: var(--wp--preset--color--action);
}

.wc-block-components-notice-banner.is-error > svg {
	fill: #a4341f;
}

/* -------------------------------------------------------------------------
   4. Block cart and checkout
   ---------------------------------------------------------------------- */

.wc-block-components-title,
.wc-block-cart__totals-title,
.wc-block-components-order-summary__title {
	font-family: var(--wp--preset--font-family--heading) !important;
	font-weight: 500 !important;
	color: var(--wp--preset--color--ink) !important;
}

.wc-block-cart-item__product-name a,
.wc-block-components-product-name {
	font-family: var(--wp--preset--font-family--heading) !important;
	font-size: var(--wp--preset--font-size--large) !important;
	font-weight: 500 !important;
	color: var(--wp--preset--color--ink) !important;
	text-decoration: none;
}

.wc-block-cart-item__image img,
.wc-block-components-order-summary-item__image img {
	border-radius: 2px 6px 6px 2px;
	box-shadow: var(--wp--preset--shadow--soft);
}

/* -------------------------------------------------------------------------
   4a. Cart line item — quantity stepper and remove control

   Woo's DOM order is input, minus, plus, then a separate remove button. The
   theme's global number-input rule (width:100%, padding, border) breaks the
   stepper's layout, so the whole group is rebuilt here as an explicit grid
   with the trash control set apart from it.
   ---------------------------------------------------------------------- */

.wc-block-cart-item__quantity {
	display: flex;
	align-items: center;
	gap: 0.9rem;
}

.wc-block-components-quantity-selector {
	display: grid;
	grid-template-columns: 2.25rem minmax(2.25rem, 1fr) 2.25rem;
	align-items: stretch;
	width: 7.75rem;
	min-width: 0;
	margin: 0;
	background: var(--wp--preset--color--base);
	border: 1.5px solid rgba(74, 78, 82, 0.22);
	border-radius: 999px;
	overflow: hidden;
}

/* Woo places the input first in the DOM; put it back in the middle. */
.wc-block-components-quantity-selector__input {
	grid-column: 2;
	grid-row: 1;
	width: 100% !important;
	min-width: 0;
	padding: 0.5rem 0 !important;
	border: 0 !important;
	border-radius: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
	text-align: center;
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--medium);
	font-weight: 600;
	color: var(--wp--preset--color--ink);
	line-height: 1.4;
	-moz-appearance: textfield;
	appearance: textfield;
}

.wc-block-components-quantity-selector__input:focus {
	box-shadow: none !important;
	outline: 2px solid var(--wp--preset--color--action);
	outline-offset: -2px;
}

/* Hide the native spinners; the −/+ buttons are the control. */
.wc-block-components-quantity-selector__input::-webkit-outer-spin-button,
.wc-block-components-quantity-selector__input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.wc-block-components-quantity-selector__button {
	grid-row: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-width: 0;
	padding: 0;
	margin: 0;
	border: 0;
	background: transparent;
	color: var(--wp--preset--color--ink);
	font-family: var(--wp--preset--font-family--body);
	font-size: 1.15rem;
	line-height: 1;
	opacity: 0.65;
	cursor: pointer;
	transition: opacity var(--wp--custom--transition--base),
		background-color var(--wp--custom--transition--base);
}

.wc-block-components-quantity-selector__button--minus {
	grid-column: 1;
}

.wc-block-components-quantity-selector__button--plus {
	grid-column: 3;
}

.wc-block-components-quantity-selector__button:hover:not(:disabled) {
	opacity: 1;
	background: var(--wp--preset--color--surface);
	color: var(--wp--preset--color--action);
}

.wc-block-components-quantity-selector__button:disabled {
	opacity: 0.28;
	cursor: not-allowed;
}

/* Remove control: a quiet icon button, clearly separate from the stepper. */
.wc-block-cart-item__remove-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.25rem;
	height: 2.25rem;
	flex: 0 0 auto;
	padding: 0;
	margin: 0 !important;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: var(--wp--preset--color--muted);
	text-decoration: none !important;
	font-size: 0 !important;
	cursor: pointer;
	transition: color var(--wp--custom--transition--base),
		background-color var(--wp--custom--transition--base);
}

.wc-block-cart-item__remove-link svg {
	width: 20px;
	height: 20px;
	fill: currentColor;
	display: block;
}

.wc-block-cart-item__remove-link:hover {
	background: #fdf3f1;
	color: #a4341f;
}

/* -------------------------------------------------------------------------
   4b. Order summary line (cart sidebar and checkout)

   Requested layout: image · title + unit price · quantity · line total.
   The quantity lives inside the image wrapper in Woo's markup, so the
   wrapper is set to `display: contents` to hoist both children into the
   flex row, where they can be ordered freely.
   ---------------------------------------------------------------------- */

/* An explicit three-column grid. Woo's own layout here is a grid, so `order`
   on flex children had no effect, and `display: contents` on the image wrapper
   was overridden — so rather than hoisting the quantity out, it stays in the
   first column and is stacked directly beneath the cover, which reads clearly:

     [cover ]  [title + unit price]  [line total]
     [  x2  ]
*/
.wc-block-components-order-summary-item {
	display: grid !important;
	grid-template-columns: 56px minmax(0, 1fr) auto;
	column-gap: 0.85rem;
	align-items: start;
	padding-block: 1rem;
}

.wc-block-components-order-summary-item::after {
	display: none;
}

/* Column 1: cover with the quantity beneath it, both centred. */
.wc-block-components-order-summary-item__image {
	grid-column: 1;
	grid-row: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.4rem;
	position: static;
	width: 56px;
	margin: 0;
}

.wc-block-components-order-summary-item__image img {
	width: 56px !important;
	height: auto !important;
	max-width: 56px;
	margin: 0;
	border-radius: 2px 6px 6px 2px;
	box-shadow: var(--wp--preset--shadow--soft);
	order: 1;
}

.wc-block-components-order-summary-item__description {
	grid-column: 2;
	grid-row: 1;
	min-width: 0;
}

/* Quantity: taken out of its absolute overlay and set below the cover. */
.wc-block-components-order-summary-item__quantity {
	order: 2;
	position: static !important;
	display: inline-flex;
	align-items: center;
	flex: 0 0 auto;
	width: auto !important;
	height: auto !important;
	min-width: 0;
	margin: 0 !important;
	padding: 0.2rem 0.6rem;
	border: 0 !important;
	border-radius: 999px;
	background: var(--wp--preset--color--surface);
	color: var(--wp--preset--color--ink);
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 700;
	line-height: 1.5;
	box-shadow: none;
	white-space: nowrap;
}

/* "Qty 2" reads unambiguously; a bare "× 2" was easy to miss. */
.wc-block-components-order-summary-item__quantity::before {
	content: "Qty ";
	margin-right: 0.1rem;
	font-weight: 600;
	opacity: 0.65;
}

.wc-block-components-order-summary-item__total-price {
	grid-column: 3;
	grid-row: 1;
	margin: 0;
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--medium);
	font-weight: 500;
	color: var(--wp--preset--color--ink);
	white-space: nowrap;
}

/* The product blurb is redundant at the point of payment. */
.wc-block-components-order-summary-item .wc-block-components-product-metadata__description,
.wc-block-components-order-summary-item .wc-block-components-product-details {
	display: none !important;
}

/* Title needs to read as a label here, not a heading. */
.wc-block-components-order-summary-item .wc-block-components-product-name {
	display: block;
	margin: 0 0 0.15rem;
	font-family: var(--wp--preset--font-family--heading) !important;
	font-size: var(--wp--preset--font-size--medium) !important;
	font-weight: 500 !important;
	line-height: 1.25 !important;
	color: var(--wp--preset--color--ink) !important;
}

/* Per-unit price, quieter than the line total. */
.wc-block-components-order-summary-item__individual-prices,
.wc-block-components-order-summary-item .wc-block-cart-item__prices {
	display: block;
	margin: 0;
	font-family: var(--wp--preset--font-family--body) !important;
	font-size: var(--wp--preset--font-size--small) !important;
	font-weight: 400 !important;
	color: var(--wp--preset--color--muted) !important;
}

/* Title reads as a compact label in the sidebar; at heading scale the long
   book name wraps to five lines. */
.wc-block-components-order-summary-item .wc-block-components-product-name {
	font-size: var(--wp--preset--font-size--small) !important;
	line-height: 1.35 !important;
}

@media (max-width: 480px) {
	.wc-block-components-order-summary-item {
		grid-template-columns: 48px minmax(0, 1fr) auto;
		column-gap: 0.7rem;
	}

	.wc-block-components-order-summary-item__image img {
		width: 48px !important;
		max-width: 48px;
	}
}

/* The totals panel becomes a card so it reads as a distinct summary.
   Padding is modest here: Woo adds its own 16px inside
   .wc-block-components-order-summary, and stacking both left a wide dead
   margin to the left of the cover thumbnail. */
.wp-block-woocommerce-cart-order-summary-block,
.wc-block-components-sidebar .wc-block-components-totals-wrapper:first-child {
	background: var(--wp--preset--color--surface);
	border-radius: 16px;
	padding: var(--wp--preset--spacing--20);
}

/* Woo's inner side padding is redundant once the panel has its own. */
.wc-block-components-order-summary,
.wc-block-components-order-summary__content {
	padding-left: 0 !important;
	padding-right: 0 !important;
}

.wc-block-components-totals-item__label {
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--small);
}

.wc-block-components-totals-footer-item .wc-block-components-totals-item__label,
.wc-block-components-totals-footer-item .wc-block-formatted-money-amount {
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--large);
	font-weight: 500;
	color: var(--wp--preset--color--ink);
}

/* Inputs inside the checkout inherit the site's field styling. */
.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="number"],
.wc-block-components-textarea,
.wc-blocks-components-select__select {
	border: 1.5px solid rgba(74, 78, 82, 0.22) !important;
	border-radius: 8px !important;
	font-family: var(--wp--preset--font-family--body) !important;
	font-size: var(--wp--preset--font-size--medium) !important;
	color: var(--wp--preset--color--ink) !important;
	background: var(--wp--preset--color--base) !important;
}

.wc-block-components-text-input.is-active label,
.wc-block-components-text-input label {
	font-family: var(--wp--preset--font-family--body) !important;
	color: var(--wp--preset--color--muted) !important;
}

.wc-block-components-text-input input:focus,
.wc-blocks-components-select__select:focus {
	border-color: var(--wp--preset--color--action) !important;
	box-shadow: 0 0 0 3px rgba(44, 97, 63, 0.14) !important;
	outline: none !important;
}

/* Woo's own buttons inside blocks. */
.wc-block-components-button:not(.is-link) {
	background: var(--wp--preset--color--action) !important;
	color: var(--wp--preset--color--base) !important;
	border-radius: 999px !important;
	border: 0 !important;
	font-family: var(--wp--preset--font-family--body) !important;
	font-size: var(--wp--preset--font-size--small) !important;
	font-weight: 600 !important;
	letter-spacing: 0.03em;
	padding: 0.95rem 2rem !important;
	transition: background-color var(--wp--custom--transition--base);
}

.wc-block-components-button:not(.is-link):hover {
	background: var(--wp--preset--color--ink) !important;
}

.wc-block-components-button.is-link {
	color: var(--wp--preset--color--action) !important;
}

/* Radio/payment option cards. */
.wc-block-components-radio-control-accordion-option,
.wc-block-components-radio-control__option {
	border-radius: 10px;
}

.wc-block-components-radio-control__option--checked-option-highlighted {
	border-color: var(--wp--preset--color--action) !important;
}

/* Empty cart */
.wp-block-woocommerce-empty-cart-block {
	text-align: center;
	padding-block: var(--wp--preset--spacing--40);
}

/* -------------------------------------------------------------------------
   5. Order confirmation
   ---------------------------------------------------------------------- */

.woocommerce-order .woocommerce-thankyou-order-received,
.wc-block-order-confirmation-status {
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--x-large);
	font-weight: 500;
	color: var(--wp--preset--color--ink);
}

.woocommerce ul.order_details,
.wc-block-order-confirmation-summary {
	display: flex;
	flex-wrap: wrap;
	gap: var(--wp--preset--spacing--20);
	margin: var(--wp--preset--spacing--30) 0;
	padding: var(--wp--preset--spacing--30);
	background: var(--wp--preset--color--surface);
	border-radius: 16px;
	list-style: none;
}

.woocommerce ul.order_details li {
	border: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--x-small);
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--wp--preset--color--muted);
}

.woocommerce ul.order_details li strong {
	display: block;
	margin-top: 0.3rem;
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--large);
	font-weight: 500;
	letter-spacing: 0;
	text-transform: none;
	color: var(--wp--preset--color--ink);
}

/* -------------------------------------------------------------------------
   6. My Account
      No block template exists for this screen, so it is styled against
      Woo's legacy markup. Visually it matches the rest of the site.
   ---------------------------------------------------------------------- */

.woocommerce-account .woocommerce {
	display: grid;
	grid-template-columns: minmax(0, 15rem) minmax(0, 1fr);
	gap: var(--wp--preset--spacing--40);
	align-items: start;
}

@media (max-width: 782px) {
	.woocommerce-account .woocommerce {
		grid-template-columns: 1fr;
		gap: var(--wp--preset--spacing--30);
	}
}

.woocommerce-account .woocommerce-MyAccount-navigation {
	width: auto;
	float: none;
	background: var(--wp--preset--color--surface);
	border-radius: 16px;
	padding: 0.5rem;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.woocommerce-account .woocommerce-MyAccount-navigation li {
	margin: 0;
}

.woocommerce-account .woocommerce-MyAccount-navigation li a {
	display: block;
	padding: 0.7rem 0.9rem;
	border-radius: 9px;
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	color: var(--wp--preset--color--ink);
	text-decoration: none;
	transition: background-color var(--wp--custom--transition--base),
		color var(--wp--custom--transition--base);
}

.woocommerce-account .woocommerce-MyAccount-navigation li a:hover {
	background: rgba(255, 255, 255, 0.75);
	color: var(--wp--preset--color--action);
}

.woocommerce-account .woocommerce-MyAccount-navigation li.is-active a {
	background: var(--wp--preset--color--action);
	color: var(--wp--preset--color--base);
}

.woocommerce-account .woocommerce-MyAccount-content {
	width: auto;
	float: none;
}

.woocommerce-account .woocommerce-MyAccount-content > p:first-child {
	font-size: var(--wp--preset--font-size--large);
	font-family: var(--wp--preset--font-family--heading);
	color: var(--wp--preset--color--ink);
}

/* Login / register forms sit as centred cards. */
.woocommerce-account:not(.logged-in) .woocommerce {
	display: block;
	max-width: 34rem;
	margin-inline: auto;
}

.woocommerce form.login,
.woocommerce form.register,
.woocommerce form.lost_reset_password,
.woocommerce-EditAccountForm,
.woocommerce-address-fields {
	border: 0;
	border-radius: 16px;
	padding: var(--wp--preset--spacing--30);
	background: var(--wp--preset--color--surface);
	margin: 0;
}

.woocommerce form .form-row {
	padding: 0;
	margin-bottom: 1.1rem;
}

.woocommerce form .form-row label {
	margin-bottom: 0.4rem;
}

/* Order tables */
.woocommerce table.shop_table,
.woocommerce table.woocommerce-orders-table {
	border: 0;
	border-collapse: collapse;
	border-radius: 12px;
	overflow: hidden;
	font-size: var(--wp--preset--font-size--small);
}

.woocommerce table.shop_table thead th {
	background: var(--wp--preset--color--surface);
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--wp--preset--color--muted);
	border: 0;
	padding: 0.9rem 1rem;
}

.woocommerce table.shop_table td,
.woocommerce table.shop_table th {
	border: 0;
	border-bottom: var(--wp--custom--rule--hairline);
	padding: 0.9rem 1rem;
}

.woocommerce table.shop_table tbody tr:last-child td {
	border-bottom: 0;
}

.woocommerce mark.order-status,
.woocommerce .woocommerce-orders-table__cell-order-status {
	background: transparent;
	color: var(--wp--preset--color--action);
	font-weight: 600;
}

/* -------------------------------------------------------------------------
   7. Reviews
   ---------------------------------------------------------------------- */

.woocommerce #reviews #comments ol.commentlist li .comment-text {
	border: 0;
	border-radius: 14px;
	background: var(--wp--preset--color--surface);
	padding: var(--wp--preset--spacing--20);
	margin-left: 4.5rem;
}

.woocommerce #reviews #comments ol.commentlist li img.avatar {
	width: 3.4rem;
	border: 0;
	border-radius: 999px;
	padding: 0;
	background: transparent;
}

.woocommerce .star-rating span,
.woocommerce p.stars a {
	color: var(--wp--preset--color--action);
}

/* -------------------------------------------------------------------------
   7b. Order summary — specificity overrides

   WooCommerce styles the quantity badge and cover thumbnail with descendant
   selectors, which outrank the single-class rules further up this file. These
   repeat the intent at matching specificity so the badge actually leaves its
   absolute overlay and sits beneath the cover.
   ---------------------------------------------------------------------- */

.wc-block-components-order-summary-item .wc-block-components-order-summary-item__image img {
	width: 56px !important;
	max-width: 56px !important;
	height: auto !important;
}

.wc-block-components-order-summary-item
	.wc-block-components-order-summary-item__image
	.wc-block-components-order-summary-item__quantity {
	position: static !important;
	top: auto !important;
	right: auto !important;
	left: auto !important;
	bottom: auto !important;
	transform: none !important;
	width: auto !important;
	min-width: 0 !important;
	height: auto !important;
	min-height: 0 !important;
	margin: 0 !important;
	padding: 0.15rem 0.55rem !important;
	border: 0 !important;
	border-radius: 999px !important;
	/* White chip with a hairline, so it reads as a distinct label against the
	   cream summary panel rather than dissolving into it. */
	background: var(--wp--preset--color--base) !important;
	background-color: var(--wp--preset--color--base) !important;
	border: 1px solid rgba(74, 78, 82, 0.18) !important;
	color: var(--wp--preset--color--ink) !important;
	box-shadow: none !important;
	font-family: var(--wp--preset--font-family--body) !important;
	font-size: 0.78rem !important;
	font-weight: 700 !important;
	line-height: 1.45 !important;
	letter-spacing: 0.02em;
	white-space: nowrap;
}

/* The number lives in a child span that Woo colours white for its dark badge.
   Recolouring only the chip left white-on-white, so the child needs it too. */
.wc-block-components-order-summary-item
	.wc-block-components-order-summary-item__quantity > span {
	color: var(--wp--preset--color--ink) !important;
	font: inherit !important;
	background: none !important;
}

/* -------------------------------------------------------------------------
   8. Breadcrumb
   ---------------------------------------------------------------------- */

.woocommerce .woocommerce-breadcrumb {
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--x-small);
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--wp--preset--color--muted);
	margin-bottom: var(--wp--preset--spacing--20);
}

.woocommerce .woocommerce-breadcrumb a {
	color: var(--wp--preset--color--muted);
	text-decoration: none;
}

.woocommerce .woocommerce-breadcrumb a:hover {
	color: var(--wp--preset--color--action);
}

/* Class details and the refund/transfer policy above the cart and checkout,
   from farmhouse-events/includes/signups.php. */
.fh-class-notice {
	max-width: 46rem;
	margin: 0 auto var(--wp--preset--spacing--30);
	padding: var(--wp--preset--spacing--20) var(--wp--preset--spacing--30);
	background: var(--wp--preset--color--surface);
	border-radius: 12px;
}

.fh-class-notice p,
.fh-class-notice ul {
	margin: 0 0 0.4rem;
}

.fh-class-notice ul {
	padding-left: 1.2rem;
}

.fh-class-notice > :last-child {
	margin-bottom: 0;
	color: var(--wp--preset--color--muted);
}
