/**
 * Negar Theme — Cart & Checkout (WooCommerce blocks; loaded only on those two pages).
 *
 * فقط استایل؛ ساختار و منطق همان بلوک‌های سبد/تسویه ووکامرس است (بدون override قالب).
 * همه انتخاب‌گرها زیر body.woocommerce-cart / body.woocommerce-checkout هستند.
 *
 * 1. Page title with gold ornaments
 * 2. Shared: cards, inputs, buttons
 * 3. Cart: items, quantity, coupon, totals, CTA
 * 4. Checkout: steps, fields, shipping/payment options, summary, place order
 */

/* 1. Page title ---------------------------------------------------------- */
.woocommerce-cart .site-main,
.woocommerce-checkout .site-main {
	padding-block-end: var(--section-space);
}

.woocommerce-cart .entry-title,
.woocommerce-checkout .entry-title {
	display: flex;
	align-items: center;
	gap: var(--space-3);
	margin-block: var(--space-5) var(--space-5);
	color: var(--color-text);
	font-size: var(--font-size-xl);
}

.woocommerce-cart .entry-title::after,
.woocommerce-checkout .entry-title::after {
	content: "";
	flex: none;
	width: 6rem;
	height: 1.1rem;
	background: url("../images/negar-heading-divider.svg") center / contain no-repeat;
}

/* 2. Shared ---------------------------------------------------------------- */
.woocommerce-cart .wc-block-components-sidebar-layout,
.woocommerce-checkout .wc-block-components-sidebar-layout {
	align-items: flex-start;
	gap: var(--space-5);
	margin: 0;
}

/* Main column and summary column as soft white cards. */
.woocommerce-cart .wc-block-cart .wc-block-components-main,
.woocommerce-checkout .wc-block-checkout .wc-block-components-main,
.woocommerce-cart .wc-block-components-sidebar,
.woocommerce-checkout .wc-block-components-sidebar {
	box-sizing: border-box;
	padding: var(--space-5);
	border-radius: var(--radius-lg);
	background: var(--color-white);
	box-shadow: var(--shadow-card);
}

@media (min-width: 700px) {
	.woocommerce-cart .wc-block-components-sidebar-layout .wc-block-components-main,
	.woocommerce-checkout .wc-block-components-sidebar-layout .wc-block-components-main {
		width: 64%;
		padding-inline-end: var(--space-5);
	}

	.woocommerce-cart .wc-block-components-sidebar-layout .wc-block-components-sidebar,
	.woocommerce-checkout .wc-block-components-sidebar-layout .wc-block-components-sidebar {
		position: sticky;
		inset-block-start: var(--space-5);
		width: calc(36% - var(--space-5));
		margin-inline-start: var(--space-5);
	}
}

/* Summary card: gold edge + faint corner medallion. */
.woocommerce-cart .wc-block-components-sidebar,
.woocommerce-checkout .wc-block-components-sidebar {
	position: relative;
	overflow: hidden;
	isolation: isolate;
	border-block-start: 3px solid var(--color-accent);
}

.woocommerce-cart .wc-block-components-sidebar::before,
.woocommerce-checkout .wc-block-components-sidebar::before {
	content: "";
	position: absolute;
	inset-block-start: -2.5rem;
	inset-inline-end: -2.5rem;
	z-index: -1;
	width: 7.5rem;
	height: 7.5rem;
	background: url("../images/ornament-corner.svg") center / contain no-repeat;
	opacity: 0.12;
	pointer-events: none;
}

.woocommerce-cart .wc-block-components-sidebar .wc-block-components-panel,
.woocommerce-cart .wc-block-components-totals-wrapper,
.woocommerce-checkout .wc-block-components-totals-wrapper {
	border-color: var(--color-surface);
}

/* Inputs (text, select, textarea) */
.woocommerce-cart .wc-block-components-text-input input,
.woocommerce-checkout .wc-block-components-text-input input,
.woocommerce-checkout .wc-block-components-textarea,
.woocommerce-checkout .wc-blocks-components-select .wc-blocks-components-select__select,
.woocommerce-checkout .wc-block-components-combobox .components-combobox-control input {
	min-height: 3.25rem;
	border: 1px solid var(--color-surface);
	border-radius: var(--radius-sm);
	background: var(--color-white);
	color: var(--color-text);
	font-family: inherit;
	transition: border-color var(--transition), box-shadow var(--transition);
}

.woocommerce-cart .wc-block-components-text-input input:hover,
.woocommerce-checkout .wc-block-components-text-input input:hover,
.woocommerce-checkout .wc-blocks-components-select .wc-blocks-components-select__select:hover,
.woocommerce-checkout .wc-block-components-textarea:hover {
	border-color: var(--color-secondary);
}

.woocommerce-cart .wc-block-components-text-input input:focus,
.woocommerce-checkout .wc-block-components-text-input input:focus,
.woocommerce-checkout .wc-block-components-textarea:focus,
.woocommerce-checkout .wc-blocks-components-select .wc-blocks-components-select__select:focus {
	border-color: var(--color-primary);
	outline: 0;
	box-shadow: var(--focus-ring);
}

.woocommerce-cart .wc-block-components-text-input label,
.woocommerce-checkout .wc-block-components-text-input label,
.woocommerce-checkout .wc-blocks-components-select .wc-blocks-components-select__label {
	color: var(--color-text-muted);
	font-family: inherit;
}

/* Error / valid states */
.woocommerce-checkout .wc-block-components-text-input.has-error input,
.woocommerce-checkout .has-error .wc-blocks-components-select__select {
	border-color: #c43c51;
	background: #fffafb;
}

.woocommerce-checkout .wc-block-components-text-input.has-error input:focus {
	box-shadow: 0 0 0 3px rgb(196 60 81 / 0.18);
}

.woocommerce-checkout .wc-block-components-text-input.has-error label,
.woocommerce-checkout .wc-block-components-validation-error {
	color: #a11d33;
}

.woocommerce-checkout .wc-block-components-text-input.is-active:not(.has-error) input:not(:placeholder-shown):valid {
	border-color: #9cc9ae;
}

/* Buttons: one height and radius; primary = navy. */
.woocommerce-cart .wc-block-components-button:not(.is-link),
.woocommerce-checkout .wc-block-components-button:not(.is-link) {
	min-height: var(--control-h);
	padding-inline: var(--space-5);
	border: 0;
	border-radius: var(--radius-sm);
	background: var(--color-primary);
	color: var(--color-white);
	font-family: inherit;
	font-weight: var(--font-weight-bold);
	transition: background-color var(--transition), box-shadow var(--transition);
}

.woocommerce-cart .wc-block-components-button:not(.is-link):hover,
.woocommerce-checkout .wc-block-components-button:not(.is-link):hover {
	background: var(--color-footer);
	color: var(--color-white);
}

.woocommerce-cart .wc-block-components-button:not(.is-link):focus-visible,
.woocommerce-checkout .wc-block-components-button:not(.is-link):focus-visible {
	box-shadow: var(--focus-ring);
	outline: 0;
}

.woocommerce-cart .wc-block-components-button:disabled,
.woocommerce-checkout .wc-block-components-button:disabled {
	opacity: 0.55;
}

.woocommerce-cart .wc-block-components-button.is-link,
.woocommerce-checkout .wc-block-components-button.is-link,
.woocommerce-cart .wc-block-components-totals-coupon-link,
.woocommerce-checkout .wc-block-components-totals-coupon-link {
	color: var(--color-primary);
	font-family: inherit;
}

/* Totals */
.woocommerce-cart .wc-block-components-totals-item,
.woocommerce-checkout .wc-block-components-totals-item {
	color: var(--color-text);
	font-size: var(--font-size-sm);
}

.woocommerce-cart .wc-block-components-totals-footer-item,
.woocommerce-checkout .wc-block-components-totals-footer-item {
	padding-block: var(--space-2);
	color: var(--color-primary);
}

.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__value {
	font-size: var(--font-size-lg);
	font-weight: var(--font-weight-bold);
}

/* Coupon form: input + button side by side, same height. */
.woocommerce-cart .wc-block-components-totals-coupon__form,
.woocommerce-checkout .wc-block-components-totals-coupon__form {
	align-items: stretch;
	gap: var(--space-2);
}

.woocommerce-cart .wc-block-components-totals-coupon__form .wc-block-components-text-input,
.woocommerce-checkout .wc-block-components-totals-coupon__form .wc-block-components-text-input {
	margin: 0;
}

.woocommerce-cart .wc-block-components-totals-coupon__button,
.woocommerce-checkout .wc-block-components-totals-coupon__button {
	min-height: 3.25rem;
	margin: 0;
	padding-inline: var(--space-4) !important;
	white-space: nowrap;
}

/* Notices */
.woocommerce-cart .wc-block-components-notice-banner,
.woocommerce-checkout .wc-block-components-notice-banner {
	border-radius: var(--radius-sm);
	font-size: var(--font-size-sm);
}

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

.woocommerce-cart .wc-block-cart-items__header {
	color: var(--color-text-muted);
	font-size: var(--font-size-xs);
	text-transform: none;
}

.woocommerce-cart .wc-block-cart-items__header th {
	padding-block: 0 var(--space-3);
	border-block-end: 1px solid var(--color-surface);
}

.woocommerce-cart .wc-block-cart-items .wc-block-cart-items__row {
	border-block-end: 1px solid var(--color-surface);
}

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

.woocommerce-cart .wc-block-cart-items .wc-block-cart-items__row > td {
	padding-block: var(--space-4);
	border: 0;
}

.woocommerce-cart .wc-block-cart-item__image img {
	aspect-ratio: 1;
	border-radius: var(--radius-sm);
	background: var(--color-background);
	object-fit: cover;
	box-shadow: var(--shadow-xs);
}

.woocommerce-cart .wc-block-components-product-name {
	color: var(--color-text);
	font-size: var(--font-size-base);
	font-weight: var(--font-weight-bold);
	line-height: 1.7;
	text-decoration: none;
}

.woocommerce-cart .wc-block-components-product-name:hover {
	color: var(--color-primary);
}

.woocommerce-cart .wc-block-cart-item__prices,
.woocommerce-cart .wc-block-components-product-metadata {
	color: var(--color-text-muted);
	font-size: var(--font-size-xs);
}

.woocommerce-cart .wc-block-cart-item__total {
	color: var(--color-text);
	font-weight: var(--font-weight-bold);
}

.woocommerce-cart .wc-block-components-product-badge {
	border-color: var(--color-accent);
	border-radius: var(--radius-pill);
	color: var(--color-gold-text);
}

/* Quantity: pill with round +/- */
.woocommerce-cart .wc-block-components-quantity-selector {
	overflow: hidden;
	border: 1px solid var(--color-surface);
	border-radius: var(--radius-pill);
	background: var(--color-background);
}

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

.woocommerce-cart .wc-block-components-quantity-selector input.wc-block-components-quantity-selector__input {
	min-height: var(--control-h-sm);
	background: transparent;
	color: var(--color-text);
	font-family: inherit;
	font-weight: var(--font-weight-bold);
}

.woocommerce-cart .wc-block-components-quantity-selector .wc-block-components-quantity-selector__button {
	min-width: var(--control-h-sm);
	color: var(--color-primary);
	opacity: 1;
}

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

.woocommerce-cart .wc-block-cart-item__remove-link {
	color: var(--color-text-muted) !important;
	font-size: var(--font-size-xs) !important;
	text-decoration: none !important;
}

.woocommerce-cart .wc-block-cart-item__remove-link:hover {
	color: #a11d33 !important;
}

/* Summary title */
.woocommerce-cart .wc-block-cart__totals-title {
	margin: 0 0 var(--space-3) !important;
	padding: 0 !important;
	color: var(--color-text);
	font-size: var(--font-size-base) !important;
	font-weight: var(--font-weight-bold) !important;
	text-align: start !important;
	text-transform: none !important;
}

/* Main CTA: full width, taller, with a soft shadow. */
.woocommerce-cart .wc-block-cart__submit {
	margin: var(--space-3) 0 0;
}

.woocommerce-cart .wc-block-cart__submit-button.wc-block-components-button:not(.is-link) {
	width: 100%;
	min-height: 3.5rem;
	font-size: var(--font-size-base);
	box-shadow: 0 8px 20px rgb(34 44 90 / 0.22);
}

/* Empty cart */
.woocommerce-cart .wp-block-woocommerce-empty-cart-block {
	position: relative;
	padding: var(--space-6) var(--space-4);
	border-radius: var(--radius-lg);
	background: var(--color-white);
	box-shadow: var(--shadow-card);
	text-align: center;
}

.woocommerce-cart .wc-block-cart__empty-cart__title {
	font-size: var(--font-size-lg);
}

.woocommerce-cart .wc-block-cart__empty-cart__title::before {
	opacity: 0.35;
}

.woocommerce-cart .wp-block-woocommerce-empty-cart-block .wp-block-separator {
	width: 8rem;
	height: 1.1rem;
	margin-inline: auto;
	border: 0;
	background: url("../images/negar-heading-divider.svg") center / contain no-repeat;
}

/* Phones: cart rows stay compact; the summary card follows the items. */
@media (max-width: 699px) {
	.woocommerce-cart .wc-block-cart .wc-block-components-main,
	.woocommerce-checkout .wc-block-checkout .wc-block-components-main,
	.woocommerce-cart .wc-block-components-sidebar,
	.woocommerce-checkout .wc-block-components-sidebar {
		padding: var(--space-4);
	}

	.woocommerce-cart .wc-block-components-sidebar,
	.woocommerce-checkout .wc-block-components-sidebar {
		margin-block-start: var(--space-4);
	}

	.woocommerce-cart .entry-title::after,
	.woocommerce-checkout .entry-title::after {
		width: 4.5rem;
	}

	.woocommerce-cart .wc-block-components-sidebar::before,
	.woocommerce-checkout .wc-block-components-sidebar::before {
		display: none;
	}
}

/* 4. Checkout -------------------------------------------------------------- */
/* Each step (contact, address, shipping, payment) as a section with a numbered title. */
.woocommerce-checkout .wc-block-components-checkout-step {
	margin-block-end: var(--space-5);
	padding-block-end: var(--space-5);
	border-block-end: 1px solid var(--color-surface);
}

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

.woocommerce-checkout .wc-block-components-checkout-step__heading {
	margin-block-end: var(--space-3);
}

.woocommerce-checkout .wc-block-components-checkout-step__title {
	display: inline-flex;
	align-items: center;
	gap: var(--space-2);
	color: var(--color-text);
	font-size: var(--font-size-base);
	font-weight: var(--font-weight-bold);
}

.woocommerce-checkout .wc-block-components-checkout-step__title::before {
	content: "";
	flex: none;
	width: 1.1rem;
	height: 1.1rem;
	background: url("../images/ornament-mark.svg") center / contain no-repeat;
}

.woocommerce-checkout .wc-block-components-checkout-step__description {
	color: var(--color-text-muted);
	font-size: var(--font-size-xs);
}

/* WooCommerce's step numbers/lines (left gutter) are not needed with the card layout. */
.woocommerce-checkout .wc-block-checkout__form .wc-block-components-checkout-step--with-step-number {
	padding-inline-start: 0;
}

.woocommerce-checkout .wc-block-components-checkout-step--with-step-number::after,
.woocommerce-checkout .wc-block-components-checkout-step--with-step-number .wc-block-components-checkout-step__title::after {
	display: none;
}

.woocommerce-checkout .wc-block-components-address-form {
	gap: 0 var(--space-3);
}

/* Shipping / payment options: each option is a bordered row; the selected one is navy. */
.woocommerce-checkout .wc-block-components-radio-control--highlight-checked,
.woocommerce-checkout .wc-block-components-radio-control-accordion-option,
.woocommerce-checkout .wc-block-components-radio-control__option {
	border-radius: var(--radius-sm);
}

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

.woocommerce-checkout .wc-block-components-radio-control__option {
	padding-block: var(--space-3);
	color: var(--color-text);
}

.woocommerce-checkout .wc-block-components-radio-control-accordion-option + .wc-block-components-radio-control-accordion-option,
.woocommerce-checkout .wc-block-components-radio-control__option + .wc-block-components-radio-control__option {
	margin-block-start: var(--space-2);
}

.woocommerce-checkout .wc-block-components-radio-control-accordion-option,
.woocommerce-checkout .wc-block-components-shipping-rates-control .wc-block-components-radio-control__option,
.woocommerce-checkout .wc-block-checkout__shipping-method-option {
	border: 1px solid var(--color-surface);
	background: var(--color-white);
	box-shadow: none;
	transition: border-color var(--transition), background-color var(--transition);
}

.woocommerce-checkout .wc-block-components-radio-control-accordion-option:hover,
.woocommerce-checkout .wc-block-components-shipping-rates-control .wc-block-components-radio-control__option:hover {
	border-color: var(--color-secondary);
}

.woocommerce-checkout .wc-block-components-radio-control-accordion-option--checked-option-highlighted,
.woocommerce-checkout .wc-block-components-radio-control__option--checked-option-highlighted,
.woocommerce-checkout .wc-block-checkout__shipping-method-option--selected {
	border-color: var(--color-primary) !important;
	background: #f3f5fc !important;
	box-shadow: 0 0 0 1px var(--color-primary) !important;
}

.woocommerce-checkout .wc-block-components-radio-control__input {
	border-color: var(--color-secondary);
}

.woocommerce-checkout .wc-block-components-radio-control__input:checked {
	border-color: var(--color-primary);
}

.woocommerce-checkout .wc-block-components-radio-control__input:checked::before {
	background: var(--color-primary);
}

.woocommerce-checkout .wc-block-components-radio-control__input:focus-visible {
	box-shadow: var(--focus-ring);
	outline: 0;
}

.woocommerce-checkout .wc-block-components-radio-control__label {
	font-weight: var(--font-weight-bold);
}

.woocommerce-checkout .wc-block-components-radio-control__secondary-label,
.woocommerce-checkout .wc-block-components-radio-control__description {
	color: var(--color-text-muted);
	font-size: var(--font-size-xs);
}

.woocommerce-checkout .wc-block-components-radio-control-accordion-content {
	padding-block-end: var(--space-3);
	color: var(--color-text-muted);
	font-size: var(--font-size-sm);
}

/* Checkboxes */
.woocommerce-checkout .wc-block-components-checkbox .wc-block-components-checkbox__input[type="checkbox"] {
	border-color: var(--color-secondary);
	border-radius: var(--radius-xs);
}

.woocommerce-checkout .wc-block-components-checkbox .wc-block-components-checkbox__input[type="checkbox"]:checked {
	border-color: var(--color-primary);
	background: var(--color-primary);
}

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

.woocommerce-checkout .wc-block-components-checkbox__label {
	color: var(--color-text);
	font-size: var(--font-size-sm);
}

/* Order summary (sidebar) */
.woocommerce-checkout .wc-block-components-checkout-order-summary__title,
.woocommerce-checkout .wc-block-components-order-summary .wc-block-components-panel__button {
	color: var(--color-text);
	font-size: var(--font-size-base);
	font-weight: var(--font-weight-bold);
}

.woocommerce-checkout .wc-block-components-order-summary-item {
	padding-block: var(--space-3);
	border-block-end: 1px solid var(--color-surface);
}

.woocommerce-checkout .wc-block-components-order-summary-item:last-child {
	border-block-end: 0;
}

.woocommerce-checkout .wc-block-components-order-summary-item__image img {
	border-radius: var(--radius-xs);
	box-shadow: var(--shadow-xs);
}

.woocommerce-checkout .wc-block-components-order-summary-item__quantity {
	border-color: var(--color-white);
	background: var(--color-primary);
	color: var(--color-white);
	box-shadow: none;
}

.woocommerce-checkout .wc-block-components-product-name {
	color: var(--color-text);
	font-weight: var(--font-weight-bold);
}

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

/* Place order: large navy button; «بازگشت به سبد» as a quiet link. */
.woocommerce-checkout .wc-block-checkout__actions {
	padding-block-start: var(--space-4);
	border-block-start: 1px solid var(--color-surface);
}

.woocommerce-checkout .wc-block-checkout__actions_row {
	align-items: center;
	gap: var(--space-3);
}

.woocommerce-checkout .wc-block-components-checkout-place-order-button.wc-block-components-button:not(.is-link) {
	min-height: 3.5rem;
	padding-inline: var(--space-7);
	font-size: var(--font-size-base);
	box-shadow: 0 8px 20px rgb(34 44 90 / 0.22);
}

.woocommerce-checkout .wc-block-components-checkout-return-to-cart-button {
	color: var(--color-primary);
	font-size: var(--font-size-sm);
	text-decoration: none;
}

.woocommerce-checkout .wc-block-checkout__terms {
	color: var(--color-text-muted);
	font-size: var(--font-size-xs);
	line-height: 1.9;
}

@media (max-width: 699px) {
	.woocommerce-checkout .wc-block-checkout__actions_row {
		flex-direction: column-reverse;
		align-items: stretch;
	}

	.woocommerce-checkout .wc-block-components-checkout-place-order-button.wc-block-components-button:not(.is-link) {
		width: 100%;
	}

	.woocommerce-checkout .wc-block-components-checkout-return-to-cart-button {
		align-self: center;
	}
}

/* Phones: the cart items table never grows wider than its card. */
@media (max-width: 699px) {
	.woocommerce-cart .wc-block-cart .wc-block-components-main {
		min-width: 0;
		max-width: 100%;
	}

	.woocommerce-cart table.wc-block-cart-items {
		width: 100%;
		max-width: 100%;
		table-layout: fixed;
	}

	.woocommerce-cart .wc-block-cart-items .wc-block-cart-items__row {
		max-width: 100%;
	}
}

/* WooCommerce's snackbar notices (fixed, bottom) stay inside the screen on small phones. */
.woocommerce-cart .wc-block-components-notices__snackbar,
.woocommerce-checkout .wc-block-components-notices__snackbar {
	box-sizing: border-box;
	width: auto;
	max-width: calc(100vw - 2rem);
	inset-inline: 1rem;
}

/* Checkout summary: the sidebar is already the card, so WooCommerce's inner border is dropped. */
.woocommerce-checkout .wp-block-woocommerce-checkout-order-summary-block {
	border: 0;
	border-radius: 0;
}

.woocommerce-checkout .wc-block-components-checkout-order-summary__title {
	padding-inline: 0;
}

.woocommerce-checkout .wp-block-woocommerce-checkout-order-summary-block .wc-block-components-totals-wrapper,
.woocommerce-checkout .wc-block-components-checkout-order-summary__content {
	padding-inline: 0;
}

/* Phones: WooCommerce's fixed row grid (80/132/22/110px) is wider than the card;
   image | product (flexible) | total keeps the row inside it. */
@media (max-width: 699px) {
	.woocommerce-cart .wc-block-cart-items .wc-block-cart-items__row {
		grid-template-columns: 4.5rem minmax(0, 1fr) auto;
		column-gap: var(--space-3);
	}

	.woocommerce-cart .wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__image {
		grid-column: 1;
	}

	.woocommerce-cart .wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__product {
		grid-column: 2;
		min-width: 0;
	}

	.woocommerce-cart .wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__total {
		grid-column: 3;
		grid-row: 1;
		min-width: 0;
		font-size: var(--font-size-sm);
		white-space: nowrap;
	}
}

/* Phones: two columns (image | product); the line total sits on its own row under the product. */
@media (max-width: 699px) {
	.woocommerce-cart .wc-block-cart-items .wc-block-cart-items__row {
		grid-template-columns: 4.5rem minmax(0, 1fr);
		row-gap: var(--space-2);
	}

	.woocommerce-cart .wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__image {
		grid-row: 1 / span 2;
	}

	.woocommerce-cart .wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__total {
		grid-column: 2;
		grid-row: 2;
		justify-content: flex-start;
		padding-block-start: 0 !important;
		text-align: start;
	}

	.woocommerce-cart .wc-block-cart-item__total .wc-block-cart-item__total-price-and-sale-badge-wrapper {
		align-items: flex-start;
	}
}

/* Phones: WooCommerce's container-size rules (.is-mobile/.is-small) are more specific than
   the theme's, so the two-column row layout is enforced here. */
@media (max-width: 699px) {
	.woocommerce-cart .wc-block-cart table.wc-block-cart-items tbody tr.wc-block-cart-items__row {
		grid-template-columns: 4.5rem minmax(0, 1fr) !important;
		column-gap: var(--space-3) !important;
		row-gap: var(--space-2) !important;
	}

	.woocommerce-cart .wc-block-cart table.wc-block-cart-items tr.wc-block-cart-items__row > td.wc-block-cart-item__image {
		grid-column: 1 !important;
		grid-row: 1 / span 2 !important;
	}

	.woocommerce-cart .wc-block-cart table.wc-block-cart-items tr.wc-block-cart-items__row > td.wc-block-cart-item__product {
		grid-column: 2 !important;
		grid-row: 1 !important;
		min-width: 0;
	}

	.woocommerce-cart .wc-block-cart table.wc-block-cart-items tr.wc-block-cart-items__row > td.wc-block-cart-item__total {
		grid-column: 2 !important;
		grid-row: 2 !important;
		justify-content: flex-start;
		padding: 0 !important;
		text-align: start !important;
	}
}
