/**
 * WooCommerce cart (classic shortcode, page 14) + checkout (Checkout
 * Block, page 12443) — same brand language as login-page.css.
 *
 * Palette mirrors the site-wide --col-* brand system:
 *   red #DE0A0A · orange-red #F03A07 · orange #F66B08 ·
 *   amber #EE9B00 · gold #F4C400 · dark #0F172A · body #475569 ·
 *   border #E2E8F0 · bg #FCFCFD
 * CTA gradient site-wide: linear-gradient(135deg, #F03A07, #EE9B00).
 *
 * Cart uses the classic .shop_table markup; checkout is the React
 * Checkout Block (.wc-block-*), so both selector families are covered.
 */

/* ============================ Shared canvas ============================ */

body.woocommerce-cart,
body.woocommerce-checkout {
	background-color: #fcfcfd;
	background-image:
		radial-gradient(60rem 30rem at 12% -8%, rgba(240, 58, 7, 0.05), transparent 60%),
		radial-gradient(50rem 26rem at 95% 108%, rgba(238, 155, 0, 0.06), transparent 60%);
	background-repeat: no-repeat;
}

body.woocommerce-cart .entry-title,
body.woocommerce-checkout .entry-title {
	margin-bottom: 1.75rem;
	font-size: clamp(1.6rem, 3vw, 2rem);
	font-weight: 700;
	letter-spacing: -0.02em;
	text-align: center;
	color: #0f172a;
}

/* Notices (coupon applied, item removed, errors…) */
body.woocommerce-cart .woocommerce-message,
body.woocommerce-cart .woocommerce-info,
body.woocommerce-cart .woocommerce-error,
body.woocommerce-checkout .woocommerce-message,
body.woocommerce-checkout .woocommerce-info,
body.woocommerce-checkout .woocommerce-error {
	margin-bottom: 1.25rem;
	padding: 0.875rem 1.125rem;
	font-size: 0.9375rem;
	border-radius: 12px;
	border: 1px solid #e2e8f0;
	border-left: 4px solid #f03a07;
	background: #ffffff;
	color: #0f172a;
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

body.woocommerce-cart .woocommerce-error,
body.woocommerce-checkout .woocommerce-error {
	border-left-color: #de0a0a;
}

/* ==================== Buttons (shared across both pages) ==================== */

body.woocommerce-cart .woocommerce a.button:hover,
body.woocommerce-checkout .woocommerce a.button:hover {
	color: #ffffff;
}

/* Ghost / secondary buttons: apply coupon, update cart, back to shop. */
body.woocommerce-cart .woocommerce .button,
body.woocommerce-cart .woocommerce button.button {
	height: 44px;
	padding: 0 1.125rem;
	font-size: 0.9375rem;
	font-weight: 600;
	color: #0f172a;
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	box-shadow: none;
	text-shadow: none;
	transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

body.woocommerce-cart .woocommerce .button:hover,
body.woocommerce-cart .woocommerce button.button:hover {
	color: #f03a07;
	border-color: #f03a07;
	background: #ffffff;
}

/* Primary CTA — exact site gradient (checkout button on cart). */
body.woocommerce-cart .woocommerce .wc-proceed-to-checkout a.checkout-button,
body.woocommerce-cart .woocommerce .return-to-shop .button {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 50px;
	padding: 0 1.5rem;
	font-size: 1rem;
	font-weight: 700;
	letter-spacing: 0.01em;
	color: #ffffff !important;
	background: linear-gradient(135deg, #f03a07, #ee9b00);
	border: 0;
	border-radius: 12px;
	box-shadow: 0 8px 20px -6px rgba(240, 58, 7, 0.4);
	text-shadow: none;
	transition: filter 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

body.woocommerce-cart .woocommerce .wc-proceed-to-checkout a.checkout-button:hover,
body.woocommerce-cart .woocommerce .return-to-shop .button:hover {
	background: linear-gradient(135deg, #de0a0a, #f03a07);
	color: #ffffff !important;
	transform: translateY(-1px);
	box-shadow: 0 12px 26px -8px rgba(222, 10, 10, 0.45);
}

/* ==================== CART (classic markup, page 14) ==================== */

/* Items card — treatment sits on the form so the strip pseudo is a
 * plain block child (a ::before directly on a <table> wraps into an
 * anonymous table row and can break layout). */
body.woocommerce-cart .woocommerce-cart-form {
	position: relative;
	margin-bottom: 2rem;
	border: 1px solid #e2e8f0;
	border-radius: 20px;
	background: #ffffff;
	overflow: hidden;
	box-shadow:
		0 1px 2px rgba(15, 23, 42, 0.04),
		0 12px 32px -12px rgba(15, 23, 42, 0.1);
}

/* Brand ramp strip on top of the items card. */
body.woocommerce-cart .woocommerce-cart-form::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 5px;
	background: linear-gradient(90deg, #f03a07, #f66b08, #ee9b00, #f4c400);
}

body.woocommerce-cart .woocommerce-cart-form .shop_table {
	width: 100%;
	margin: 0;
	border: 0;
	border-radius: 0;
	border-collapse: collapse;
}

body.woocommerce-cart .woocommerce-cart-form .shop_table th {
	padding: 0.875rem 1.375rem;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #64748b;
	border-bottom: 1px solid #e2e8f0;
	background: #fcfcfd;
}

body.woocommerce-cart .woocommerce-cart-form .shop_table td {
	padding: 1.125rem 1.375rem;
	border-bottom: 1px solid #f1f5f9;
}

body.woocommerce-cart .woocommerce-cart-form .shop_table tr:last-child td {
	border-bottom: 0;
}

body.woocommerce-cart .woocommerce-cart-form .product-name a {
	font-weight: 600;
	color: #0f172a;
}

body.woocommerce-cart .woocommerce-cart-form .product-name a:hover {
	color: #f03a07;
}

body.woocommerce-cart .woocommerce-cart-form .product-price,
body.woocommerce-cart .woocommerce-cart-form .product-subtotal {
	color: #475569;
}

body.woocommerce-cart .woocommerce-cart-form .product-subtotal {
	font-weight: 700;
	color: #0f172a;
}

body.woocommerce-cart .woocommerce-cart-form img {
	border: 1px solid #e2e8f0;
	border-radius: 10px;
}

/* Quantity stepper */
body.woocommerce-cart .woocommerce-cart-form .quantity .qty {
	height: 40px;
	font-size: 0.9375rem;
	color: #0f172a;
	background: #fcfcfd;
	border: 1px solid #e2e8f0;
	border-radius: 10px;
}

/* Remove item icon */
body.woocommerce-cart .woocommerce-cart-form a.remove {
	width: 30px;
	height: 30px;
	font-size: 1.125rem;
	line-height: 28px;
	color: #94a3b8 !important;
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 999px;
	transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

body.woocommerce-cart .woocommerce-cart-form a.remove:hover {
	color: #ffffff !important;
	background: #de0a0a;
	border-color: #de0a0a;
}

/* Coupon + update row */
body.woocommerce-cart .woocommerce-cart-form .coupon .input-text {
	height: 44px;
	padding: 0 0.875rem;
	font-size: 0.9375rem;
	color: #0f172a;
	background: #fcfcfd;
	border: 1px solid #e2e8f0;
	border-radius: 10px;
}

body.woocommerce-cart .woocommerce-cart-form .coupon .input-text:focus {
	border-color: #f03a07;
	box-shadow: 0 0 0 4px rgba(240, 58, 7, 0.12);
	outline: none;
}

/* Cart totals card */
body.woocommerce-cart .cart_totals {
	position: relative;
	max-width: 460px;
	margin-left: auto;
	padding: 2rem 1.75rem 1.75rem;
	border: 1px solid #e2e8f0;
	border-radius: 20px;
	background: #ffffff;
	overflow: hidden;
	box-shadow:
		0 1px 2px rgba(15, 23, 42, 0.04),
		0 12px 32px -12px rgba(15, 23, 42, 0.1);
}

body.woocommerce-cart .cart_totals::before {
	content: "";
	display: block;
	height: 5px;
	margin: -2rem -1.75rem 1.5rem;
	background: linear-gradient(90deg, #f03a07, #f66b08, #ee9b00, #f4c400);
}

body.woocommerce-cart .cart_totals > h2 {
	margin: 0 0 1rem;
	font-size: 1.25rem;
	font-weight: 700;
	letter-spacing: -0.01em;
	color: #0f172a;
}

body.woocommerce-cart .cart_totals table.shop_table {
	border: 0;
	border-radius: 0;
	background: transparent;
}

body.woocommerce-cart .cart_totals table.shop_table th {
	padding: 0.625rem 0;
	font-size: 0.9375rem;
	color: #475569;
	border-bottom: 1px solid #f1f5f9;
}

body.woocommerce-cart .cart_totals table.shop_table td {
	padding: 0.625rem 0;
	font-size: 0.9375rem;
	text-align: right;
	border-bottom: 1px solid #f1f5f9;
}

body.woocommerce-cart .cart_totals table.shop_table .order-total th,
body.woocommerce-cart .cart_totals table.shop_table .order-total td {
	padding-top: 0.875rem;
	font-size: 1.0625rem;
	font-weight: 700;
	color: #0f172a;
	border-bottom: 0;
}

body.woocommerce-cart .cart_totals .wc-proceed-to-checkout {
	margin-top: 1.25rem;
	padding: 0;
}

body.woocommerce-cart .cart_totals .shipping-calculator-form .button {
	margin-top: 0.5rem;
}

/* ================ CHECKOUT (Checkout Block, page 12443) ================ */

/* Layout note: after hydration the React Checkout Block renders
 * .wc-block-components-sidebar-layout.wc-block-checkout as a flex row
 * whose children are exactly 65% + 35% = 100% wide. Do NOT add gap /
 * flex-direction / padding here — any extra width trips flex-wrap and
 * stacks the two columns on desktop. Woo's own container queries
 * handle the mobile collapse. Only visual card styling goes below. */

/* Two main cards */
body.woocommerce-checkout .wp-block-woocommerce-checkout-fields-block,
body.woocommerce-checkout .wp-block-woocommerce-checkout-totals-block {
	position: relative;
	padding: 2.25rem 2rem 2rem;
	border: 1px solid #e2e8f0;
	border-radius: 20px;
	background: #ffffff;
	overflow: hidden;
	box-shadow:
		0 1px 2px rgba(15, 23, 42, 0.04),
		0 12px 32px -12px rgba(15, 23, 42, 0.1);
}

body.woocommerce-checkout .wp-block-woocommerce-checkout-fields-block::before,
body.woocommerce-checkout .wp-block-woocommerce-checkout-totals-block::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 5px;
	background: linear-gradient(90deg, #f03a07, #f66b08, #ee9b00, #f4c400);
}

/* Step headings + numbers */
body.woocommerce-checkout .wc-block-components-checkout-step__title {
	font-size: 1rem;
	font-weight: 700;
	letter-spacing: -0.01em;
	color: #0f172a;
}

body.woocommerce-checkout .wc-block-components-checkout-step__heading {
	margin-bottom: 1rem;
}

body.woocommerce-checkout .wc-block-components-checkout-step__number {
	/* Brand-colored step circle (rendered by the block). */
	background: linear-gradient(135deg, #f03a07, #ee9b00) !important; /* vs block inline styles */
	color: #ffffff;
	border: 0;
	font-weight: 700;
}

/* Text inputs */
body.woocommerce-checkout .wc-block-components-text-input input[type="text"],
body.woocommerce-checkout .wc-block-components-text-input input[type="email"],
body.woocommerce-checkout .wc-block-components-text-input input[type="tel"],
body.woocommerce-checkout .wc-block-components-text-input input[type="url"],
body.woocommerce-checkout .wc-block-components-text-input input[type="password"] {
	height: 48px;
	padding: 1.1rem 0.875rem 0.3rem;
	font-size: 0.9375rem;
	color: #0f172a;
	background: #fcfcfd;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
}

body.woocommerce-checkout .wc-block-components-text-input input:focus {
	background: #ffffff;
	border-color: #f03a07;
	box-shadow: 0 0 0 4px rgba(240, 58, 7, 0.12);
}

body.woocommerce-checkout .wc-block-components-text-input label {
	padding: 0 0.875rem;
	font-size: 0.8125rem;
	color: #64748b;
}

/* Selects (country/state) + THWCFE-added field fallback */
body.woocommerce-checkout .wp-block-woocommerce-checkout-fields-block select,
body.woocommerce-checkout .wp-block-woocommerce-checkout-fields-block input.input-text,
body.woocommerce-checkout .wp-block-woocommerce-checkout-fields-block textarea.input-text {
	min-height: 48px;
	padding: 0.5rem 0.875rem;
	font-size: 0.9375rem;
	color: #0f172a;
	background: #fcfcfd;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
}

body.woocommerce-checkout .wp-block-woocommerce-checkout-fields-block select:focus,
body.woocommerce-checkout .wp-block-woocommerce-checkout-fields-block input.input-text:focus,
body.woocommerce-checkout .wp-block-woocommerce-checkout-fields-block textarea.input-text:focus {
	background: #ffffff;
	border-color: #f03a07;
	box-shadow: 0 0 0 4px rgba(240, 58, 7, 0.12);
	outline: none;
}

/* Native checkboxes / radios accent */
body.woocommerce-checkout input[type="checkbox"],
body.woocommerce-checkout input[type="radio"] {
	accent-color: #f03a07;
}

/* Payment method radio rows */
body.woocommerce-checkout .wc-block-components-radio-control__option {
	border-bottom: 1px solid #f1f5f9;
}

body.woocommerce-checkout .wc-block-components-radio-control__option:last-child {
	border-bottom: 0;
}

/* Place order button */
body.woocommerce-checkout .wc-block-components-checkout-place-order-button {
	width: 100%;
	height: 52px;
	font-size: 1rem;
	font-weight: 700;
	letter-spacing: 0.01em;
	color: #ffffff;
	background: linear-gradient(135deg, #f03a07, #ee9b00) !important; /* vs block inline styles */
	border: 0;
	border-radius: 12px;
	box-shadow: 0 8px 20px -6px rgba(240, 58, 7, 0.4) !important;
	text-shadow: none;
	transition: filter 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

body.woocommerce-checkout .wc-block-components-checkout-place-order-button:hover,
body.woocommerce-checkout .wc-block-components-checkout-place-order-button:focus {
	background: linear-gradient(135deg, #de0a0a, #f03a07) !important; /* vs block inline styles */
	color: #ffffff;
	transform: translateY(-1px);
}

/* Order summary card contents */
body.woocommerce-checkout .wc-block-components-order-summary__row {
	padding: 0.75rem 0;
	border-bottom: 1px solid #f1f5f9;
}

body.woocommerce-checkout .wc-block-components-order-summary__row:last-child {
	border-bottom: 0;
}

body.woocommerce-checkout .wc-block-components-order-summary__row-image img {
	border: 1px solid #e2e8f0;
	border-radius: 8px;
}

body.woocommerce-checkout .wc-block-components-order-summary__row-description a {
	color: #0f172a;
	font-weight: 600;
}

body.woocommerce-checkout .wc-block-components-order-summary__row-description a:hover {
	color: #f03a07;
}

body.woocommerce-checkout .wc-block-components-totals-item {
	padding: 0.5rem 0;
}

body.woocommerce-checkout .wc-block-components-totals-footer-item,
body.woocommerce-checkout .wc-block-components-totals-footer-item .wc-block-formatted-money-amount {
	font-size: 1.0625rem;
	font-weight: 700;
	color: #0f172a;
}

/* Coupon panel inside the summary card */
body.woocommerce-checkout .wc-block-components-panel {
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	background: #fcfcfd;
}

body.woocommerce-checkout .wc-block-components-panel > .wc-block-components-panel__button {
	color: #f03a07;
	font-weight: 600;
}

/* Link color inside checkout (sign in, change address…) */
body.woocommerce-checkout .wc-block-components-checkout-step a,
body.woocommerce-checkout .wc-block-components-totals-wrapper a {
	color: #f03a07;
}

/* ==================== Responsive ==================== */

@media (max-width: 768px) {
	body.woocommerce-cart .woocommerce-cart-form .shop_table th {
		display: none; /* classic responsive stacking keeps ::before labels */
	}

	body.woocommerce-cart .woocommerce-cart-form .shop_table td {
		padding: 0.875rem 1rem;
	}

	body.woocommerce-cart .cart_totals {
		max-width: 100%;
	}

	body.woocommerce-checkout .wp-block-woocommerce-checkout-fields-block,
	body.woocommerce-checkout .wp-block-woocommerce-checkout-totals-block {
		padding: 1.5rem 1.25rem 1.25rem;
	}
}
