/*
 * cart-checkout.css — editorial chrome for /cart/, /checkout/, /checkout/order-received/.
 *
 * Loaded only when is_cart() || is_checkout() || is_order_received_page().
 * Body class scopes: .chn-cart, .chn-checkout, .chn-order-received, .chn-commerce.
 *
 * Mobile-first; breakpoints 560 / 900 / 1240. Approved palette only.
 */

/* =====================================================================
 * 1. SHELL — keep the WC main content inside the editorial container
 *    and reset the inherited "page-fullwidth" + Elementor margins.
 * ===================================================================== */

body.chn-commerce {
	background: var(--chn-color-surface);
	color: var(--chn-color-text);
	font-family: var(--chn-font-sans);
}
body.chn-commerce .chn-commerce-main {
	display: block;
	background: var(--chn-color-surface);
}
body.chn-commerce .woocommerce {
	max-width: var(--chn-container);
	margin: 0 auto;
	padding: var(--chn-space-7) var(--chn-space-5);
	font-family: var(--chn-font-sans);
	color: var(--chn-color-text);
	width: 100%;
}
/* Chrome injected above the cart/checkout/thank-you body via
 * woocommerce_before_cart / woocommerce_before_checkout_form /
 * woocommerce_before_thankyou — these MUST be full-bleed (`100vw`) even
 * though they live inside the constrained `.woocommerce` wrapper. The
 * negative margin escapes the parent container's max-width + padding so
 * the strip's `--chn-color-surface-alt` band actually spans the viewport. */
body.chn-commerce .woocommerce > .chn-breadcrumb-strip,
body.chn-commerce .woocommerce > .chn-page-hero {
	width: 100vw;
	max-width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
}
/* Reset top-padding on `.woocommerce` so the chrome (breadcrumb strip) sits
 * flush against the header instead of being pushed down by --chn-space-7. */
body.chn-commerce .woocommerce { padding-top: 0; }
/* Bring the cart/checkout body content back in below the hero with a
 * comfortable lead-in. */
body.chn-commerce .chn-page-hero { margin-bottom: var(--chn-space-7); }
/* Force the Elementor shortcode wrapper that holds the WC shortcode to
 * span the full elementor container width so our 2-col layout has room. */
body.chn-commerce .elementor-shortcode { display: block; width: 100%; max-width: none; }
body.chn-commerce .elementor-widget-shortcode .elementor-widget-container { max-width: none; }
body.chn-commerce .elementor-section.elementor-section-boxed > .elementor-container { max-width: var(--chn-container); }
body.chn-commerce .elementor-shortcode > .woocommerce { padding-left: 0; padding-right: 0; }
body.chn-commerce .woocommerce > h1,
body.chn-commerce .woocommerce > .page-title,
body.chn-commerce .entry-title {
	display: none;
}

/* WC notices — keep brand colours, not WC green/red defaults. */
body.chn-commerce .woocommerce-notices-wrapper {
	width: 100%;
	max-width: none;
	margin: 0 0 var(--chn-space-4);
	padding: 0;
	display: grid;
	gap: var(--chn-space-2);
}
body.chn-commerce .woocommerce-message,
body.chn-commerce .woocommerce-info,
body.chn-commerce .woocommerce-error {
	position: relative;
	margin: 0;
	min-height: 48px;
	background: #f5f8fd;
	color: var(--chn-color-text);
	border-left: 3px solid var(--chn-color-primary);
	border-top: 1px solid var(--chn-color-border);
	border-right: 1px solid var(--chn-color-border);
	border-bottom: 1px solid var(--chn-color-border);
	padding: 12px 48px 12px 44px;
	font-family: var(--chn-font-sans);
	font-size: 13.5px;
	line-height: 1.45;
	border-radius: var(--chn-radius-md);
	box-shadow: 0 8px 24px -22px rgba(11, 59, 148, .45);
}
body.chn-commerce .woocommerce-message::before,
body.chn-commerce .woocommerce-info::before,
body.chn-commerce .woocommerce-error::before {
	top: 50%;
	left: 16px;
	transform: translateY(-50%);
}
body.chn-commerce .woocommerce-message {
	background: #f0f8f3;
	border-color: #b9ddc5;
	border-left-color: #107a49;
}
body.chn-commerce .woocommerce-message::before {
	color: #107a49;
}
body.chn-commerce .woocommerce-error {
	border-left-color: var(--chn-state-danger);
	background: #fff4f1;
}
body.chn-commerce .woocommerce-info {
	border-left-color: var(--chn-color-accent);
}
body.chn-cart .chn-notice-dismiss {
	position: absolute;
	top: 50%;
	right: 10px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	padding: 0;
	transform: translateY(-50%);
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--chn-color-muted);
	font: 500 20px/1 var(--chn-font-sans);
	cursor: pointer;
}
body.chn-cart .chn-notice-dismiss:hover,
body.chn-cart .chn-notice-dismiss:focus-visible {
	background: var(--chn-color-primary);
	color: #fff;
	outline: 0;
}
/* The `Have a coupon? Click here to enter your code` notice is wrapped in
 * .woocommerce-form-coupon-toggle around a .woocommerce-info — give the
 * outer wrapper rhythm so it lands at the top of the checkout grid above
 * the billing column instead of sitting flush against the hero margin. */
body.chn-checkout .woocommerce-form-coupon-toggle,
body.chn-checkout .woocommerce-form-login-toggle {
	margin: 0 0 var(--chn-space-4);
}
/* The hidden coupon form that toggles below the notice — when expanded it
 * should still feel branded, not "WordPress default form". */
body.chn-checkout form.checkout_coupon {
	background: var(--chn-color-surface-alt);
	border: 1px solid var(--chn-color-border);
	border-left: 3px solid var(--chn-color-primary);
	border-radius: var(--chn-radius-md);
	padding: var(--chn-space-4) var(--chn-space-5);
	margin: 0 0 var(--chn-space-5);
}
body.chn-checkout form.checkout_coupon p:first-of-type {
	margin-top: 0;
	font-size: 14px;
	color: var(--chn-color-muted);
}
body.chn-checkout form.checkout_coupon input.input-text,
body.chn-checkout form.checkout_coupon input[name="coupon_code"] {
	height: 44px;
	border: 1px solid var(--chn-color-primary);
	border-radius: var(--chn-radius-sm);
	background: var(--chn-color-surface);
	padding: 0 var(--chn-space-3);
	font: 500 14px/1 var(--chn-font-mono);
	color: var(--chn-color-text);
}
body.chn-checkout form.checkout_coupon button.button[name="apply_coupon"],
body.chn-checkout form.checkout_coupon button[name="apply_coupon"] {
	background: var(--chn-color-primary);
	color: #fff;
	border: 1px solid var(--chn-color-primary);
	font: 700 12.5px/1 var(--chn-font-sans);
	letter-spacing: .04em;
	text-transform: uppercase;
	padding: 11px 18px;
	border-radius: var(--chn-radius-sm);
	cursor: pointer;
	min-height: 44px;
}
body.chn-checkout form.checkout_coupon button[name="apply_coupon"]:hover {
	background: var(--chn-color-primary-700);
	color: #fff;
}

/* Default WC `.button` on cart/checkout flows — any place where a button
 * doesn't get the specific name-attribute styling above. Brand it. */
body.chn-commerce .woocommerce-cart-form button.button,
body.chn-commerce .woocommerce button.button,
body.chn-commerce .button[type="submit"]:not([name="login"]):not([name="register"]) {
	font-family: var(--chn-font-sans);
}
/* The Update qty button (when WC + qty UI plugin renders an `<input
 * type="submit" class="button" value="Update">` next to the qty stepper).
 * Also covers WC's shipping calculator "Update" button which uses
 * `name="calc_shipping"`. */
body.chn-cart input.button[value="Update"],
body.chn-cart button.button[value="Update"],
body.chn-cart button[name="calc_shipping"],
body.chn-cart button.button[name="calc_shipping"] {
	background: transparent;
	color: var(--chn-color-primary);
	border: 1px solid var(--chn-color-primary);
	font: 600 12px/1 var(--chn-font-sans);
	letter-spacing: .04em;
	text-transform: uppercase;
	padding: 8px 14px;
	border-radius: var(--chn-radius-sm);
	min-height: 36px;
	cursor: pointer;
}
body.chn-cart input.button[value="Update"]:hover,
body.chn-cart button.button[value="Update"]:hover,
body.chn-cart button[name="calc_shipping"]:hover {
	background: rgba(11, 59, 148, .06);
}

/* PDF Invoice button on order-received page (rendered by the
 * Yith/WC Order Actions plugin chain). */
body.chn-order-received a.woocommerce-button.button.pdf,
body.chn-order-received a.order-actions-button {
	background: transparent;
	color: var(--chn-color-primary);
	border: 1px solid var(--chn-color-primary);
	font: 600 12px/1 var(--chn-font-sans);
	letter-spacing: .04em;
	text-transform: uppercase;
	padding: 10px 16px;
	border-radius: var(--chn-radius-sm);
	min-height: 40px;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	text-decoration: none;
	transition: background .15s ease;
}
body.chn-order-received a.woocommerce-button.button.pdf:hover,
body.chn-order-received a.order-actions-button:hover {
	background: rgba(11, 59, 148, .06);
	color: var(--chn-color-primary);
}
body.chn-commerce .woocommerce-message a.button,
body.chn-commerce .woocommerce-info a.button {
	background: transparent;
	color: var(--chn-color-primary);
	border: 1px solid var(--chn-color-primary);
	font: 700 12px/1 var(--chn-font-sans);
	letter-spacing: .04em;
	text-transform: uppercase;
	padding: 9px 14px;
	border-radius: var(--chn-radius-sm);
	margin-left: var(--chn-space-3);
}
body.chn-commerce .woocommerce-message a.button:hover,
body.chn-commerce .woocommerce-info a.button:hover {
	background: rgba(11, 59, 148, .06);
}

/* Hero hugs the chrome — no big top margin needed when page-hero immediately follows header. */
body.chn-commerce .chn-page-hero { min-height: 200px; padding: var(--chn-space-6) 0 var(--chn-space-5); }
body.chn-commerce .chn-page-hero .chn-container { padding-top: var(--chn-space-5); padding-bottom: var(--chn-space-5); }
/* surface-alt hero variant scoped here — commerce-only design choice. */
body.chn-commerce .chn-page-hero--bg-surface-alt { background: var(--chn-color-surface-alt); border-bottom: 1px solid var(--chn-color-border); }

/* =====================================================================
 * 2. CHECKOUT PROGRESS — 3 mono pill steps under the breadcrumb.
 * ===================================================================== */

.chn-checkout-progress {
	padding: 0 var(--chn-space-5);
	margin: 0 auto var(--chn-space-5);
}
.chn-checkout-progress ol {
	display: flex;
	flex-wrap: wrap;
	gap: var(--chn-space-2);
	list-style: none;
	margin: 0;
	padding: 0;
}
.chn-checkout-progress__step {
	display: inline-flex;
	align-items: center;
	gap: var(--chn-space-2);
	padding: 7px 12px;
	border: 1px solid var(--chn-color-border);
	border-radius: 999px;
	background: var(--chn-color-surface);
	color: var(--chn-color-muted);
	font: 500 11.5px/1 var(--chn-font-mono);
	letter-spacing: .04em;
	white-space: nowrap;
}
.chn-checkout-progress__step.is-current {
	background: var(--chn-color-primary);
	border-color: var(--chn-color-primary);
	color: #fff;
}
.chn-checkout-progress__num {
	font-weight: 600;
	opacity: .85;
}
.chn-checkout-progress__label {
	text-transform: uppercase;
	letter-spacing: .08em;
}
@media (max-width: 560px) {
	.chn-checkout-progress ol { gap: 6px; }
	.chn-checkout-progress__step { padding: 6px 10px; font-size: 10.5px; }
}

/* =====================================================================
 * 3. CART TABLE — restyle WC default cart markup.
 * ===================================================================== */

body.chn-cart .woocommerce { display: block; }
body.chn-cart .woocommerce-cart-form { width: 100%; }

body.chn-cart table.shop_table,
body.chn-cart table.cart {
	width: 100%;
	max-width: 100%;
	border-collapse: collapse;
	border-spacing: 0;
	background: var(--chn-color-surface);
	border: 1px solid var(--chn-color-border);
	border-radius: var(--chn-radius-md);
	font-family: var(--chn-font-sans);
	color: var(--chn-color-text);
	margin: 0 0 var(--chn-space-5);
	/* Fixed layout so explicit column widths bind regardless of the
	 * screen-reader-text content inside Remove / Thumbnail headers. */
	table-layout: fixed;
}
body.chn-cart table.cart thead {
	background: var(--chn-color-surface-alt);
	border-bottom: 1px solid var(--chn-color-border);
}
body.chn-cart table.cart thead th {
	font: 700 11px/1 var(--chn-font-sans);
	letter-spacing: .22em;
	text-transform: uppercase;
	color: var(--chn-color-muted);
	padding: var(--chn-space-4) var(--chn-space-4);
	text-align: left;
	border: 0;
}
body.chn-cart table.cart thead th.product-price,
body.chn-cart table.cart thead th.product-subtotal,
body.chn-cart table.cart thead th.product-quantity { text-align: right; }
body.chn-cart table.cart thead th.product-quantity { text-align: center; }
body.chn-cart table.cart tbody td {
	padding: var(--chn-space-4);
	border-bottom: 1px solid var(--chn-color-border);
	vertical-align: middle;
	font-size: 15px;
	background: var(--chn-color-surface);
}
body.chn-cart table.cart tbody tr:last-child td { border-bottom: 0; }
body.chn-cart table.cart tbody td.product-thumbnail,
body.chn-cart table.cart thead th.product-thumbnail { width: 80px; max-width: 80px; }
body.chn-cart table.cart tbody td.product-remove,
body.chn-cart table.cart thead th.product-remove { width: 40px; max-width: 40px; }
body.chn-cart table.cart tbody td.product-quantity,
body.chn-cart table.cart thead th.product-quantity { width: 124px; }
/* Price + subtotal columns: 130px was too narrow for recurring-billing
   formats like "US $9.99 / month" (~165px). The cells used nowrap +
   overflow:visible so the text spilled outside the cell border.
   Widened to 170px; product-name column compensates with a tighter
   min-width since the table is fixed-layout and the parent is 840px:
   40 (remove) + 80 (thumb) + 296 (product-name) + 170 (price) + 124
   (qty) + 170 (subtotal) = 880px → resolves to 840 by collapsing the
   product-name column down to its min-width on this layout. */
body.chn-cart table.cart tbody td.product-price,
body.chn-cart table.cart thead th.product-price { width: 180px; white-space: nowrap; }
body.chn-cart table.cart tbody td.product-subtotal,
body.chn-cart table.cart thead th.product-subtotal { width: 180px; white-space: nowrap; }
body.chn-cart table.cart tbody td.product-name { min-width: 160px; }
/* Numeric cells: prevent the multi-currency span (woocs_special_price_code +
 * amount + bdi triplet) from forcing a line-break or overflow inside a
 * narrow column. The cell already declares white-space: nowrap. */
body.chn-cart table.cart tbody td.product-price > *,
body.chn-cart table.cart tbody td.product-subtotal > * { white-space: nowrap; }
body.chn-cart table.cart tbody td.product-thumbnail a { display: block; }
body.chn-cart table.cart tbody td.product-thumbnail img {
	width: 80px;
	height: 80px;
	object-fit: cover;
	border-radius: var(--chn-radius-sm);
	display: block;
}
body.chn-cart table.cart tbody td.product-name > a {
	font-family: var(--chn-font-serif);
	font-weight: 600;
	font-size: 17px;
	color: var(--chn-color-text);
	text-decoration: none;
	line-height: 1.25;
}
body.chn-cart table.cart tbody td.product-name > a:hover { color: var(--chn-color-primary); }
.chn-cart-seller {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 5px 8px;
	margin-top: 8px;
	font-family: var(--chn-font-sans);
	font-size: 12px;
	line-height: 1.35;
}
.chn-cart-seller__label {
	color: var(--chn-color-muted);
	font-size: 10px;
	font-weight: 700;
	letter-spacing: .12em;
	text-transform: uppercase;
}
body.chn-cart table.cart tbody td.product-name .chn-cart-seller__link {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	color: var(--chn-color-primary);
	font-family: var(--chn-font-sans);
	font-size: 12px;
	font-weight: 700;
	line-height: 1.35;
	text-decoration: none;
}
body.chn-cart table.cart tbody td.product-name .chn-cart-seller__link:hover,
body.chn-cart table.cart tbody td.product-name .chn-cart-seller__link:focus-visible {
	color: var(--chn-color-primary-700);
	text-decoration: underline;
}
body.chn-cart table.cart tbody td.product-name .variation,
body.chn-cart table.cart tbody td.product-name dl.variation {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 6px 0 0;
	padding: 0;
	font: 500 12px/1.2 var(--chn-font-mono);
	color: var(--chn-color-muted);
}
body.chn-cart table.cart tbody td.product-name .variation dt,
body.chn-cart table.cart tbody td.product-name .variation dd {
	display: inline;
	margin: 0;
	padding: 2px 8px;
	background: var(--chn-color-surface-alt);
	border: 1px solid var(--chn-color-border);
	border-radius: 999px;
	letter-spacing: .04em;
	text-transform: uppercase;
	font-size: 10.5px;
}
body.chn-cart table.cart tbody td.product-price,
body.chn-cart table.cart tbody td.product-subtotal {
	font: 500 15.5px/1 var(--chn-font-mono);
	font-feature-settings: "tnum";
	text-align: right;
	color: var(--chn-color-text);
	white-space: nowrap;
}
body.chn-cart table.cart tbody td.product-subtotal { color: var(--chn-color-primary); font-weight: 600; }

/* Qty input + +/- buttons. */
body.chn-cart .quantity {
	display: inline-flex;
	align-items: stretch;
	border: 1px solid var(--chn-color-primary);
	border-radius: var(--chn-radius-sm);
	overflow: hidden;
	background: var(--chn-color-surface);
}
body.chn-cart .quantity input.qty,
body.chn-cart .quantity .input-text {
	width: 54px;
	min-width: 44px;
	height: 44px;
	border: 0;
	background: transparent;
	color: var(--chn-color-text);
	font: 500 15px/1 var(--chn-font-mono);
	font-feature-settings: "tnum";
	text-align: center;
	padding: 0;
	-moz-appearance: textfield;
}
body.chn-cart .quantity input.qty::-webkit-outer-spin-button,
body.chn-cart .quantity input.qty::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
body.chn-cart .quantity input.qty:focus {
	outline: 3px solid rgba(11, 59, 148, .12);
	outline-offset: 0;
}
body.chn-cart .quantity .qty-minus,
body.chn-cart .quantity .qty-plus,
body.chn-cart .quantity button {
	width: 36px;
	height: 44px;
	border: 0;
	background: var(--chn-color-surface-alt);
	color: var(--chn-color-primary);
	font: 600 16px/1 var(--chn-font-mono);
	cursor: pointer;
}
body.chn-cart .quantity .qty-minus:hover,
body.chn-cart .quantity .qty-plus:hover { background: rgba(11, 59, 148, .06); }
body.chn-cart .quantity .chn-qty-stepper {
	display: grid;
	grid-template-rows: 1fr 1fr;
	width: 32px;
	height: 48px;
	border-left: 1px solid var(--chn-color-border);
}
body.chn-cart .quantity button.chn-qty-button {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 24px;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: var(--chn-color-surface-alt);
	color: var(--chn-color-primary);
	box-shadow: none;
	cursor: pointer;
}
body.chn-cart .quantity button.chn-qty-button:first-child {
	border-bottom: 1px solid var(--chn-color-border);
}
body.chn-cart .quantity button.chn-qty-button svg {
	width: 11px;
	height: 7px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
}
body.chn-cart .quantity button.chn-qty-button:hover,
body.chn-cart .quantity button.chn-qty-button:focus-visible {
	background: var(--chn-color-primary);
	color: #fff;
	outline: 0;
}
body.chn-cart td.product-quantity { text-align: center; }

/* Remove (×) button. */
body.chn-cart .product-remove { width: 48px; text-align: center; }
body.chn-cart .product-remove a.remove,
body.chn-cart a.remove {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: transparent;
	color: var(--chn-color-muted);
	font: 500 18px/1 var(--chn-font-sans);
	text-decoration: none;
	border: 1px solid var(--chn-color-border);
	transition: all .15s ease;
}
body.chn-cart .product-remove a.remove:hover,
body.chn-cart a.remove:hover {
	color: var(--chn-color-accent);
	border-color: var(--chn-color-accent);
	background: rgba(243, 128, 45, .08);
}

/* Update cart + continue shopping. `.actions` is a `<td colspan="6">` row
 * spanning the whole cart table. To get a proper full-width flex strip we
 * flip the actions TR + TD to block flow so they no longer obey the table
 * column algorithm — the inner content then renders as a flex row below
 * the items at full cart-form width. */
body.chn-cart .woocommerce-cart-form table.cart > tbody > tr:has(td.actions),
body.chn-cart table.cart tbody tr:has(td.actions) {
	display: block;
	height: auto;
	background: var(--chn-color-surface-alt);
	border-top: 1px solid var(--chn-color-border);
}
body.chn-cart td.actions,
body.chn-cart .actions {
	display: flex;
	flex-wrap: wrap;
	gap: var(--chn-space-3);
	align-items: center;
	justify-content: space-between;
	width: 100%;
	height: auto;
	box-sizing: border-box;
	padding: var(--chn-space-4) !important;
	background: var(--chn-color-surface-alt);
	border: 0 !important;
}
body.chn-cart .actions .button[name="update_cart"],
body.chn-cart .actions button[name="update_cart"] {
	background: transparent;
	color: var(--chn-color-primary);
	border: 1px solid var(--chn-color-primary);
	font: 700 12.5px/1 var(--chn-font-sans);
	letter-spacing: .04em;
	text-transform: uppercase;
	padding: 11px 22px;
	border-radius: var(--chn-radius-sm);
	cursor: pointer;
	min-height: 44px;
}
body.chn-cart .actions .button[name="update_cart"]:hover { background: rgba(11, 59, 148, .06); }

/* Coupon section — flex layout with stable widths. */
body.chn-cart .coupon {
	display: flex;
	flex-wrap: nowrap;
	gap: var(--chn-space-3);
	align-items: center;
	flex: 1 1 320px;
	min-width: 280px;
	max-width: 520px;
	padding: 0;
	margin: 0;
}
body.chn-cart .coupon label {
	font: 700 11px/1 var(--chn-font-sans);
	letter-spacing: .22em;
	text-transform: uppercase;
	color: var(--chn-color-muted);
}
body.chn-cart .coupon input[name="coupon_code"],
body.chn-cart .coupon input#coupon_code {
	flex: 1 1 160px;
	height: 44px;
	border: 1px solid var(--chn-color-primary);
	border-radius: var(--chn-radius-sm);
	background: var(--chn-color-surface);
	padding: 0 var(--chn-space-3);
	font: 500 14px/1 var(--chn-font-mono);
	color: var(--chn-color-text);
}
body.chn-cart .coupon input[name="coupon_code"]:focus,
body.chn-cart .coupon input#coupon_code:focus {
	outline: 3px solid rgba(11, 59, 148, .12);
	outline-offset: 0;
}
body.chn-cart .coupon button[name="apply_coupon"] {
	background: var(--chn-color-primary);
	color: #fff;
	border: 1px solid var(--chn-color-primary);
	font: 700 12.5px/1 var(--chn-font-sans);
	letter-spacing: .04em;
	text-transform: uppercase;
	padding: 11px 18px;
	border-radius: var(--chn-radius-sm);
	cursor: pointer;
	min-height: 44px;
}
body.chn-cart .coupon button[name="apply_coupon"]:hover { background: var(--chn-color-primary-700); }

/* Cart totals (right column). */
body.chn-cart .cart-collaterals {
	display: block;
	width: 100%;
	margin-top: var(--chn-space-5);
}
body.chn-cart .cart-collaterals .cart_totals {
	background: var(--chn-color-card);
	border: 1px solid var(--chn-color-border);
	border-radius: var(--chn-radius-md);
	padding: var(--chn-space-5);
	width: 100%;
}
body.chn-cart .cart-collaterals .cart_totals h2 {
	font: 700 11px/1 var(--chn-font-sans);
	letter-spacing: .22em;
	text-transform: uppercase;
	color: var(--chn-color-muted);
	margin: 0 0 var(--chn-space-4);
}
body.chn-cart .cart-collaterals .cart_totals table {
	width: 100%;
	border: 0;
	background: transparent;
}
body.chn-cart .cart-collaterals .cart_totals table th,
body.chn-cart .cart-collaterals .cart_totals table td {
	padding: var(--chn-space-3) 0;
	border: 0;
	border-bottom: 1px solid var(--chn-color-border);
	background: transparent;
	font: 400 14.5px/1.3 var(--chn-font-sans);
	color: var(--chn-color-text);
}
body.chn-cart .cart-collaterals .cart_totals table th {
	font-weight: 500;
	color: var(--chn-color-muted);
	text-align: left;
	letter-spacing: .04em;
}
body.chn-cart .cart-collaterals .cart_totals table td {
	font-family: var(--chn-font-mono);
	font-feature-settings: "tnum";
	text-align: right;
}
body.chn-cart .cart-collaterals .cart_totals table tr.order-total th,
body.chn-cart .cart-collaterals .cart_totals table tr.order-total td {
	border-bottom: 0;
	padding-top: var(--chn-space-4);
	font-weight: 600;
	color: var(--chn-color-primary);
}
body.chn-cart .cart-collaterals .cart_totals table tr.order-total td {
	font-size: 20px;
	font-family: var(--chn-font-mono);
}
body.chn-cart .cart-collaterals .wc-proceed-to-checkout {
	padding: var(--chn-space-4) 0 0;
}
body.chn-cart .cart-collaterals .checkout-button,
body.chn-cart .cart-collaterals a.checkout-button {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: var(--chn-space-2);
	width: 100%;
	min-height: 52px;
	background: var(--chn-color-primary);
	color: #fff;
	border: 1px solid var(--chn-color-primary);
	font: 700 12.5px/1 var(--chn-font-sans);
	letter-spacing: .06em;
	text-transform: uppercase;
	padding: 0 var(--chn-space-5);
	border-radius: var(--chn-radius-sm);
	text-decoration: none;
	transition: background .15s ease, transform .12s ease;
}
body.chn-cart .cart-collaterals .checkout-button:hover {
	background: var(--chn-color-primary-700);
	color: #fff;
	transform: translateY(-1px);
}
body.chn-cart .shipping-calculator-button {
	color: var(--chn-color-primary);
	font: 500 13px/1 var(--chn-font-sans);
	text-decoration: underline;
}
body.chn-cart .cart-subtotal td,
body.chn-cart .shipping td,
body.chn-cart .tax-total td {
	font-family: var(--chn-font-mono) !important;
	font-feature-settings: "tnum";
}

/* Cross-sells reduce visual noise on /cart/. */
body.chn-cart .cross-sells {
	margin-top: var(--chn-space-7);
	padding-top: var(--chn-space-5);
	border-top: 1px solid var(--chn-color-border);
}
body.chn-cart .cross-sells > h2 {
	font: 600 22px/1.2 var(--chn-font-serif);
	color: var(--chn-color-primary);
	margin: 0 0 var(--chn-space-4);
}

/* 900px+ — two-column layout: form left, totals sticky right.
 * `.woocommerce` is a grid wrapper. Chrome elements that we inject above
 * (`.chn-breadcrumb-strip`, `.chn-page-hero`) and other utility blocks
 * (notices, cross-sells) span the full row so they sit above the
 * cart-form / cart-collaterals two-column row.
 */
@media (min-width: 900px) {
	body.chn-cart .woocommerce {
		display: grid;
		grid-template-columns: minmax(0, 1fr) 360px;
		column-gap: var(--chn-space-6);
		row-gap: var(--chn-space-5);
		align-items: start;
	}
	body.chn-cart .woocommerce > .chn-breadcrumb-strip,
	body.chn-cart .woocommerce > .chn-page-hero,
	body.chn-cart .woocommerce > .woocommerce-notices-wrapper,
	body.chn-cart .woocommerce > .cross-sells {
		grid-column: 1 / -1;
	}
	body.chn-cart .woocommerce > .woocommerce-notices-wrapper {
		grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
	}
	body.chn-cart .woocommerce > .woocommerce-cart-form {
		grid-column: 1;
		min-width: 0;
	}
	body.chn-cart .woocommerce > .cart-collaterals {
		grid-column: 2;
		margin-top: 0;
		position: sticky;
		top: 96px;
	}
}

/* Mobile-stacked totals — full-width totals card, table reformats to rows. */
@media (max-width: 899px) {
	body.chn-cart .woocommerce { padding: var(--chn-space-5) var(--chn-space-3); }
	body.chn-cart .cart-collaterals .cart_totals { margin: 0 0 var(--chn-space-7); }
	body.chn-cart td.actions,
	body.chn-cart .actions {
		flex-direction: column;
		flex-wrap: nowrap;
		align-items: stretch;
		gap: var(--chn-space-3);
	}
	body.chn-cart .actions .coupon {
		width: 100%; max-width: none; min-width: 0;
		flex-wrap: nowrap;
		flex-direction: row;
		flex: 0 0 auto; /* override desktop `flex: 1 1 320px` which becomes
		                   height when actions td is column-flex */
		height: auto;
	}
	/* Below ~520 the coupon row breaks vertically to give the input enough room. */
	body.chn-cart .actions .coupon input[name="coupon_code"] { flex: 1 1 60%; min-width: 0; }
	body.chn-cart .actions .coupon button[name="apply_coupon"] { flex: 0 0 auto; }
	body.chn-cart table.cart thead { display: none; }
	body.chn-cart table.cart tbody tr.cart_item {
		display: grid;
		grid-template-columns: 64px minmax(0, 1fr) auto;
		grid-template-rows: auto auto auto;
		gap: 4px var(--chn-space-3);
		padding: var(--chn-space-3);
		border-bottom: 1px solid var(--chn-color-border);
	}
	body.chn-cart table.cart tbody tr.cart_item:last-child { border-bottom: 0; }
	/* Mobile cells: override the desktop explicit `width:` declarations so
	 * the grid template wins — fixed widths there were forcing cols 2/3 to
	 * 124/130px regardless of the 1fr/auto specs. */
	body.chn-cart table.cart tbody tr.cart_item > td {
		width: auto !important;
		max-width: none;
		float: none !important;
	}
	/* WooCommerce's responsive table CSS adds data-title labels and hides the
	 * thumbnail. This cart already has a purpose-built grid, so suppress those
	 * generated labels and restore the image explicitly. */
	body.chn-cart table.cart tbody tr.cart_item > td.product-remove::before,
	body.chn-cart table.cart tbody tr.cart_item > td.product-thumbnail::before,
	body.chn-cart table.cart tbody tr.cart_item > td.product-name::before,
	body.chn-cart table.cart tbody tr.cart_item > td.product-quantity::before {
		display: none !important;
		content: none !important;
	}
	/* Actions row (`<tr><td colspan="6" class="actions">`): override the
	 * cart_item grid + restore block layout so the coupon row can flow as
	 * a single full-width cell beneath the cart items. */
	body.chn-cart table.cart tbody tr:has(td.actions) {
		display: block;
	}
	body.chn-cart table.cart tbody tr:has(td.actions) td.actions {
		display: flex;
		flex-direction: column;
		gap: var(--chn-space-3);
		width: 100%;
		padding: var(--chn-space-4) !important;
	}
	body.chn-cart table.cart tbody td {
		display: block;
		padding: 0;
		border: 0;
		min-width: 0;
	}
	body.chn-cart table.cart tbody td.product-remove {
		grid-row: 1; grid-column: 3; justify-self: end;
		width: auto;
	}
	body.chn-cart table.cart tbody td.product-thumbnail {
		display: block !important;
		grid-row: 1 / span 3; grid-column: 1;
		width: 72px; max-width: 72px;
	}
	body.chn-cart table.cart tbody td.product-thumbnail img {
		width: 64px; height: 64px;
	}
	body.chn-cart table.cart tbody td.product-name {
		grid-row: 1; grid-column: 2;
		min-width: 0;
		font-size: 14px;
		text-align: left !important;
	}
	body.chn-cart table.cart tbody td.product-name > a {
		font-size: 15px;
	}
	body.chn-cart table.cart tbody td.product-price {
		grid-row: 2; grid-column: 2 / span 2;
		text-align: left !important;
		color: var(--chn-color-muted);
		font-size: 13px;
		min-width: 0;
		overflow: visible;
	}
	body.chn-cart table.cart tbody td.product-price::before {
		content: "Price: ";
		text-transform: uppercase;
		letter-spacing: .12em;
		font-size: 10.5px;
		color: var(--chn-color-muted);
		margin-right: 6px;
	}
	body.chn-cart table.cart tbody td.product-quantity {
		grid-row: 3; grid-column: 2;
		text-align: left !important;
		padding-top: var(--chn-space-1);
	}
	body.chn-cart table.cart tbody td.product-subtotal {
		grid-row: 3; grid-column: 3;
		text-align: right !important;
		align-self: center;
		font-size: 14px;
	}
	body.chn-cart table.cart tbody td.product-subtotal::before {
		content: "Total: ";
		text-transform: uppercase;
		letter-spacing: .12em;
		font-size: 10.5px;
		color: var(--chn-color-muted);
		font-family: var(--chn-font-sans);
		font-weight: 700;
		margin-right: 4px;
	}
}

/* Below 480px — coupon row stacks vertically so input + button are easier
 * to tap and don't squeeze each other. */
@media (max-width: 480px) {
	body.chn-cart .actions .coupon {
		flex-direction: column;
		align-items: stretch;
		align-self: stretch;
		gap: var(--chn-space-2);
		width: 100% !important;
		max-width: none !important;
	}
	body.chn-cart .actions .coupon input[name="coupon_code"],
	body.chn-cart .actions .coupon button[name="apply_coupon"] {
		width: 100% !important;
		max-width: none !important;
		flex: 0 0 auto !important;
	}
	body.chn-cart .woocommerce-cart-form .actions .coupon #coupon_code {
		height: 44px !important;
		min-height: 44px !important;
		max-height: 44px !important;
		box-sizing: border-box;
	}
}

/* =====================================================================
 * 4. EMPTY-CART STATE — navy info card + 3 route tiles.
 * ===================================================================== */

/* WC's stock "Your cart is currently empty" message + return-to-shop link
 * are both superseded by our chn-cart-empty tile grid. Hide them. */
body.chn-cart .cart-empty,
body.chn-cart .wc-empty-cart-message,
body.chn-cart .return-to-shop {
	display: none !important;
}
.chn-cart-empty {
	background: var(--chn-color-surface);
	border: 1px solid var(--chn-color-border);
	border-radius: var(--chn-radius-md);
	padding: var(--chn-space-6);
	margin: 0 0 var(--chn-space-7);
}
.chn-cart-empty__title {
	margin: 0 0 var(--chn-space-2);
	font: 600 28px/1.2 var(--chn-font-serif);
	color: var(--chn-color-primary);
	letter-spacing: -.015em;
}
.chn-cart-empty__sub {
	margin: 0 0 var(--chn-space-5);
	font: 400 16px/1.55 var(--chn-font-sans);
	color: var(--chn-color-muted);
	max-width: 56ch;
}
.chn-cart-empty__tiles {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--chn-space-3);
}
.chn-cart-empty__tile {
	display: grid;
	grid-template-columns: 1fr auto;
	grid-template-rows: auto auto;
	gap: 2px var(--chn-space-3);
	align-items: center;
	padding: var(--chn-space-4) var(--chn-space-5);
	background: var(--chn-color-surface-alt);
	border: 1px solid var(--chn-color-border);
	border-left: 2px solid var(--chn-color-accent);
	border-radius: var(--chn-radius-md);
	text-decoration: none;
	color: var(--chn-color-text);
	transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.chn-cart-empty__tile:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 24px -10px rgba(11, 59, 148, .2);
	border-left-color: var(--chn-color-primary);
}
.chn-cart-empty__tile-eyebrow {
	grid-row: 1; grid-column: 1;
	font: 700 11px/1 var(--chn-font-sans);
	letter-spacing: .22em;
	text-transform: uppercase;
	color: var(--chn-color-muted);
}
.chn-cart-empty__tile-title {
	grid-row: 2; grid-column: 1;
	font: 600 18px/1.2 var(--chn-font-serif);
	color: var(--chn-color-primary);
}
.chn-cart-empty__tile-arrow {
	grid-row: 1 / span 2; grid-column: 2;
	font: 600 20px/1 var(--chn-font-mono);
	color: var(--chn-color-accent);
}
@media (min-width: 700px) {
	.chn-cart-empty__tiles { grid-template-columns: repeat(3, 1fr); }
}
.chn-cart-empty__return {
	margin: var(--chn-space-5) 0 0;
	text-align: left;
}
.chn-cart-empty__return a {
	font: 700 12.5px/1 var(--chn-font-sans);
	letter-spacing: .04em;
	text-transform: uppercase;
	color: var(--chn-color-muted);
	text-decoration: none;
	transition: color .15s ease;
}
.chn-cart-empty__return a:hover {
	color: var(--chn-color-primary);
}

/* =====================================================================
 * 5. CHECKOUT — 2-col layout, branded inputs, payment gateway cards.
 * ===================================================================== */

body.chn-checkout form.checkout {
	display: block;
}
body.chn-checkout h3,
body.chn-checkout .woocommerce-billing-fields > h3,
body.chn-checkout .woocommerce-shipping-fields > h3,
body.chn-checkout #order_review_heading,
body.chn-checkout .woocommerce-additional-fields > h3 {
	font: 600 22px/1.2 var(--chn-font-serif);
	color: var(--chn-color-primary);
	margin: 0 0 var(--chn-space-4);
	letter-spacing: -.01em;
	position: relative;
	padding-top: var(--chn-space-5);
}
body.chn-checkout h3::before,
body.chn-checkout .woocommerce-billing-fields > h3::before,
body.chn-checkout .woocommerce-shipping-fields > h3::before,
body.chn-checkout #order_review_heading::before,
body.chn-checkout .woocommerce-additional-fields > h3::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	width: 28px;
	height: 2px;
	background: var(--chn-color-accent);
}

body.chn-checkout .form-row {
	margin-bottom: var(--chn-space-4);
}
body.chn-checkout .form-row label {
	display: block;
	font: 700 11px/1.3 var(--chn-font-sans);
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--chn-color-muted);
	margin-bottom: 6px;
}
body.chn-checkout .form-row label .required,
body.chn-checkout .form-row label abbr.required {
	color: var(--chn-color-accent);
	text-decoration: none;
	margin-left: 2px;
}
body.chn-checkout .form-row input[type="text"],
body.chn-checkout .form-row input[type="email"],
body.chn-checkout .form-row input[type="tel"],
body.chn-checkout .form-row input[type="number"],
body.chn-checkout .form-row input[type="password"],
body.chn-checkout .form-row select,
body.chn-checkout .form-row textarea,
body.chn-checkout .select2-container .select2-selection--single {
	width: 100% !important;
	min-height: 44px;
	height: 44px;
	border: 1px solid var(--chn-color-primary) !important;
	border-radius: var(--chn-radius-sm);
	background: var(--chn-color-surface);
	padding: 0 var(--chn-space-3);
	font: 500 15px/1 var(--chn-font-sans);
	color: var(--chn-color-text);
	box-shadow: none;
	transition: outline-color .15s ease;
}
body.chn-checkout .form-row textarea {
	min-height: 100px;
	height: auto;
	padding: var(--chn-space-3);
	font-family: var(--chn-font-sans);
	line-height: 1.45;
}
/* Select2 keeps the original select in the accessibility tree. Do not let
 * the broad field-width rule turn that visually-hidden control into a
 * viewport-wide layout box. */
body.chn-checkout .form-row select.select2-hidden-accessible {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	min-height: 0 !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	white-space: nowrap !important;
}
body.chn-checkout .form-row input:focus,
body.chn-checkout .form-row select:focus,
body.chn-checkout .form-row textarea:focus,
body.chn-checkout .select2-container--open .select2-selection {
	outline: 3px solid rgba(11, 59, 148, .12);
	outline-offset: 0;
	border-color: var(--chn-color-primary) !important;
}
body.chn-checkout .select2-container .select2-selection--single .select2-selection__rendered {
	line-height: 42px;
	padding-left: 0;
	padding-right: 28px;
	color: var(--chn-color-text);
	font-family: var(--chn-font-sans);
}
body.chn-checkout .select2-container .select2-selection--single .select2-selection__arrow {
	height: 42px;
}

/* Shipping toggle. */
body.chn-checkout #ship-to-different-address label {
	display: inline-flex;
	align-items: center;
	gap: var(--chn-space-2);
	font: 500 15px/1.3 var(--chn-font-sans);
	color: var(--chn-color-text);
	text-transform: none;
	letter-spacing: 0;
}
body.chn-checkout #ship-to-different-address input[type="checkbox"] {
	width: 18px;
	height: 18px;
	accent-color: var(--chn-color-primary);
	margin: 0;
}

/* Payment methods. */
body.chn-checkout #payment {
	background: transparent;
	border: 0;
	margin: 0;
	padding: 0;
}
body.chn-checkout #payment ul.payment_methods {
	list-style: none;
	margin: 0 0 var(--chn-space-4);
	padding: 0;
	display: grid;
	gap: var(--chn-space-3);
	border: 0;
}
body.chn-checkout #payment ul.payment_methods li.wc_payment_method {
	background: var(--chn-color-surface);
	border: 1px solid var(--chn-color-border);
	border-left: 2px solid var(--chn-color-border);
	border-radius: var(--chn-radius-md);
	padding: var(--chn-space-4) var(--chn-space-5);
	margin: 0;
	transition: border-color .15s ease, background .15s ease;
}
body.chn-checkout #payment ul.payment_methods li.wc_payment_method.is-selected,
body.chn-checkout #payment ul.payment_methods li.wc_payment_method:has(input[type="radio"]:checked) {
	border-color: var(--chn-color-primary);
	border-left-color: var(--chn-color-accent);
	background: var(--chn-color-surface);
	box-shadow: 0 1px 0 rgba(11, 59, 148, .06);
}
body.chn-checkout #payment ul.payment_methods li.wc_payment_method input[type="radio"] {
	width: 18px;
	height: 18px;
	accent-color: var(--chn-color-primary);
	margin-right: var(--chn-space-3);
	vertical-align: middle;
}
body.chn-checkout #payment ul.payment_methods li.wc_payment_method label {
	font: 600 16px/1.3 var(--chn-font-sans);
	color: var(--chn-color-text);
	display: inline;
	cursor: pointer;
	text-transform: none;
	letter-spacing: 0;
}
body.chn-checkout #payment ul.payment_methods li.wc_payment_method img {
	max-height: 28px;
	width: auto;
	margin-left: var(--chn-space-3);
	vertical-align: middle;
}
body.chn-checkout #payment ul.payment_methods .payment_box {
	background: var(--chn-color-surface-alt);
	border-radius: var(--chn-radius-sm);
	padding: var(--chn-space-3) var(--chn-space-4);
	margin: var(--chn-space-3) 0 0;
	font: 400 14px/1.5 var(--chn-font-sans);
	color: var(--chn-color-muted);
}
body.chn-checkout #payment ul.payment_methods .payment_box::before {
	display: none;
}

/* Place order button. */
body.chn-checkout #payment .place-order,
body.chn-checkout #payment #place_order {
	margin-top: var(--chn-space-5);
}
body.chn-checkout #payment #place_order,
body.chn-checkout button#place_order {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--chn-space-2);
	min-height: 52px;
	background: var(--chn-color-primary);
	color: #fff;
	border: 1px solid var(--chn-color-primary);
	font: 700 12.5px/1 var(--chn-font-sans);
	letter-spacing: .06em;
	text-transform: uppercase;
	padding: 0 var(--chn-space-6);
	border-radius: var(--chn-radius-sm);
	cursor: pointer;
	transition: background .15s ease, transform .12s ease;
	width: 100%;
}
body.chn-checkout #payment #place_order:hover,
body.chn-checkout button#place_order:hover {
	background: var(--chn-color-primary-700);
	transform: translateY(-1px);
	color: #fff;
}

/* Terms checkbox. */
body.chn-checkout .woocommerce-terms-and-conditions-wrapper {
	margin-top: var(--chn-space-4);
	font: 400 13.5px/1.5 var(--chn-font-sans);
	color: var(--chn-color-muted);
}
body.chn-checkout .woocommerce-terms-and-conditions-wrapper input[type="checkbox"] {
	width: 18px;
	height: 18px;
	accent-color: var(--chn-color-primary);
	margin-right: var(--chn-space-2);
}
body.chn-checkout .woocommerce-terms-and-conditions a {
	color: var(--chn-color-primary);
	text-decoration: underline;
}

/* Order review summary (right column). */
body.chn-checkout #order_review_heading,
body.chn-checkout #order_review {
	background: var(--chn-color-card);
	border: 1px solid var(--chn-color-border);
	border-radius: var(--chn-radius-md);
}
body.chn-checkout #order_review_heading {
	margin: 0;
	padding: var(--chn-space-4) var(--chn-space-5) 0;
	border-bottom: 0;
	border-bottom-left-radius: 0;
	border-bottom-right-radius: 0;
	font: 700 11px/1 var(--chn-font-sans);
	letter-spacing: .22em;
	text-transform: uppercase;
	color: var(--chn-color-muted);
}
body.chn-checkout #order_review_heading::before { display: none; }
body.chn-checkout #order_review {
	padding: var(--chn-space-4) var(--chn-space-5) var(--chn-space-5);
	border-top: 0;
	border-top-left-radius: 0;
	border-top-right-radius: 0;
	margin-top: 0;
}
body.chn-checkout #order_review table.shop_table {
	width: 100%;
	border: 0;
	background: transparent;
	border-radius: 0;
}
body.chn-checkout #order_review table.shop_table thead { display: none; }
body.chn-checkout #order_review table.shop_table tr.cart_item td {
	padding: var(--chn-space-3) 0;
	border: 0;
	border-bottom: 1px solid var(--chn-color-border);
	background: transparent;
	font: 500 14px/1.4 var(--chn-font-sans);
}
body.chn-checkout #order_review table.shop_table tr.cart_item td.product-name {
	color: var(--chn-color-text);
}
body.chn-checkout #order_review table.shop_table tr.cart_item td.product-total {
	text-align: right;
	font: 500 14.5px/1 var(--chn-font-mono);
	font-feature-settings: "tnum";
	color: var(--chn-color-primary);
	white-space: nowrap;
	padding-left: var(--chn-space-3);
}
body.chn-checkout #order_review table.shop_table .product-quantity {
	color: var(--chn-color-muted);
	font-family: var(--chn-font-mono);
	font-feature-settings: "tnum";
	margin-left: 4px;
}
body.chn-checkout #order_review table.shop_table tfoot th,
body.chn-checkout #order_review table.shop_table tfoot td {
	padding: var(--chn-space-3) 0;
	border: 0;
	border-bottom: 1px solid var(--chn-color-border);
	background: transparent;
	font: 500 14px/1.3 var(--chn-font-sans);
	color: var(--chn-color-text);
}
body.chn-checkout #order_review table.shop_table tfoot th {
	color: var(--chn-color-muted);
	text-align: left;
	font-weight: 500;
	letter-spacing: .04em;
}
body.chn-checkout #order_review table.shop_table tfoot td {
	font-family: var(--chn-font-mono);
	font-feature-settings: "tnum";
	text-align: right;
}
body.chn-checkout #order_review table.shop_table tfoot tr.order-total th,
body.chn-checkout #order_review table.shop_table tfoot tr.order-total td {
	padding-top: var(--chn-space-4);
	border-bottom: 0;
	font-weight: 600;
	color: var(--chn-color-primary);
}
body.chn-checkout #order_review table.shop_table tfoot tr.order-total td {
	font-size: 20px;
}

/* 900px+ — two-column checkout layout. */
@media (min-width: 900px) {
	body.chn-checkout form.checkout.woocommerce-checkout {
		display: grid;
		grid-template-columns: minmax(0, 1fr) 380px;
		grid-template-areas:
			"login    login"
			"coupon   coupon"
			"customer review"
			"customer payment";
		column-gap: var(--chn-space-6);
		row-gap: var(--chn-space-5);
		align-items: start;
	}
	body.chn-checkout form.checkout > .woocommerce-form-login-toggle { grid-area: login; }
	body.chn-checkout form.checkout > .woocommerce-form-coupon-toggle { grid-area: coupon; }
	body.chn-checkout form.checkout > #customer_details { grid-area: customer; }
	body.chn-checkout form.checkout > #order_review_heading,
	body.chn-checkout form.checkout > #order_review {
		grid-area: review;
		position: sticky;
		top: 96px;
	}
	body.chn-checkout form.checkout > #order_review_heading + #order_review { grid-area: review; }
	body.chn-checkout form.checkout #payment { grid-area: review; }

	body.chn-checkout #customer_details .col-1,
	body.chn-checkout #customer_details .col-2 {
		width: 100%;
		float: none;
		padding: 0;
	}
	body.chn-checkout #customer_details {
		display: grid;
		gap: var(--chn-space-5);
	}
}

/* Two-column name fields. */
@media (min-width: 560px) {
	body.chn-checkout .woocommerce-billing-fields__field-wrapper,
	body.chn-checkout .woocommerce-shipping-fields__field-wrapper,
	body.chn-checkout #customer_details .col-1 .form-row-wrapper,
	body.chn-checkout #customer_details .col-2 .form-row-wrapper {
		display: grid;
		grid-template-columns: 1fr 1fr;
		column-gap: var(--chn-space-4);
	}
	body.chn-checkout .form-row-first { grid-column: 1; }
	body.chn-checkout .form-row-last { grid-column: 2; }
	body.chn-checkout .form-row-wide,
	body.chn-checkout .form-row.notes,
	body.chn-checkout .form-row.address-field { grid-column: 1 / -1; }
}

/* =====================================================================
 * 6. CHECKOUT TRUST FOOTER.
 * ===================================================================== */

.chn-checkout__trust {
	max-width: var(--chn-container);
	margin: var(--chn-space-6) auto 0;
	padding: var(--chn-space-4) var(--chn-space-5);
	display: flex;
	align-items: center;
	gap: var(--chn-space-3);
	background: var(--chn-color-surface-alt);
	border: 1px solid var(--chn-color-border);
	border-left: 2px solid var(--chn-color-accent);
	border-radius: var(--chn-radius-md);
	font-family: var(--chn-font-sans);
}
.chn-checkout__trust-badge {
	font-size: 20px;
	color: var(--chn-color-primary);
}
.chn-checkout__trust-copy {
	font-size: 14px;
	color: var(--chn-color-muted);
	line-height: 1.45;
}
.chn-checkout__trust-copy strong {
	color: var(--chn-color-text);
	font-weight: 600;
	margin-right: 4px;
}

/* =====================================================================
 * 7. ORDER RECEIVED — order details, "what's next", item list.
 * ===================================================================== */

body.chn-order-received .woocommerce { background: var(--chn-color-surface); }
body.chn-order-received .woocommerce-thankyou-order-received {
	margin: 0 0 var(--chn-space-5);
	font: 500 16px/1.5 var(--chn-font-sans);
	color: var(--chn-color-muted);
}
body.chn-order-received ul.woocommerce-thankyou-order-details.order_details,
body.chn-order-received ul.order_details {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--chn-space-4);
	list-style: none;
	margin: 0 0 var(--chn-space-6);
	padding: var(--chn-space-5);
	background: var(--chn-color-paper);
	border: 1px solid var(--chn-color-border);
	border-left: 3px solid var(--chn-color-primary);
	border-radius: var(--chn-radius-md);
}
body.chn-order-received ul.order_details li {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 0;
	margin: 0;
	border: 0;
	font: 400 13.5px/1.3 var(--chn-font-sans);
	color: var(--chn-color-text);
}
body.chn-order-received ul.order_details li::after { display: none; }
body.chn-order-received ul.order_details li strong {
	font: 500 16px/1.2 var(--chn-font-mono);
	font-feature-settings: "tnum";
	color: var(--chn-color-primary);
	letter-spacing: 0;
}
body.chn-order-received ul.order_details li.order {
	border-bottom: 0;
}
body.chn-order-received ul.order_details li.order strong {
	font-size: 22px;
}
@media (min-width: 700px) {
	body.chn-order-received ul.order_details {
		grid-template-columns: repeat(4, 1fr);
	}
}

body.chn-order-received section.woocommerce-order-details,
body.chn-order-received section.woocommerce-customer-details {
	margin: 0 0 var(--chn-space-6);
}
body.chn-order-received section.woocommerce-order-details > h2,
body.chn-order-received section.woocommerce-customer-details > h2,
body.chn-order-received h2.woocommerce-order-details__title,
body.chn-order-received h2.woocommerce-column__title {
	font: 600 22px/1.2 var(--chn-font-serif);
	color: var(--chn-color-primary);
	margin: 0 0 var(--chn-space-4);
	letter-spacing: -.01em;
	padding-top: var(--chn-space-3);
	position: relative;
}
body.chn-order-received section.woocommerce-order-details > h2::before,
body.chn-order-received section.woocommerce-customer-details > h2::before,
body.chn-order-received h2.woocommerce-order-details__title::before,
body.chn-order-received h2.woocommerce-column__title::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	width: 28px;
	height: 2px;
	background: var(--chn-color-accent);
}
body.chn-order-received table.shop_table.order_details {
	width: 100%;
	border: 1px solid var(--chn-color-border);
	border-radius: var(--chn-radius-md);
	overflow: hidden;
	background: var(--chn-color-surface);
	border-collapse: collapse;
}
body.chn-order-received table.shop_table.order_details thead th {
	font: 700 11px/1 var(--chn-font-sans);
	letter-spacing: .22em;
	text-transform: uppercase;
	color: var(--chn-color-muted);
	padding: var(--chn-space-4);
	background: var(--chn-color-surface-alt);
	border-bottom: 1px solid var(--chn-color-border);
	text-align: left;
}
body.chn-order-received table.shop_table.order_details tbody td,
body.chn-order-received table.shop_table.order_details tfoot td,
body.chn-order-received table.shop_table.order_details tfoot th {
	padding: var(--chn-space-4);
	border-bottom: 1px solid var(--chn-color-border);
	background: var(--chn-color-surface);
	font: 400 14.5px/1.4 var(--chn-font-sans);
}
body.chn-order-received table.shop_table.order_details tbody td.product-total,
body.chn-order-received table.shop_table.order_details tfoot td {
	text-align: right;
	font-family: var(--chn-font-mono);
	font-feature-settings: "tnum";
	color: var(--chn-color-primary);
}
body.chn-order-received table.shop_table.order_details tfoot tr.order_item_totals-total th,
body.chn-order-received table.shop_table.order_details tfoot tr:last-child th,
body.chn-order-received table.shop_table.order_details tfoot tr:last-child td {
	border-bottom: 0;
	font-weight: 600;
	font-size: 18px;
	color: var(--chn-color-primary);
}

/* "What happens next" 3-step row. */
.chn-order-next {
	max-width: var(--chn-container);
	margin: 0 auto var(--chn-space-7);
	padding: 0 var(--chn-space-5);
}
.chn-order-next__title {
	font: 600 22px/1.2 var(--chn-font-serif);
	color: var(--chn-color-primary);
	margin: 0 0 var(--chn-space-4);
	letter-spacing: -.01em;
	padding-top: var(--chn-space-3);
	position: relative;
}
.chn-order-next__title::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	width: 28px;
	height: 2px;
	background: var(--chn-color-accent);
}
.chn-order-next__steps {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: var(--chn-space-4);
	grid-template-columns: 1fr;
}
.chn-order-next__step {
	display: grid;
	grid-template-columns: auto 1fr;
	grid-template-rows: auto auto;
	gap: 6px var(--chn-space-3);
	padding: var(--chn-space-4) var(--chn-space-5);
	background: var(--chn-color-card);
	border: 1px solid var(--chn-color-border);
	border-radius: var(--chn-radius-md);
}
.chn-order-next__step-num {
	grid-row: 1 / span 2;
	grid-column: 1;
	align-self: center;
	font: 500 24px/1 var(--chn-font-mono);
	font-feature-settings: "tnum";
	color: var(--chn-color-accent);
	padding-right: var(--chn-space-3);
	border-right: 1px solid var(--chn-color-border);
}
.chn-order-next__step-title {
	grid-row: 1;
	grid-column: 2;
	font: 600 17px/1.2 var(--chn-font-serif);
	color: var(--chn-color-primary);
}
.chn-order-next__step-body {
	grid-row: 2;
	grid-column: 2;
	font: 400 14.5px/1.5 var(--chn-font-sans);
	color: var(--chn-color-muted);
}
@media (min-width: 900px) {
	.chn-order-next__steps { grid-template-columns: repeat(3, 1fr); }
}

/* =====================================================================
 * 8. PMPRO checkout bridge — keep the membership form chrome consistent.
 * Hide-if-empty + label hooks; PMPro itself owns the data.
 * ===================================================================== */

body.chn-checkout .pmpro_checkout {
	font-family: var(--chn-font-sans);
	color: var(--chn-color-text);
}
body.chn-checkout .pmpro_checkout h3 {
	font: 600 22px/1.2 var(--chn-font-serif);
	color: var(--chn-color-primary);
}
