/* =============================================================
   WBA SHOP — CART / CHECKOUT / THANK-YOU / ACCOUNT
   CSS-only restyle of Woo's core templates (deliberately no
   template overrides here — checkout markup changes with Woo
   updates, so we style the standard structure).
   ============================================================= */

/* -------------------------------------------------------------
   PAGE FRAME — Woo cart/checkout render inside page.php content
   ------------------------------------------------------------- */
.woocommerce-cart .woocommerce,
.woocommerce-checkout .woocommerce,
.woocommerce-account .woocommerce {
	max-width: 1240px;
	margin: 0 auto;
	padding: 56px var(--gutter-d) 96px;
}

/* -------------------------------------------------------------
   CART LAYOUT — table left, totals right
   ------------------------------------------------------------- */
.woocommerce-cart form.woocommerce-cart-form { margin-bottom: 40px; }

@media (min-width: 981px) {
	.woocommerce-cart .woocommerce {
		display: grid;
		grid-template-columns: 7fr 4fr;
		gap: 56px;
		align-items: start;
	}
	.woocommerce-cart .woocommerce > .woocommerce-notices-wrapper { grid-column: 1 / -1; }
	.woocommerce-cart .cart-collaterals { position: sticky; top: 100px; }
	.woocommerce-cart .cart-collaterals .cross-sells { grid-column: 1 / -1; }
}

/* Cart table */
table.shop_table {
	width: 100%;
	border-collapse: collapse;
	border: 0;
}
table.shop_table th {
	font-size: 0.62rem;
	font-weight: 700;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--wba-muted);
	text-align: left;
	padding: 0 12px 14px;
	border-bottom: 1px solid var(--wba-border);
}
table.shop_table td {
	padding: 18px 12px;
	border-bottom: 1px solid var(--wba-border);
	vertical-align: middle;
	color: var(--wba-dark);
	font-size: 0.9rem;
}
table.shop_table td.product-thumbnail { width: 84px; }
table.shop_table td.product-thumbnail img {
	width: 68px;
	height: 68px;
	object-fit: contain;
	background: #fff;
	border: 1px solid var(--wba-border);
	border-radius: 8px;
	padding: 6px;
	box-sizing: border-box;
	display: block;
}
table.shop_table td.product-name a {
	color: var(--wba-dark);
	font-weight: 700;
	text-decoration: none;
}
table.shop_table td.product-name a:hover { color: var(--wba-red); }
table.shop_table td.product-name .variation {
	margin: 4px 0 0;
	font-size: 0.72rem;
	color: var(--wba-muted);
	display: flex;
	gap: 6px;
	flex-wrap: wrap;
}
table.shop_table td.product-name .variation dt,
table.shop_table td.product-name .variation dd { margin: 0; display: inline; }
table.shop_table td.product-remove a.remove {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	border: 1px solid var(--wba-border);
	border-radius: 50%;
	color: var(--wba-muted) !important;
	font-size: 1rem;
	font-weight: 400;
	text-decoration: none;
	transition: all 0.2s;
}
table.shop_table td.product-remove a.remove:hover {
	background: var(--wba-red);
	border-color: var(--wba-red);
	color: #fff !important;
}
table.shop_table td.product-subtotal { font-weight: 700; }

/* coupon + update row */
table.shop_table td.actions { padding-top: 24px; border-bottom: 0; }
table.shop_table td.actions .coupon {
	display: inline-flex;
	gap: 10px;
	float: left;
}
table.shop_table td.actions .coupon .input-text {
	padding: 12px 15px;
	border: 1px solid var(--wba-border);
	border-radius: 4px;
	font-family: inherit;
	font-size: 0.8rem;
	width: 170px;
}
table.shop_table td.actions .coupon .input-text:focus { outline: none; border-color: var(--wba-dark); }
table.shop_table td.actions > .button { float: right; }
table.shop_table td.actions .button {
	padding: 12px 20px;
	font-size: 0.7rem;
	background: transparent;
	color: var(--wba-dark);
	border-color: var(--wba-dark);
}
table.shop_table td.actions .button:hover { background: var(--wba-dark); color: #fff; }

/* Cart totals panel — cream card */
.cart_totals {
	background: var(--wba-cream);
	border: 1px solid var(--wba-border);
	border-radius: 14px;
	padding: 28px;
}
.cart_totals > h2 {
	margin: 0 0 18px;
	font-size: 1.1rem;
	font-weight: 800;
	letter-spacing: -0.01em;
	text-transform: lowercase;
	color: var(--wba-dark);
}
.cart_totals table.shop_table th,
.cart_totals table.shop_table td { padding: 12px 0; }
.cart_totals table.shop_table th {
	font-size: 0.66rem;
	vertical-align: top;
	width: 40%;
}
.cart_totals .order-total td { font-size: 1.1rem; font-weight: 800; }
.wc-proceed-to-checkout { padding-top: 22px; text-align: center; }
.wc-proceed-to-checkout a.checkout-button { width: 100%; box-sizing: border-box; }
.shop-continue {
	display: inline-block;
	margin-top: 16px;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: lowercase;
	color: var(--wba-muted);
	text-decoration: none;
	transition: color 0.2s;
}
.shop-continue:hover { color: var(--wba-red); }

/* Cross-sells — "before you check out" */
.cart-collaterals .cross-sells { margin-top: 64px; }
.cart-collaterals .cross-sells > h2 {
	margin: 0 0 8px;
	font-size: clamp(1.4rem, 2.8vw, 1.9rem);
	font-weight: 800;
	letter-spacing: -0.02em;
	text-transform: lowercase;
	color: var(--wba-dark);
}
.cart-collaterals .cross-sells > h2::after {
	content: "";
	display: block;
	width: 44px;
	height: 3px;
	background: var(--wba-red);
	margin: 14px 0 30px;
}

/* Empty cart */
.shop-empty {
	text-align: center;
	max-width: 540px;
	margin: 0 auto;
	padding: 32px 0 8px;
}
.shop-empty__title {
	margin: 14px 0 12px;
	font-size: clamp(1.8rem, 4vw, 2.6rem);
	font-weight: 800;
	letter-spacing: -0.02em;
	color: var(--wba-dark);
}
.shop-empty__title em { font-weight: 300; font-style: italic; }
.shop-empty__lede { color: var(--wba-muted); line-height: 1.75; margin-bottom: 30px; }
.woocommerce-cart .shop-funnel { padding-left: 0; padding-right: 0; padding-bottom: 0; }

/* -------------------------------------------------------------
   CHECKOUT — fields left, order review right
   ------------------------------------------------------------- */
@media (min-width: 981px) {
	form.woocommerce-checkout {
		display: grid;
		grid-template-columns: 7fr 5fr;
		gap: 56px;
		align-items: start;
	}
	form.woocommerce-checkout #order_review_heading,
	form.woocommerce-checkout #order_review {
		grid-column: 2;
	}
	form.woocommerce-checkout #customer_details { grid-column: 1; grid-row: 1 / span 3; }
	form.woocommerce-checkout #order_review { position: sticky; top: 100px; }
}

#customer_details h3,
#order_review_heading {
	font-size: 1.05rem;
	font-weight: 800;
	letter-spacing: -0.01em;
	text-transform: lowercase;
	color: var(--wba-dark);
	margin: 0 0 20px;
}
#customer_details .col-2 { margin-top: 32px; }

.woocommerce form .form-row-first,
.woocommerce form .form-row-last {
	width: 48.5%;
	display: inline-block;
	vertical-align: top;
}
.woocommerce form .form-row-first { margin-right: 3%; }
@media (max-width: 560px) {
	.woocommerce form .form-row-first,
	.woocommerce form .form-row-last { width: 100%; margin-right: 0; }
}

/* Order review panel */
#order_review {
	background: var(--wba-cream);
	border: 1px solid var(--wba-border);
	border-radius: 14px;
	padding: 28px;
}
#order_review table.shop_table th,
#order_review table.shop_table td { padding: 11px 0; font-size: 0.84rem; }
#order_review .order-total td,
#order_review .order-total th { font-size: 1.05rem; font-weight: 800; }

/* Payment methods */
#payment { background: transparent; border: 0; margin-top: 12px; }
#payment ul.payment_methods {
	list-style: none;
	margin: 0 0 18px;
	padding: 18px 0 0;
	border-top: 1px solid var(--wba-border);
}
#payment ul.payment_methods li { margin-bottom: 12px; }
#payment ul.payment_methods label {
	font-weight: 700;
	font-size: 0.85rem;
	color: var(--wba-dark);
	cursor: pointer;
}
#payment div.payment_box {
	background: #fff;
	border: 1px solid var(--wba-border);
	border-radius: 8px;
	padding: 16px;
	margin-top: 10px;
	font-size: 0.8rem;
	color: var(--wba-muted);
	line-height: 1.6;
}
#payment #place_order { width: 100%; box-sizing: border-box; }
.woocommerce-terms-and-conditions-wrapper { font-size: 0.78rem; color: var(--wba-muted); margin-bottom: 16px; }

/* Trust strip under Place Order */
.shop-trust {
	list-style: none;
	margin: 20px 0 0;
	padding: 18px 0 0;
	border-top: 1px solid var(--wba-border);
}
.shop-trust__item {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	color: var(--wba-muted);
	margin-bottom: 10px;
}
.shop-trust__item svg { width: 15px; height: 15px; flex-shrink: 0; color: var(--wba-red); }

/* -------------------------------------------------------------
   THANK-YOU (order received)
   ------------------------------------------------------------- */
.woocommerce-order .woocommerce-thankyou-order-received {
	font-size: clamp(1.5rem, 3.4vw, 2.2rem);
	font-weight: 800;
	letter-spacing: -0.02em;
	color: var(--wba-dark);
	margin: 0 0 28px;
}
ul.woocommerce-order-overview {
	list-style: none;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
	gap: 1px;
	background: var(--wba-border);
	border: 1px solid var(--wba-border);
	border-radius: 14px;
	overflow: hidden;
	margin: 0 0 48px;
	padding: 0;
}
ul.woocommerce-order-overview li {
	background: var(--wba-cream);
	padding: 20px;
	font-size: 0.62rem;
	font-weight: 700;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--wba-muted);
	border: 0;
	margin: 0;
	float: none;
	width: auto;
}
ul.woocommerce-order-overview li strong {
	display: block;
	margin-top: 8px;
	font-size: 0.95rem;
	font-weight: 800;
	letter-spacing: 0;
	text-transform: none;
	color: var(--wba-dark);
}
.woocommerce-order-details__title,
.woocommerce-customer-details h2 {
	font-size: 1.05rem;
	font-weight: 800;
	text-transform: lowercase;
	color: var(--wba-dark);
}
.woocommerce-order .shop-funnel { padding-left: 0; padding-right: 0; }

/* -------------------------------------------------------------
   MY ACCOUNT — light-touch styling
   ------------------------------------------------------------- */
.woocommerce-MyAccount-navigation ul {
	list-style: none;
	margin: 0;
	padding: 0;
	border: 1px solid var(--wba-border);
	border-radius: 14px;
	overflow: hidden;
}
.woocommerce-MyAccount-navigation li { border-bottom: 1px solid var(--wba-border); }
.woocommerce-MyAccount-navigation li:last-child { border-bottom: 0; }
.woocommerce-MyAccount-navigation li a {
	display: block;
	padding: 15px 20px;
	font-size: 0.74rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: lowercase;
	color: var(--wba-dark);
	text-decoration: none;
	transition: background 0.15s, color 0.15s, padding-left 0.15s;
}
.woocommerce-MyAccount-navigation li a:hover,
.woocommerce-MyAccount-navigation li.is-active a {
	background: var(--wba-cream);
	color: var(--wba-red);
	padding-left: 26px;
}
@media (min-width: 769px) {
	.woocommerce-account .woocommerce {
		display: grid;
		grid-template-columns: 3fr 9fr;
		gap: 48px;
		align-items: start;
	}
}

/* -------------------------------------------------------------
   RESPONSIVE — cart table collapses to stacked cards
   ------------------------------------------------------------- */
@media (max-width: 700px) {
	.woocommerce-cart .woocommerce,
	.woocommerce-checkout .woocommerce,
	.woocommerce-account .woocommerce {
		padding: 32px var(--gutter-m) 64px;
	}
	table.shop_table thead { display: none; }
	.woocommerce-cart-form table.shop_table tr.cart_item {
		display: grid;
		grid-template-columns: 84px 1fr auto;
		grid-template-areas:
			"thumb name   remove"
			"thumb price  price"
			"thumb qty    subtotal";
		gap: 4px 14px;
		padding: 16px 0;
		border-bottom: 1px solid var(--wba-border);
	}
	.woocommerce-cart-form table.shop_table tr.cart_item td { border: 0; padding: 2px 0; }
	.woocommerce-cart-form td.product-thumbnail { grid-area: thumb; }
	.woocommerce-cart-form td.product-name { grid-area: name; }
	.woocommerce-cart-form td.product-price { grid-area: price; font-size: 0.8rem; color: var(--wba-muted); }
	.woocommerce-cart-form td.product-quantity { grid-area: qty; }
	.woocommerce-cart-form td.product-subtotal { grid-area: subtotal; text-align: right; }
	.woocommerce-cart-form td.product-remove { grid-area: remove; text-align: right; }
	table.shop_table td.actions .coupon { float: none; display: flex; margin-bottom: 14px; }
	table.shop_table td.actions .coupon .input-text { flex: 1; width: auto; }
	table.shop_table td.actions > .button { float: none; width: 100%; }
}
