/**
 * Cart page (/cart) restyle — loaded only on the WooCommerce cart page.
 * Paired with the woocommerce/cart/cart.php, cart-totals.php,
 * cart-item-data.php and proceed-to-checkout-button.php template overrides.
 *
 * Layout/spacing/interaction states are recreated from the approved
 * "Cart Page" design handoff (design_handoff_product_cart), but colors and
 * type stay the site's own brand: navy #1a2e44 / orange #e8501a, DM Sans +
 * DM Serif Display — consistent with checkout.css and the cart drawer.
 */
@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display&family=DM+Sans:wght@400;500;600;700;800&display=swap');

body.woocommerce-cart {
	background: #fff;
}

/* ── Page shell + two-column layout ──
   Scoped to .elementor-shortcode > .woocommerce (the [woocommerce_cart]
   shortcode widget's own wrapper) rather than a bare ".woocommerce-cart
   .woocommerce" descendant selector — the header's search widget
   (dgwt-wcas-search-wrapp) also carries a literal "woocommerce" class, and
   since body.woocommerce-cart wraps the whole page including the header, the
   unscoped selector was matching it too and inflating its height. */
.woocommerce-cart .elementor-shortcode > .woocommerce {
	font-family: 'DM Sans', sans-serif;
	color: #1a2e44;
	max-width: 1180px;
	margin: 0 auto;
	padding: 40px 20px 80px;
	display: grid;
	grid-template-columns: 1fr 420px;
	gap: 20px;
	align-items: start;
}
.woocommerce-cart .elementor-shortcode > .woocommerce > h1,
.woocommerce-cart .elementor-shortcode > .woocommerce > .page-title {
	font-family: 'DM Serif Display', serif;
	color: #1a2e44;
}
.woocommerce-cart .woocommerce-cart-form {
	grid-column: 1;
}
.woocommerce-cart .cart-collaterals {
	grid-column: 2;
	position: sticky;
	top: 24px;
}

/* ── Empty cart state (woocommerce/cart/cart-empty.php) ── */
.wsc-cart-empty {
	grid-column: 1 / -1;
	max-width: 460px;
	margin: 40px auto;
	padding: 20px 20px 8px;
	text-align: center;
}
.wsc-cart-empty__icon {
	width: 88px;
	height: 88px;
	margin: 0 auto 24px;
	border-radius: 50%;
	background: #f4f5f7;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #9ca3af;
}
.wsc-cart-empty__title {
	font-family: 'DM Sans', sans-serif;
	font-size: 1.3rem;
	font-weight: 700;
	color: #1a2e44;
	margin: 0 0 8px;
}
.wsc-cart-empty__subtitle {
	font-size: 0.95rem;
	color: #9ca3af;
	margin: 0 0 28px;
}
.wsc-cart-empty__cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 48px;
	padding: 0 32px;
	border-radius: 0;
	background: #e8501a !important;
	color: #fff !important;
	font-weight: 700;
	text-decoration: none;
	letter-spacing: 0.02em;
	transition: background 0.18s;
}
.wsc-cart-empty__cta:hover { background: #c94415 !important; }

/* ── Outer panel wrapping the header row, item rows and coupon/update row ── */
.wsc-cart-panel {
	background: #fff;
	border-radius: 10px;
	border-top: 4px solid #e8501a;
	box-shadow: 0 4px 16px rgba(26, 46, 68, 0.1);
	padding: 24px 28px 28px;
}

/* ── Item list header ── */
.wsc-cart-items__head {
	display: grid;
	grid-template-columns: 1fr 100px 130px 100px;
	align-items: center;
	padding-bottom: 14px;
	border-bottom: 1px solid #e5e7eb;
	margin-bottom: 4px;
}
.wsc-cart-items__head span {
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #6b7280;
}
.wsc-col-price,
.wsc-col-qty { text-align: center; }
.wsc-col-total { text-align: right; }

/* ── Item rows ── */
.wsc-cart-item {
	display: grid;
	grid-template-columns: 1fr 100px 130px 100px;
	align-items: center;
	gap: 8px;
	padding: 18px 0;
	border-bottom: 1px solid #eff1f4;
}
.wsc-cart-item:last-child { border-bottom: none; padding-bottom: 4px; }

.wsc-cart-item__product {
	display: flex;
	align-items: flex-start;
	gap: 14px;
	min-width: 0;
}
.wsc-cart-item__image img {
	width: 64px;
	height: 64px;
	object-fit: contain;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	display: block;
}
.wsc-cart-item__details {
	min-width: 0;
}
.wsc-cart-item__name {
	font-size: 0.88rem;
	font-weight: 600;
	color: #1a2e44;
	line-height: 1.35;
	margin-bottom: 8px;
}
.wsc-cart-item__name a {
	color: #1a2e44;
	text-decoration: none;
}
.wsc-cart-item__name a:hover { color: #e8501a; }

.wsc-cart-item__weight { font-size: 0.76rem; color: #9aa1ab; margin-bottom: 6px; }

.wsc-cart-item__tags {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 8px;
}
.wsc-cart-item__tag {
	font-size: 0.7rem;
	color: #6b7280;
	border: 1px solid #e5e7eb;
	border-radius: 20px;
	padding: 3px 10px;
}

.wsc-cart-item__remove {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	font-size: 0.76rem;
	font-weight: 600;
	color: #9aa1ab !important;
	text-decoration: none !important;
	border: none;
	background: none;
	padding: 0;
	cursor: pointer;
}
.wsc-cart-item__remove svg { width: 13px; height: 13px; flex-shrink: 0; stroke: currentColor; }
.wsc-cart-item__remove:hover { color: #dc3545 !important; }

.wsc-cart-item__price { text-align: center; font-size: 0.88rem; }
.wsc-cart-item__price del { display: block; color: #9aa1ab; font-size: 0.78rem; text-decoration: line-through; }
.wsc-cart-item__price ins { display: block; text-decoration: none; font-size: 0.88rem; font-weight: 700; color: #1a2e44; }

.wsc-cart-item__qty { display: flex; justify-content: center; }
.wsc-cart-item__qty .quantity {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	border: 1px solid #d1d5db !important;
	border-radius: 0 !important;
	padding: 4px 6px !important;
	width: fit-content;
	background: transparent !important;
	box-shadow: none !important;
}
.wsc-qty-btn {
	width: 22px !important;
	height: 22px !important;
	min-width: 0 !important;
	flex-shrink: 0;
	border: none !important;
	border-radius: 0 !important;
	background: transparent !important;
	color: #1a2e44 !important;
	padding: 0 !important;
	margin: 0 !important;
	display: flex !important;
	align-items: center;
	justify-content: center;
	box-shadow: none !important;
	cursor: pointer;
}
.wsc-qty-btn svg { width: 12px; height: 12px; stroke: currentColor; }
.wsc-qty-btn:hover { background: #f3f4f6 !important; }
.wsc-cart-item__qty input.qty {
	/* Width is set inline by cart.php's resizeQtyInput() so the field grows
	   to fit however many digits are typed — this is only a floor for
	   before that JS runs (e.g. no-JS fallback), not the effective width. */
	width: 24px;
	min-width: 24px;
	border: none !important;
	background: transparent !important;
	text-align: center;
	font-size: 0.82rem;
	font-weight: 600;
	color: #1a2e44;
	padding: 0 !important;
	box-shadow: none !important;
	-moz-appearance: textfield;
}
.wsc-cart-item__qty input.qty::-webkit-inner-spin-button,
.wsc-cart-item__qty input.qty::-webkit-outer-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.wsc-cart-item__total {
	text-align: right;
	font-size: 0.94rem;
	font-weight: 700;
	color: #1a2e44;
}

/* ── Coupon / update-cart / clear footer row ── */
.wsc-cart-panel__footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 16px;
	margin-top: 22px;
}
.wsc-cart-panel__footer .coupon {
	display: flex;
	border-radius: 0;
	overflow: hidden;
	border: 1px solid #d1d5db;
}
.wsc-cart-panel__footer .coupon .input-text {
	border: none !important;
	outline: none;
	padding: 11px 16px !important;
	font-size: 0.82rem;
	font-family: 'DM Sans', sans-serif;
	color: #1a2e44;
	background: transparent !important;
	box-shadow: none !important;
	width: 170px;
}
.wsc-cart-panel__footer .coupon .wsc-btn {
	border-radius: 0 !important;
	border: none !important;
}

.wsc-btn {
	display: inline-block !important;
	padding: 11px 22px !important;
	font-size: 0.8rem !important;
	font-weight: 700 !important;
	cursor: pointer;
	box-shadow: none !important;
	transition: background 0.2s, color 0.2s;
}
.wsc-btn--primary {
	background: #e8501a !important;
	color: #fff !important;
}
.wsc-btn--primary:hover { background: #c94415 !important; }

.wsc-cart-actions { display: flex; gap: 10px; }
.wsc-btn-outline {
	display: inline-flex !important;
	align-items: center;
	gap: 6px;
	background: #fff !important;
	font-size: 0.8rem !important;
	font-weight: 700 !important;
	padding: 10px 20px !important;
	border-radius: 0 !important;
	text-decoration: none !important;
	box-shadow: none !important;
	cursor: pointer;
}
.wsc-btn-outline svg { width: 13px; height: 13px; flex-shrink: 0; }
.wsc-btn-outline--accent { border: 1px solid #e8501a !important; color: #e8501a !important; }
.wsc-btn-outline--accent:hover { background: #fdf0e9 !important; }
.wsc-btn-outline--danger { border: 1px solid #dc3545 !important; color: #dc3545 !important; }
.wsc-btn-outline--danger:hover { background: #fdecea !important; }

/* ── Order summary panel ── */
.woocommerce-cart .cart-collaterals .cart_totals {
	background: #fff;
	border-radius: 10px;
	border-top: 4px solid #e8501a;
	padding: 24px 26px 28px;
	box-shadow: 0 4px 16px rgba(26, 46, 68, 0.1);
	width: 100%;
}
.wsc-order-summary h2 {
	position: relative;
	font-family: 'DM Serif Display', serif;
	font-size: 1.25rem;
	color: #1a2e44;
	margin: 0 0 16px;
	padding-bottom: 12px;
	border-bottom: 2px solid #e5e7eb;
}
.wsc-order-summary h2::after {
	content: '';
	position: absolute;
	left: 0;
	bottom: -2px;
	width: 40px;
	height: 2px;
	background: #e8501a;
}
.wsc-totals-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 10px 0;
	font-size: 0.82rem;
	color: #6b7280;
}
.wsc-totals-row span:last-child { color: #1a2e44; font-weight: 700; font-size: 0.88rem; text-align: right; }
.wsc-totals-row--discount { padding-bottom: 16px; }
.wsc-discount-pill {
	font-size: 0.75rem !important;
	font-weight: 700;
	color: #2f9e5c !important;
	background: rgba(47, 158, 92, 0.12);
	padding: 4px 10px;
	border-radius: 20px;
}
.wsc-totals-row--total {
	background: #f4f5f7;
	border-radius: 10px;
	padding: 16px 18px;
	margin-bottom: 20px;
}
.wsc-totals-row--total span:first-child {
	font-size: 0.95rem;
	font-weight: 700;
	color: #1a2e44;
}
.wsc-totals-row--total span:last-child {
	font-size: 1.25rem;
	font-weight: 800;
	color: #1a2e44;
}

.wc-proceed-to-checkout { margin: 0; }
.woocommerce-cart .cart-collaterals .wc-proceed-to-checkout a.checkout-button.button.alt.wc-forward {
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	flex-wrap: nowrap !important;
	gap: 8px !important;
	width: 100% !important;
	max-width: 100% !important;
	min-width: 0 !important;
	box-sizing: border-box !important;
	background: #e8501a !important;
	color: #fff !important;
	border: none !important;
	border-radius: 0 !important;
	padding: 14px 10px !important;
	font-size: 0.85rem !important;
	font-weight: 700 !important;
	letter-spacing: normal !important;
	text-transform: none !important;
	text-decoration: none !important;
	white-space: nowrap !important;
	overflow: hidden !important;
	box-shadow: none !important;
	margin: 0 0 12px !important;
	float: none !important;
	transition: background 0.2s;
}
.woocommerce-cart .cart-collaterals .wc-proceed-to-checkout a.checkout-button.button.alt.wc-forward span {
	overflow: hidden;
	text-overflow: ellipsis;
}
.woocommerce-cart .cart-collaterals .wc-proceed-to-checkout a.checkout-button.button.alt.wc-forward svg { flex-shrink: 0; }
.woocommerce-cart .cart-collaterals .wc-proceed-to-checkout a.checkout-button.button.alt.wc-forward:hover { background: #c94415 !important; color: #fff !important; }

.wsc-continue-shopping {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	text-align: center;
	font-size: 0.8rem;
	font-weight: 600;
	color: #6b7280;
	text-decoration: none;
}
.wsc-continue-shopping svg { flex-shrink: 0; }
.wsc-continue-shopping:hover { color: #e8501a; }

/* ── Notices ── */
.woocommerce-cart .woocommerce-message,
.woocommerce-cart .woocommerce-error,
.woocommerce-cart .woocommerce-info {
	grid-column: 1 / -1;
	background: #fff8f4;
	border: 1px solid #f4d9c9;
	border-left: 3px solid #e8501a;
	border-radius: 8px;
	padding: 14px 18px 14px 42px;
	list-style: none;
	color: #1a2e44;
	font-size: 0.86rem;
	margin: 0 0 20px;
}
/* Repositioned to clear the tighter padding above — see the matching
   comment in checkout.css. */
.woocommerce-cart .woocommerce-message::before,
.woocommerce-cart .woocommerce-error::before,
.woocommerce-cart .woocommerce-info::before { top: 14px; left: 16px; }
.woocommerce-cart .woocommerce-error { border-left-color: #dc3545; }
.woocommerce-cart .woocommerce-error::before { color: #dc3545; }

/* ── Responsive ── */
@media (max-width: 900px) {
	.woocommerce-cart .elementor-shortcode > .woocommerce {
		display: block;
	}
	.woocommerce-cart .cart-collaterals {
		position: static;
		margin-top: 20px;
		grid-column: 0;
	}
}
@media (max-width: 768px) {
	.wsc-cart-panel { padding: 18px 16px 20px; }
	.wsc-cart-items__head { display: none; }
	.wsc-cart-item {
		grid-template-columns: 1fr;
		gap: 0;
	}
	.wsc-cart-item__price,
	.wsc-cart-item__qty,
	.wsc-cart-item__total {
		display: flex;
		justify-content: space-between;
		align-items: center;
		text-align: left;
		padding-top: 12px;
		margin-top: 12px;
		border-top: 1px solid #f5f5f5;
	}
	.wsc-cart-item__price del,
	.wsc-cart-item__price ins { display: inline; }
	.wsc-cart-item__price::before,
	.wsc-cart-item__qty::before,
	.wsc-cart-item__total::before {
		content: attr(data-title);
		font-size: 0.72rem;
		font-weight: 700;
		text-transform: uppercase;
		letter-spacing: 0.06em;
		color: #999;
	}
	.wsc-cart-panel__footer { flex-direction: column; align-items: stretch; }
	.wsc-cart-panel__footer .coupon { justify-content: stretch; }
	.wsc-cart-panel__footer .coupon .input-text { flex: 1; width: auto; }
	.wsc-cart-actions { flex-direction: column; align-items: stretch; }
	.wsc-btn-outline { justify-content: center !important; }
}
