/* ============================================================
   Cart page — themed to match homepage design language.
   Reuses the --nh-color-* variables defined in assets/css/home.css.
   ============================================================ */

/* Homepage palette, duplicated here because home.css only loads on the
   front page. Keep in sync with assets/css/home.css. */
:root {
	--nh-color-surface: #fff;
	--nh-color-surface-muted: #f8f8f8;
	--nh-color-text: #1a1a1a;
	--nh-color-text-muted: #666;
	--nh-color-border: #e0e0e0;
	--nh-color-brand: #2b6cb0;
	--nh-color-brand-strong: #1a4971;
	--nh-color-price: #c0392b;
	--nh-content-inline-padding: clamp(1.25rem, 8.6vw, 10.3125rem);
}

/* Hide the page title rendered by page.php; the themed header replaces it. */
body.woocommerce-cart .entry-title { display: none; }

/* Seamless top: flush the grey theme background against the fixed navbar
   (no white body showing above/behind the cart section) and drop the
   leftover article header (edit link) gap. */
body.woocommerce-cart #container,
body.woocommerce-cart #container > main#content,
body.woocommerce-cart #container > main#content > article,
body.woocommerce-cart .entry-content {
	background: var(--nh-color-surface-muted);
}
body.woocommerce-cart article > header.header { display: none; }

/* ---- Section & container (aligned with homepage sections) ---- */
.nh-cart { background: var(--nh-color-surface-muted); color: var(--nh-color-text); }
.nh-cart__inner { width: 100%; padding: calc(3rem + var(--navbar-height, 64px)) var(--nh-content-inline-padding) 4rem; }

.nh-cart__heading { text-align: center; margin-bottom: 2rem; }
.nh-cart__heading h2 { font-size: 2rem; font-weight: 700; letter-spacing: .12em; color: #333333; }
.nh-cart__heading i { display: block; width: 2.5rem; height: 3px; background: var(--nh-color-brand); margin: .75rem auto 0; }

/* ---- Two-column layout: items | sticky summary ---- */
.nh-cart-layout { display: grid; grid-template-columns: minmax(0, 1fr) 22rem; gap: 1.5rem; align-items: start; }
.nh-cart .woocommerce-cart-form { min-width: 0; }
.nh-cart-summary { position: sticky; top: 1.5rem; }

/* ---- Shared form controls ---- */
.nh-cart input[type="text"],
.nh-cart input[type="number"],
.nh-cart input[type="email"],
.nh-cart input[type="tel"],
.nh-cart select {
	border: 1px solid var(--nh-color-border);
	border-radius: .375rem;
	background: #fff;
	color: var(--nh-color-text);
	font: inherit;
	transition: border-color .2s, box-shadow .2s;
}
.nh-cart input:focus,
.nh-cart select:focus {
	outline: none;
	border-color: var(--nh-color-brand);
	box-shadow: 0 0 0 3px rgba(43, 108, 176, .15);
}

/* ---- Left column: product table as card ---- */
.nh-cart .shop_table.cart {
	width: 100%;
	margin: 0;
	background: var(--nh-color-surface);
	border: 0;
	border-collapse: separate;
	border-spacing: 0;
	border-radius: .75rem;
	box-shadow: 0 2px 12px #00000014;
	overflow: hidden;
}
.nh-cart .shop_table.cart thead th {
	padding: .9rem 1.25rem;
	background: var(--nh-color-surface-muted);
	border: 0;
	border-bottom: 1px solid var(--nh-color-border);
	color: var(--nh-color-text-muted);
	font-size: .8125rem;
	font-weight: 600;
	letter-spacing: .08em;
	text-transform: uppercase;
	white-space: nowrap;
}
/* Header alignment mirrors the cell content below: centered for
   checkbox / quantity / actions, right for money columns, and the
   name header sits above the product text (past the thumbnail). */
.nh-cart .shop_table.cart thead th.product-checkbox,
.nh-cart .shop_table.cart thead th.product-quantity,
.nh-cart .shop_table.cart thead th.product-remove {
	text-align: center;
}
.nh-cart .shop_table.cart thead th.product-price,
.nh-cart .shop_table.cart thead th.product-subtotal {
	text-align: right;
}
.nh-cart .shop_table.cart thead th.product-name {
	padding-left: calc(1.25rem + 5rem + 1rem);
}
.nh-cart .shop_table.cart tbody .cart_item {
	border-bottom: 1px solid var(--nh-color-border);
}
.nh-cart .shop_table.cart tbody .cart_item:last-of-type {
	border-bottom: 0;
}
.nh-cart .shop_table.cart td {
	padding: 1.1rem 1.25rem;
	border: 0;
	vertical-align: middle;
}

/* Remove link in operations column — round soft-red chip */
.nh-cart .shop_table.cart .product-remove { width: 4rem; text-align: center; }
.nh-cart .shop_table.cart .product-remove .remove {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.75rem;
	height: 1.75rem;
	border-radius: 50%;
	background: #fef5f5;
	color: #c0392b;
	font-size: 1.25rem;
	font-weight: 300;
	text-decoration: none;
	transition: all 0.2s;
	line-height: 1;
}
.nh-cart .shop_table.cart .product-remove .remove:hover {
	background: #c0392b;
	color: #fff;
	transform: scale(1.1);
}

/* Product name with thumbnail - horizontal layout */
.nh-cart .shop_table.cart .product-name { min-width: 18rem; }
.nh-cart .shop_table.cart .product-name-wrapper {
	display: flex;
	align-items: center;
	gap: 1rem;
}
.nh-cart .shop_table.cart .product-thumbnail { 
	flex: none;
	width: 5rem; 
	height: 5rem;
}
.nh-cart .shop_table.cart .product-thumbnail img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 4px;
	border: 1px solid var(--nh-color-border);
}
.nh-cart .shop_table.cart .product-info {
	flex: 1;
	min-width: 0;
}
.nh-cart .shop_table.cart .product-info > a {
	display: block;
	font-weight: 500;
	color: var(--nh-color-text);
	text-decoration: none;
	line-height: 1.4;
}
.nh-cart .shop_table.cart .product-info > a:hover { color: var(--nh-color-brand); }

/* Unit price */
.nh-cart .shop_table.cart td.product-price,
.nh-cart .shop_table.cart td.product-subtotal { text-align: right; }
.nh-cart .shop_table.cart .product-price { color: var(--nh-color-text); }
.nh-cart .shop_table.cart .product-price .amount { font-weight: 600; color: var(--nh-color-price); }

/* Subtotal with savings text */
.nh-cart .shop_table.cart .product-subtotal .amount { 
	font-weight: 700; 
	color: var(--nh-color-price);
	font-size: 1.0625rem;
}
.nh-cart .shop_table.cart .nh-savings-text {
	margin-top: 0.25rem;
	font-size: 0.75rem;
	color: var(--nh-color-text-muted);
}


/* Quantity control - horizontal +/- buttons */
.nh-cart .shop_table.cart .nh-quantity-control {
	display: inline-flex;
	align-items: center;
	border: 1px solid var(--nh-color-border);
	border-radius: 4px;
	overflow: hidden;
	background: var(--nh-color-surface);
}
.nh-cart .shop_table.cart .nh-qty-btn {
	width: 2rem;
	height: 2rem;
	border: none;
	background: var(--nh-color-surface);
	color: var(--nh-color-text);
	font-size: 1.125rem;
	cursor: pointer;
	transition: background 0.2s;
	display: flex;
	align-items: center;
	justify-content: center;
	user-select: none;
}
.nh-cart .shop_table.cart .nh-qty-btn:hover:not(:disabled) {
	background: var(--nh-color-surface-muted);
}
.nh-cart .shop_table.cart .nh-qty-btn:disabled {
	opacity: 0.4;
	cursor: not-allowed;
}
.nh-cart .shop_table.cart .nh-qty-input {
	width: 3rem;
	height: 2rem;
	border: none;
	border-left: 1px solid var(--nh-color-border);
	border-right: 1px solid var(--nh-color-border);
	text-align: center;
	font-size: 0.9375rem;
	font-weight: 500;
	background: var(--nh-color-surface);
	color: var(--nh-color-text);
	padding: 0;
	-moz-appearance: textfield;
}
.nh-cart .shop_table.cart .nh-qty-input::-webkit-outer-spin-button,
.nh-cart .shop_table.cart .nh-qty-input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

/* Quantity changes are confirmed by WooCommerce before prices are replaced.
   Keep the existing numbers visible, but clearly mark them as pending. */
.nh-cart.is-updating .product-subtotal .amount,
.nh-cart.is-updating .cart_totals table,
.nh-cart.is-updating .nh-cart-mobile-footer__amount {
	opacity: .55;
	transition: opacity .15s ease;
}
.nh-cart .cart_totals {
	position: relative;
}
.nh-cart.is-updating .cart_totals::after {
	content: '金额更新中…';
	position: absolute;
	top: 1.65rem;
	right: 1.75rem;
	font-size: .75rem;
	font-weight: 500;
	color: var(--nh-color-text-muted);
}
.nh-cart.is-updating .nh-cart-mobile-footer__label::after {
	content: ' · 更新中';
	font-size: .6875rem;
	color: var(--nh-color-text-muted);
}

/* Table toolbar — enhanced with select-all and batch delete */
.nh-cart-table-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	/* Span the full content container width (aligned with the page edges,
	   matching the header above and the cross-sells below). */
	width: 100%;
	box-sizing: border-box;
	margin: 0 0 1rem;
	gap: 1rem;
	padding: .75rem 1rem;
	background: var(--nh-color-surface);
	border: 1px solid var(--nh-color-border);
	border-radius: 2px;
}
.nh-cart-table-head__left {
	display: flex;
	align-items: center;
	gap: 1rem;
	flex: 1;
}
.nh-cart-select-all {
	display: flex;
	align-items: center;
	gap: .4rem;
	font-size: .875rem;
	color: var(--nh-color-text);
	cursor: pointer;
	user-select: none;
}
.nh-cart-select-all input[type="checkbox"] {
	width: 1.125rem;
	height: 1.125rem;
	cursor: pointer;
	accent-color: var(--nh-color-brand);
}
.nh-cart-table-head__count {
	font-size: .875rem;
	color: var(--nh-color-text-muted);
	font-weight: 500;
}
.nh-cart-batch-remove {
	padding: .4rem .875rem;
	border: 1px solid var(--nh-color-border);
	background: var(--nh-color-surface);
	color: var(--nh-color-text-muted);
	font-size: .8125rem;
	border-radius: 2px;
	cursor: pointer;
	transition: all .2s ease;
}
.nh-cart-batch-remove:hover:not(:disabled) {
	border-color: var(--nh-color-price);
	color: var(--nh-color-price);
	background: #fff5f5;
}
.nh-cart-batch-remove:disabled {
	opacity: .5;
	cursor: not-allowed;
}

/* ---- Right column: totals card ---- */
.nh-cart .cart_totals {
	background: var(--nh-color-surface);
	border-radius: .75rem;
	box-shadow: 0 2px 12px #00000014;
	padding: 1.5rem 1.75rem 1.75rem;
}
.nh-cart .cart_totals h2 {
	padding-bottom: 1rem;
	margin-bottom: .5rem;
	border-bottom: 1px solid var(--nh-color-border);
	font-size: 1.25rem;
	font-weight: 700;
	letter-spacing: .08em;
	color: var(--nh-color-text);
}
.nh-cart .cart_totals table { width: 100%; border: 0; border-collapse: collapse; margin: 0; }
.nh-cart .cart_totals tr {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 1rem;
	padding: .65rem 0;
	border: 0;
	border-bottom: 1px dashed var(--nh-color-border);
}
.nh-cart .cart_totals tr:last-child { border-bottom: 0; }
.nh-cart .cart_totals th {
	padding: 0;
	border: 0;
	color: var(--nh-color-text-muted);
	font-size: .9375rem;
	font-weight: 400;
}
.nh-cart .cart_totals td {
	padding: 0;
	border: 0;
	text-align: right;
	font-size: .9375rem;
}
.nh-cart .cart_totals .cart-discount td { color: #2e7d32; font-weight: 600; }
/* Keep WooCommerce's localized "[移除]" coupon action on one line. */
.nh-cart .cart_totals .cart-discount .woocommerce-remove-coupon { white-space: nowrap; }

/* Shipping rows */
.nh-cart .cart_totals .shipping ul#shipping_method {
	margin: 0;
	padding: 0;
	list-style: none;
	text-align: right;
}
.nh-cart .cart_totals .shipping li {
	display: flex;
	justify-content: flex-end;
	align-items: center;
	gap: .5rem;
	margin: .2rem 0;
}
.nh-cart .cart_totals .shipping-calculator-button {
	display: inline-block;
	margin-top: .4rem;
	color: var(--nh-color-brand);
	font-size: .875rem;
}
.nh-cart .shipping-calculator-form { margin-top: .75rem; text-align: left; }
.nh-cart .shipping-calculator-form p { margin: 0 0 .6rem; }
.nh-cart .shipping-calculator-form select,
.nh-cart .shipping-calculator-form input[type="text"] {
	width: 100%;
	padding: .55rem .75rem;
	font-size: .875rem;
}
.nh-cart .shipping-calculator-form button {
	width: 100%;
	padding: .6rem .75rem;
	border: 1px solid var(--nh-color-brand);
	border-radius: .375rem;
	background: transparent;
	color: var(--nh-color-brand);
	font-size: .875rem;
	font-weight: 600;
	cursor: pointer;
	transition: background .2s, color .2s;
}
.nh-cart .shipping-calculator-form button:hover { background: var(--nh-color-brand); color: #fff; }

.nh-cart .coupon-error-notice {
	width: 100%;
	margin: 0;
	padding: .6rem .9rem;
	background: #fdecea;
	border-radius: .375rem;
	color: var(--nh-color-price);
	font-size: .875rem;
}

/* Coupon form - highlighted card style */
.nh-cart .nh-cart-coupon-highlight {
	display: flex;
	gap: .75rem;
	align-items: flex-start;
	margin-bottom: 1.25rem;
	padding: 1rem;
	background: linear-gradient(135deg, #fff5e6 0%, #fff 100%);
	border: 1px solid #ffd699;
	border-radius: 4px;
}
.nh-cart .nh-cart-coupon-icon {
	flex: none;
	margin-top: .45rem; /* align the icon with the first row's input, not the card */
	color: #e67e22;
}
.nh-cart .nh-cart-coupon-form {
	display: flex;
	flex-direction: column; /* row 1: code input + apply; row 2: owned-coupon picker */
	gap: .625rem;
	flex: 1;
	min-width: 0; /* allow the form to shrink inside the highlight card */
	margin: 0;
	padding: 0;
}
.nh-cart .nh-cart-coupon-row {
	display: flex;
	gap: .5rem;
	min-width: 0;
}
.nh-cart .nh-cart-coupon-form .input-text {
	flex: 1;
	min-width: 0;
	padding: .5rem .75rem;
	border: 1px solid #e0e0e0;
	border-radius: 2px;
	font-size: .875rem;
}
.nh-cart .nh-cart-coupon-form .button {
	padding: .5rem 1.25rem;
	background: var(--nh-color-brand);
	color: #fff;
	border: 1px solid var(--nh-color-brand);
	border-radius: 2px;
	font-size: .875rem;
	font-weight: 600;
	cursor: pointer;
	transition: all .2s ease;
	white-space: nowrap;
}
.nh-cart .nh-cart-coupon-form .button:hover {
	background: var(--nh-color-brand-strong);
	border-color: var(--nh-color-brand-strong);
}

/* Order total — super emphasis (Chinese e-commerce style) */
.nh-cart .cart_totals .nh-order-total-highlight {
	background: #fff9f9;
	border-top: 2px solid var(--nh-color-border);
	border-bottom: 2px solid var(--nh-color-border);
	padding: .4rem 0; /* tighter than the default .65rem row padding so the
	                     total stays close to the checkout button below */
}
.nh-cart .cart_totals .nh-order-total-highlight th {
	font-size: 1.125rem;
	font-weight: 700;
	color: var(--nh-color-text);
	padding-top: 1rem;
	padding-bottom: 1rem;
}
.nh-cart .cart_totals .nh-order-total-highlight td {
	padding-top: 1rem;
	padding-bottom: 1rem;
}
.nh-cart .cart_totals .nh-total-amount {
	display: block;
	font-size: 1.75rem;
	font-weight: 700;
	color: var(--nh-color-price);
}

/* Proceed to checkout — full-width brand button.
   padding: 0 kills WooCommerce's default 1em 0 on this wrapper. */
.nh-cart .wc-proceed-to-checkout { margin-top: .75rem; padding: 0; }
/* The order-total row already carries a solid top border; drop the dashed
   border of the row above it so the boundary reads as a single line. */
.nh-cart .cart_totals tr:has(+ tr.nh-order-total-highlight) { border-bottom: 0; }
body.woocommerce-cart .nh-cart .checkout-button {
	display: block;
	width: 100%;
	padding: .95rem 1.25rem;
	background: var(--nh-color-brand);
	border-radius: .5rem;
	color: #fff;
	font-size: 1.0625rem;
	font-weight: 700;
	letter-spacing: .12em;
	text-align: center;
	text-decoration: none;
	transition: background .2s, transform .2s;
}
body.woocommerce-cart .nh-cart .checkout-button:hover {
	background: var(--nh-color-brand-strong);
	color: #fff;
	transform: translateY(-1px);
}

/* ---- Cross-sells — full width below the two columns ---- */
.nh-cart .cross-sells { margin-top: 3rem; }
.nh-cart .cross-sells > h2 {
	text-align: center;
	margin-bottom: 1.5rem;
	color: var(--nh-color-text);
	font-size: 1.75rem;
	font-weight: 700;
	letter-spacing: .12em;
}
.nh-cart .cross-sells ul.products {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 1.25rem;
	margin: 0;
	padding: 0;
	list-style: none;
}
.nh-cart .cross-sells li.product {
	display: flex;
	flex-direction: column;
	background: var(--nh-color-surface);
	border-radius: .75rem;
	box-shadow: 0 2px 12px #00000014;
	overflow: hidden;
	transition: transform .3s cubic-bezier(.25, .46, .45, .94), box-shadow .3s;
}
.nh-cart .cross-sells li.product:hover {
	transform: translateY(-4px);
	box-shadow: 0 6px 20px #0000001a;
}
.nh-cart .cross-sells li.product .woocommerce-loop-product__link img {
	width: 100%;
	height: 14rem;
	object-fit: cover;
	display: block;
}
.nh-cart .cross-sells h2.woocommerce-loop-product__title {
	padding: 1.1rem 1.25rem .25rem;
	margin: 0;
	text-align: left;
	font-size: 1.125rem;
	font-weight: 600;
	letter-spacing: 0;
}
.nh-cart .cross-sells .price {
	padding: 0 1.25rem;
	color: var(--nh-color-brand);
	font-size: 1rem;
	font-weight: 700;
}
.nh-cart .cross-sells .price del {
	margin-right: .4rem;
	color: var(--nh-color-text-muted);
	font-weight: 400;
}
.nh-cart .cross-sells li.product .button {
	margin: auto 1.25rem 1.25rem;
	padding: .65rem 1rem;
	background: var(--nh-color-brand);
	border-radius: .375rem;
	color: #fff;
	font-size: .875rem;
	font-weight: 600;
	text-align: center;
	text-decoration: none;
	transition: background .2s;
}
.nh-cart .cross-sells li.product .button:hover { background: var(--nh-color-brand-strong); color: #fff; }

/* ---- Empty cart state ---- */
.nh-cart--empty .nh-cart__inner {
	min-height: 100svh;
	display: flex;
	flex-direction: column;
}
.nh-cart--empty .nh-cart__heading { flex: none; }
.nh-cart-empty {
	flex: 1;
	min-height: 24rem;
	padding: 4.5rem 2rem;
	background: var(--nh-color-surface);
	border: 1px solid var(--nh-color-border);
	border-radius: .75rem;
	box-shadow: 0 2px 12px #00000014;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
}
.nh-cart-empty__icon {
	width: 4.5rem;
	height: 4.5rem;
	margin-bottom: 1.25rem;
	color: var(--nh-color-border);
}
.nh-cart-empty h3 { font-size: 1.5rem; font-weight: 700; letter-spacing: .1em; color: #333333; }
.nh-cart-empty p { margin-top: .6rem; color: var(--nh-color-text-muted); font-size: .9375rem; }
.nh-cart-empty__btn {
	display: inline-block;
	margin-top: 1.75rem;
	padding: .8rem 2.5rem;
	background: var(--nh-color-brand);
	border-radius: .5rem;
	color: #fff;
	font-weight: 600;
	letter-spacing: .08em;
	text-decoration: none;
	transition: background .2s, transform .2s;
}
.nh-cart-empty__btn:hover {
	background: var(--nh-color-brand-strong);
	color: #fff;
	transform: translateY(-1px);
}

/* ============================================================
   Responsive
   ============================================================ */
/* Mobile: fixed bottom checkout bar */
.nh-cart-mobile-footer {
	display: none;
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	z-index: 999;
	background: #fff;
	border-top: 1px solid var(--nh-color-border);
	box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
	padding: .875rem 1rem;
}
.nh-cart-mobile-footer__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	max-width: 1200px;
	margin: 0 auto;
}
.nh-cart-mobile-footer__total {
	flex: 1;
	min-width: 0;
}
.nh-cart-mobile-footer__label {
	font-size: .75rem;
	color: var(--nh-color-text-muted);
	margin-bottom: .125rem;
}
.nh-cart-mobile-footer__amount {
	font-size: 1.375rem;
	font-weight: 700;
	color: var(--nh-color-price);
}
.nh-cart-mobile-footer__btn {
	flex: none;
	padding: .75rem 2rem;
	background: var(--nh-color-price);
	color: #fff;
	border: none;
	border-radius: 999px;
	font-size: .9375rem;
	font-weight: 600;
	cursor: pointer;
	transition: all .2s ease;
	white-space: nowrap;
}
.nh-cart-mobile-footer__btn:hover {
	background: #a02e23;
}

/* The six-column cart table needs about 50rem before its cells can shrink
   without overlapping the 22rem totals card. Stack the totals as soon as
   the two-column grid can no longer provide that space. */
@media (max-width: 1420px) {
	.nh-cart-layout { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
	.nh-cart-summary { position: static; margin-top: 0; }
}

/* Preserve the compact row-based table on tablets. Reducing the page gutter,
   cell padding and media column keeps every column inside the viewport until
   WooCommerce's card layout takes over at 768px. */
@media (min-width: 769px) and (max-width: 1024px) {
	.nh-cart__inner { padding-inline: 1.25rem; }
	.nh-cart .shop_table.cart thead th,
	.nh-cart .shop_table.cart td { padding-inline: .75rem; }
	.nh-cart .shop_table.cart thead th.product-name {
		padding-left: calc(.75rem + 4rem + .75rem);
	}
	.nh-cart .shop_table.cart .product-name { min-width: 12rem; }
	.nh-cart .shop_table.cart .product-name-wrapper { gap: .75rem; }
	.nh-cart .shop_table.cart .product-thumbnail {
		width: 4rem;
		height: 4rem;
	}
}

@media (max-width: 768px) {
	/* minmax(0, 1fr): plain `1fr` keeps an auto minimum, so the track can
	   never shrink below the table's min-content and overflows the screen. */
	.nh-cart-layout { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
	.nh-cart-summary { position: static; margin-top: 0; }
	.nh-cart .shop_table.cart { font-size: .8125rem; }
	
	/* Mobile: thumbnail smaller. WooCommerce smallscreen hides it via
	   `.woocommerce #content table.cart .product-thumbnail { display:none }`,
	   which matches our markup with ID-level specificity — !important is
	   required to keep the thumbnail visible in the name cell. */
	.nh-cart .shop_table.cart .product-thumbnail { 
		display: block !important;
		width: 3.5rem; 
		height: 3.5rem;
	}
	.nh-cart .shop_table.cart .product-thumbnail img { border-radius: 3px; }
	
	/* Mobile: stack product name above the thumbnail (image below the name)
	   instead of the desktop row layout where the name sat to the right of
	   the image. Flex column + order puts .product-info (name) on top. */
	.nh-cart .shop_table.cart .product-name-wrapper {
		flex-direction: column;
		align-items: flex-start;
		gap: 0.5rem;
	}
	.nh-cart .shop_table.cart .product-info {
		order: -1;
		align-self: stretch;
	}
	.nh-cart .shop_table.cart .product-name { min-width: 8rem; font-size: .875rem; }
	
	.nh-cart .shop_table.cart .product-price,
	.nh-cart .shop_table.cart .product-quantity,
	.nh-cart .shop_table.cart .product-subtotal { font-size: .8125rem; }
	
	/* Mobile: smaller quantity controls */
	.nh-cart .shop_table.cart .nh-qty-btn {
		width: 1.75rem;
		height: 1.75rem;
		font-size: 1rem;
	}
	.nh-cart .shop_table.cart .nh-qty-input {
		width: 2.5rem;
		height: 1.75rem;
		font-size: 0.875rem;
	}
	
	.nh-cart-table-head { flex-wrap: wrap; padding: .625rem .75rem; width: 100%; }
	.nh-cart .shop_table.cart thead th.product-name {
		padding-left: calc(1.25rem + 3.5rem + .5rem);
	}
	.nh-cart-table-head__left { gap: .375rem; font-size: .8125rem; }
	.nh-cart-select-all { font-size: .8125rem; }
	.nh-cart-batch-remove { padding: .375rem .75rem; font-size: .8125rem; }
	.nh-cart-mobile-footer { display: flex; }
	/* Keep the page footer clear of the fixed checkout bar on mobile. */
	body.woocommerce-cart footer { padding-bottom: calc(4.25rem + 1.25rem); }
}

@media (max-width: 480px) {
	.nh-cart-empty { padding: 3.5rem 1.25rem; }
	.nh-cart .cross-sells li.product .woocommerce-loop-product__link img { height: 13rem; }
}

/* WC notices on the cart page: keep visible below the fixed navbar (only when a notice exists) */
body.woocommerce-cart .woocommerce-notices-wrapper:not(:empty) { padding-top: calc(var(--navbar-height, 64px) + 16px); }

/* WC notices on the cart page — brand blue instead of the default lime/aubergine */
body.woocommerce-cart .woocommerce-info,
body.woocommerce-cart .woocommerce-error,
body.woocommerce-cart .woocommerce-message {
	margin: 0 0 1rem;
	padding: 1rem;
	background: #fff;
	border-top: 2px solid var(--nh-color-brand);
	color: var(--nh-color-text);
	font-size: .875rem;
	line-height: 1.5;
}
body.woocommerce-cart .woocommerce-error { border-top-color: var(--nh-color-price); }
body.woocommerce-cart .woocommerce-message::before,
body.woocommerce-cart .woocommerce-info::before { color: var(--nh-color-brand); }
body.woocommerce-cart .woocommerce-error::before { color: var(--nh-color-price); }

/* Back-to-previous button in the cart heading */
.nh-cart__heading { position: relative; }
.nh-cart-back {
	position: absolute;
	left: 0;
	top: 50%;
	transform: translateY(-50%);
	display: inline-flex;
	align-items: center;
	gap: .4rem;
	padding: .45rem .9rem;
	border: 1px solid var(--nh-color-border);
	border-radius: 999px;
	background: #fff;
	color: var(--nh-color-text);
	font-size: .875rem;
	text-decoration: none;
	transition: border-color .2s, color .2s;
}
.nh-cart-back:hover { border-color: var(--nh-color-brand); color: var(--nh-color-brand); }
.nh-cart-back svg { flex: none; }
