/* ==========================================================
   D2S Theme — cart-checkout.css
   Loads on cart/checkout pages. WooCommerce's own shortcode
   markup/classes are targeted for styling only — never
   restructured in PHP/HTML — so existing mini-cart JS keeps
   matching the same selectors it always has.
   ========================================================== */

.d2s-cart-page {
	/* v1.30.245: no top padding — the cart UI's own progress-bar strip
	   (.d2-prog-bar, in cart-content.php's inline styles) already has
	   its own padding, so this used to add a second, redundant gap
	   between the header and the "1 Shopping Cart" step indicator. */
	padding: 0 0 60px;
}

.d2s-cart-header {
	display: flex;
	align-items: baseline;
	gap: 12px;
	margin-bottom: 24px;
}

.d2s-cart-title {
	font-size: 26px;
	margin: 0;
}

.d2s-cart-item-count {
	font-size: 14px;
	color: var(--d2s-color-text-muted);
}

/* ---------- Empty state ---------- */
.d2s-cart-empty {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 14px;
	padding: 80px 20px;
	color: var(--d2s-color-text-muted);
	text-align: center;
}

.d2s-cart-empty-text {
	font-size: 16px;
	margin: 0;
}

.d2s-cart-empty-cta {
	display: inline-block;
	padding: 12px 28px;
	background: var(--d2s-color-primary);
	color: #fff;
	border-radius: var(--d2s-radius);
	font-weight: 600;
}

.d2s-cart-empty-cta:hover {
	background: var(--d2s-color-accent);
}

/* ---------- Two-column layout ----------
   The shortcode wraps its output in a single .woocommerce div
   containing .woocommerce-cart-form and .cart-collaterals as
   siblings — grid the wrapper, no markup change needed. */
.d2s-cart-items-col .woocommerce {
	display: grid;
	grid-template-columns: 1fr 340px;
	gap: 32px;
	align-items: flex-start;
}

@media (max-width: 900px) {
	.d2s-cart-items-col .woocommerce {
		grid-template-columns: 1fr;
	}
}

/* ---------- Cart items table ---------- */
.woocommerce-cart-form table.cart {
	width: 100%;
	border-collapse: collapse;
}

.woocommerce-cart-form table.cart thead th {
	text-align: left;
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: var(--d2s-color-text-muted);
	padding: 0 10px 12px;
	border-bottom: 1px solid var(--d2s-color-border);
}

.woocommerce-cart-form table.cart td {
	padding: 16px 10px;
	border-bottom: 1px solid var(--d2s-color-border);
	vertical-align: middle;
}

.woocommerce-cart-form .product-thumbnail img {
	width: 72px;
	height: 72px;
	object-fit: cover;
	border-radius: var(--d2s-radius);
}

.woocommerce-cart-form .product-name a {
	font-size: 14px;
	font-weight: 600;
	color: var(--d2s-color-text);
}

.woocommerce-cart-form .product-price,
.woocommerce-cart-form .product-subtotal {
	font-weight: 700;
	color: var(--d2s-color-primary);
	font-size: 14px;
}

.woocommerce-cart-form .quantity .qty {
	width: 60px;
	padding: 8px;
	border: 1px solid var(--d2s-color-border);
	border-radius: var(--d2s-radius);
	text-align: center;
}

.woocommerce-cart-form .product-remove a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	color: #B3261E;
	font-size: 16px;
	line-height: 1;
}

.woocommerce-cart-form .product-remove a:hover {
	background: #FDECEA;
}

.woocommerce-cart-form .actions {
	padding-top: 20px;
}

.woocommerce-cart-form .coupon {
	display: flex;
	gap: 8px;
}

.woocommerce-cart-form .coupon input#coupon_code {
	flex: 1;
	padding: 10px 12px;
	border: 1px solid var(--d2s-color-border);
	border-radius: var(--d2s-radius);
}

.woocommerce-cart-form .coupon button,
.woocommerce-cart-form button[name="update_cart"] {
	padding: 10px 18px;
	background: #fff;
	color: var(--d2s-color-primary);
	border: 1px solid var(--d2s-color-primary);
	border-radius: var(--d2s-radius);
	font-weight: 600;
	cursor: pointer;
}

.woocommerce-cart-form .coupon button:hover,
.woocommerce-cart-form button[name="update_cart"]:hover {
	background: var(--d2s-color-primary);
	color: #fff;
}

/* ---------- Order summary sidebar (cart_totals) ---------- */
.cart-collaterals {
	position: sticky;
	top: 20px;
}

.cart_totals {
	border: 1px solid var(--d2s-color-border);
	border-radius: 10px;
	padding: 20px;
	background: #FAFAFA;
}

.cart_totals h2 {
	font-size: 16px;
	margin: 0 0 16px;
}

.cart_totals table.shop_table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
}

.cart_totals table.shop_table th,
.cart_totals table.shop_table td {
	padding: 10px 0;
	border-bottom: 1px solid var(--d2s-color-border);
	text-align: left;
}

.cart_totals table.shop_table tr:last-child th,
.cart_totals table.shop_table tr:last-child td {
	border-bottom: none;
	font-weight: 700;
	font-size: 16px;
	color: var(--d2s-color-primary);
}

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

.wc-proceed-to-checkout .checkout-button {
	display: block;
	width: 100%;
	text-align: center;
	padding: 14px 16px;
	background: var(--d2s-color-primary);
	color: #fff;
	border-radius: var(--d2s-radius);
	font-weight: 700;
	font-size: 15px;
}

.wc-proceed-to-checkout .checkout-button:hover {
	background: var(--d2s-color-accent);
}

/* ---------- Trust strip ---------- */
.d2s-cart-trust-strip {
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
	justify-content: center;
	margin-top: 36px;
	padding-top: 24px;
	border-top: 1px solid var(--d2s-color-border);
}

.d2s-trust-item {
	font-size: 13px;
	font-weight: 600;
	color: var(--d2s-color-text-muted);
}

/* ---------- Checkout page wrapper ----------
   Deliberately minimal: the checkout UI itself (Elementor-built)
   manages its own width/spacing. This just avoids the theme's
   header sitting flush against it. */
.d2s-checkout-page {
	/* v1.30.245: same reasoning as .d2s-cart-page above — the checkout
	   UI's own progress-bar strip already has its own top padding. */
	padding-top: 0;
}
