/**
 * cart.css
 *
 * Ported directly from the approved review mockup. Covers line items,
 * order summary, free shipping progress, shipping estimate widget, and
 * the Save/Share Cart actions.
 */

.page-header {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	border-bottom: 2px solid #111;
	padding: 10px 0 14px;
	margin-bottom: 24px;
	flex-wrap: wrap;
	gap: 10px;
}
.page-header h1 {
	margin: 0;
	font-size: 24px;
	text-transform: uppercase;
}
.page-header .count {
	font-size: 13px;
	color: #666;
}

.cart-layout {
	display: grid;
	grid-template-columns: 1fr 360px;
	gap: 32px;
	align-items: start;
	/* Bottom spacing before the footer now comes from .site-footer's
	 * canonical margin-top (footer.css, testing-round item 18) — this
	 * page-specific padding-bottom was removed 2026-09-02 to avoid
	 * doubling up with it. */
}

/* ---------------- Line items ---------------- */
.cart-table {
	width: 100%;
	border-collapse: collapse;
}
.cart-table th {
	text-align: left;
	font-size: 10.5px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: #888;
	border-bottom: 2px solid #111;
	padding-bottom: 10px;
}
.cart-table td {
	border-bottom: 1px solid #eee;
	padding: 16px 0;
	vertical-align: top;
	font-size: 13px;
}
.line-product {
	display: flex;
	gap: 12px;
	align-items: flex-start;
}
.line-product .thumb {
	width: 64px;
	height: 64px;
	background: #f2f2f2;
	border: 1px solid #ddd;
	flex-shrink: 0;
}
.line-product .thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.line-product .info h4 {
	font-size: 13px;
	margin: 0 0 3px;
}
.line-product .info .meta {
	font-size: 11.5px;
	color: #888;
}
.qty-input {
	width: 60px;
	padding: 6px;
	border: 1px solid #ccc;
	text-align: center;
	font-size: 13px;
}
.remove-btn {
	background: none;
	border: 0;
	color: var(--ink);
	padding: 6px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
}
.remove-btn:hover {
	opacity: 0.6;
}
.remove-btn svg {
	width: 17px;
	height: 17px;
}
.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}
.line-total-cell {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
}
.line-total {
	font-weight: 700;
}
.savings-note {
	font-size: 11px;
	color: var(--ink-soft);
	margin-top: 2px;
}
.savings-note:empty {
	display: none;
}
.continue-shopping {
	display: inline-block;
	margin-top: 20px;
	font-size: 12.5px;
	text-decoration: underline;
	color: #666;
}

/* ---------------- Order summary ---------------- */
.summary-box {
	border: 2px solid #111;
	padding: 22px;
	position: sticky;
	top: 90px;
}
.summary-box h3 {
	text-transform: uppercase;
	font-size: 13px;
	letter-spacing: 0.04em;
	border-bottom: 1px solid var(--line);
	padding-bottom: 12px;
	margin-bottom: 14px;
}
.summary-row {
	display: flex;
	justify-content: space-between;
	font-size: 13px;
	padding: 6px 0;
}
.summary-row.units {
	color: #666;
}
.summary-row.savings {
	font-weight: 700;
}
.summary-row.total {
	border-top: 2px solid #111;
	margin-top: 10px;
	padding-top: 12px;
	font-weight: 800;
	font-size: 16px;
}
/*
 * .btn is a shared, site-wide class (base.css) — each mockup file
 * actually defines its own local .btn slightly differently per page
 * context (single-product's is inline-flex in a row of buttons,
 * account's is inline-block, cart's is a full-width block button with
 * top spacing). The theme's shared base.css version matches the
 * account mockup's definition, which is correct for account-page
 * buttons but left "Proceed to Checkout" narrow and left-aligned
 * instead of the cart mockup's full-width, centered, spaced-out
 * treatment. Scoped override here rather than changing the shared
 * class, which would incorrectly affect every other page that
 * correctly relies on the inline-block version.
 */
.summary-box .btn,
.modal-box .btn {
	display: block;
	width: 100%;
	padding: 13px;
	margin-top: 16px;
}

/* ---------------- Free shipping progress ---------------- */
.free-shipping-widget {
	border-top: 1px solid var(--line);
	margin-top: 16px;
	padding-top: 16px;
}
.free-shipping-bar-track {
	width: 100%;
	height: 6px;
	background: #eee;
	border: 1px solid #ddd;
	overflow: hidden;
}
.free-shipping-bar-fill {
	height: 100%;
	background: #111;
	width: 0%;
	transition: width 0.3s ease;
}
.free-shipping-message {
	font-size: 12px;
	margin-top: 8px;
	text-align: center;
}
.free-shipping-message.unlocked {
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

/* ---------------- Shipping estimate widget ---------------- */
.shipping-widget {
	border-top: 1px solid var(--line);
	margin-top: 16px;
	padding-top: 16px;
}
.shipping-widget label {
	display: block;
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	font-weight: 700;
	margin-bottom: 6px;
}
.shipping-input-row {
	display: flex;
	gap: 8px;
}
.shipping-input-row input {
	flex: 1;
	border: 1px solid #ccc;
	padding: 8px 10px;
	font-size: 13px;
}
.shipping-input-row button {
	border: 1px solid #111;
	background: #111;
	color: #fff;
	padding: 0 14px;
	font-size: 11.5px;
	text-transform: uppercase;
	font-weight: 600;
	cursor: pointer;
}
.shipping-result {
	margin-top: 10px;
	font-size: 12.5px;
	padding: 10px 12px;
	border: 1px solid #ddd;
	background: var(--bg-soft);
	display: none;
}
.shipping-result.show {
	display: block;
}
.shipping-result.freight {
	border: 2px solid #111;
	background: #f7f7f7;
}
.shipping-result .disclaimer {
	display: block;
	font-size: 10.5px;
	color: #999;
	margin-top: 4px;
}

/* ---------------- Save / Share Cart ---------------- */
.save-cart-row {
	margin-top: 14px;
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.save-cart-link,
.share-cart-link {
	font-size: 14px;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	font-weight: 600;
	text-decoration: underline;
	color: #666;
	background: none;
	border: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	width: 100%;
	cursor: pointer;
}
.save-cart-link svg,
.share-cart-link svg {
	width: 14px;
	height: 14px;
}

/*
 * Save/Share Cart modals — .modal-overlay / .modal-box (common) /
 * .modal-close / .modal-box h3 live in base.css, shared with the
 * single product page's Size Chart modal. This is just the size this
 * page's compact form content needs (narrower than single-product's
 * size-chart table) plus the text input styling neither page needed
 * until now.
 */
.modal-box {
	max-width: 420px;
}
.modal-box input {
	width: 100%;
	border: 1px solid #ccc;
	padding: 10px 12px;
	font-size: 13px;
	margin-bottom: 14px;
}
.modal-box label {
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	font-weight: 700;
	display: block;
	margin-bottom: 6px;
}
.modal-box p {
	font-size: 12.5px;
	color: #666;
	margin-top: 0;
}
.share-link-row {
	display: flex;
	gap: 8px;
	margin-bottom: 14px;
}
.share-link-row input {
	margin-bottom: 0;
}
.share-link-row .btn {
	width: auto;
	margin-top: 0;
	padding: 0 16px;
	white-space: nowrap;
}
.share-note {
	font-size: 11px;
	color: #999;
	margin-bottom: 0;
}

/* ---------------- Empty cart ---------------- */
.empty-state {
	border: 1px dashed #999;
	padding: 60px 20px;
	text-align: center;
}
.empty-state h2 {
	margin-bottom: 8px;
}
.empty-state p {
	color: #666;
	margin-bottom: 20px;
}

/* ---------------- Responsive ---------------- */
@media (max-width: 900px) {
	.cart-layout {
		grid-template-columns: 1fr;
	}
	.line-product {
		flex-direction: column;
		align-items: flex-start;
	}
	.summary-box {
		position: static;
	}
}
