/*
 * Cart and Checkout blocks.
 *
 * WooCommerce's block markup stays intact. This file only themes the block and
 * wc-block-component classes on the cart/checkout pages, using the global token
 * system from main.css.
 */

/* Focused commerce chrome: keep the brand and support route visible without
   carrying the full announcement, catalogue navigation and newsletter into
   high-intent cart/checkout pages. */
.commerce-shell {
	background: var(--surface-page);
	border-bottom: 1px solid var(--line);
}

.commerce-header__inner {
	width: min(100% - 2rem, var(--container));
	min-height: 4.5rem;
	margin-inline: auto;
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
	align-items: center;
	gap: var(--space-sm);
}

.commerce-header__logo {
	display: inline-flex;
	justify-self: center;
	width: clamp(6.75rem, 13vw, 8.5rem);
}

.commerce-header__logo-image {
	width: 100%;
	height: auto;
}

.commerce-header__utility {
	display: inline-flex;
	align-items: center;
	gap: var(--space-2xs);
	min-height: 44px;
	width: fit-content;
	color: var(--ink-soft);
	font-size: var(--step--1);
	text-decoration: none;
}

.commerce-header__utility:hover {
	color: var(--color-ink);
	text-decoration: underline;
	text-underline-offset: 0.2em;
}

.commerce-header__utility--support {
	justify-self: end;
}

.commerce-progress {
	border-top: 1px solid var(--line);
}

.commerce-progress__list {
	width: min(100% - 2rem, 34rem);
	margin: 0 auto;
	padding: var(--space-xs) 0;
	list-style: none;
	display: grid;
	grid-template-columns: repeat(3, 1fr);
}

.commerce-progress__item {
	position: relative;
	display: flex;
	justify-content: center;
	align-items: center;
	min-height: 2.75rem;
	color: var(--ink-soft);
	font-size: var(--step--1);
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.commerce-progress__item + .commerce-progress__item::before {
	content: "";
	position: absolute;
	top: 50%;
	right: calc(50% + 2.5rem);
	left: calc(-50% + 2.5rem);
	height: 1px;
	background: var(--line-strong);
}

.commerce-progress__item.is-current {
	color: var(--color-ink);
}

.commerce-progress__item.is-current::after {
	content: "";
	position: absolute;
	bottom: calc(-1 * var(--space-xs));
	left: 50%;
	width: 2.5rem;
	height: 2px;
	background: var(--color-gold);
	transform: translateX(-50%);
}

.commerce-footer {
	margin-top: var(--space-md);
	border-top: 1px solid var(--line);
	background: var(--surface-page);
}

.commerce-footer__inner {
	width: min(100% - 2rem, var(--container));
	min-height: 5rem;
	margin-inline: auto;
	padding-block: var(--space-sm);
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-xs) var(--space-lg);
	color: var(--ink-soft);
	font-size: var(--step--1);
}

.commerce-footer__copy {
	margin: 0;
}

.commerce-footer__links {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-xs) var(--space-md);
}

.commerce-footer__links a {
	min-height: 44px;
	display: inline-flex;
	align-items: center;
	text-decoration: none;
}

.commerce-footer__links a:hover {
	color: var(--color-ink);
	text-decoration: underline;
	text-underline-offset: 0.2em;
}

.woocommerce-cart .site-main,
.woocommerce-checkout .site-main {
	padding-block: var(--space-lg);
}

.woocommerce-cart .entry-header,
.woocommerce-checkout .entry-header {
	margin-bottom: var(--space-lg);
}

.woocommerce-cart .entry-title,
.woocommerce-checkout .entry-title {
	margin-bottom: var(--space-xs);
	font-size: var(--step-4);
}

.woocommerce-cart .entry-content,
.woocommerce-checkout .entry-content {
	max-width: none;
}

.woocommerce-cart .entry-content > *,
.woocommerce-checkout .entry-content > * {
	margin-top: 0;
}

.woocommerce-cart .wp-block-woocommerce-cart,
.woocommerce-checkout .wp-block-woocommerce-checkout {
	width: 100%;
	color: var(--color-ink);
	font-family: var(--font-body);
}

.woocommerce-cart .wc-block-components-sidebar-layout,
.woocommerce-checkout .wc-block-components-sidebar-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: var(--space-lg);
	margin: 0;
}

.woocommerce-cart .wc-block-components-sidebar-layout .wc-block-components-main,
.woocommerce-cart .wc-block-components-sidebar-layout .wc-block-components-sidebar,
.woocommerce-checkout .wc-block-components-sidebar-layout .wc-block-components-main,
.woocommerce-checkout .wc-block-components-sidebar-layout .wc-block-components-sidebar {
	width: auto;
	padding: 0;
}

.woocommerce-cart .wc-block-components-main,
.woocommerce-checkout .wc-block-components-main {
	min-width: 0;
}

.woocommerce-cart .wc-block-components-sidebar,
.woocommerce-checkout .wc-block-components-sidebar {
	align-self: start;
	padding: var(--space-md);
	background: var(--surface-raised);
	border: 1px solid var(--line);
	border-radius: var(--radius-md);
}

.woocommerce-cart .wc-block-cart,
.woocommerce-checkout .wc-block-checkout {
	padding-top: 0;
}

@media (min-width: 64em) {
	.woocommerce-cart .wc-block-components-sidebar-layout,
	.woocommerce-checkout .wc-block-components-sidebar-layout {
		grid-template-columns: minmax(0, 1fr) minmax(19rem, 24rem);
		gap: var(--space-xl);
	}

	.woocommerce-checkout .wc-block-checkout__sidebar.is-sticky {
		top: calc(var(--nav-h) + var(--space-md));
	}
}

/* Shared block components. */
.woocommerce-cart .wc-block-components-title,
.woocommerce-cart .wc-block-cart__totals-title,
.woocommerce-checkout .wc-block-components-title,
.woocommerce-checkout .wc-block-components-checkout-step__title {
	color: var(--color-ink);
	font-family: var(--font-display);
	font-size: var(--step-2);
	font-weight: 500;
	line-height: 1.15;
}

.woocommerce-cart .wc-block-components-button:not(.is-link),
.woocommerce-checkout .wc-block-components-button:not(.is-link) {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 3rem;
	padding: 0 var(--space-lg);
	border: 1px solid var(--color-ink);
	border-radius: var(--radius-sm);
	background: var(--color-ink);
	box-shadow: none;
	color: var(--ink-on-dark);
	font-family: var(--font-body);
	font-size: var(--step-0);
	line-height: 1.2;
	letter-spacing: 0.04em;
	text-decoration: none;
	transition: background 180ms ease, border-color 180ms ease, color 180ms ease;
}

.woocommerce-cart .wc-block-components-button:not(.is-link):hover,
.woocommerce-checkout .wc-block-components-button:not(.is-link):hover {
	background: color-mix(in srgb, var(--color-ink) 82%, var(--color-sage));
	border-color: color-mix(in srgb, var(--color-ink) 82%, var(--color-sage));
	color: var(--ink-on-dark);
}

/* Keep the high-intent conversion actions ink-led even though the wider site
   now uses deep sage for primary brand actions. These selectors cover both the
   current Cart/Checkout blocks and the classic Woo fallbacks. */
.woocommerce-cart .wp-block-button__link,
.woocommerce-cart .checkout-button,
.woocommerce-checkout #place_order {
	background: var(--color-ink);
	border-color: var(--color-ink);
	color: var(--ink-on-dark);
}

.woocommerce-cart .wp-block-button__link:hover,
.woocommerce-cart .checkout-button:hover,
.woocommerce-checkout #place_order:hover {
	background: color-mix(in srgb, var(--color-ink) 82%, var(--color-sage));
	border-color: color-mix(in srgb, var(--color-ink) 82%, var(--color-sage));
	color: var(--ink-on-dark);
}

.woocommerce-cart .wc-block-components-button:not(.is-link):focus,
.woocommerce-cart .wc-block-components-button:not(.is-link):focus-visible,
.woocommerce-checkout .wc-block-components-button:not(.is-link):focus,
.woocommerce-checkout .wc-block-components-button:not(.is-link):focus-visible {
	outline: 2px solid var(--color-ink);
	outline-offset: 3px;
	box-shadow: 0 0 0 3px var(--color-gold);
}

.woocommerce-cart .wc-block-components-button:not(.is-link)[disabled],
.woocommerce-cart .wc-block-components-button:not(.is-link)[aria-disabled="true"],
.woocommerce-checkout .wc-block-components-button:not(.is-link)[disabled],
.woocommerce-checkout .wc-block-components-button:not(.is-link)[aria-disabled="true"] {
	cursor: not-allowed;
	opacity: 0.62;
}

.woocommerce-cart .wc-block-components-button.is-link,
.woocommerce-checkout .wc-block-components-button.is-link,
.woocommerce-cart .wc-block-components-panel__button,
.woocommerce-checkout .wc-block-components-panel__button,
.woocommerce-cart .wc-block-components-totals-shipping__change-address-button,
.woocommerce-checkout .wc-block-components-totals-shipping__change-address-button,
.woocommerce-checkout .wc-block-components-address-card__edit,
.woocommerce-checkout .wc-block-components-address-form__address_2-toggle {
	color: var(--color-ink);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.18em;
}

.woocommerce-cart .wc-block-components-button.is-link:hover,
.woocommerce-checkout .wc-block-components-button.is-link:hover,
.woocommerce-cart .wc-block-components-panel__button:hover,
.woocommerce-checkout .wc-block-components-panel__button:hover,
.woocommerce-cart .wc-block-components-totals-shipping__change-address-button:hover,
.woocommerce-checkout .wc-block-components-totals-shipping__change-address-button:hover,
.woocommerce-checkout .wc-block-components-address-card__edit:hover,
.woocommerce-checkout .wc-block-components-address-form__address_2-toggle:hover {
	color: var(--color-sage-text);
	text-decoration: none;
}

.woocommerce-cart .wc-block-components-notice-banner,
.woocommerce-checkout .wc-block-components-notice-banner {
	margin-bottom: var(--space-md);
	padding: var(--space-sm) var(--space-md);
	background: var(--surface-raised);
	border: 1px solid var(--line);
	border-left: 3px solid var(--color-sage);
	border-radius: var(--radius-sm);
	color: var(--color-ink);
}

.woocommerce-cart .wc-block-components-notice-banner.is-error,
.woocommerce-checkout .wc-block-components-notice-banner.is-error {
	background: var(--surface-raised);
	border-color: var(--line);
	border-left-color: color-mix(in srgb, var(--color-gold) 70%, var(--color-ink));
}

.woocommerce-cart .wc-block-components-notice-banner > svg,
.woocommerce-checkout .wc-block-components-notice-banner > svg {
	background: var(--color-sage-text);
	fill: var(--surface-raised);
}

.woocommerce-cart .wc-block-components-notice-banner.is-error > svg,
.woocommerce-checkout .wc-block-components-notice-banner.is-error > svg {
	background: color-mix(in srgb, var(--color-gold) 70%, var(--color-ink));
}

/* Cart line items. */
.woocommerce-cart .wc-block-cart-items {
	border-spacing: 0;
}

.woocommerce-cart table.wc-block-cart-items .wc-block-cart-items__header {
	color: var(--color-sage-text);
	font-size: var(--step--1);
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.woocommerce-cart .wc-block-cart__main .wc-block-cart-items,
.woocommerce-cart .wc-block-cart__main .wc-block-cart-items td {
	border-color: var(--line);
}

.woocommerce-cart table.wc-block-cart-items .wc-block-cart-items__row {
	border-bottom: 1px solid var(--line);
}

.woocommerce-cart table.wc-block-cart-items .wc-block-cart-items__row:last-child {
	border-bottom: 0;
}

.woocommerce-cart table.wc-block-cart-items .wc-block-cart-item__image img {
	width: 100%;
	aspect-ratio: 4 / 5;
	object-fit: contain;
	padding: var(--space-2xs);
	border: 1px solid var(--line);
	border-radius: var(--radius-md);
	background: var(--surface-warm);
}

.woocommerce-cart table.wc-block-cart-items .wc-block-components-product-name {
	color: var(--color-ink);
	font-family: var(--font-display);
	font-size: var(--step-1);
	font-weight: 500;
	line-height: 1.2;
	text-decoration: none;
}

.woocommerce-cart table.wc-block-cart-items .wc-block-components-product-name:hover {
	color: var(--color-sage-text);
}

.woocommerce-cart table.wc-block-cart-items .wc-block-components-product-metadata,
.woocommerce-cart table.wc-block-cart-items .wc-block-components-product-price,
.woocommerce-cart table.wc-block-cart-items .wc-block-cart-item__total {
	color: var(--ink-soft);
	font-size: var(--step--1);
}

.woocommerce-cart table.wc-block-cart-items .wc-block-cart-item__total {
	color: var(--color-ink);
	font-weight: 600;
}

.woocommerce-cart .wc-block-components-quantity-selector {
	width: auto;
	min-width: 8.25rem;
	min-height: 2.75rem;
	border: 1px solid var(--line-strong);
	border-radius: var(--radius-sm);
	background: var(--surface-raised);
	color: var(--color-ink);
}

.woocommerce-cart .wc-block-components-quantity-selector input.wc-block-components-quantity-selector__input {
	min-width: 2.75rem;
	padding: 0 var(--space-2xs);
	color: var(--color-ink);
	font-size: var(--step-0);
}

.woocommerce-cart .wc-block-components-quantity-selector .wc-block-components-quantity-selector__button {
	min-width: 2.75rem;
	min-height: 2.75rem;
	color: var(--color-ink);
	opacity: 1;
}

.woocommerce-cart .wc-block-components-quantity-selector .wc-block-components-quantity-selector__button:hover {
	background: var(--surface-warm);
}

.woocommerce-cart .wc-block-components-quantity-selector input.wc-block-components-quantity-selector__input:focus,
.woocommerce-cart .wc-block-components-quantity-selector .wc-block-components-quantity-selector__button:focus {
	outline: 2px solid var(--color-ink);
	outline-offset: 3px;
	box-shadow: 0 0 0 3px var(--color-gold);
}

.woocommerce-cart table.wc-block-cart-items .wc-block-cart-item__quantity .wc-block-cart-item__remove-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: auto;
	min-width: 2.75rem;
	min-height: 2.75rem;
	padding-inline: var(--space-xs);
	color: var(--ink-soft);
	font-size: var(--step--1);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.18em;
}

.woocommerce-cart table.wc-block-cart-items .wc-block-cart-item__quantity .wc-block-cart-item__remove-link:hover {
	color: var(--color-ink);
	text-decoration: none;
}

/* Cart totals and primary action. */
.woocommerce-cart .wc-block-components-sidebar-layout .wc-block-cart__sidebar {
	padding: var(--space-lg);
	background: var(--surface-warm);
	border: 1px solid var(--line-warm);
	border-top: 2px solid var(--color-gold);
	border-radius: var(--radius-sm);
}

.woocommerce-cart .wc-block-cart__sidebar .wp-block-woocommerce-cart-order-summary-block {
	margin: 0;
	background: transparent;
}

.woocommerce-cart .wc-block-cart__totals-title {
	margin: 0;
	padding: 0 0 var(--space-md);
	border-bottom: 1px solid var(--line-warm);
	font-size: var(--step-1);
	font-weight: 500;
	line-height: 1.2;
	text-transform: none;
}

.woocommerce-cart .wp-block-woocommerce-cart-order-summary-block,
.woocommerce-checkout .wc-block-components-totals-wrapper {
	border-color: var(--line);
}

.woocommerce-cart .wc-block-cart__sidebar .wc-block-components-totals-wrapper {
	padding: 0;
	border-top: 0;
	border-color: var(--line-warm);
}

.woocommerce-cart .wc-block-cart__sidebar .wp-block-woocommerce-cart-order-summary-coupon-form-block {
	padding: var(--space-sm) 0;
	border-bottom: 1px solid var(--line-warm);
}

.woocommerce-cart .wc-block-cart__sidebar .wp-block-woocommerce-cart-order-summary-coupon-form-block .wc-block-components-panel__button {
	min-height: 2.75rem;
	padding: 0;
	font-size: var(--step--1);
	letter-spacing: 0.03em;
}

.woocommerce-cart .wc-block-cart__sidebar .wp-block-woocommerce-cart-order-summary-totals-block {
	padding-block: var(--space-sm) var(--space-2xs);
}

.woocommerce-cart .wc-block-components-totals-item,
.woocommerce-checkout .wc-block-components-totals-item {
	gap: var(--space-2xs);
	color: var(--color-ink);
	font-size: var(--step--1);
	line-height: 1.4;
}

.woocommerce-cart .wc-block-cart__sidebar .wc-block-components-totals-item {
	align-items: baseline;
	justify-content: space-between;
	padding: var(--space-2xs) 0;
}

.woocommerce-cart .wc-block-cart__sidebar .wc-block-components-totals-item__label {
	min-width: 0;
	padding-inline-end: var(--space-sm);
}

.woocommerce-cart .wc-block-cart__sidebar .wc-block-components-totals-item__value {
	flex: 0 0 auto;
	margin-inline-start: auto;
	white-space: nowrap;
	text-align: end;
}

.woocommerce-cart .wc-block-components-totals-item__description,
.woocommerce-checkout .wc-block-components-totals-item__description {
	color: var(--ink-soft);
}

.woocommerce-cart .wc-block-cart__sidebar .wc-block-components-totals-item__description {
	flex: 0 0 100%;
	margin-top: var(--space-3xs);
}

.woocommerce-cart .wc-block-components-totals-footer-item,
.woocommerce-checkout .wc-block-components-totals-footer-item {
	padding-top: var(--space-sm);
	border-top: 1px solid var(--line-strong);
}

.woocommerce-cart .wc-block-cart__sidebar .wc-block-components-totals-footer-item {
	margin-top: var(--space-sm);
	padding: var(--space-md) 0 0;
	border-top-color: var(--gold-line);
}

.woocommerce-cart .wc-block-components-totals-footer-item .wc-block-components-totals-item__label,
.woocommerce-cart .wc-block-components-totals-footer-item .wc-block-components-totals-item__value,
.woocommerce-checkout .wc-block-components-totals-footer-item .wc-block-components-totals-item__label,
.woocommerce-checkout .wc-block-components-totals-footer-item .wc-block-components-totals-item__value {
	font-size: var(--step-1);
	font-weight: 600;
}

.woocommerce-cart .wc-block-cart__submit {
	margin: var(--space-lg) 0 0;
}

.woocommerce-cart .wc-block-cart__submit-button,
.woocommerce-checkout .wc-block-components-checkout-place-order-button {
	width: 100%;
	min-height: 3.25rem;
}

.woocommerce-cart .wc-block-cart__submit-container--sticky {
	background: color-mix(in srgb, var(--surface-page) 92%, var(--surface-raised));
	border-top: 1px solid var(--line);
}

.woocommerce-cart .wc-block-cart__submit-container--sticky::before {
	color: color-mix(in srgb, var(--color-ink) 18%, transparent);
}

.woocommerce-cart .wc-block-cart__payment-options,
.woocommerce-cart .wc-block-components-payment-method-icons {
	color: var(--ink-soft);
}

.woocommerce-cart .wc-block-components-totals-coupon__form {
	gap: var(--space-xs);
}

.woocommerce-cart .wc-block-components-totals-coupon__button {
	min-height: 2.75rem;
}

/* Empty cart and cross-sells. */
.woocommerce-cart .wp-block-woocommerce-empty-cart-block {
	max-width: 46rem;
	margin-inline: auto;
	padding: var(--space-xl) var(--space-md);
	background: var(--surface-raised);
	border: 1px solid var(--line);
	border-radius: var(--radius-md);
	text-align: center;
}

.woocommerce-cart .wc-block-cart__empty-cart__title {
	margin-bottom: var(--space-sm);
	color: var(--color-ink);
	font-family: var(--font-display);
	font-size: var(--step-3);
	font-weight: 500;
	line-height: 1.15;
}

.woocommerce-cart .wc-block-cart__empty-cart__title.with-empty-cart-icon::before {
	display: none;
}

.woocommerce-cart .wp-block-woocommerce-empty-cart-block p {
	max-width: 34rem;
	margin-inline: auto;
	color: var(--ink-soft);
}

.woocommerce-cart .latchd-empty-cart {
	max-width: 46rem;
	margin: var(--space-md) auto 0;
	text-align: center;
}

.woocommerce-cart .latchd-empty-cart__note {
	margin: 0 auto;
	color: var(--ink-soft);
}

.woocommerce-cart .latchd-empty-cart__actions {
	margin: var(--space-md) 0 0;
}

.woocommerce-cart .wp-block-woocommerce-empty-cart-block p.has-text-align-center a,
.woocommerce-cart .latchd-empty-cart__actions a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 3rem;
	padding: 0 var(--space-lg);
	border: 1px solid var(--color-ink);
	border-radius: var(--radius-sm);
	background: var(--color-ink);
	color: var(--ink-on-dark);
	font-size: var(--step-0);
	line-height: 1.2;
	letter-spacing: 0.04em;
	text-decoration: none;
}

.woocommerce-cart .wp-block-woocommerce-empty-cart-block p.has-text-align-center a:hover,
.woocommerce-cart .latchd-empty-cart__actions a:hover {
	background: color-mix(in srgb, var(--color-ink) 82%, var(--color-sage));
	border-color: color-mix(in srgb, var(--color-ink) 82%, var(--color-sage));
	color: var(--ink-on-dark);
}

.woocommerce-cart .wp-block-woocommerce-empty-cart-block .wp-block-button__link {
	margin-top: var(--space-md);
}

/* Woo's generic "New in store" collection can direct-add products that require
   personalisation. The branded return-to-shop path below is the single safe
   empty-cart action. display:none removes the unsafe collection from both the
   rendered layout and the accessibility tree. */
.woocommerce-cart .wp-block-woocommerce-empty-cart-block .wp-block-woocommerce-product-new,
.woocommerce-cart .wp-block-woocommerce-empty-cart-block .wp-block-heading:has(+ .wp-block-woocommerce-product-new) {
	display: none;
}

.woocommerce-cart.latchd-cart-is-empty .xsell--cart {
	display: none;
}

.woocommerce-cart .wp-block-woocommerce-cart-cross-sells-block {
	margin-top: var(--space-xl);
	padding-top: var(--space-lg);
	border-top: 1px solid var(--line);
}

.woocommerce-cart .wp-block-woocommerce-cart-cross-sells-block h2,
.woocommerce-cart .cross-sells h2 {
	margin-bottom: var(--space-md);
	font-size: var(--step-2);
}

/* Checkout form. */
.woocommerce-checkout .wc-block-components-form .wc-block-components-checkout-step {
	margin-bottom: var(--space-lg);
	padding-bottom: var(--space-lg);
	border-bottom: 1px solid var(--line);
}

.woocommerce-checkout .wc-block-components-form .wc-block-components-checkout-step:last-of-type {
	border-bottom: 0;
}

.woocommerce-checkout .wc-block-components-checkout-step__heading-container {
	gap: var(--space-2xs);
	margin-bottom: var(--space-md);
}

.woocommerce-checkout .wc-block-components-checkout-step__description,
.woocommerce-checkout .wc-block-components-checkout-step__heading-content {
	color: var(--ink-soft);
	font-size: var(--step--1);
	line-height: 1.5;
}

.woocommerce-checkout .wc-block-checkout__form--with-step-numbers .wc-block-components-checkout-step--with-step-number {
	padding-left: 0;
}

.woocommerce-checkout .wc-block-checkout__form--with-step-numbers .wc-block-components-checkout-step--with-step-number .wc-block-components-checkout-step__title::before {
	position: static;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 1.75rem;
	height: 1.75rem;
	margin-right: var(--space-xs);
	background: var(--surface-warm);
	border: 1px solid var(--gold-line);
	border-radius: 999px;
	color: var(--color-sage-text);
	font-family: var(--font-body);
	font-size: var(--step--1);
	transform: none;
}

.woocommerce-checkout .wc-block-checkout__form--with-step-numbers .wc-block-components-checkout-step__content::before,
.woocommerce-checkout .wc-block-checkout__form--with-step-numbers .wc-block-components-checkout-step__description::before {
	display: none;
}

.woocommerce-checkout .wc-block-components-address-form,
.woocommerce-checkout .wc-block-components-checkout-step__content {
	color: var(--color-ink);
}

.woocommerce-checkout .wc-block-components-form .wc-block-components-text-input,
.woocommerce-checkout .wc-block-components-text-input,
.woocommerce-checkout .wc-blocks-components-select,
.woocommerce-checkout .wc-block-components-combobox {
	margin-top: var(--space-sm);
}

.woocommerce-checkout .wc-block-components-form .wc-block-components-text-input label,
.woocommerce-checkout .wc-block-components-text-input label {
	left: var(--space-sm);
	color: var(--ink-soft);
	font-size: 1rem;
}

.woocommerce-checkout .wc-block-components-form .wc-block-components-text-input input[type="email"],
.woocommerce-checkout .wc-block-components-form .wc-block-components-text-input input[type="number"],
.woocommerce-checkout .wc-block-components-form .wc-block-components-text-input input[type="password"],
.woocommerce-checkout .wc-block-components-form .wc-block-components-text-input input[type="tel"],
.woocommerce-checkout .wc-block-components-form .wc-block-components-text-input input[type="text"],
.woocommerce-checkout .wc-block-components-form .wc-block-components-text-input input[type="url"],
.woocommerce-checkout .wc-block-components-text-input input[type="email"],
.woocommerce-checkout .wc-block-components-text-input input[type="number"],
.woocommerce-checkout .wc-block-components-text-input input[type="password"],
.woocommerce-checkout .wc-block-components-text-input input[type="tel"],
.woocommerce-checkout .wc-block-components-text-input input[type="text"],
.woocommerce-checkout .wc-block-components-text-input input[type="url"],
.woocommerce-checkout .wc-block-components-textarea,
.woocommerce-checkout .wc-blocks-components-select select,
.woocommerce-checkout .wc-blocks-components-select .wc-blocks-components-select__select {
	min-height: 3.25rem;
	border: 1px solid var(--line-strong);
	border-radius: var(--radius-sm);
	background: var(--surface-raised);
	color: var(--color-ink);
	font-family: var(--font-body);
	font-size: 1rem;
}

.woocommerce-checkout .wc-block-components-form .wc-block-components-text-input input[type="email"]:focus,
.woocommerce-checkout .wc-block-components-form .wc-block-components-text-input input[type="number"]:focus,
.woocommerce-checkout .wc-block-components-form .wc-block-components-text-input input[type="password"]:focus,
.woocommerce-checkout .wc-block-components-form .wc-block-components-text-input input[type="tel"]:focus,
.woocommerce-checkout .wc-block-components-form .wc-block-components-text-input input[type="text"]:focus,
.woocommerce-checkout .wc-block-components-form .wc-block-components-text-input input[type="url"]:focus,
.woocommerce-checkout .wc-block-components-text-input input[type="email"]:focus,
.woocommerce-checkout .wc-block-components-text-input input[type="number"]:focus,
.woocommerce-checkout .wc-block-components-text-input input[type="password"]:focus,
.woocommerce-checkout .wc-block-components-text-input input[type="tel"]:focus,
.woocommerce-checkout .wc-block-components-text-input input[type="text"]:focus,
.woocommerce-checkout .wc-block-components-text-input input[type="url"]:focus,
.woocommerce-checkout .wc-block-components-textarea:focus,
.woocommerce-checkout .wc-blocks-components-select select:focus,
.woocommerce-checkout .wc-blocks-components-select .wc-blocks-components-select__select:focus {
	border-color: var(--color-ink);
	outline: 2px solid var(--color-ink);
	outline-offset: 3px;
	box-shadow: 0 0 0 3px var(--color-gold);
}

.woocommerce-checkout .wc-block-components-form .wc-block-components-text-input.has-error input,
.woocommerce-checkout .wc-block-components-form .wc-block-components-text-input.has-error input:focus,
.woocommerce-checkout .wc-block-components-text-input.has-error input,
.woocommerce-checkout .wc-block-components-text-input.has-error input:focus,
.woocommerce-checkout .wc-block-components-checkbox.has-error .wc-block-components-checkbox__input,
.woocommerce-checkout .wc-block-components-checkbox.has-error .wc-block-components-checkbox__input:focus {
	border-color: color-mix(in srgb, var(--color-gold) 70%, var(--color-ink));
}

.woocommerce-checkout .wc-block-components-form .wc-block-components-text-input.has-error label,
.woocommerce-checkout .wc-block-components-text-input.has-error label,
.woocommerce-checkout .wc-block-components-checkbox.has-error,
.woocommerce-checkout .wc-block-components-checkbox.has-error a,
.woocommerce-checkout .wc-block-components-validation-error {
	color: color-mix(in srgb, var(--color-gold) 70%, var(--color-ink));
}

.woocommerce-checkout .wc-block-components-validation-error {
	padding-top: var(--space-2xs);
	font-size: var(--step--1);
}

.woocommerce-checkout .wc-block-components-checkbox label {
	min-height: 2.75rem;
	align-items: center;
	gap: var(--space-xs);
	color: var(--color-ink);
	font-size: var(--step--1);
	line-height: 1.4;
}

.woocommerce-checkout .wc-block-components-checkbox .wc-block-components-checkbox__input[type="checkbox"] {
	width: 1.25rem;
	min-width: 1.25rem;
	height: 1.25rem;
	border-color: var(--line-strong);
	background: var(--surface-raised);
}

.woocommerce-checkout .wc-block-components-checkbox .wc-block-components-checkbox__input[type="checkbox"]:focus {
	outline: 2px solid var(--color-ink);
	outline-offset: 3px;
	box-shadow: 0 0 0 3px var(--color-gold);
}

.woocommerce-checkout .wc-block-components-checkbox .wc-block-components-checkbox__mark {
	fill: var(--color-ink);
}

.woocommerce-checkout .wc-block-components-address-card {
	background: var(--surface-raised);
	border-color: var(--line);
	border-radius: var(--radius-sm);
	color: var(--color-ink);
}

/* Payment gateway slot: gateway plugins render their methods inside this
   section. Keep styles gateway-agnostic until real Tabby, Tamara, Apple Pay, or
   card gateway requirements are confirmed. */
.woocommerce-checkout .wc-block-checkout__payment-method,
.woocommerce-checkout .wc-block-components-payment-methods,
.woocommerce-checkout .wc-block-components-radio-control--highlight-checked {
	background: var(--surface-raised);
	border: 1px solid var(--line);
	border-radius: var(--radius-md);
}

.woocommerce-checkout .wc-block-components-radio-control__option,
.woocommerce-checkout .wc-block-components-radio-control-accordion-option {
	min-height: 3.25rem;
	padding: var(--space-sm) var(--space-sm) var(--space-sm) calc(var(--space-lg) + var(--space-md));
	color: var(--color-ink);
}

.woocommerce-checkout .wc-block-components-radio-control__option::after,
.woocommerce-checkout .wc-block-components-radio-control--highlight-checked::after,
.woocommerce-checkout .wc-block-components-radio-control-accordion-option::after {
	border-color: var(--line);
}

.woocommerce-checkout .wc-block-components-radio-control__input {
	top: 50%;
	margin-top: 0;
	transform: translateY(-50%);
}

.woocommerce-checkout .wc-block-components-radio-control__input:focus {
	outline: 2px solid var(--color-ink);
	outline-offset: 3px;
	box-shadow: 0 0 0 3px var(--color-gold);
}

.woocommerce-checkout .wc-block-components-radio-control__label,
.woocommerce-checkout .wc-block-components-radio-control__secondary-label {
	font-weight: 600;
}

.woocommerce-checkout .wc-block-components-radio-control__description,
.woocommerce-checkout .wc-block-components-radio-control__secondary-description,
.woocommerce-checkout .wc-block-components-payment-method-label,
.woocommerce-checkout .wc-block-components-payment-methods__no-payment-methods {
	color: var(--ink-soft);
	font-size: var(--step--1);
	line-height: 1.5;
}

.woocommerce-checkout .wc-block-checkout__actions {
	margin-top: var(--space-lg);
	padding-top: var(--space-md);
	border-top: 1px solid var(--line);
}

.woocommerce-checkout .wc-block-checkout__actions_row {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--space-sm);
	width: 100%;
}

.woocommerce-checkout .wc-block-checkout__actions .wc-block-checkout__actions_row.wc-block-checkout__actions_row--justify-flex-end {
	display: grid;
	width: 100%;
}

.woocommerce-checkout .wc-block-checkout__actions_row .wc-block-checkout__actions_back-link {
	order: 2;
	justify-self: center;
	color: var(--ink-soft);
	font-size: var(--step--1);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.18em;
}

.woocommerce-checkout .wc-block-checkout__actions_row .wc-block-components-checkout-place-order-button {
	order: 1;
}

.woocommerce-checkout .wc-block-checkout__actions .wc-block-components-button:not(.is-link) {
	inline-size: 22rem;
	max-inline-size: 100%;
	min-height: 3.25rem;
	justify-self: end;
}

.woocommerce-checkout .wc-block-checkout__actions_row .wc-block-components-button.wp-element-button.wc-block-components-checkout-place-order-button {
	inline-size: 22rem;
	max-inline-size: 100%;
	min-height: 3.25rem;
}

.woocommerce-checkout .wc-block-checkout-empty,
.woocommerce-checkout .wc-block-checkout-error {
	max-width: 42rem;
	margin-inline: auto;
	padding: var(--space-xl) var(--space-md);
	background: var(--surface-raised);
	border: 1px solid var(--line);
	border-radius: var(--radius-md);
	text-align: center;
}

.woocommerce-checkout .wc-block-checkout-empty__title,
.woocommerce-checkout .wc-block-checkout-error_title {
	display: block;
	margin-bottom: var(--space-xs);
	color: var(--color-ink);
	font-family: var(--font-display);
	font-size: var(--step-2);
	font-weight: 500;
	line-height: 1.2;
}

.woocommerce-checkout .wc-block-checkout-empty__description,
.woocommerce-checkout .wc-block-checkout-error__description {
	max-width: 34rem;
	margin-inline: auto;
	color: var(--ink-soft);
}

@media (min-width: 48em) {
	.woocommerce-checkout .wc-block-checkout__actions_row {
		grid-template-columns: auto minmax(14rem, 22rem);
		align-items: center;
	}

	.woocommerce-checkout .wc-block-checkout__actions_row .wc-block-checkout__actions_back-link {
		order: 1;
		justify-self: start;
	}

	.woocommerce-checkout .wc-block-checkout__actions_row .wc-block-components-checkout-place-order-button {
		order: 2;
	}
}

/* Checkout order summary. */
.woocommerce-checkout .wc-block-checkout__sidebar {
	background: var(--surface-raised);
}

.woocommerce-checkout .wc-block-components-order-summary,
.woocommerce-checkout .wc-block-components-order-summary__content {
	color: var(--color-ink);
}

.woocommerce-checkout .wc-block-components-order-summary-item {
	padding-block: var(--space-sm);
	border-bottom: 1px solid var(--line);
}

.woocommerce-checkout .wc-block-components-order-summary-item__image img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	padding: var(--space-2xs);
	border: 1px solid var(--line);
	border-radius: var(--radius-md);
	background: var(--surface-warm);
}

.woocommerce-checkout .wc-block-checkout__terms {
	margin-block: var(--space-md);
	font-size: max(var(--step--1), 0.875rem);
	line-height: 1.55;
	color: var(--ink-soft);
}

.woocommerce-checkout .wc-block-checkout__terms a {
	color: var(--color-ink);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.2em;
}

.woocommerce-checkout .wc-block-components-order-summary-item__description {
	color: var(--ink-soft);
	font-size: var(--step--1);
	line-height: 1.45;
}

.woocommerce-checkout .wc-block-components-order-summary-item__description .wc-block-components-product-name {
	color: var(--color-ink);
	font-family: var(--font-display);
	font-size: var(--step-0);
	font-weight: 500;
	line-height: 1.2;
}

.woocommerce-checkout .wc-block-components-order-summary-item__total-price {
	color: var(--color-ink);
	font-weight: 600;
}

@media (max-width: 47.99em) {
	.woocommerce-cart .site-main,
	.woocommerce-checkout .site-main {
		width: min(100% - 1.25rem, var(--container));
		padding-block: var(--space-lg);
	}

	.woocommerce-cart .wc-block-components-sidebar-layout .wc-block-cart__sidebar {
		padding: var(--space-md);
	}

	/* Keep the mobile action in the summary flow. WooCommerce's fixed variant
	   otherwise sits directly over the estimated-total row at this breakpoint. */
	.woocommerce-cart .wc-block-cart__submit-container--sticky {
		position: static;
		inset: auto;
		width: 100%;
		padding: 0;
		background: transparent;
		border: 0;
		box-shadow: none;
		transform: none;
	}

	.woocommerce-cart .wc-block-cart__submit-container--sticky::before {
		display: none;
	}

	.woocommerce-checkout .wc-block-components-sidebar {
		padding: var(--space-sm);
	}

	.woocommerce-cart table.wc-block-cart-items .wc-block-cart-items__row {
		grid-template-columns: 5rem minmax(0, 1fr);
		gap: var(--space-sm);
		padding: var(--space-md) 0;
	}

	.woocommerce-cart table.wc-block-cart-items .wc-block-cart-item__image img {
		width: 100%;
	}

	.woocommerce-cart table.wc-block-cart-items .wc-block-cart-item__image,
	.woocommerce-cart table.wc-block-cart-items .wc-block-cart-item__quantity {
		padding-right: 0;
	}

	.woocommerce-cart table.wc-block-cart-items .wc-block-cart-item__product {
		grid-column-end: 3;
	}

	.woocommerce-cart table.wc-block-cart-items .wc-block-cart-item__total {
		justify-content: flex-end;
	}

	.woocommerce-cart .wc-block-components-quantity-selector {
		min-width: 7.5rem;
	}

	.woocommerce-cart table.wc-block-cart-items .wc-block-cart-item__quantity {
		align-items: center;
		flex-direction: row;
		flex-wrap: wrap;
		gap: var(--space-xs);
	}
	.woocommerce-cart table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__quantity {
		padding: 0;
	}
	.woocommerce-cart table.wc-block-cart-items .wc-block-cart-item__quantity .wc-block-components-quantity-selector {
		flex: 0 0 8.25rem;
		width: 8.25rem;
		min-width: 8.25rem;
	}
	.woocommerce-cart table.wc-block-cart-items .wc-block-cart-item__quantity .wc-block-cart-item__remove-link {
		width: 2.75rem;
		padding: 0;
	}

	.woocommerce-checkout .wc-block-components-form .wc-block-components-checkout-step {
		margin-bottom: var(--space-md);
		padding-bottom: var(--space-md);
	}

	.woocommerce-checkout .wc-block-checkout__actions .wc-block-components-button:not(.is-link) {
		inline-size: 100%;
		justify-self: stretch;
	}

	.woocommerce-checkout .wc-block-checkout__actions_row .wc-block-components-button.wp-element-button.wc-block-components-checkout-place-order-button {
		inline-size: 100%;
	}

	.woocommerce-checkout .wc-block-checkout__sidebar {
		order: 0;
	}

	.woocommerce-checkout .wc-block-checkout__main {
		order: 1;
	}
}

/* One summary surface across current Woo Blocks versions. Preserve the native
   mobile disclosure and lower review: do not hide order details or controls. */
@media (max-width: 22em) {
	.woocommerce-cart .xsell--cart .xsell__grid {
		grid-template-columns: minmax(0, 1fr);
	}
	.woocommerce-cart .wc-block-components-totals-footer-item .wc-block-components-totals-item__label,
	.woocommerce-cart .wc-block-components-totals-footer-item .wc-block-components-totals-item__value {
		font-size: var(--step-0);
	}
	/* Reserve room for the 44px quantity controls on compact phones. */
	.woocommerce-cart table.wc-block-cart-items .wc-block-cart-items__row {
		grid-template-columns: 3rem minmax(0, 1fr);
	}
	.woocommerce-cart table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__image {
		width: 3rem;
		max-width: 3rem;
	}
}

.woocommerce-checkout .wp-block-woocommerce-checkout-order-summary-block:not(.checkout-order-summary-block-fill-wrapper),
.woocommerce-checkout .checkout-order-summary-block-fill {
	background: var(--surface-warm);
	border: 1px solid var(--line-warm);
	border-top: 2px solid var(--color-gold);
	border-radius: var(--radius-sm);
}

.woocommerce-checkout .wc-block-components-order-summary__button-text,
.woocommerce-checkout .wc-block-components-checkout-order-summary__title {
	font-family: var(--font-display);
	font-size: var(--step-1);
}

.woocommerce-checkout .wc-block-components-checkout-order-summary__title,
.woocommerce-checkout .wc-block-components-order-summary__button {
	min-height: 44px;
}

@media (max-width: 47.99em) {
	/* The fill wrapper includes space outside the panel in Woo 10.9. */
	.woocommerce-checkout .checkout-order-summary-block-fill-wrapper {
		padding-bottom: var(--space-md);
	}
	.woocommerce-checkout .wc-block-components-sidebar-layout .wc-block-checkout__sidebar {
		border: 0;
		background: transparent;
		margin-bottom: 0;
	}
	.woocommerce-checkout .wc-block-components-order-summary__button {
		padding-block: var(--space-sm);
	}
	.woocommerce-checkout .wc-block-components-sidebar-layout {
		gap: var(--space-md);
	}
	.woocommerce-checkout .wc-block-components-order-summary {
		margin-bottom: var(--space-md);
	}
	.woocommerce-cart .entry-header,
	.woocommerce-checkout .entry-header {
		margin-bottom: var(--space-md);
	}
}
