/**
 * Cart page — table, prices, variations, totals.
 *
 * WooCommerce's own CSS is disabled site-wide, so the responsive (stacked)
 * cart layout is provided here. Uses the shared tokens from shv-base.css.
 */

.cart-product-table {
	background: #fff;
}

.woocommerce-cart-form__contents {
	width: 100%;
	margin: 0;
	border-collapse: collapse;
}

/* ---------- Header ---------- */
.shv-cart-head th {
	font-family: "Manrope", "Inter", sans-serif;
	font-weight: 700;
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--shv-muted);
	text-align: left;
	padding: 0 12px 14px;
	border-bottom: 2px solid var(--shv-line);
}

.shv-cart-head .product-price,
.shv-cart-head .product-subtotal {
	text-align: right;
}

.shv-cart-head .product-quantity {
	text-align: center;
}

/* ---------- Rows ---------- */
.woocommerce-cart-form__cart-item td {
	padding: 18px 12px;
	border-bottom: 1px solid var(--shv-line);
	vertical-align: middle;
}

.woocommerce-cart-form__cart-item .product-thumbnail img {
	width: 72px;
	height: 72px;
	object-fit: cover;
	border-radius: 10px;
}

.product-remove .remove {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	color: var(--shv-muted);
	background: var(--shv-stone);
	text-decoration: none;
	transition: background 0.15s ease, color 0.15s ease;
}

.product-remove .remove:hover {
	background: var(--shv-coral-tint);
	color: var(--shv-coral-dark);
}

.shv-cart-name {
	font-weight: 700;
	font-size: 15px;
	color: var(--shv-ink);
	text-decoration: none;
}

.shv-cart-name:hover {
	color: var(--shv-coral-dark);
}

/* Variation / item meta under the name. */
.product-name dl.variation {
	margin: 6px 0 0;
	font-size: 13px;
	color: var(--shv-muted);
}

.product-name dl.variation dt,
.product-name dl.variation dd {
	display: inline;
	margin: 0;
}

.product-name dl.variation dt {
	font-weight: 600;
	margin-right: 4px;
}

.product-name dl.variation dd {
	margin-right: 10px;
}

.product-name dl.variation dd p {
	display: inline;
	margin: 0;
}

.product-name .backorder_notification {
	margin: 6px 0 0;
	font-size: 12px;
	color: var(--shv-coral-dark);
}

.product-price,
.product-subtotal {
	text-align: right;
	font-size: 15px;
	color: var(--shv-ink);
	white-space: nowrap;
}

.product-subtotal {
	font-weight: 700;
}

.product-quantity {
	text-align: center;
}

.product-quantity .quantity {
	display: inline-flex;
}

.product-quantity input.qty {
	width: 64px;
	text-align: center;
	border: 1px solid var(--shv-stone-line);
	border-radius: 9px;
	padding: 9px 6px;
	font-size: 15px;
	color: var(--shv-ink);
	background: #fff;
}

/* ---------- Actions ---------- */
.shv-cart-actions {
	display: flex;
	justify-content: flex-end;
	gap: 12px;
	margin-top: 18px;
}

.shv-cart-update {
	background: var(--shv-ink);
	color: #fff;
	border: none;
	border-radius: 10px;
	padding: 12px 22px;
	font-family: "Manrope", "Inter", sans-serif;
	font-weight: 700;
	font-size: 14px;
	cursor: pointer;
	transition: background 0.15s ease;
}

.shv-cart-update:hover {
	background: var(--shv-coral-dark);
	color: #fff;
}

.shv-cart-update[disabled] {
	opacity: 0.5;
	cursor: default;
}

/* ---------- Totals ---------- */
.cart-total h2 {
	font-family: "Manrope", "Inter", sans-serif;
	font-weight: 800;
	font-size: 18px;
	margin: 0 0 16px;
	color: var(--shv-ink);
}

.cart_totals table {
	width: 100%;
	border-collapse: collapse;
}

.cart_totals th,
.cart_totals td {
	padding: 12px 0;
	border-bottom: 1px solid var(--shv-line);
	font-size: 15px;
	text-align: left;
	vertical-align: top;
}

.cart_totals td {
	text-align: right;
	color: var(--shv-ink);
}

.cart_totals .order-total th,
.cart_totals .order-total td {
	border-bottom: none;
	font-weight: 800;
	font-size: 18px;
}

.cart_totals .wc-proceed-to-checkout {
	margin-top: 18px;
}

.cart_totals .wc-proceed-to-checkout .checkout-button {
	display: block;
	text-align: center;
	background: var(--shv-coral);
	color: #fff;
	border-radius: 10px;
	padding: 15px 24px;
	font-family: "Manrope", "Inter", sans-serif;
	font-weight: 700;
	font-size: 16px;
	text-decoration: none;
	transition: background 0.15s ease;
}

.cart_totals .wc-proceed-to-checkout .checkout-button:hover {
	background: var(--shv-coral-dark);
	color: #fff;
}

/* ============================================================
   RESPONSIVE — stack each row into a card on mobile
   ============================================================ */
@media (max-width: 767px) {
	.shv-cart-head {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0 0 0 0);
	}

	.woocommerce-cart-form__cart-item {
		display: grid;
		grid-template-columns: 72px 1fr auto;
		grid-template-areas:
			"thumb name remove"
			"thumb price price"
			"qty qty subtotal";
		gap: 6px 14px;
		align-items: center;
		padding: 16px 0;
		border-bottom: 1px solid var(--shv-line);
	}

	.woocommerce-cart-form__cart-item td {
		padding: 0;
		border: none;
	}

	.product-thumbnail { grid-area: thumb; }
	.product-name { grid-area: name; }
	.product-remove { grid-area: remove; justify-self: end; }
	.product-price { grid-area: price; text-align: left; font-size: 14px; color: var(--shv-muted); }
	.product-quantity { grid-area: qty; text-align: left; }
	.product-subtotal { grid-area: subtotal; text-align: right; }

	/* data-title labels for the value cells. */
	.product-price::before {
		content: attr(data-title) ": ";
		font-weight: 600;
	}

	.shv-cart-actions {
		justify-content: stretch;
	}

	.shv-cart-update {
		width: 100%;
	}
}
