/**
 * ShopRover Premium Checkout — v1.2 (reverted from a template-override
 * detour that didn't work — XStore renders checkout through its own
 * Checkout Page Builder, never through WooCommerce's standard
 * checkout/form-checkout.php file, so overriding that file had no effect).
 *
 * Back to styling XStore's REAL, CONFIRMED wrapper class
 * `.etheme-elementor-cart-checkout-page-wrapper` (found via view-source) —
 * this is what was already working well before.
 */

:root {
	--sco-pink: #EC1361;
	--sco-pink-dark: #C10E50;
	--sco-pink-light: #FDEEF3;
	--sco-pink-softer: #FCE4EC;
	--sco-ink: #1F1F1F;
	--sco-muted: #6B6B6B;
	--sco-white: #FFFFFF;
	--sco-green: #16A34A;
	--sco-border: #F0DCE4;
	--sco-radius: 14px;
}

/* Hide the theme's native 3-step nav — we show our own 4-step indicator instead.
   Confirmed via view-source: it's the "etheme_cart_checkout_breadcrumbs" Elementor
   widget, rendered as .etheme-elementor-breadcrumbs-steps — NOT .cart-checkout-nav
   (a different, unrelated element we were mistakenly targeting before). */
.cart-checkout-nav,
.etheme-elementor-breadcrumbs-steps {
	display: none !important;
}

/* ============ Our own step indicator + secure badge (injected via hook) ============ */

.sco-steps {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	max-width: 640px;
	margin: 24px auto 8px;
	font-family: 'Poppins', sans-serif;
}

.sco-step { display: flex; flex-direction: column; align-items: center; gap: 6px; flex-shrink: 0; }

.sco-step__dot {
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: #E5E7EB;
	color: #9CA3AF;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 13px;
	font-weight: 700;
}

.sco-step--done .sco-step__dot,
.sco-step--active .sco-step__dot {
	background: var(--sco-pink);
	color: #fff;
}

.sco-step__label { font-size: 12px; color: var(--sco-muted); white-space: nowrap; }
.sco-step--active .sco-step__label { color: var(--sco-pink); font-weight: 600; }

.sco-step__line { width: 60px; height: 2px; background: #E5E7EB; flex-shrink: 0; }
.sco-step__line--done { background: var(--sco-pink); }

.sco-secure-badge {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	font-size: 13px;
	font-weight: 600;
	color: var(--sco-pink);
	margin-bottom: 28px;
}

.sco-secure-badge svg { width: 15px; height: 15px; }

/* ============ THE REAL CHECKOUT — scoped to the confirmed XStore wrapper ============ */

.etheme-elementor-cart-checkout-page-wrapper {
	font-family: 'Poppins', sans-serif;
	color: var(--sco-ink);
	max-width: 1160px;
	margin: 0 auto;
	gap: 24px;
	align-items: flex-start;
}

.etheme-elementor-cart-checkout-page-column.first {
	flex: 1 1 60%;
}

.etheme-elementor-cart-checkout-page-column.last {
	flex: 1 1 38%;
	position: sticky;
	top: 20px;
}

/* Section cards: Billing / Shipping / Additional Info */
.etheme-elementor-cart-checkout-page-wrapper .woocommerce-billing-fields,
.etheme-elementor-cart-checkout-page-wrapper .woocommerce-shipping-fields,
.etheme-elementor-cart-checkout-page-wrapper .woocommerce-additional-fields {
	background: var(--sco-white);
	border: 1px solid var(--sco-border);
	border-radius: var(--sco-radius);
	padding: 22px;
	margin-bottom: 20px;
}

/* Restyle XStore's own section headings — do NOT hide them, just theme them */
.etheme-elementor-cart-checkout-page-wrapper h3.step-title {
	font-family: 'Playfair Display', serif;
	font-size: 18px;
	font-weight: 600;
	color: var(--sco-ink);
	border-bottom: 2px solid var(--sco-pink-softer);
	padding-bottom: 14px;
	margin: 0 0 18px;
}

.etheme-elementor-cart-checkout-page-wrapper h3.step-title span {
	position: relative;
	padding-left: 26px;
}

.etheme-elementor-cart-checkout-page-wrapper h3.step-title span::before {
	content: "";
	position: absolute;
	left: 0;
	top: 2px;
	width: 16px;
	height: 16px;
	background: var(--sco-pink);
	border-radius: 4px;
}

/* Form fields */
.etheme-elementor-cart-checkout-page-wrapper .form-row label {
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: var(--sco-muted);
	margin-bottom: 6px;
	display: block;
}

.etheme-elementor-cart-checkout-page-wrapper .form-row label .required {
	color: var(--sco-pink);
	text-decoration: none;
}

.etheme-elementor-cart-checkout-page-wrapper input.input-text,
.etheme-elementor-cart-checkout-page-wrapper select,
.etheme-elementor-cart-checkout-page-wrapper textarea,
.etheme-elementor-cart-checkout-page-wrapper .select2-container .select2-selection--single {
	width: 100%;
	height: 46px;
	padding: 0 14px;
	border: 1.5px solid var(--sco-border) !important;
	border-radius: 10px !important;
	font-size: 14px;
	background: #fff;
}

.etheme-elementor-cart-checkout-page-wrapper textarea { height: auto; padding: 12px 14px; }

.etheme-elementor-cart-checkout-page-wrapper input.input-text:focus,
.etheme-elementor-cart-checkout-page-wrapper select:focus,
.etheme-elementor-cart-checkout-page-wrapper textarea:focus {
	outline: none;
	border-color: var(--sco-pink) !important;
	box-shadow: 0 0 0 3px rgba(236, 19, 97, 0.12);
}

.etheme-elementor-cart-checkout-page-wrapper .woocommerce-form-login-toggle .woocommerce-info,
.etheme-elementor-cart-checkout-page-wrapper .checkout_coupon,
.etheme-elementor-cart-checkout-page-wrapper .woocommerce-form-coupon-toggle .woocommerce-info {
	background: var(--sco-pink-light) !important;
	border: 1px dashed #E8A9BF !important;
	border-radius: 10px !important;
	padding: 12px 16px !important;
	font-size: 13px !important;
}

.etheme-elementor-cart-checkout-page-wrapper .woocommerce-form-login-toggle a,
.etheme-elementor-cart-checkout-page-wrapper .showcoupon {
	color: var(--sco-pink) !important;
	font-weight: 600;
	text-decoration: underline;
}

/* Shipping method radios -> "Delivery Options" cards */
.etheme-elementor-cart-checkout-page-wrapper ul.woocommerce-shipping-methods {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.etheme-elementor-cart-checkout-page-wrapper ul.woocommerce-shipping-methods li {
	border: 1.5px solid var(--sco-border);
	border-radius: 12px;
	padding: 14px 16px;
}

.etheme-elementor-cart-checkout-page-wrapper ul.woocommerce-shipping-methods li:has(input:checked) {
	border-color: var(--sco-pink);
	background: var(--sco-pink-light);
}

.etheme-elementor-cart-checkout-page-wrapper ul.woocommerce-shipping-methods label {
	font-weight: 600;
	font-size: 14px;
}

.etheme-elementor-cart-checkout-page-wrapper ul.woocommerce-shipping-methods input.shipping_method {
	accent-color: var(--sco-pink);
	width: 17px;
	height: 17px;
	margin-right: 10px;
}

/* Order review card (right column) */
.etheme-elementor-cart-checkout-page-wrapper .order-review,
.etheme-elementor-cart-checkout-page-wrapper #order_review {
	background: var(--sco-white);
	border: 1px solid var(--sco-border);
	border-radius: var(--sco-radius);
	padding: 22px;
}

.etheme-elementor-cart-checkout-page-wrapper table.woocommerce-checkout-review-order-table {
	width: 100%;
	border-collapse: collapse;
}

.etheme-elementor-cart-checkout-page-wrapper table.woocommerce-checkout-review-order-table thead th {
	font-size: 11px;
	text-transform: uppercase;
	color: var(--sco-muted);
	padding-bottom: 10px;
	border-bottom: 1px solid var(--sco-border);
}

.etheme-elementor-cart-checkout-page-wrapper table.woocommerce-checkout-review-order-table td {
	padding: 10px 0;
	border-bottom: 1px solid var(--sco-border);
	font-size: 14px;
}

.etheme-elementor-cart-checkout-page-wrapper table.woocommerce-checkout-review-order-table img {
	border-radius: 10px;
}

.etheme-elementor-cart-checkout-page-wrapper table.woocommerce-checkout-review-order-table .amount {
	font-weight: 600;
}

.etheme-elementor-cart-checkout-page-wrapper table.woocommerce-checkout-review-order-table tfoot .order-total th,
.etheme-elementor-cart-checkout-page-wrapper table.woocommerce-checkout-review-order-table tfoot .order-total td {
	border-bottom: none;
	border-top: 2px solid var(--sco-ink);
	padding-top: 14px;
	font-family: 'Playfair Display', serif;
	font-size: 19px;
	font-weight: 700;
}

.etheme-elementor-cart-checkout-page-wrapper table.woocommerce-checkout-review-order-table tfoot .order-total .amount {
	color: var(--sco-pink);
}

/* Payment methods -> "Payment Options" cards */
.etheme-elementor-cart-checkout-page-wrapper ul.wc_payment_methods {
	list-style: none;
	margin: 20px 0 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.etheme-elementor-cart-checkout-page-wrapper ul.wc_payment_methods li.wc_payment_method {
	border: 1.5px solid var(--sco-border);
	border-radius: 12px;
	padding: 14px 16px;
}

.etheme-elementor-cart-checkout-page-wrapper ul.wc_payment_methods li.wc_payment_method:has(input:checked) {
	border-color: var(--sco-pink);
	background: var(--sco-pink-light);
}

.etheme-elementor-cart-checkout-page-wrapper ul.wc_payment_methods li.wc_payment_method label {
	font-weight: 600;
	font-size: 14px;
	display: flex;
	align-items: center;
	gap: 10px;
}

.etheme-elementor-cart-checkout-page-wrapper ul.wc_payment_methods input.input-radio {
	width: 18px;
	height: 18px;
	accent-color: var(--sco-pink);
}

.etheme-elementor-cart-checkout-page-wrapper .payment_box {
	background: var(--sco-pink-light) !important;
	border-radius: 10px;
	margin-top: 8px !important;
	padding: 12px 14px !important;
	font-size: 13px;
	color: var(--sco-muted);
}

/* Terms + Place Order button */
.etheme-elementor-cart-checkout-page-wrapper .woocommerce-terms-and-conditions-wrapper {
	font-size: 13px;
	color: var(--sco-muted);
	margin: 16px 0;
}

.etheme-elementor-cart-checkout-page-wrapper #place_order {
	width: 100%;
	height: 52px;
	background: var(--sco-pink) !important;
	color: #fff !important;
	border: none !important;
	border-radius: 12px !important;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
}

.etheme-elementor-cart-checkout-page-wrapper #place_order:hover {
	background: var(--sco-pink-dark) !important;
}

/* ============ Trust strip (injected via hook, after the form) ============ */

.sco-trust-strip {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 16px;
	max-width: 1160px;
	margin: 40px auto 0;
	padding: 24px 16px 0;
	border-top: 1px solid var(--sco-border);
}

.sco-trust-item { display: flex; align-items: flex-start; gap: 12px; }

.sco-trust-item__icon {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: var(--sco-pink-light);
	color: var(--sco-pink);
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.sco-trust-item__icon svg { width: 18px; height: 18px; }
.sco-trust-item strong { display: block; font-size: 13.5px; font-weight: 600; color: var(--sco-ink); margin-bottom: 2px; }
.sco-trust-item p { margin: 0; font-size: 12px; color: var(--sco-muted); }

/* ============ Cart page (same confirmed wrapper, additional cart-specific styling) ============ */

.etheme-elementor-cart-checkout-page-wrapper table.cart,
.etheme-elementor-cart-checkout-page-wrapper table.woocommerce-cart-form__contents {
	width: 100%;
	border-collapse: collapse;
	background: var(--sco-white);
	border: 1px solid var(--sco-border);
	border-radius: var(--sco-radius);
	overflow: hidden;
}

.etheme-elementor-cart-checkout-page-wrapper table.cart thead th {
	background: var(--sco-pink-light);
	font-size: 11px;
	text-transform: uppercase;
	color: var(--sco-muted);
	padding: 14px 12px;
	text-align: left;
}

.etheme-elementor-cart-checkout-page-wrapper table.cart tbody td {
	padding: 16px 12px;
	border-bottom: 1px solid var(--sco-border);
	font-size: 14px;
	vertical-align: middle;
}

.etheme-elementor-cart-checkout-page-wrapper table.cart tr:last-child td {
	border-bottom: none;
}

.etheme-elementor-cart-checkout-page-wrapper .product-thumbnail img {
	border-radius: 10px;
	max-width: 72px;
}

.etheme-elementor-cart-checkout-page-wrapper .product-title {
	font-weight: 600;
	color: var(--sco-ink);
	text-decoration: none;
}

.etheme-elementor-cart-checkout-page-wrapper .variation {
	font-size: 12px;
	color: var(--sco-muted);
	margin: 4px 0 0;
}

.etheme-elementor-cart-checkout-page-wrapper .quantity input.qty {
	width: 60px;
	height: 38px;
	text-align: center;
	border: 1.5px solid var(--sco-border) !important;
	border-radius: 8px !important;
}

.etheme-elementor-cart-checkout-page-wrapper .product-subtotal .amount,
.etheme-elementor-cart-checkout-page-wrapper .product-price .amount {
	font-weight: 600;
	color: var(--sco-ink);
}

.etheme-elementor-cart-checkout-page-wrapper a.remove {
	color: var(--sco-pink) !important;
	border: none !important;
	background: transparent !important;
	font-size: 18px !important;
}

.etheme-elementor-cart-checkout-page-wrapper a.remove:hover {
	background: var(--sco-pink-light) !important;
	color: var(--sco-pink-dark) !important;
}

/* Coupon row + action buttons */
.etheme-elementor-cart-checkout-page-wrapper .coupon {
	display: flex;
	gap: 10px;
	align-items: center;
	margin-top: 20px;
}

.etheme-elementor-cart-checkout-page-wrapper .coupon input#coupon_code {
	height: 44px;
	border: 1.5px solid var(--sco-border) !important;
	border-radius: 10px !important;
	padding: 0 14px;
	font-size: 14px;
}

.etheme-elementor-cart-checkout-page-wrapper .actions .button,
.etheme-elementor-cart-checkout-page-wrapper button[name="update_cart"],
.etheme-elementor-cart-checkout-page-wrapper button[name="apply_coupon"] {
	background: var(--sco-white) !important;
	color: var(--sco-pink) !important;
	border: 1.5px solid var(--sco-pink) !important;
	border-radius: 10px !important;
	padding: 10px 20px !important;
	font-weight: 600 !important;
	font-size: 13px !important;
	cursor: pointer;
}

.etheme-elementor-cart-checkout-page-wrapper .actions .button:hover,
.etheme-elementor-cart-checkout-page-wrapper button[name="update_cart"]:hover,
.etheme-elementor-cart-checkout-page-wrapper button[name="apply_coupon"]:hover {
	background: var(--sco-pink-light) !important;
}

/* Cart totals card (right column) */
.etheme-elementor-cart-checkout-page-wrapper .cart_totals,
.etheme-elementor-cart-checkout-page-wrapper .cart-collaterals {
	background: var(--sco-white);
	border: 1px solid var(--sco-border);
	border-radius: var(--sco-radius);
	padding: 22px;
}

.etheme-elementor-cart-checkout-page-wrapper .cart_totals h2 {
	font-family: 'Playfair Display', serif;
	font-size: 18px;
	font-weight: 600;
	margin: 0 0 18px;
	padding-bottom: 14px;
	border-bottom: 1px solid var(--sco-border);
}

.etheme-elementor-cart-checkout-page-wrapper .cart_totals table {
	width: 100%;
	border-collapse: collapse;
}

.etheme-elementor-cart-checkout-page-wrapper .cart_totals table th,
.etheme-elementor-cart-checkout-page-wrapper .cart_totals table td {
	padding: 10px 0;
	border-bottom: 1px solid var(--sco-border);
	font-size: 14px;
	text-align: left;
}

.etheme-elementor-cart-checkout-page-wrapper .cart_totals .order-total th,
.etheme-elementor-cart-checkout-page-wrapper .cart_totals .order-total td {
	border-bottom: none;
	border-top: 2px solid var(--sco-ink);
	padding-top: 14px;
	font-family: 'Playfair Display', serif;
	font-size: 18px;
	font-weight: 700;
}

.etheme-elementor-cart-checkout-page-wrapper .cart_totals .order-total .amount {
	color: var(--sco-pink);
}

.etheme-elementor-cart-checkout-page-wrapper .wc-proceed-to-checkout .checkout-button {
	display: block;
	width: 100%;
	text-align: center;
	background: var(--sco-pink) !important;
	color: #fff !important;
	border-radius: 12px !important;
	padding: 15px !important;
	font-weight: 600 !important;
	text-decoration: none;
	margin-top: 16px;
}

.etheme-elementor-cart-checkout-page-wrapper .wc-proceed-to-checkout .checkout-button:hover {
	background: var(--sco-pink-dark) !important;
}

/* ============ Order Received / Thank You page (confirmed standard WooCommerce classes) ============ */

.woocommerce-order {
	max-width: 900px;
	margin: 0 auto;
	font-family: 'Poppins', sans-serif;
	color: var(--sco-ink);
	padding: 8px 16px 48px;
}

.woocommerce-order .woocommerce-notice--success {
	text-align: center;
	font-size: 15px;
	color: var(--sco-ink);
	max-width: 640px;
	margin: 0 auto 24px;
}

.woocommerce-order-overview-wrapper {
	background: var(--sco-white);
	border: 1px solid var(--sco-border);
	border-radius: var(--sco-radius);
	padding: 24px;
	margin-bottom: 24px;
}

ul.woocommerce-order-overview {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 24px;
}

ul.woocommerce-order-overview li {
	flex: 1 1 140px;
	max-width: 220px;
	font-size: 13px;
	color: var(--sco-muted);
	text-align: center;
}

ul.woocommerce-order-overview li strong {
	display: block;
	margin-top: 4px;
	font-family: 'Playfair Display', serif;
	font-size: 16px;
	color: var(--sco-ink);
}

ul.woocommerce-order-overview li.woocommerce-order-overview__total strong {
	color: var(--sco-pink);
}

/* Payment method info notices (e.g. "Pay with cash upon delivery") */
.woocommerce-order .woocommerce-message,
.woocommerce-order .woocommerce-info {
	background: var(--sco-pink-light) !important;
	color: var(--sco-ink) !important;
	border-top: none !important;
	border-radius: 10px !important;
	padding: 14px 18px !important;
	font-size: 13.5px !important;
	margin-bottom: 24px !important;
}

.woocommerce-order h2 {
	font-family: 'Playfair Display', serif;
	font-size: 20px;
	font-weight: 600;
	margin: 0 0 16px;
}

.woocommerce-order table.shop_table {
	width: 100%;
	border-collapse: collapse;
	margin-bottom: 32px;
	background: var(--sco-white);
	border: 1px solid var(--sco-border);
	border-radius: var(--sco-radius);
	overflow: hidden;
}

.woocommerce-order table.shop_table th,
.woocommerce-order table.shop_table td {
	padding: 12px 16px;
	border-bottom: 1px solid var(--sco-border);
	font-size: 14px;
	text-align: left;
}

.woocommerce-order table.shop_table th {
	font-size: 11px;
	text-transform: uppercase;
	color: var(--sco-muted);
	background: var(--sco-pink-light);
}

.woocommerce-order table.shop_table tfoot tr:last-child th,
.woocommerce-order table.shop_table tfoot tr:last-child td {
	border-bottom: none;
	font-family: 'Playfair Display', serif;
	font-size: 17px;
	font-weight: 700;
}

.woocommerce-order table.shop_table tfoot tr:last-child td {
	color: var(--sco-pink);
}

.woocommerce-order .woocommerce-columns,
.woocommerce-order .col2-set.addresses {
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
}

.woocommerce-order .woocommerce-column,
.woocommerce-order .col2-set.addresses .col-1,
.woocommerce-order .col2-set.addresses .col-2 {
	flex: 1 1 260px;
	background: var(--sco-white);
	border: 1px solid var(--sco-border);
	border-radius: var(--sco-radius);
	padding: 20px;
}

.woocommerce-order .woocommerce-column h2,
.woocommerce-order .col2-set.addresses h2 {
	font-size: 15px;
	margin-bottom: 10px;
}

.woocommerce-order address {
	font-style: normal;
	font-size: 13.5px;
	color: var(--sco-muted);
	line-height: 1.7;
}

/* ============ Mobile ============ */

@media (max-width: 767px) {
	.sco-steps { gap: 4px; }
	.sco-step__line { width: 24px; }
	.sco-step__label { display: none; }
	.sco-step--active .sco-step__label { display: block; }
	.sco-trust-strip { grid-template-columns: repeat(2, 1fr); }

	.etheme-elementor-cart-checkout-page-wrapper .woocommerce-billing-fields,
	.etheme-elementor-cart-checkout-page-wrapper .woocommerce-shipping-fields,
	.etheme-elementor-cart-checkout-page-wrapper .woocommerce-additional-fields,
	.etheme-elementor-cart-checkout-page-wrapper .order-review {
		padding: 16px;
	}

	.etheme-elementor-cart-checkout-page-wrapper #place_order {
		position: sticky;
		bottom: 10px;
		box-shadow: 0 8px 24px rgba(236, 19, 97, 0.28);
	}

	.woocommerce-order { padding: 8px 12px 32px; }
	.woocommerce-order-overview-wrapper { padding: 16px; }
	ul.woocommerce-order-overview { gap: 16px; }
}
