/**
 * AMA India Twenty-Six — WooCommerce theming
 * Single product · cart · checkout · AJAX mini-cart drawer.
 * Uses AMA design tokens (style.css :root). Scoped to .woocommerce / mini-cart
 * so it never bleeds into non-Woo pages.
 */

/* The .screen-reader-text utility moved to style.css, which loads on every
   page whether or not WooCommerce is active. Do not redeclare it here. */

/* ── Font foundation ──────────────────────────────────────────────────────────
 * Establish the AMA body face (Atkinson Hyperlegible) as the base font for the
 * cart + checkout widgets. Without this, body text inherits whatever global font
 * the cascade provides and the sections render in a mismatched typeface.
 *
 * Form controls (input/select/textarea) do NOT inherit font-family from their
 * ancestors by default — browsers render them in the UA font — so they must be
 * told explicitly to inherit, or the checkout fields look like a different font
 * from the rest of the page. Buttons are intentionally excluded: they keep their
 * own Plus Jakarta Sans rule below.
 * ─────────────────────────────────────────────────────────────────────────── */
.ama-cart-widget,
.ama-checkout-widget {
	font-family: var(--font-body, 'Atkinson Hyperlegible', Arial, sans-serif);
}
.ama-cart-widget input,
.ama-cart-widget select,
.ama-cart-widget textarea,
.ama-checkout-widget input,
.ama-checkout-widget select,
.ama-checkout-widget textarea,
.ama-checkout-widget .select2-container,
.ama-checkout-widget .select2-selection__rendered {
	font-family: inherit;
}

/* ── Buttons (shared) ─────────────────────────────────────────────────────── */
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit,
.woocommerce .button.alt,
.woocommerce #place_order {
	background: var(--blue-deep, #0d2160);
	color: var(--cream, #faf6ee);
	border-radius: 6px;
	font-family: var(--font-sans, sans-serif);
	font-weight: 700;
	letter-spacing: .01em;
	padding: 12px 22px;
	min-height: 48px;            /* WCAG 2.5.8 */
	border: 0;
	transition: background .15s ease;
}

.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce .button.alt:hover,
.woocommerce #place_order:hover {
	background: var(--red-deep, #a82720);
	color: var(--cream, #faf6ee);
}

.woocommerce a.button:focus-visible,
.woocommerce button.button:focus-visible,
.woocommerce #place_order:focus-visible {
	outline: 3px solid var(--blue-deep, #0d2160);
	outline-offset: 3px;
}

/* Prices */
.woocommerce .price,
.woocommerce span.amount { color: var(--red-deep, #a82720); font-weight: 700; }

/* All prices, amounts and totals are DATA → Atkinson Hyperlegible (body face),
   never the heading font. Atkinson is also the most legible for figures
   (distinct 0/O, 1/l). Covers product pages, cart, checkout, totals, widgets
   and the mini-cart so a price is never split across two typefaces. */
.woocommerce .price,
.woocommerce .amount,
.woocommerce .woocommerce-Price-amount,
.woocommerce-Price-amount,
.cart_totals .amount,
.order-total .amount,
.ama-cart-totals__rows .amount {
	font-family: var(--font-body, 'Atkinson Hyperlegible', Arial, sans-serif) !important;
}
.woocommerce del { color: var(--ink-soft, #4a5474); font-weight: 400; }

/* ── Single product ───────────────────────────────────────────────────────── */
.single-product div.product .product_title {
	font-family: var(--font-serif, var(--font-sans));
	color: var(--blue-deep, #0d2160);
	font-size: clamp(1.625rem, 4vw, 2.5rem);
	line-height: 1.1;
}

.single-product div.product .woocommerce-product-rating { margin-bottom: 14px; }

.single-product div.product form.cart .quantity input.qty {
	min-height: 48px;
	border: 1px solid var(--rule, #d4c8b0);
	border-radius: 6px;
	padding: 0 10px;
	font-size: 1rem;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li.active {
	background: var(--cream, #faf6ee);
	border-bottom-color: var(--cream, #faf6ee);
}

.woocommerce div.product .woocommerce-tabs ul.tabs li a { color: var(--blue-deep, #0d2160); font-weight: 700; }

/* ── Cart ─────────────────────────────────────────────────────────────────── */
.woocommerce-cart table.cart th { font-family: var(--font-body, 'Atkinson Hyperlegible', Arial, sans-serif); text-transform: uppercase; letter-spacing: .05em; font-size: 0.75rem; color: var(--ink-soft, #4a5474); }
.woocommerce-cart table.cart img { border-radius: 6px; }
.woocommerce-cart .cart-collaterals .cart_totals h2 { font-family: var(--font-serif, var(--font-sans)); color: var(--blue-deep, #0d2160); }
.woocommerce .cart-collaterals .cart_totals,
.woocommerce-checkout #order_review {
	background: var(--cream, #faf6ee);
	border: 1px solid var(--rule, #d4c8b0);
	border-radius: 8px;
	padding: 20px 24px;
}

/* ── Checkout ─────────────────────────────────────────────────────────────── */
/* Select2 (country / state) stacking.
   IMPORTANT: only the open OPTIONS LIST (.select2-dropdown, appended to <body>)
   gets a z-index. The class .select2-container--open is added to the inline
   FIELD too, so giving THAT a z-index lifts the field itself above neighbouring
   form rows — which made checkout fields overlap other elements. We scope the
   z-index strictly to the dropdown list, and keep the inline field in normal
   flow. 250 keeps the open list above the form but below the theme overlays
   (mobile nav ~350, mini-cart drawer 100000+). */
.select2-dropdown {
	z-index: 250 !important;
}
.ama-checkout-widget .select2-container,
.woocommerce-checkout .select2-container {
	z-index: auto !important;   /* never lift the inline field */
}

.woocommerce-checkout h3 { font-family: var(--font-serif, var(--font-sans)); color: var(--blue-deep, #0d2160); }
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce-checkout select,
.select2-container .select2-selection--single {
	min-height: 46px;
	border: 1px solid var(--rule, #d4c8b0);
	border-radius: 6px;
	padding: 8px 12px;
	font-size: 1rem;
	font-family: var(--font-body, 'Atkinson Hyperlegible', Arial, sans-serif);
}
.woocommerce form .form-row input.input-text:focus,
.woocommerce form .form-row textarea:focus {
	outline: none;
	border-color: var(--blue-deep, #0d2160);
	box-shadow: 0 0 0 4px rgba(13, 33, 96, .15);
}

/* WooCommerce notices in AMA palette */
.woocommerce-message,
.woocommerce-info { border-top-color: var(--blue-deep, #0d2160); }
.woocommerce-error { border-top-color: var(--red-deep, #a82720); }

/* ══════════════════════════════════════════════════════════════════════════
   AJAX MINI-CART
   ══════════════════════════════════════════════════════════════════════════ */
.ama-mini-cart { position: relative; display: inline-flex; }

.ama-mini-cart__toggle {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 48px;
	min-height: 48px;
	border: 0;
	background: transparent;
	color: var(--blue-deep, #0d2160);
	cursor: pointer;
}
.ama-mini-cart__toggle:hover { color: var(--red-deep, #a82720); }

.ama-mini-cart__count {
	position: absolute;
	top: 4px;
	right: 2px;
	min-width: 18px;
	height: 18px;
	padding: 0 5px;
	border-radius: 9px;
	background: var(--red-deep, #a82720);
	color: #fff;
	font-family: var(--font-body, 'Atkinson Hyperlegible', Arial, sans-serif);
	font-size: 0.75rem;
	font-weight: 700;
	line-height: 18px;
	text-align: center;
}

/* Overlay + drawer */
.ama-mini-cart__overlay {
	position: fixed;
	inset: 0;
	background: rgba(13, 33, 96, .42);
	/* Above the skip link (--z-skip: 9999) and nav so the drawer is never covered */
	z-index: var(--z-drawer, 100000); /* see the z-index scale in style.css */
}

.ama-mini-cart__drawer {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	width: min(400px, 92vw);
	background: var(--white, #fff);
	z-index: calc(var(--z-drawer, 100000) + 1);
	display: flex;
	flex-direction: column;
	box-shadow: -16px 0 40px rgba(13, 33, 96, .18);
	transform: translateX(100%);
	transition: transform .25s ease;
	padding-right: env(safe-area-inset-right);
	/* Portaled to <body>, so set the AMA body face explicitly — it can't rely
	   on inheriting from a WooCommerce/widget wrapper here. */
	font-family: var(--font-body, 'Atkinson Hyperlegible', Arial, sans-serif);
}
/* The drawer is portaled to <body>, so the open-state class is on the drawer
   itself (set by ama-mini-cart.js), not on the .ama-mini-cart container. */
.ama-mini-cart__drawer.is-open { transform: translateX(0); }

.ama-mini-cart__drawer-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 18px 20px;
	border-bottom: 1px solid var(--rule, #d4c8b0);
}
.ama-mini-cart__drawer-title {
	margin: 0;
	font-family: var(--font-serif, var(--font-sans));
	font-size: 1.25rem;
	color: var(--blue-deep, #0d2160);
}
.ama-mini-cart__close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	min-height: 44px;
	border: 0;
	background: transparent;
	color: var(--ink, #1a1f33);
	cursor: pointer;
}
.ama-mini-cart__close:hover { color: var(--red-deep, #a82720); }

.ama-mini-cart__drawer-body { flex: 1 1 auto; overflow-y: auto; padding: 8px 20px 20px; }
.ama-mini-cart__empty { color: var(--ink-soft, #4a5474); font-style: italic; padding: 24px 0; }

/* ── WooCommerce mini-cart list inside the drawer ─────────────────────────── */
.ama-mini-cart__drawer-body ul.woocommerce-mini-cart {
	margin: 0;
	padding: 0;
	list-style: none;
}

/* Line item: floated 64×64 thumb on the left, all text/meta flows to the right
   and WRAPS. Handles both plain WooCommerce products and MEC ticket items
   (which output extra spans + a <dl class="variation"> as direct children). */
.ama-mini-cart__drawer-body li.woocommerce-mini-cart-item {
	position: relative;
	display: block;
	padding: 14px 30px 14px 0;     /* right padding leaves room for the × */
	margin: 0;
	border-bottom: 1px solid var(--paper, #f1ece0);
	overflow: hidden;              /* contain the float */
	overflow-wrap: anywhere;       /* break long titles / emails / URLs */
	word-break: break-word;
	font-size: 0.8125rem;
	line-height: 1.4;
}

/* Thumbnail — floated so text wraps beside and below it. !important tames the
   300×300 WooCommerce placeholder MEC injects. */
.ama-mini-cart__drawer-body li.woocommerce-mini-cart-item img {
	float: left;
	width: 64px !important;
	height: 64px !important;
	max-width: 64px;
	object-fit: cover;
	border-radius: 6px;
	margin: 0 12px 6px 0 !important;
	border: 1px solid var(--paper, #f1ece0);
}

/* No real image → don't show WooCommerce's placeholder; let the text use the
   full width instead. */
.ama-mini-cart__drawer-body li.woocommerce-mini-cart-item img.woocommerce-placeholder,
.ama-mini-cart__drawer-body li.woocommerce-mini-cart-item img[src*="woocommerce-placeholder"],
.ama-mini-cart__drawer-body li.woocommerce-mini-cart-item img[src*="placeholder.png"] {
	display: none !important;
}

/* Title / product name — must look the same whether it's a clickable <a>
   (product visible in catalog) OR plain text (product hidden / not clickable).
   The link rule below only catches the <a>; the second block covers the plain
   text + the MEC name span so a hidden title isn't left in the default font/colour. */
.ama-mini-cart__drawer-body li.woocommerce-mini-cart-item a:not(.remove) {
	color: var(--ink, #1a1f33);
	text-decoration: none;
	font-weight: 700;
}
.ama-mini-cart__drawer-body li.woocommerce-mini-cart-item a:not(.remove):hover {
	color: var(--red-deep, #a82720);
}
/* Title wrappers our name filter outputs: clickable products get an
   <a class="ama-cart-item__title-link"> (already bold via the rule above), but a
   hidden/non-clickable product gets a <span class="ama-cart-item__title"> — that
   span had no styling, so the title looked plain. Style BOTH (plus MEC's name
   span) identically so clickable and hidden titles match. */
.ama-mini-cart__drawer-body li.woocommerce-mini-cart-item {
	color: var(--ink, #1a1f33);
}
.ama-mini-cart__drawer-body .ama-cart-item__title-link,
.ama-mini-cart__drawer-body .ama-cart-item__title,
.ama-mini-cart__drawer-body .mec-woo-cart-product-name,
.ama-mini-cart__drawer-body .mec-woo-cart-product-name a {
	display: block;
	color: var(--ink, #1a1f33) !important;
	font-weight: 700 !important;
	text-decoration: none;
}
.ama-mini-cart__drawer-body .ama-cart-item__title-link:hover,
.ama-mini-cart__drawer-body .mec-woo-cart-product-name a:hover {
	color: var(--red-deep, #a82720) !important;
}

/* MEC ticket detail spans → tidy block lines */
.ama-mini-cart__drawer-body .mec-woo-cart-product-name { display: block; font-weight: 700; margin-bottom: 2px; }
.ama-mini-cart__drawer-body .mec-woo-cart-product-name a { color: var(--blue-deep, #0d2160); }
.ama-mini-cart__drawer-body .mec-woo-cart-product-person-name,
.ama-mini-cart__drawer-body .mec-woo-cart-product-person-email,
.ama-mini-cart__drawer-body .mec-woo-cart-booking-date {
	display: block;
	font-size: 0.75rem;
	color: var(--ink-soft, #4a5474);
}

/* MEC duplicates its info in a <dl class="variation"> — hide it only for MEC
   items (modern :has()); keep it for genuine WooCommerce variable products.
   EXCEPT our own .ama-mec-booking list, which carries the custom registration
   fields and must stay visible. */
.ama-mini-cart__drawer-body li.woocommerce-mini-cart-item:has(.mec-woo-cart-product-name) dl.variation:not(.ama-mec-booking) {
	display: none;
}

/* Variation list for normal variable products + our booking list — compact */
.ama-mini-cart__drawer-body dl.variation {
	margin: 4px 0 0;
	font-size: 0.75rem;
}
.ama-mini-cart__drawer-body dl.variation dt { font-weight: 700; float: left; margin-right: 4px; clear: left; }
.ama-mini-cart__drawer-body dl.variation dd { margin: 0 0 2px; }
.ama-mini-cart__drawer-body dl.variation p { margin: 0; }

/* WooCommerce ships its product-list/cart-list dl rows with a large margin-bottom
   (higher specificity than our drawer rule), which over-spaces each line. Flatten it
   so the mini-cart variation/booking lines sit tight. */
.woocommerce ul.cart_list li dl dd,
.woocommerce ul.cart_list li dl dt,
.woocommerce ul.product_list_widget li dl dd,
.woocommerce ul.product_list_widget li dl dt {
	margin-bottom: 0 !important;
	line-height: 1.45;
}
.woocommerce ul.cart_list li dl,
.woocommerce ul.product_list_widget li dl { margin-bottom: 4px; }

/* Quantity × price — its own line below the title block */
.ama-mini-cart__drawer-body li.woocommerce-mini-cart-item .quantity {
	display: block;
	margin-top: 6px;
	font-family: var(--font-body, 'Atkinson Hyperlegible', Arial, sans-serif);
	font-size: 0.8125rem;
	color: var(--ink-soft, #4a5474);
}
.ama-mini-cart__drawer-body li.woocommerce-mini-cart-item .quantity .amount {
	color: var(--ink, #1a1f33);
	font-weight: 700;
}

/* Remove (×) button — top-right of the row */
.ama-mini-cart__drawer-body li.woocommerce-mini-cart-item a.remove {
	position: absolute;
	top: 12px;
	right: 0;
	width: 26px;
	height: 26px;
	line-height: 24px;
	text-align: center;
	border-radius: 50%;
	font-size: 1.125rem;
	color: var(--ink-soft, #4a5474) !important;
	background: var(--paper, #f1ece0);
}
.ama-mini-cart__drawer-body li.woocommerce-mini-cart-item a.remove:hover {
	background: var(--red-deep, #a82720);
	color: #fff !important;
}

/* Subtotal row */
.ama-mini-cart__drawer-body .woocommerce-mini-cart__total {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	border-top: 2px solid var(--rule, #d4c8b0);
	padding-top: 16px;
	margin-top: 16px;
	font-size: 0.9375rem;
	font-family: var(--font-body, 'Atkinson Hyperlegible', Arial, sans-serif);
	text-transform: uppercase;
	letter-spacing: .04em;
}
.ama-mini-cart__drawer-body .woocommerce-mini-cart__total .amount {
	font-family: var(--font-body, 'Atkinson Hyperlegible', Arial, sans-serif);
	font-size: 1.25rem;
	letter-spacing: 0;
	color: var(--red-deep, #a82720);
}

/* Action buttons — full-width, stacked, AMA styling */
.ama-mini-cart__drawer-body .woocommerce-mini-cart__buttons {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin: 16px 0 0;
}
.ama-mini-cart__drawer-body .woocommerce-mini-cart__buttons .button {
	display: block;
	width: 100%;
	text-align: center;
	margin: 0;
	padding: 13px 18px;
	border-radius: 6px;
	font-weight: 700;
	min-height: 48px;
	text-decoration: none;
	box-sizing: border-box;
}
/* "View cart" = outline, "Checkout" = solid */
.ama-mini-cart__drawer-body .woocommerce-mini-cart__buttons .button:not(.checkout) {
	background: transparent;
	border: 2px solid var(--blue-deep, #0d2160);
	color: var(--blue-deep, #0d2160);
}
.ama-mini-cart__drawer-body .woocommerce-mini-cart__buttons .button:not(.checkout):hover {
	background: var(--blue-soft, #e6ebf7);
}
.ama-mini-cart__drawer-body .woocommerce-mini-cart__buttons .button.checkout {
	background: var(--blue-deep, #0d2160);
	color: var(--cream, #faf6ee);
	border: 2px solid var(--blue-deep, #0d2160);
}
.ama-mini-cart__drawer-body .woocommerce-mini-cart__buttons .button.checkout:hover {
	background: var(--red-deep, #a82720);
	border-color: var(--red-deep, #a82720);
}

@media (prefers-reduced-motion: reduce) {
	.ama-mini-cart__drawer { transition: none; }
}

/* ══════════════════════════════════════════════════════════════════════════
   CHECKOUT PROGRESS STEPS  (AMA Cart + Checkout widgets)
   ══════════════════════════════════════════════════════════════════════════ */

.ama-woo-steps {
	margin-bottom: 28px;
	padding-bottom: 20px;
	border-bottom: 1px solid var(--rule, #d4c8b0);
}
.ama-woo-steps__list {
	display: flex;
	align-items: center;
	list-style: none;
	margin: 0;
	padding: 0;
}
.ama-woo-steps__item {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-shrink: 0;
}
.ama-woo-steps__item:not(:last-child)::after {
	content: '';
	display: block;
	flex: 1 1 auto;
	height: 1px;
	min-width: 20px;
	background: var(--rule, #d4c8b0);
	margin: 0 10px;
}
.ama-woo-steps__num {
	width: 28px; height: 28px;
	border-radius: 50%;
	border: 1.5px solid var(--rule, #d4c8b0);
	display: inline-flex;
	align-items: center; justify-content: center;
	font-family: var(--font-body, 'Atkinson Hyperlegible', Arial, sans-serif);
	font-size: 0.75rem; font-weight: 700;
	color: var(--ink-soft, #4a5474);
	background: var(--white, #fff);
	flex-shrink: 0;
}
.ama-woo-steps__label {
	font-size: 0.8125rem;
	color: var(--ink-soft, #4a5474);
	white-space: nowrap;
}
.ama-woo-steps__item.is-active .ama-woo-steps__num {
	background: var(--blue-deep, #0d2160);
	border-color: var(--blue-deep, #0d2160);
	color: var(--white, #fff);
}
.ama-woo-steps__item.is-active .ama-woo-steps__label { color: var(--blue-deep, #0d2160); font-weight: 700; }
.ama-woo-steps__item.is-done .ama-woo-steps__num { background: var(--blue-soft, #e6ebf7); border-color: var(--blue-deep, #0d2160); color: var(--blue-deep, #0d2160); }
.ama-woo-steps__item.is-done .ama-woo-steps__label { color: var(--blue-deep, #0d2160); }
.ama-woo-steps__item.is-done::after { background: var(--blue-deep, #0d2160); }

@media (max-width: 540px) {
	.ama-woo-steps__label { display: none; }
	.ama-woo-steps__item:not(:last-child)::after { min-width: 12px; margin: 0 6px; }
}

/* ══════════════════════════════════════════════════════════════════════════
   CART WIDGET  — flex-card items, 2-column page layout
   ══════════════════════════════════════════════════════════════════════════ */

/* ── Page heading ───────────────────────────────────────────────────────── */
.ama-cart-widget__heading {
	font-family: var(--font-serif, var(--font-sans));
	font-size: clamp(1.625rem, 4vw, 2.5rem);
	color: var(--blue-deep, #0d2160);
	margin: 0 0 20px;
	line-height: 1.1;
}
.ama-cart-widget__heading::after {
	content: '';
	display: block;
	width: 44px; height: 3px;
	background: var(--gold, #b8872a);
	border-radius: 2px;
	margin-top: 10px;
}

/* ── "N ITEMS IN YOUR CART" count bar ──────────────────────────────────── */
.ama-cart-count-bar {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 20px;
	font-family: var(--font-body, 'Atkinson Hyperlegible', Arial, sans-serif);
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: .08em;
	color: var(--ink-soft, #4a5474);
}
.ama-cart-count-bar__dot {
	width: 8px; height: 8px;
	border-radius: 50%;
	background: var(--gold, #b8872a);
	flex-shrink: 0;
}

/* ── 2-column layout: .ama-cart-main wrapper holds form + sidebar ───────────
 * .ama-cart-main is output by our cart.php template override, wrapping ONLY
 * the woocommerce-cart-form and .cart-collaterals so no WC-injected elements
 * (notices wrapper, before_cart hooks) can interrupt the flex row.
 */
.ama-cart-widget__heading { grid-column: unset; }
.ama-cart-count-bar        { grid-column: unset; }

.ama-cart-main {
	display: flex;
	flex-wrap: nowrap;
	align-items: flex-start;
	gap: 40px;
	width: 100%;
}

/* Cart form — grows to fill space left after the 300px sidebar */
.ama-cart-main > form.woocommerce-cart-form {
	flex: 1 1 0;
	min-width: 0;
}

/* Sidebar — fixed 300px, sticky */
.ama-cart-main > .cart-collaterals {
	flex: 0 0 300px;
	width: 300px;
	position: sticky;
	top: 100px;
	align-self: flex-start;
}

/* ── Cart items — shared grid columns ───────────────────────────────────────
 * DOM order matches visual order: remove × | thumb | info | price | qty | total
 *   32px   = remove ×      ← always visible at left edge
 *   72px   = thumbnail
 *   1fr    = product info
 *   100px  = unit price
 *   140px  = qty stepper
 *   100px  = row total
 * ─────────────────────────────────────────────────────────────────────────── */
.ama-cart-items { list-style: none; margin: 0; padding: 0; }

.ama-cart-items__header,
.ama-cart-item {
	display: grid;
	grid-template-columns: 32px 72px 1fr 100px 140px 100px;
	gap: 0 16px;
	align-items: center;
}

/* Break span is only for mobile flex — invisible in desktop grid */
.ama-cart-item__break     { display: none; }

/* Header row — PRICE · QTY · TOTAL labels */
.ama-cart-items__header {
	padding-bottom: 10px;
	border-bottom: 1.5px solid #1a1f33;
	border-bottom: 1.5px solid var(--ink, #1a1f33);
}
.ama-cart-items__header .ama-cart-item__label {
	font-family: var(--font-body, 'Atkinson Hyperlegible', Arial, sans-serif);
	font-size: 0.75rem; font-weight: 700;
	text-transform: uppercase; letter-spacing: .08em;
	color: #4a5474; color: var(--ink-soft, #4a5474);
}
/* Cols 1-3 are blank (×, thumb, info); labels at cols 4-6 */
.ama-cart-items__header span:nth-child(4) { text-align: left; }
.ama-cart-items__header span:nth-child(5) { text-align: center; }
.ama-cart-items__header span:nth-child(6) { text-align: right; }

/* Item row */
.ama-cart-item {
	padding: 18px 0;
	border-bottom: 1px solid #f1ece0;
	border-bottom: 1px solid var(--paper, #f1ece0);
}

/* ── Col 1: Thumbnail ───────────────────────────────────────────────────── */
.ama-cart-item__thumb a { display: block; }
.ama-cart-item__thumb img {
	display: block;
	width: 64px !important; height: 64px !important;
	object-fit: cover;
	border-radius: 6px;
	border: 1px solid #d4c8b0; border: 1px solid var(--rule, #d4c8b0);
}
/* No image: hide thumb; span info across cols 2+3 (thumb+info positions) */
.ama-cart-item--no-image .ama-cart-item__thumb { display: none; }
.ama-cart-item--no-image .ama-cart-item__info   { grid-column: 2 / 4; }

/* ── Col 2: Product info ────────────────────────────────────────────────── */
.ama-cart-item__info { min-width: 0; }

span.ama-cart-item-cat {
	display: block;
	font-family: var(--font-body, 'Atkinson Hyperlegible', Arial, sans-serif);
	font-size: 0.75rem; font-weight: 700;
	letter-spacing: .08em; text-transform: uppercase;
	color: #b8872a; color: var(--gold, #b8872a);
	margin-bottom: 3px;
}

.ama-cart-item__title-link,
.ama-cart-item__title {
	font-weight: 700; font-size: 0.9375rem;
	color: #1a1f33; color: var(--ink, #1a1f33);
	text-decoration: none; line-height: 1.35;
	display: block;
	overflow-wrap: break-word; word-break: break-word;
}
.ama-cart-item__title-link:hover { color: #a82720; color: var(--red-deep, #a82720); }

.ama-cart-item__info .mec-woo-cart-product-name {
	display: block; font-weight: 700; font-size: 0.875rem;
	color: #1a1f33; color: var(--ink, #1a1f33); overflow-wrap: break-word;
}
.ama-cart-item__info .mec-woo-cart-product-person-name,
.ama-cart-item__info .mec-woo-cart-product-person-email,
.ama-cart-item__info .mec-woo-cart-booking-date {
	display: block; font-size: 0.75rem;
	color: #4a5474; color: var(--ink-soft, #4a5474);
	line-height: 1.5; overflow-wrap: break-word;
}

/* Variation meta — shown for all products including MEC events.
   Tight, even rows: kill WooCommerce's inherited dl/dd/p margins and large
   line-height, contain the floated dt/dd, and keep a small gap between the
   standard variation list and our .ama-mec-booking list. */
.ama-cart-item__meta dl.variation {
	margin: 4px 0 0 !important;
	padding: 0 !important;
	font-size: 0.75rem;
	line-height: 1.45;
	color: #4a5474; color: var(--ink-soft, #4a5474);
	overflow: hidden;            /* contain the floated dt/dd */
}
.ama-cart-item__meta dl.variation.ama-mec-booking { margin-top: 2px !important; }
.ama-cart-item__meta dl.variation dt {
	font-weight: 700; float: left; clear: left;
	margin: 0 4px 0 0 !important; padding: 0 !important;
}
.ama-cart-item__meta dl.variation dd {
	margin: 0 0 1px 0 !important; padding: 0 !important;
}
.ama-cart-item__meta dl.variation dd p,
.ama-cart-item__meta dl.variation p { margin: 0 !important; padding: 0 !important; line-height: 1.45; }

/* MEC injects event details as spans/divs in the product name via its
   woocommerce_cart_item_name filter. Our .ama-cart-item__meta already shows
   the same data via wc_get_formatted_cart_item_data() — hide the duplicate. */
.ama-cart-item__info [class*="mec-woo"],
.ama-order-review__item-name [class*="mec-woo"] { display: none !important; }

/* Checkout review-order — meta (dl.variation from wc_get_formatted_cart_item_data) */
.ama-order-review__item-meta dl.variation { font-size: 0.75rem; color: #4a5474; color: var(--ink-soft, #4a5474);}
.ama-order-review__item-meta dl.variation dt { clear: left;}
.ama-order-review__item-meta dl.variation dd { margin: 0 0 2px; }
.ama-order-review__item-meta dl.variation p { margin: 0; }

/* MEC item row — "Event : Title × qty" inline */
.ama-order-review__item-name--mec { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 6px; }
.ama-order-review__item-label {
	font-family: var(--font-body, 'Atkinson Hyperlegible', Arial, sans-serif);
	font-size: 0.75rem; font-weight: 700;
	text-transform: uppercase; letter-spacing: .06em;
	color: #4a5474; color: var(--ink-soft, #4a5474);
	white-space: nowrap;
}
.ama-order-review__item-name--mec .ama-order-review__item-link { font-weight: 600; }
.ama-order-review__item-name--mec .ama-order-review__item-meta { flex: 0 0 100%; margin-top: 4px; }

/* ── Col 3: Unit price ──────────────────────────────────────────────────── */
.ama-cart-item__price-col {
	font-family: var(--font-body, 'Atkinson Hyperlegible', Arial, sans-serif);
	font-size: 0.875rem; font-weight: 700;
	color: #1a1f33; color: var(--ink, #1a1f33);
	text-align: left; white-space: nowrap;
}

/* ── Col 4: Qty stepper ─────────────────────────────────────────────────── */
.ama-cart-item__qty-col { display: flex; justify-content: center; }
.ama-cart-item__qty-col .quantity { display: inline-flex; }
.ama-cart-item__qty-col .quantity input.qty {
	width: 44px; text-align: center;
	border: 1.5px solid #d4c8b0; border: 1.5px solid var(--rule, #d4c8b0);
	border-radius: 6px; padding: 4px; font-size: 0.875rem; min-height: 36px;
	background: #fff; background: var(--white, #fff);
}
.ama-cart-item__qty-col .quantity.buttons_added {
	border: 1.5px solid #d4c8b0; border: 1.5px solid var(--rule, #d4c8b0);
	border-radius: 6px; overflow: hidden; display: inline-flex;
}
.ama-cart-item__qty-col .quantity.buttons_added input.qty { border: 0; border-radius: 0; }
.ama-cart-item__qty-col .quantity.buttons_added .minus,
.ama-cart-item__qty-col .quantity.buttons_added .plus {
	min-width: 28px; min-height: 36px; border: 0;
	background: #f1ece0; background: var(--paper, #f1ece0);
	color: #0d2160; color: var(--blue-deep, #0d2160);
	font-size: 1.0625rem; cursor: pointer;
	display: inline-flex; align-items: center; justify-content: center;
}
.ama-cart-item__qty-col .quantity.buttons_added .minus:hover,
.ama-cart-item__qty-col .quantity.buttons_added .plus:hover { background: #d4c8b0; background: var(--rule, #d4c8b0); }
.ama-cart-item__qty-fixed { font-family: var(--font-body, 'Atkinson Hyperlegible', Arial, sans-serif); font-weight: 700; color: #4a5474; color: var(--ink-soft, #4a5474); }

/* ── Col 5: Row total ───────────────────────────────────────────────────── */
.ama-cart-item__total-col {
	font-family: var(--font-body, 'Atkinson Hyperlegible', Arial, sans-serif);
	font-size: 0.875rem; font-weight: 700;
	text-align: right; white-space: nowrap;
}
.ama-cart-item__total-col .woocommerce-Price-amount { color: #a82720; color: var(--red-deep, #a82720); }

/* ── Col 6: Remove × ────────────────────────────────────────────────────── */
.ama-cart-item__remove { display: flex; justify-content: center; }
.ama-cart-item__remove a.remove {
	display: inline-flex;
	align-items: center; justify-content: center;
	width: 28px; height: 28px;
	border-radius: 50%;
	background: #f1ece0; background: var(--paper, #f1ece0);
	color: #4a5474 !important; color: var(--ink-soft, #4a5474) !important;
	font-size: 1rem; text-decoration: none;
	transition: background .12s ease;
}
.ama-cart-item__remove a.remove:hover {
	background: #a82720; background: var(--red-deep, #a82720);
	color: #fff !important;
}

/* ── WooCommerce .button → AMA primary button style (blue) ─────────────── */
/* Site-wide buttons use --blue-deep (#0d2160). Cart & checkout buttons
   follow the same convention. Double selector beats WooCommerce specificity. */
.ama-cart-widget .ama-cart-widget a.button,
.ama-cart-widget a.button,
.ama-cart-widget .ama-cart-widget button.button,
.ama-cart-widget button.button {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	min-height: 48px !important;
	padding: 0 24px !important;
	font-family: var(--font-sans, sans-serif) !important;
	font-weight: 700 !important;
	font-size: 0.9375rem !important;
	line-height: 1 !important;
	text-decoration: none !important;
	white-space: nowrap !important;
	cursor: pointer !important;
	border: 2px solid #0d2160 !important;
	border: 2px solid var(--blue-deep, #0d2160) !important;
	border-radius: 2px !important;
	background: #0d2160 !important;
	background: var(--blue-deep, #0d2160) !important;
	color: #ffffff !important;
	transition: background .15s ease, border-color .15s ease !important;
	box-shadow: none !important;
}
.ama-cart-widget a.button:hover,
.ama-cart-widget button.button:hover {
	background: #1a3290 !important;
	border-color: #1a3290 !important;
	color: #ffffff !important;
	text-decoration: none !important;
}

/* ── Cart actions: coupon + update ─────────────────────────────────────── */
.ama-cart-actions {
	display: flex; align-items: center; justify-content: space-between;
	flex-wrap: wrap; gap: 12px; padding: 16px 0;
	border-top: 2px solid #d4c8b0; border-top: 2px solid var(--rule, #d4c8b0);
	margin-top: 4px;
}
.ama-cart-coupon { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ama-cart-coupon input#coupon_code {
	min-height: 48px; padding: 8px 14px;
	border: 1.5px solid #d4c8b0; border: 1.5px solid var(--rule, #d4c8b0);
	border-radius: 2px; font-size: 0.9375rem;
	background: #fff; background: var(--white, #fff);
	width: 180px; box-sizing: border-box;
}
.ama-cart-coupon input#coupon_code:focus {
	outline: none;
	border-color: #0d2160; border-color: var(--blue-deep, #0d2160);
	box-shadow: 0 0 0 3px rgba(13,33,96,.12);
}

/* Apply coupon — primary (inherits .button styles above) */
button.ama-cart-apply-coupon { /* inherits */ }

/* Update cart — ghost/secondary style overrides the primary .button above */
button.ama-cart-update,
button.ama-cart-update.button {
	background: transparent !important;
	color: #0d2160 !important; color: var(--blue-deep, #0d2160) !important;
	border: 2px solid #0d2160 !important; border: 2px solid var(--blue-deep, #0d2160) !important;
}
button.ama-cart-update:hover,
button.ama-cart-update.button:hover {
	background: #0d2160 !important; background: var(--blue-deep, #0d2160) !important;
	color: #faf6ee !important; color: var(--cream, #faf6ee) !important;
	border-color: #0d2160 !important; border-color: var(--blue-deep, #0d2160) !important;
}

/* ── Shipping method tiles ──────────────────────────────────────────────── */
ul.woocommerce-shipping-methods { list-style: none; margin: 0; padding: 0; }
ul.woocommerce-shipping-methods li {
	display: flex; align-items: center; gap: 10px;
	padding: 10px 14px;
	border: 1.5px solid #d4c8b0; border: 1.5px solid var(--rule, #d4c8b0);
	border-radius: 8px; margin-bottom: 8px; cursor: pointer;
}
ul.woocommerce-shipping-methods li:has(input:checked) {
	border-color: #0d2160; border-color: var(--blue-deep, #0d2160);
	background: #e6ebf7; background: var(--blue-soft, #e6ebf7);
}
ul.woocommerce-shipping-methods input[type="radio"] { accent-color: #0d2160; flex-shrink: 0; }
ul.woocommerce-shipping-methods label { flex: 1; font-size: 0.875rem; font-weight: 600; cursor: pointer; margin: 0; }

/* WooCommerce's woocommerce.css sets .cart-collaterals .cart_totals { width:48%; float:left }
   which squishes our sidebar content. Reset it unconditionally. */
.woocommerce .cart-collaterals .cart_totals,
.woocommerce-page .cart-collaterals .cart_totals,
.ama-cart-main .cart-collaterals .cart_totals {
	width: 100% !important;
	float: none !important;
}

/* ── Order summary sidebar ──────────────────────────────────────────────── */
.ama-cart-widget .cart_totals {
	background: #faf6ee; background: var(--cream, #faf6ee);
	border: 1px solid #d4c8b0; border: 1px solid var(--rule, #d4c8b0);
	border-radius: 12px;
	padding: 24px;
}

/* Heading — works for both our totals.php h2.ama-cart-totals__heading
   AND the default WC <h2>Cart totals</h2> */
.ama-cart-widget .cart_totals h2,
h2.ama-cart-totals__heading {
	font-family: var(--font-body, 'Atkinson Hyperlegible', Arial, sans-serif);
	text-transform: uppercase; letter-spacing: .08em;
	font-size: 0.75rem; font-weight: 700;
	color: #b8872a; color: var(--gold, #b8872a);
	margin: 0 0 16px; padding-bottom: 12px;
	border-bottom: 1.5px solid #d4c8b0; border-bottom: 1.5px solid var(--rule, #d4c8b0);
}

/* New div-based rows from our totals.php override */
.ama-cart-totals__rows { display: flex; flex-direction: column; }
.ama-cart-totals__row {
	display: flex; align-items: baseline; justify-content: space-between;
	gap: 12px; padding: 9px 0;
	border-bottom: 1px solid #f1ece0; border-bottom: 1px solid var(--paper, #f1ece0);
	font-size: 0.875rem;
}
.ama-cart-totals__label { color: #4a5474; color: var(--ink-soft, #4a5474); font-weight: 400; flex: 1; }
.ama-cart-totals__value { font-weight: 700; white-space: nowrap; text-align: right; }
.ama-cart-totals__row--discount .ama-cart-totals__value { color: #a82720; color: var(--red-deep, #a82720); }
.ama-cart-totals__shipping-pending { font-size: 0.75rem; color: #4a5474; color: var(--ink-soft, #4a5474); }
.ama-cart-totals__row--total { border-bottom: 0; padding-top: 14px; }
.ama-cart-totals__row--total .ama-cart-totals__label { font-weight: 700; color: #1a1f33; color: var(--ink, #1a1f33); font-size: 0.9375rem; }
.ama-cart-totals__row--total .ama-cart-totals__value { font-size: 1.375rem; }
.ama-cart-totals__row--total .woocommerce-Price-amount { font-size: 1.375rem; color: #0d2160; color: var(--blue-deep, #0d2160); }

/* CSS fallback: WooCommerce's AJAX cart fragment refresh re-renders totals using
   the default shop_table template (bypasses our totals.php file override).
   This converts both table.shop_table and .shop_table_responsive to flex rows
   so the sidebar always looks correct regardless of which template WC uses. */
.ama-cart-widget .cart_totals table.shop_table,
.ama-cart-widget .cart_totals .shop_table_responsive table,
.cart-collaterals .cart_totals table.shop_table {
	display: block !important; width: 100% !important; border: 0 !important;
	border-collapse: unset !important;
}
.ama-cart-widget .cart_totals table.shop_table thead,
.ama-cart-widget .cart_totals .shop_table_responsive table thead,
.cart-collaterals .cart_totals table.shop_table thead { display: none !important; }

.ama-cart-widget .cart_totals table.shop_table tbody,
.ama-cart-widget .cart_totals table.shop_table tfoot,
.ama-cart-widget .cart_totals .shop_table_responsive table tbody,
.ama-cart-widget .cart_totals .shop_table_responsive table tfoot,
.cart-collaterals .cart_totals table.shop_table tbody,
.cart-collaterals .cart_totals table.shop_table tfoot { display: block !important; }

.ama-cart-widget .cart_totals table.shop_table tr,
.ama-cart-widget .cart_totals .shop_table_responsive table tr,
.cart-collaterals .cart_totals table.shop_table tr {
	display: flex !important; justify-content: space-between; align-items: baseline;
	gap: 12px; padding: 9px 0;
	border: 0 !important; border-bottom: 1px solid #f1ece0 !important;
	border-bottom: 1px solid var(--paper, #f1ece0) !important;
}
.ama-cart-widget .cart_totals table.shop_table th,
.ama-cart-widget .cart_totals table.shop_table td,
.ama-cart-widget .cart_totals .shop_table_responsive table th,
.ama-cart-widget .cart_totals .shop_table_responsive table td,
.cart-collaterals .cart_totals table.shop_table th,
.cart-collaterals .cart_totals table.shop_table td {
	display: block !important; border: 0 !important; padding: 0 !important;
	background: transparent !important; font-size: 0.875rem;
}
.ama-cart-widget .cart_totals table.shop_table th,
.cart-collaterals .cart_totals table.shop_table th {
	flex: 1; font-weight: 400; color: #4a5474;
	color: var(--ink-soft, #4a5474); text-align: left !important;
}
.ama-cart-widget .cart_totals table.shop_table td,
.cart-collaterals .cart_totals table.shop_table td {
	font-weight: 700; text-align: right !important; white-space: nowrap;
}
.ama-cart-widget .cart_totals table.shop_table tr.order-total,
.cart-collaterals .cart_totals table.shop_table tr.order-total {
	border-bottom: 0 !important; padding-top: 14px;
}
.ama-cart-widget .cart_totals table.shop_table tr.order-total th,
.cart-collaterals .cart_totals table.shop_table tr.order-total th {
	font-weight: 700; color: #1a1f33; color: var(--ink, #1a1f33); font-size: 0.9375rem;
}
.ama-cart-widget .cart_totals table.shop_table tr.order-total td .woocommerce-Price-amount,
.cart-collaterals .cart_totals table.shop_table tr.order-total td .woocommerce-Price-amount {
	font-size: 1.375rem; color: #0d2160; color: var(--blue-deep, #0d2160);
}

/* Proceed to checkout button */
.ama-cart-widget .wc-proceed-to-checkout { margin-top: 20px; }

/* Cart "Proceed to Checkout" — match the red primary button used for
   "Place Order" on checkout. Without this the button falls back to the base
   navy .button.alt and keeps the link underline (it's an <a>). High-specificity
   + !important because both our base button rule and the Elementor kit style
   these selectors; covers the standalone cart page and the AMA cart widget. */
.woocommerce .wc-proceed-to-checkout a.checkout-button,
.woocommerce-cart .wc-proceed-to-checkout a.checkout-button,
.ama-cart-widget .wc-proceed-to-checkout a.checkout-button {
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	width: 100% !important;
	min-height: 52px !important;
	padding: 14px 22px !important;
	background: var(--red, #d6362f) !important;
	color: #fff !important;
	border: 0 !important;
	border-radius: 2px !important;
	font-family: var(--font-sans, "Plus Jakarta Sans", sans-serif) !important;
	font-weight: 700 !important;
	font-size: 1rem !important;
	letter-spacing: .04em !important;
	text-transform: uppercase !important;
	text-decoration: none !important;
	box-shadow: none !important;
	transition: background .15s ease;
}
.woocommerce .wc-proceed-to-checkout a.checkout-button:hover,
.woocommerce .wc-proceed-to-checkout a.checkout-button:focus,
.ama-cart-widget .wc-proceed-to-checkout a.checkout-button:hover {
	background: var(--red-deep, #a82720) !important;
	color: #fff !important;
}
.woocommerce .wc-proceed-to-checkout a.checkout-button:focus-visible {
	outline: 3px solid var(--red-deep, #a82720) !important;
	outline-offset: 3px;
}

/* Block-based Cart ("wp-block-woocommerce-cart") — the WooCommerce Blocks cart
   uses <a class="wc-block-cart__submit-button"> with the label in a nested
   .wc-block-components-button__text span, NOT the classic .checkout-button. Give
   it the same red primary look. High specificity + !important to beat WooCommerce
   Blocks' own component styles and theme.json's .wp-element-button. */
a.wc-block-cart__submit-button,
a.wc-block-components-button.wc-block-cart__submit-button.contained,
.wc-block-cart__submit-container a.wc-block-components-button {
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	width: 100% !important;
	min-height: 52px !important;
	padding: 14px 22px !important;
	background: var(--red, #d6362f) !important;
	background-color: var(--red, #d6362f) !important;
	color: #fff !important;
	border: 0 !important;
	border-radius: 2px !important;
	box-shadow: none !important;
	font-family: var(--font-sans, "Plus Jakarta Sans", sans-serif) !important;
	font-weight: 700 !important;
	font-size: 1rem !important;
	letter-spacing: .04em !important;
	text-transform: uppercase !important;
	text-decoration: none !important;
}
a.wc-block-cart__submit-button .wc-block-components-button__text {
	color: #fff !important;
	text-transform: uppercase !important;
	letter-spacing: .04em !important;
	font-weight: 700 !important;
}
a.wc-block-cart__submit-button:hover,
a.wc-block-cart__submit-button:focus,
.wc-block-cart__submit-container a.wc-block-components-button:hover {
	background: var(--red-deep, #a82720) !important;
	background-color: var(--red-deep, #a82720) !important;
	color: #fff !important;
}
a.wc-block-cart__submit-button:focus-visible {
	outline: 3px solid var(--red-deep, #a82720) !important;
	outline-offset: 3px;
}

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 960px) {
	.ama-cart-main { flex-wrap: wrap; gap: 0; }
	.ama-cart-main > form.woocommerce-cart-form { flex: 0 0 100%; width: 100%; }
	.ama-cart-main > .cart-collaterals { flex: 0 0 100%; width: 100%; position: static; margin-top: 24px; }
}
/* ── Mobile: flex layout with labelled Price / Qty / Total row ────────────
 * On small screens the 6-column grid is too wide. Switch to flexbox:
 * Row 1: [thumb]  [info ...]  [remove ×]
 * Row 2: [PRICE ₹X]  [QTY N]  [TOTAL ₹Y]   ← inline labels via ::before
 * .ama-cart-item__break is a zero-height flex item (inserted in PHP) that
 * forces rows 1 and 2 to be separate wrap lines.
 */
@media (max-width: 640px) {
	.ama-cart-items__header { display: none; }

	.ama-cart-item,
	.ama-cart-item--no-image {
		display: flex;
		flex-wrap: wrap;
		align-items: flex-start;
		gap: 10px 12px;
	}
	.ama-cart-item__thumb  { flex: 0 0 52px; }
	.ama-cart-item__thumb img { width: 52px !important; height: 52px !important; }
	.ama-cart-item__info   { flex: 1 1 0; min-width: 0; }
	.ama-cart-item__remove { flex: 0 0 28px; }

	/* Zero-height break forces price/qty/total onto their own row */
	.ama-cart-item__break  { flex: 0 0 100%; height: 0; margin: 0; }

	/* No-image: info gets full width (no thumb taking space) */
	.ama-cart-item--no-image .ama-cart-item__info { flex: 1 1 100%; grid-column: unset; }

	/* Price / Qty / Total: three equal flex cells, each with an inline label */
	.ama-cart-item__price-col,
	.ama-cart-item__qty-col,
	.ama-cart-item__total-col {
		flex: 1 1 0;
		display: flex;
		flex-direction: column;
		align-items: flex-start;
		gap: 3px;
		font-size: 0.8125rem;
		text-align: left !important;
	}
	.ama-cart-item__qty-col   { align-items: center; }
	.ama-cart-item__total-col { align-items: flex-end; text-align: right !important; }

	.ama-cart-item__price-col::before,
	.ama-cart-item__qty-col::before,
	.ama-cart-item__total-col::before {
		font-family: var(--font-body, 'Atkinson Hyperlegible', Arial, sans-serif);
		font-size: 0.75rem; font-weight: 700;
		text-transform: uppercase; letter-spacing: .08em;
		color: #4a5474; color: var(--ink-soft, #4a5474);
	}
	.ama-cart-item__price-col::before { content: 'Price'; }
	.ama-cart-item__qty-col::before   { content: 'Qty'; }
	.ama-cart-item__total-col::before { content: 'Total'; }

	.ama-cart-item__qty-col .quantity { justify-content: center; }
}

/* ══════════════════════════════════════════════════════════════════════════
   CHECKOUT WIDGET  (.ama-checkout-widget)
   ══════════════════════════════════════════════════════════════════════════ */

/* Heading */
.ama-checkout-widget__heading {
	font-family: var(--font-serif, var(--font-sans));
	font-size: clamp(1.625rem, 4vw, 2.5rem);
	color: var(--blue-deep, #0d2160);
	margin: 0 0 6px;
	line-height: 1.1;
}
.ama-checkout-widget__heading::after {
	content: '';
	display: block;
	width: 44px; height: 3px;
	background: var(--gold, #b8872a);
	border-radius: 2px;
	margin-top: 10px;
}
.ama-checkout-widget__heading-dot {
	display: none !important; /* hidden by design choice — can re-enable if needed */
}

/* ← Back to Cart */
.ama-checkout-widget__back-link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-bottom: 24px;
	font-size: 0.8125rem;
	font-weight: 600;
	color: var(--ink-soft, #4a5474);
	text-decoration: none;
}
.ama-checkout-widget__back-link:hover { color: var(--blue-deep, #0d2160); }

/* ── 2-column layout: billing left | order+payment right ────────────────── */
.ama-checkout-widget form.checkout.woocommerce-checkout {
	display: grid;
	grid-template-columns: 1fr 320px;
	gap: 48px;
	align-items: start;
}
.ama-checkout-widget #customer_details { grid-column: 1; grid-row: 1; }
.ama-checkout-widget h3#order_review_heading { display: none; }
.ama-checkout-widget #order_review { grid-column: 2; grid-row: 1 / 10; position: sticky; top: 100px; }

/* Flatten WooCommerce col2-set float layout */
.ama-checkout-widget .col2-set { display: block; }
.ama-checkout-widget .col2-set .col-1,
.ama-checkout-widget .col2-set .col-2 { width: 100%; float: none; margin: 0; }

/* ── Section headers ────────────────────────────────────────────────────── */
.ama-checkout-widget .woocommerce-billing-fields > h3,
.ama-checkout-widget .woocommerce-additional-fields > h3,
.ama-checkout-widget .woocommerce-shipping-fields > h3,
.ama-checkout-widget .woocommerce-account-fields > h3 {
	display: flex;
	align-items: center;
	gap: 8px;
	font-family: var(--font-body, 'Atkinson Hyperlegible', Arial, sans-serif);
	font-size: 0.75rem; font-weight: 700;
	text-transform: uppercase; letter-spacing: .08em;
	color: var(--gold, #b8872a);
	margin: 0 0 16px; padding-bottom: 12px;
	border-bottom: 1.5px solid var(--rule, #d4c8b0);
}
.ama-checkout-widget .woocommerce-billing-fields > h3::before,
.ama-checkout-widget .woocommerce-additional-fields > h3::before,
.ama-checkout-widget .woocommerce-shipping-fields > h3::before {
	content: '';
	display: inline-block;
	width: 6px; height: 6px;
	border-radius: 50%;
	background: var(--gold, #b8872a);
}

/* ── Billing form 2-column paired fields ────────────────────────────────── */
.ama-checkout-widget .woocommerce-billing-fields__field-wrapper,
.ama-checkout-widget .woocommerce-shipping-fields__field-wrapper {
	display: grid;
	grid-template-columns: 1fr 1fr;
	column-gap: 16px;
}
.ama-checkout-widget p.form-row         { margin-bottom: 16px; }
.ama-checkout-widget p.form-row-wide    { grid-column: 1 / -1; }
.ama-checkout-widget p.form-row-first   { grid-column: 1; }
.ama-checkout-widget p.form-row-last    { grid-column: 2; }

/* WooCommerce's woocommerce.css sets width:47% float:left on form-row-first/last.
   Must reset both so our CSS grid controls the layout instead of float. */
.ama-checkout-widget form .form-row-first,
.ama-checkout-widget form .form-row-last,
.woocommerce .ama-checkout-widget form .form-row-first,
.woocommerce .ama-checkout-widget form .form-row-last,
.woocommerce-page .ama-checkout-widget form .form-row-first,
.woocommerce-page .ama-checkout-widget form .form-row-last {
	width: 100% !important;
	float: none !important;
	clear: none !important;
}

/* Labels */
.ama-checkout-widget .woocommerce-checkout label {
	display: block;
	font-weight: 700; font-size: 0.8125rem;
	color: var(--blue-deep, #0d2160);
	margin-bottom: 6px;
}
.ama-checkout-widget .required { color: var(--red-deep, #a82720); }
.ama-checkout-widget .optional { font-weight: 400; font-size: 0.75rem; color: var(--ink-soft, #4a5474); }

/* Inputs */
.ama-checkout-widget .woocommerce form .form-row input.input-text,
.ama-checkout-widget .woocommerce form .form-row textarea,
.ama-checkout-widget .woocommerce-checkout select,
.ama-checkout-widget .select2-container .select2-selection--single {
	width: 100%;
	box-sizing: border-box;
	min-height: 48px;
	padding: 10px 14px;
	border: 1.5px solid var(--rule, #d4c8b0) !important;
	border-radius: 6px !important;
	background: var(--white, #fff) !important;
	color: var(--ink, #1a1f33);
	font-size: 1rem !important;
	transition: border-color .15s ease, box-shadow .15s ease;
}
.ama-checkout-widget textarea { min-height: 90px; resize: vertical; }
.ama-checkout-widget .woocommerce form .form-row input.input-text:focus,
.ama-checkout-widget .woocommerce form .form-row textarea:focus,
.ama-checkout-widget .woocommerce-checkout select:focus {
	outline: none;
	border-color: var(--blue-deep, #0d2160) !important;
	box-shadow: 0 0 0 4px rgba(13,33,96,.12) !important;
}
.ama-checkout-widget .woocommerce-invalid input.input-text,
.ama-checkout-widget .woocommerce-invalid select { border-color: var(--red-deep, #a82720) !important; }
.ama-checkout-widget .woocommerce-invalid label { color: var(--red-deep, #a82720); }

/* ── Order review sidebar (our review-order.php template) ───────────────── */
.ama-checkout-widget #order_review {
	background: var(--cream, #faf6ee);
	border: 1px solid var(--rule, #d4c8b0);
	border-radius: 12px;
	padding: 24px;
}
.ama-checkout-widget #order_review::before {
	content: 'Your Order';
	display: block;
	font-family: var(--font-body, 'Atkinson Hyperlegible', Arial, sans-serif);
	font-size: 0.75rem; font-weight: 700;
	text-transform: uppercase; letter-spacing: .08em;
	color: var(--gold, #b8872a);
	margin-bottom: 16px; padding-bottom: 12px;
	border-bottom: 1.5px solid var(--rule, #d4c8b0);
}

/* Order review custom markup from review-order.php override */
.ama-order-review__items {
	margin-bottom: 0;
}
.ama-order-review__item {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
	padding: 10px 0;
	border-bottom: 1px solid var(--paper, #f1ece0);
	font-size: 0.8125rem;
}
.ama-order-review__item-name {
	flex: 1;
	min-width: 0;
	color: var(--ink, #1a1f33);
	font-weight: 600;
	overflow-wrap: break-word;
	line-height: 1.4;
}
.ama-order-review__item-qty {
	font-weight: 400;
	color: var(--ink-soft, #4a5474);
}
.ama-order-review__item-price {
	flex-shrink: 0;
	font-family: var(--font-body, 'Atkinson Hyperlegible', Arial, sans-serif);
	font-size: 0.8125rem;
	font-weight: 700;
	white-space: nowrap;
	color: var(--ink, #1a1f33);
}
.ama-order-review__item-meta {
	display: block;
	font-size: 0.75rem;
	color: var(--ink-soft, #4a5474);
	margin-top: 3px;
	font-weight: 400;
}
.ama-order-review__item-meta dl.variation { margin: 0; }
.ama-order-review__item-meta dl.variation dt { float: left; margin-right: 4px; font-weight: 600; }

/* Totals section */
.ama-order-review__totals { margin-top: 4px; }
.ama-order-review__row {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	padding: 9px 0;
	border-bottom: 1px solid var(--paper, #f1ece0);
	font-size: 0.875rem;
}
.ama-order-review__row-label { color: var(--ink-soft, #4a5474); font-weight: 400; }
.ama-order-review__row-value { font-weight: 700; text-align: right; white-space: nowrap; }
/* Order total row */
.ama-order-review__row--total {
	border-bottom: 0;
	padding-top: 12px;
}
.ama-order-review__row--total .ama-order-review__row-label { font-weight: 700; font-size: 0.9375rem; color: var(--ink, #1a1f33); }
.ama-order-review__row--total .ama-order-review__row-value .woocommerce-Price-amount { font-size: 1.25rem; color: var(--blue-deep, #0d2160); }
.ama-order-review__row--total .ama-order-review__row-value { font-size: 1.25rem; }

/* WooCommerce injects a <tr> for shipping inside our div via wc_cart_totals_shipping_html() —
   make it look like our rows */
.ama-checkout-widget #order_review tr.shipping { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--paper, #f1ece0); font-size: 0.875rem; }
.ama-checkout-widget #order_review tr.shipping th { font-weight: 400; color: var(--ink-soft, #4a5474); }
.ama-checkout-widget #order_review tr.shipping td { text-align: right; }
.ama-checkout-widget #order_review table.shop_table { display: block; }

/* MEC-WooCommerce 2.4.0 injects its price breakdown the same way: its
   render_cart_price_breakdown() (core/integrations/parts/tax.php) echoes bare
   <tr><th>/<td> rows on woocommerce_cart_totals_before_order_total and
   woocommerce_review_order_before_order_total, which in our overrides fire
   inside the flex <div> containers .ama-cart-totals__rows (cart-totals.php)
   and .ama-order-review__totals (review-order.php) — four possible rows:
   .mec-wc-cart-full-price, -partial-price, -mec-tax and -wc-tax. Matching on
   `tr` rather than those four classes keeps any later row in line too; nothing
   else in these containers is a table row. (The AJAX cart-fragment path needs
   no rule: there the rows land in a real shop_table, already handled above.) */
.ama-cart-totals__rows tr,
.ama-order-review__totals tr {
	display: flex; align-items: baseline; justify-content: space-between;
	gap: 12px; padding: 9px 0;
	border-bottom: 1px solid #f1ece0; border-bottom: 1px solid var(--paper, #f1ece0);
	font-size: 0.875rem;
}
.ama-cart-totals__rows tr th,
.ama-order-review__totals tr th {
	flex: 1; padding: 0; border: 0; font-weight: 400; text-align: left;
	color: #4a5474; color: var(--ink-soft, #4a5474);
}
.ama-cart-totals__rows tr td,
.ama-order-review__totals tr td {
	padding: 0; border: 0; font-weight: 700; text-align: right; white-space: nowrap;
}

/* ── Payment methods — tile radios ─────────────────────────────────────── */
.ama-checkout-widget #payment { background: transparent !important; border: 0 !important; padding: 0 !important; margin-top: 20px; }
.ama-checkout-widget #payment h3 {
	font-family: var(--font-body, 'Atkinson Hyperlegible', Arial, sans-serif);
	font-size: 0.75rem; font-weight: 700;
	text-transform: uppercase; letter-spacing: .08em;
	color: var(--gold, #b8872a);
	margin: 0 0 14px; padding-bottom: 12px;
	border-bottom: 1.5px solid var(--rule, #d4c8b0);
	display: flex; align-items: center; gap: 8px;
}
.ama-checkout-widget #payment h3::before {
	content: ''; display: inline-block;
	width: 6px; height: 6px; border-radius: 50%;
	background: var(--gold, #b8872a);
}

/* WooCommerce sets padding-left on #payment ul.payment_methods — reset it */
.ama-checkout-widget #payment ul.payment_methods,
.woocommerce-checkout #payment ul.payment_methods {
	list-style: none !important;
	margin: 0 0 16px !important;
	padding: 0 !important;
}
/* Left margin on all inputs inside payment method list items */
.woocommerce-checkout #payment ul.payment_methods li input,
.ama-checkout-widget #payment ul.payment_methods li input,
.ama-checkout-widget #payment ul.wc_payment_methods li input {
	margin-left: 1em !important;
}

.ama-checkout-widget ul.wc_payment_methods li.wc_payment_method {
	border: 1.5px solid var(--rule, #d4c8b0);
	border-radius: 8px;
	margin-bottom: 8px;
	overflow: hidden;
}
.ama-checkout-widget ul.wc_payment_methods li.wc_payment_method.active,
.ama-checkout-widget ul.wc_payment_methods li.wc_payment_method:has(input:checked) {
	border-color: var(--blue-deep, #0d2160);
	background: var(--blue-deep, #0d2160);
}

/*
 * WooCommerce payment method HTML: <input type="radio"> and <label> are siblings
 * inside the <li> — NOT nested. Use flex on the <li> to align them on one line.
 * <li>
 *   <input type="radio" id="payment_method_x">
 *   <label for="payment_method_x">Method name</label>
 *   <div class="payment_box">...</div>
 * </li>
 */
.ama-checkout-widget ul.wc_payment_methods li.wc_payment_method {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
}
.ama-checkout-widget ul.wc_payment_methods li.wc_payment_method > input[type="radio"] {
	order: 0;
	flex-shrink: 0;
	width: 16px; height: 16px;
	margin: 0 0 0 16px;
	accent-color: var(--gold, #b8872a);
}
.ama-checkout-widget ul.wc_payment_methods li.wc_payment_method > label {
	order: 1;
	flex: 1;
	display: flex; align-items: center; gap: 8px;
	padding: 12px 16px 12px 10px;
	cursor: pointer;
	font-size: 0.875rem; font-weight: 600;
	color: var(--ink, #1a1f33); margin: 0;
}
.ama-checkout-widget ul.wc_payment_methods li.wc_payment_method > .payment_box {
	order: 2;
	flex: 0 0 100%;
}

.ama-checkout-widget ul.wc_payment_methods li.wc_payment_method.active > label,
.ama-checkout-widget ul.wc_payment_methods li.wc_payment_method:has(input:checked) > label { color: var(--cream, #faf6ee); }
.ama-checkout-widget .payment_box {
	padding: 12px 16px;
	background: var(--paper, #f1ece0);
	border-top: 1px solid var(--rule, #d4c8b0);
	font-size: 0.8125rem; color: var(--ink-soft, #4a5474);
}
.ama-checkout-widget .payment_box p { margin: 0 0 8px; }
.ama-checkout-widget .payment_box p:last-child { margin: 0; }
.ama-checkout-widget .payment_box input {
	width: 100%; box-sizing: border-box;
	min-height: 44px; padding: 8px 12px;
	border: 1.5px solid var(--rule, #d4c8b0);
	border-radius: 6px; font-size: 0.9375rem;
	background: var(--white, #fff); color: var(--ink, #1a1f33);
	margin-top: 4px;
}

/* Place order */
.ama-checkout-widget .place-order { margin-top: 20px; }
.ama-checkout-widget #place_order,
.ama-checkout-widget #place_order.button,
.ama-checkout-widget button#place_order {
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	width: 100% !important;
	min-height: 52px !important;
	border-radius: 8px !important;
	font-size: 1rem !important;
	font-weight: 700 !important;
	padding: 0 !important;
	background: #0d2160 !important;
	background: var(--blue-deep, #0d2160) !important;
	color: #ffffff !important;
	border: 2px solid #0d2160 !important;
	border: 2px solid var(--blue-deep, #0d2160) !important;
	cursor: pointer !important;
	letter-spacing: .04em !important;
	text-transform: uppercase !important;
}
.ama-checkout-widget #place_order:hover,
.ama-checkout-widget #place_order.button:hover,
.ama-checkout-widget button#place_order:hover {
	background: #1a3290 !important;
	border-color: #1a3290 !important;
	color: #ffffff !important;
}
.ama-checkout-widget .place-order .required-field-message {
	font-size: 0.75rem; color: var(--ink-soft, #4a5474);
	margin-top: 10px; text-align: center; display: block;
}

/* ── "Have a coupon?" toggle on Checkout ───────────────────────────────── */
/* WooCommerce renders this as a .woocommerce-info box above the checkout form */
.ama-checkout-widget .woocommerce-form-coupon-toggle,
.ama-checkout-widget .woocommerce-form-coupon-toggle .woocommerce-info {
	background: transparent !important;
	border: 1.5px solid var(--rule, #d4c8b0) !important;
	border-radius: 8px !important;
	padding: 10px 16px !important;
	margin-bottom: 20px !important;
	font-size: 0.8125rem !important;
	color: var(--ink-soft, #4a5474) !important;
	box-shadow: none !important;
}
.ama-checkout-widget .woocommerce-form-coupon-toggle .woocommerce-info::before {
	display: none !important; /* hide WC's info icon */
}
.ama-checkout-widget .woocommerce-form-coupon-toggle a.showcoupon {
	color: var(--blue-deep, #0d2160) !important;
	font-weight: 700;
	text-decoration: underline;
}
.ama-checkout-widget .woocommerce-form-coupon-toggle a.showcoupon:hover {
	color: var(--red, #d6362f) !important;
}
/* The coupon form that slides in when "click here" is tapped */
.ama-checkout-widget .checkout_coupon.woocommerce-form-coupon {
	background: var(--cream, #faf6ee);
	border: 1.5px solid var(--rule, #d4c8b0);
	border-radius: 8px;
	padding: 20px;
	margin-bottom: 20px;
}

/* ── Coupon visibility — controlled by widget setting ───────────────────── */
/* Cart: hide coupon row entirely */
.ama-cart-widget--no-coupon .ama-cart-coupon { display: none !important; }
/* Checkout: hide the "Have a coupon?" toggle and the coupon form */
.ama-checkout-widget--no-coupon .woocommerce-form-coupon-toggle { display: none !important; }
.ama-checkout-widget--no-coupon .checkout_coupon { display: none !important; }

/* ── GST field ──────────────────────────────────────────────────────────── */
.ama-gst-section { margin-top: 8px; }
.ama-gst-question__label {
	display: block;
	font-weight: 700; font-size: 0.8125rem;
	color: var(--blue-deep, #0d2160);
	margin-bottom: 10px;
}
.ama-gst-options { display: flex; gap: 12px; flex-wrap: wrap; }
.ama-gst-option {
	display: inline-flex;
	align-items: center; gap: 8px;
	font-size: 0.875rem; font-weight: 600;
	color: var(--ink, #1a1f33);
	cursor: pointer;
	padding: 9px 16px;
	border: 1.5px solid var(--rule, #d4c8b0);
	border-radius: 8px;
	transition: border-color .15s ease, background .15s ease;
}
.ama-gst-option:has(input:checked) {
	border-color: var(--blue-deep, #0d2160);
	background: var(--blue-soft, #e6ebf7);
	color: var(--blue-deep, #0d2160);
}
.ama-gst-option input[type="radio"] { accent-color: var(--blue-deep, #0d2160); }
.ama-gst-number-wrap { margin-top: 4px !important; }
.ama-gst-hint { font-size: 0.75rem; color: var(--ink-soft, #4a5474); margin-top: 4px; display: block; }

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 960px) {
	.ama-checkout-widget form.checkout.woocommerce-checkout { grid-template-columns: 1fr; }
	.ama-checkout-widget #customer_details { grid-column: 1; grid-row: 1; }
	.ama-checkout-widget #order_review { grid-column: 1; grid-row: 2; position: static; }
}
@media (max-width: 600px) {
	.ama-checkout-widget .woocommerce-billing-fields__field-wrapper,
	.ama-checkout-widget .woocommerce-shipping-fields__field-wrapper { grid-template-columns: 1fr; }
	.ama-checkout-widget p.form-row-first,
	.ama-checkout-widget p.form-row-last { grid-column: 1; }
	.ama-gst-options { flex-direction: column; }
}


/* ── GST check-digit confirmation ─────────────────────────────────────────
   Shown only after a submitted GSTIN has failed its check digit. Styled as a
   caution rather than an error: the number is probably a typo, but the
   customer is allowed to insist, and the copy has to read as a question
   rather than a refusal. */
.ama-gst-confirm {
    margin-top: 10px;
    padding: 12px 14px;
    border: 1px solid #e0ab5c;
    border-left: 3px solid #b45309;
    border-radius: 4px;
    background: #fdf7ec;
}
.ama-gst-confirm__label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 0.875rem;
    line-height: 1.5;
    color: #4a3a1a;
}
.ama-gst-confirm__label input[type="checkbox"] {
    flex: 0 0 auto;
    margin-top: 3px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}
.ama-gst-confirm__label strong { display: block; color: #7a4a08; }

/* ══════════════════════════════════════════════════════════════════════════
   PAYMENT METHODS WITH A GATEWAY LOGO
   ══════════════════════════════════════════════════════════════════════════
   WooCommerce renders the icon INSIDE the label, after the title:

       <label for="payment_method_x">Title <img src="logo.png"></label>

   and it caps the size of exactly one gateway — PayPal. Every other gateway's
   logo arrives at whatever width it ships. On the narrow checkout column that
   pushed "Credit Card/Debit Card/NetBanking" onto three lines and ran the logo
   past the edge, where the <li>'s `overflow: hidden` (there for the rounded
   corners) cut it off.

   These selectors include #payment deliberately. WooCommerce's own rule for
   the icon is `.woocommerce-checkout #payment ul.payment_methods li img`,
   which carries an ID — no number of repeated classes can outrank that, so the
   choice is to match the ID or use !important. Matching it is the cleaner of
   the two, and the rest of this file already scopes that way.
   ══════════════════════════════════════════════════════════════════════════ */

/* Logo first, then the title. The title is a bare text node, which cannot be
   given an `order` of its own — but the <img> is a real flex item, so moving
   it to -1 puts it ahead of the anonymous text item sitting at 0. */
.ama-checkout-widget #payment ul.wc_payment_methods li.wc_payment_method > label img {
	order: -1;
	flex: 0 0 auto;
	width: auto;
	max-width: 76px;
	max-height: 26px;
	margin: 0;
	object-fit: contain;
}

/* min-width:0 lets the title shrink rather than forcing the row wider than the
   column; without it a long method name cannot wrap below its longest word. */
.ama-checkout-widget #payment ul.wc_payment_methods li.wc_payment_method > label {
	min-width: 0;
	flex-wrap: wrap;
}

/* ── Selected state, logo methods only ─────────────────────────────────────
   A gateway logo is drawn to sit on white. On the navy selected row it went
   muddy and the brand colour fought the background, so for these methods the
   row stays light and the selection is carried by the border and by the panel
   underneath instead. Methods without a logo keep the navy row exactly as
   before — :has(label img) is what separates the two. */
.ama-checkout-widget ul.wc_payment_methods li.wc_payment_method:has(label img).active,
.ama-checkout-widget ul.wc_payment_methods li.wc_payment_method:has(label img):has(input:checked) {
	background: var(--white, #fff);
}
.ama-checkout-widget ul.wc_payment_methods li.wc_payment_method:has(label img).active > label,
.ama-checkout-widget ul.wc_payment_methods li.wc_payment_method:has(label img):has(input:checked) > label {
	color: var(--ink, #1a1f33);
}

/* The panel below now carries the emphasis. */
.ama-checkout-widget #payment ul.wc_payment_methods li.wc_payment_method:has(label img) > div.payment_box {
	background: var(--blue-deep, #0d2160);
	border-top-color: var(--blue-deep, #0d2160);
	color: var(--cream, #faf6ee);
}
/* Woo draws the little pointer above the panel as a border triangle in
   #dcd7e2; left alone it would be a pale notch on a navy box. */
.ama-checkout-widget #payment ul.wc_payment_methods li.wc_payment_method:has(label img) > div.payment_box::before {
	border-bottom-color: var(--blue-deep, #0d2160);
}
.ama-checkout-widget #payment ul.wc_payment_methods li.wc_payment_method:has(label img) > div.payment_box a {
	color: var(--cream, #faf6ee);
	text-decoration: underline;
}
