/* Cart (boards cart-v1 / cart-v1-mobile). Lines + order summary; WooCommerce's cart.js updates both. */

.cart-wrap { padding-bottom: 48px; }
.cart-body { display: grid; gap: 28px; grid-template-columns: minmax(0, 1fr); }

/* ---------- Lines ---------- */
.cart-head { display: none; }
.cart-lines { box-shadow: inset 0 1px 0 var(--line); }
.cart-line { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 12px; padding: 20px 0; box-shadow: inset 0 -1px 0 var(--line); }
.cl-thumb { flex: none; width: 72px; height: 72px; }
.cl-info { flex: 1 1 calc(100% - 84px); min-width: 0; display: grid; gap: 4px; align-self: start; }
.cl-name { font-size: 16px; font-weight: 500; line-height: 1.3; }
.cl-name a { text-decoration: none; }
.cl-name a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.cl-unit { font-family: var(--font-mono); font-size: 13px; font-weight: 400; letter-spacing: 0.02em; line-height: 1.5; color: var(--quiet); }
.cl-qty { flex: none; }
.cl-qty .qty-box { min-height: 44px; } /* 44 x 44 buttons on a phone (session 55, owner; was 40 x 26) */
.cl-qty .qty-btn { width: 44px; }
/* Mobile: Remove sits after the stepper, the line total at the far right. */
.cl-end { flex: 1; display: flex; flex-direction: row-reverse; justify-content: space-between; align-items: center; gap: 12px; }
.cl-total { font-family: var(--font-mono); font-weight: 300; letter-spacing: -0.02em; font-size: 20px; line-height: 1.2; }
.cl-remove {
	padding-block: 12px; margin-block: -12px;
	font-size: 12px; line-height: 1.5; letter-spacing: 0.06px; color: var(--quiet); text-decoration: none;
}
.cl-remove:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.backorder_notification { font-size: 12px; color: var(--quiet); }

.cart-actions { display: flex; justify-content: flex-end; padding-top: 16px; }
.js:not(.cart-off) .cart-update { display: none; } /* html.js is set before the first paint (functions.php): no shift when cart.js runs; cart-off when it never ran */
.js:not(.cart-off) .cart-actions { padding: 0; }
.woocommerce-cart-form.processing, .cart_totals.processing { opacity: 0.4; } /* WooCommerce's blockUI overlay is unstyled */
.blockUI.blockOverlay { background: transparent !important; }

/* ---------- Order summary ---------- */
.cart_totals { background: var(--ground-alt); box-shadow: inset 0 0 0 1px var(--line); }
.sum-head {
	font-family: var(--font-mono); font-size: 11px; font-weight: 400; letter-spacing: 0.06em;
	padding: 16px 18px; box-shadow: inset 0 -1px 0 var(--line); line-height: 16px; text-transform: uppercase; color: var(--sage-deep);
}
.sum-row { display: grid; gap: 6px; padding: 14px 18px 14px; }
.sum-line, .sum-total { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.sum-line { font-size: 13px; line-height: 19px; }
.sum-val { font-family: var(--font-mono); font-size: 13px; font-weight: 400; letter-spacing: 0.02em; text-align: right; }
.sum-note { font-size: 12px; line-height: 1.5; color: var(--quiet); }
/* Country picker (WooCommerce's shipping calculator): a text link that opens a country select + Update. */
.woocommerce-shipping-calculator { margin-top: 4px; }
.shipping-calculator-button {
	display: inline-block; padding-block: 12px; margin-block: -12px;
	font-size: 12px; font-weight: 500; line-height: 1.5; color: var(--sage-deep);
	text-decoration: underline; text-decoration-color: var(--sage); text-decoration-thickness: 1.5px; text-underline-offset: 4px;
}
.shipping-calculator-form { margin-top: 16px; }
.shipping-calculator-form p { margin: 0; }
.shipping-calculator-form .required { display: none; } /* WooCommerce's country script adds an asterisk; one field, nothing to mark */
.shipping-calculator-form .form-row { display: grid; gap: 8px; margin-bottom: 12px; }
.shipping-calculator-form label { font-size: 11px; font-weight: 500; line-height: 16px; letter-spacing: 0.14px; text-transform: uppercase; color: var(--sage-deep); }
.shipping-calculator-form select {
	width: 100%; min-height: 44px; padding: 10px 40px 10px 14px; border: 0; border-radius: 0; appearance: none; cursor: pointer;
	background: var(--ground) no-repeat right 14px center url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M.5.5l4.5 4.5 4.5-4.5' fill='none' stroke='%23496253' stroke-width='1.2'/%3E%3C/svg%3E");
	box-shadow: inset 0 0 0 1px var(--sage); font-family: var(--font-sans); font-size: 14px; font-weight: 300; color: var(--ink);
}
.shipping-calculator-form button {
	min-height: 44px; padding: 10px 24px; border: 0; background: transparent; box-shadow: inset 0 0 0 1.5px var(--sage); cursor: pointer;
	font-family: var(--font-sans); font-size: 13px; font-weight: 500; color: var(--sage-deep);
}
.shipping-calculator-form button:hover { background: var(--sage); color: var(--ground); }
.sum-no-ship .sum-no-ship-text, .sum-no-ship .hs-us-reseller-notice, .sum-no-ship p { margin: 0 !important; padding: 0; background: none; box-shadow: none; font-size: inherit; color: var(--ink); }
.sum-no-ship a { color: var(--sage-deep) !important; font-weight: 500; text-decoration-color: var(--sage) !important; text-underline-offset: 3px; }
.sum-total { padding: 16px 18px; border-top: 1px solid var(--line); }
.sum-total > span:first-child { font-size: 16px; font-weight: 500; line-height: 24px; }
.sum-total-val { font-family: var(--font-mono); font-weight: 300; letter-spacing: -0.02em; font-size: 26px; line-height: 1.2; }
.sum-cta { display: grid; gap: 12px; padding: 0 18px 18px; }
.sum-cta .checkout-button { width: 100%; }
/* Code Snippet "Cart limit" (qty > 20) swaps in a disabled button: drawn as the primary button, disabled. */
.sum-cta button.button { width: 100%; min-height: 51px; padding: 10px 24px; border: 0; background: var(--sage); color: var(--ground); font: 500 13px/1.6 var(--font-sans); }
.sum-pay { font-size: 12px; line-height: 1.5; color: var(--quiet); }

.cart-continue {
	justify-self: start; display: inline-flex; gap: 10px; padding-block: 12px; margin-block: -12px;
	font-size: 13px; font-weight: 500; line-height: 19px; color: var(--sage-deep); text-decoration: none;
}
.cart-continue:hover { text-decoration: underline; text-underline-offset: 4px; }

/* Empty cart: the message, then one button back to the shop. */
.return-to-shop { margin-top: 24px; }
.wc-empty-cart-message .woocommerce-info { margin: 0; }

/* ---------- Tablet from 768: the desktop line rows; the summary a 416 column at the right, under the lines ---------- */
@media (min-width: 768px) {
	.cart-wrap { padding-bottom: 72px; }
	.cart-body { grid-template-columns: minmax(0, 1fr) 416px; column-gap: var(--col-gap); row-gap: 40px; align-items: start; }
	.cart-items { grid-column: 1 / -1; }
	.cart-summary { grid-column: 2; grid-row: 2; }
	.cart-continue { grid-column: 1; grid-row: 2; margin-top: -12px; }

	/* Header and lines share one grid: thumbnail 96, text, quantity 90, total 110, gaps 24. */
	.cart-head, .cart-line { display: grid; grid-template-columns: 96px minmax(0, 1fr) 90px 110px; column-gap: 24px; }
	.cart-head {
		font-family: var(--font-mono); font-size: 11px; font-weight: 400; letter-spacing: 0.06em;
		padding-bottom: 12px; box-shadow: inset 0 -1px 0 var(--line); line-height: 16px; text-transform: uppercase; color: var(--sage-deep);
	}
	.cart-head span:first-child { grid-column: 1 / 3; }
	.cart-head span:nth-child(2) { text-align: center; }
	.cart-head span:last-child { text-align: right; }
	.cart-lines { box-shadow: none; }
	.cart-line { align-items: center; padding: 24px 0; }
	.cl-thumb { width: 96px; height: 96px; }
	.cl-info { gap: 6px; align-self: center; }
	.cl-name { font-size: 20px; }
	.cl-qty .qty-box { min-height: 44px; }
	.cl-qty .qty-btn { width: 30px; }
	.cl-end { flex-direction: column; align-items: flex-end; justify-content: center; gap: 8px; }
	.cl-remove { font-size: 11px; line-height: 16px; }

	.sum-head { padding: 20px 24px; }
	.sum-row { padding: 16px 24px; }
	.sum-note { font-size: 11px; }
	.sum-total { padding: 20px 24px; }
	.sum-cta { padding: 0 24px 24px; }
	.sum-pay { font-size: 11px; }
}

/* ---------- Desktop from 1024: lines 8 columns, summary 4 (872 + 416) ---------- */
@media (min-width: 1024px) {
	.cart-body { grid-template-columns: repeat(12, minmax(0, 1fr)); row-gap: 0; }
	.cart-items { grid-column: 1 / 9; grid-row: 1; }
	.cart-summary { grid-column: 9 / -1; grid-row: 1 / 3; }
	.cart-body::before { display: block; grid-column: 9; grid-row: 1 / 3; } /* the rule: main | summary (main.css) */
	.cart-continue { grid-column: 1 / 9; grid-row: 2; margin-top: 12px; } /* 24 above the text */
}
