/**
 * Flycart Checkout — cart page styles.
 *
 * Loaded only when fcx_is_cart_takeover() is true (see inc/fcx-cart.php).
 *
 * Mirrors assets/css/checkout.css: same tokens, same white-card-on-#f6f8fb
 * shell, the same 1fr / summary grid and the same blue CTA, so the cart and the
 * checkout read as a single funnel. Tokens are redeclared here because
 * checkout.css is not loaded on the cart page.
 */

:root {
	--fcx-blue: #2f7df6;
	--fcx-blue-dark: #1d5fd0;
	--fcx-blue-tint: #eef4fe;
	--fcx-ink: #0f1b2d;
	--fcx-ink-soft: #4b5871;
	--fcx-ink-faint: #8b96ab;
	--fcx-line: #e3e8f0;
	--fcx-page-bg: #f6f8fb;
	--fcx-green: #0e9f6e;
	--fcx-green-tint: #e6f7f0;
	--fcx-red: #d92d20;
	--fcx-radius: 12px;
	--fcx-shadow: 0 1px 2px rgba(15, 27, 45, .05), 0 8px 24px rgba(15, 27, 45, .06);
	--fcx-focus: 0 0 0 3px rgba(47, 125, 246, .25);
}

/* ------------------------------------------------------------ Page shell */

.fcx-cart-page {
	background: var(--fcx-page-bg);
	color: var(--fcx-ink);
	font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	font-size: 15px;
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
}

.fcx-cart-page a {
	text-decoration: none !important;
}

.fcx-cart-page .site-content {
	padding-top: 32px;
}

/* Storefront keeps .content-area narrow to leave room for the sidebar we
   removed. Reclaim the full width. */
.fcx-cart-page .content-area {
	float: none;
	margin-right: 0;
	width: 100%;
}

.fcx-cart-page .site-footer {
	background: transparent;
	padding: 0;
}

/* ---------------------------------------------------------------- Topbar */

.fcx-cart-page .site-header {
	background: #fff;
	border-bottom: 1px solid var(--fcx-line);
	margin-bottom: 0;
	padding: 14px 0;
}

.fcx-cart-page .site-header .col-full {
	align-items: center;
	display: flex;
	gap: 16px;
	justify-content: space-between;
	max-width: 1080px;
}

.fcx-cart-page .site-branding,
.fcx-cart-page .fcx-topbar-actions {
	flex: 1 1 0;
	min-width: 0;
}

.fcx-cart-page .site-branding {
	float: none;
	margin: 0;
	padding: 0;
	width: auto;
}

/* Brand logo. */
.fcx-cart-page .fcx-logo-link {
	align-items: center;
	display: inline-flex;
}

.fcx-cart-page .fcx-logo {
	display: block;
	height: 30px !important;
	max-width: 160px;
	width: auto !important;
}

/* Belt-and-suspenders: if Storefront's own branding ever renders too, hide it so
   only the logo shows. */
.fcx-cart-page .site-branding:not(.fcx-branding) {
	display: none;
}

/* Right-hand group: cart icon + back link, pinned to the right. */
.fcx-cart-page .fcx-topbar-actions {
	align-items: center;
	display: flex;
	gap: 16px;
	justify-content: flex-end;
}

.fcx-cart-page .fcx-topbar-cart {
	align-items: center;
	color: var(--fcx-ink-soft);
	display: inline-flex;
	flex: none;
}

.fcx-cart-page .fcx-topbar-cart:hover,
.fcx-cart-page .fcx-topbar-cart:focus {
	color: var(--fcx-blue);
}

.fcx-cart-page .site-branding .site-title,
.fcx-cart-page .site-branding .site-title a {
	color: var(--fcx-ink);
	font-size: 17px;
	font-weight: 700;
	letter-spacing: -.01em;
	line-height: 1.3;
	margin: 0;
	text-decoration: none;
}

.fcx-cart-page .site-branding .site-description {
	display: none;
}

.fcx-cart-page .fcx-topbar-badge {
	align-items: center;
	color: var(--fcx-ink-soft);
	display: flex;
	font-size: 13px;
	font-weight: 600;
	gap: 7px;
	white-space: nowrap;
}

.fcx-cart-page .fcx-topbar-badge .fcx-shield {
	color: var(--fcx-green);
	flex: none;
}

.fcx-cart-page .fcx-topbar-back {
	color: var(--fcx-ink-faint);
	font-size: 13px;
	text-align: right;
	white-space: nowrap;
}

.fcx-cart-page .fcx-topbar-back:hover,
.fcx-cart-page .fcx-topbar-back:focus {
	color: var(--fcx-blue);
}

/* ---------------------------------------------------------------- Layout */

.fcx-cart-shell {
	margin: 0 auto;
	max-width: 1080px;
	padding-bottom: 72px;
}

.fcx-cart-intro {
	margin-bottom: 24px;
}

.fcx-cart-title {
	color: var(--fcx-ink);
	font-size: 22px;
	font-weight: 700;
	letter-spacing: -.02em;
	line-height: 1.3;
	margin: 0 0 4px;
}

.fcx-cart-sub {
	color: var(--fcx-ink-soft);
	font-size: 14px;
	margin: 0;
}

.fcx-cart-grid {
	align-items: start;
	display: grid;
	gap: 40px;
	grid-template-columns: minmax(0, 1fr) 380px;
}

.fcx-cart-main,
.fcx-cart-side {
	min-width: 0;
}

.fcx-cart-side {
	position: sticky;
	top: 24px;
}

/* The collaterals div is emptied in PHP (its pieces are re-placed elsewhere) but
   still renders as a third grid child — hide it so the grid stays two columns. */
.fcx-cart-grid > .cart-collaterals {
	display: none;
}

/* ------------------------------------------------------ Line items (card) */

.fcx-cart-main .woocommerce-cart-form {
	background: #fff;
	border: 1px solid var(--fcx-line);
	border-radius: var(--fcx-radius);
	box-shadow: var(--fcx-shadow);
	overflow: hidden;
}

.fcx-cart-page .woocommerce-cart-form table.cart,
.fcx-cart-page table.shop_table.cart {
	background: none;
	border: 0;
	border-collapse: collapse;
	margin: 0;
	/* Fixed layout gives the columns exactly the widths set below, so the long
	   product name gets a real share instead of collapsing to a sliver and
	   breaking mid-word. The coupon / Update-cart row is moved out of the table
	   by cart.js (its colspan cell breaks fixed layout), so only item rows are
	   left here — see .fcx-cart-actions below. */
	table-layout: fixed;
	width: 100%;
}

.fcx-cart-page .woocommerce-cart-form table.cart th.product-remove,
.fcx-cart-page .woocommerce-cart-form table.cart td.product-remove {
	width: 44px;
}

.fcx-cart-page .woocommerce-cart-form table.cart th.product-thumbnail,
.fcx-cart-page .woocommerce-cart-form table.cart td.product-thumbnail {
	width: 64px;
}

.fcx-cart-page .woocommerce-cart-form table.cart th.product-price,
.fcx-cart-page .woocommerce-cart-form table.cart td.product-price {
	width: 90px;
}

.fcx-cart-page .woocommerce-cart-form table.cart th.product-quantity,
.fcx-cart-page .woocommerce-cart-form table.cart td.product-quantity {
	width: 96px;
}

.fcx-cart-page .woocommerce-cart-form table.cart th.product-subtotal,
.fcx-cart-page .woocommerce-cart-form table.cart td.product-subtotal {
	width: 92px;
}

/* Wrap the title on word boundaries; only break inside a word if a single word
   is genuinely wider than the column. */
.fcx-cart-page td.product-name {
	hyphens: none;
	overflow-wrap: anywhere;
	word-break: normal;
}

/* Tighter side padding on the narrow columns so their content is not clipped
   by the 18px gutter the wide cells use. */
.fcx-cart-page .woocommerce-cart-form table.cart th.product-price,
.fcx-cart-page .woocommerce-cart-form table.cart th.product-quantity,
.fcx-cart-page .woocommerce-cart-form table.cart th.product-subtotal,
.fcx-cart-page .woocommerce-cart-form table.cart td.product-thumbnail,
.fcx-cart-page .woocommerce-cart-form table.cart td.product-price,
.fcx-cart-page .woocommerce-cart-form table.cart td.product-quantity,
.fcx-cart-page .woocommerce-cart-form table.cart td.product-subtotal {
	padding-left: 8px;
	padding-right: 8px;
}

/* Column headers: quiet, uppercase, hairline underneath. */
.fcx-cart-page .woocommerce-cart-form table.cart thead th {
	background: none;
	border: 0;
	border-bottom: 1px solid var(--fcx-line);
	color: var(--fcx-ink-faint);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .05em;
	padding: 14px 18px;
	text-transform: uppercase;
}

.fcx-cart-page .woocommerce-cart-form table.cart thead th.product-price,
.fcx-cart-page .woocommerce-cart-form table.cart thead th.product-quantity,
.fcx-cart-page .woocommerce-cart-form table.cart thead th.product-subtotal {
	text-align: center;
}

.fcx-cart-page .woocommerce-cart-form table.cart td {
	background: none;
	border: 0;
	border-bottom: 1px solid var(--fcx-line);
	padding: 18px;
	vertical-align: middle;
}

.fcx-cart-page .woocommerce-cart-form .cart_item:last-child td {
	border-bottom: 1px solid var(--fcx-line);
}

/* Remove column: a plain × mark, no background pill. */
.fcx-cart-page td.product-remove {
	padding-right: 0;
	text-align: center;
	width: 44px;
}

.fcx-cart-page td.product-remove a.remove {
	align-items: center;
	background: none !important;
	color: var(--fcx-ink-faint) !important;
	display: inline-flex;
	font-size: 18px;
	height: 26px;
	justify-content: center;
	line-height: 1;
	width: 26px;
}

.fcx-cart-page td.product-remove a.remove:hover {
	background: none !important;
	color: var(--fcx-red) !important;
}

/* Thumbnail. */
.fcx-cart-page td.product-thumbnail img {
	border: 1px solid var(--fcx-line);
	border-radius: 10px;
	display: block;
	height: auto;
	width: 48px;
}

/* Product name + any variation meta. */
.fcx-cart-page td.product-name a {
	color: var(--fcx-ink);
	font-size: 14.5px;
	font-weight: 700;
	letter-spacing: -.01em;
}

.fcx-cart-page td.product-name a:hover {
	color: var(--fcx-blue);
}

.fcx-cart-page td.product-name .variation,
.fcx-cart-page td.product-name dl.variation {
	color: var(--fcx-ink-soft);
	font-size: 12.5px;
	margin: 4px 0 0;
}

.fcx-cart-page td.product-name .variation dt,
.fcx-cart-page td.product-name .variation dd {
	display: inline;
	margin: 0;
}

.fcx-cart-page td.product-name .variation dd p {
	margin: 0;
}

.fcx-cart-page td.product-price,
.fcx-cart-page td.product-subtotal {
	color: var(--fcx-ink);
	font-weight: 600;
	text-align: center;
}

.fcx-cart-page td.product-subtotal {
	font-weight: 700;
}

/* Quantity stepper. */
.fcx-cart-page td.product-quantity {
	text-align: center;
}

.fcx-cart-page .product-quantity .quantity {
	display: inline-flex;
}

.fcx-cart-page .product-quantity .quantity input.qty {
	appearance: textfield;
	background: #fff;
	border: 1.5px solid var(--fcx-line);
	border-radius: 9px;
	color: var(--fcx-ink);
	font-family: inherit;
	font-size: 15px;
	font-weight: 600;
	height: auto;
	padding: 9px 6px;
	text-align: center;
	width: 62px;
}

.fcx-cart-page .product-quantity .quantity input.qty:focus {
	border-color: var(--fcx-blue);
	box-shadow: var(--fcx-focus);
	outline: none;
}

/* ------------------------------------------------------------- Cart actions */

/* cart.js moves the coupon field, Apply and Update cart out of the table's
   colspan row into this full-width bar (a colspan cell can't coexist with the
   fixed column widths above). It sits inside the items card, as its footer. The
   original table row is hidden; without JS it stays in place as a fallback. */
.fcx-cart-page .fcx-cart-actions {
	align-items: flex-start;
	background: var(--fcx-page-bg);
	border-top: 1px solid var(--fcx-line);
	display: flex;
	flex-direction: row;
	flex-wrap: nowrap;
	gap: 10px;
	justify-content: space-between;
	padding: 16px 18px;
}

.fcx-cart-page .fcx-cart-actions .coupon {
	align-items: center;
	display: flex;
	/* Wrap so WooCommerce's error message can drop to its own line; the input +
	   Apply still share the first line (they fit well within the coupon block). */
	flex-wrap: wrap;
	float: none;
	gap: 8px;
	margin: 0;
	min-width: 0;
}

.fcx-cart-page .fcx-cart-actions .coupon label {
	display: none;
}

/* WooCommerce injects its coupon error inline after the field, which pushed the
   row two lines tall. Force it onto its own full-width line, small and red, so
   the coupon input, Apply and Update cart stay on a single line above it. */
.fcx-cart-page .fcx-cart-actions .coupon-error-notice {
	background: none;
	color: var(--fcx-red);
	flex: 1 0 100%;
	font-size: 12.5px;
	font-weight: 500;
	line-height: 1.4;
	margin: 6px 0 0;
	padding: 0;
}

.fcx-cart-page .fcx-cart-actions .coupon-success-notice {
	color: #0a7d57;
}

.fcx-cart-page .fcx-cart-actions input#coupon_code {
	/* !important beats Storefront's grey .input-text fill and its even-row cell
	   background so the field is clean white. */
	background: #fff !important;
	border: 1.5px solid var(--fcx-line);
	border-radius: 9px;
	box-shadow: none;
	color: var(--fcx-ink);
	/* Shrinks when the column is tight so all three stay on one line. */
	flex: 1 1 auto;
	font-family: inherit;
	font-size: 14px;
	max-width: 220px;
	min-width: 90px;
	padding: 10px 12px;
	text-transform: uppercase;
	width: auto;
}

.fcx-cart-page .fcx-cart-actions input#coupon_code:focus {
	border-color: var(--fcx-blue);
	box-shadow: var(--fcx-focus);
	outline: none;
}

/* Secondary (outline) button for "Apply coupon". */
.fcx-cart-page .fcx-cart-actions button[name="apply_coupon"] {
	background: #fff;
	border: 1.5px solid var(--fcx-blue);
	border-radius: 9px;
	color: var(--fcx-blue);
	cursor: pointer;
	flex: none;
	font-family: inherit;
	font-size: 13.5px;
	font-weight: 700;
	padding: 10px 16px;
	text-shadow: none;
	white-space: nowrap;
}

.fcx-cart-page .fcx-cart-actions button[name="apply_coupon"]:hover,
.fcx-cart-page .fcx-cart-actions button[name="apply_coupon"]:focus {
	background: var(--fcx-blue-tint);
	color: var(--fcx-blue-dark);
}

/* "Update cart" — pushed to the far right. Disabled (nothing changed) it is a
   quiet grey label; once a quantity changes it becomes an active outline button
   so it clearly reads as clickable. */
.fcx-cart-page .fcx-cart-actions button[name="update_cart"] {
	background: none;
	border: 1.5px solid transparent;
	border-radius: 9px;
	box-shadow: none;
	color: var(--fcx-ink-soft);
	cursor: pointer;
	flex: none;
	font-family: inherit;
	font-size: 13.5px;
	font-weight: 600;
	margin-left: auto;
	padding: 10px 16px;
	text-shadow: none;
	transition: border-color .15s, background .15s, color .15s;
	white-space: nowrap;
}

/* Active state — a real button. */
.fcx-cart-page .fcx-cart-actions button[name="update_cart"]:not([disabled]) {
	background: #fff;
	border-color: var(--fcx-blue);
	color: var(--fcx-blue);
}

.fcx-cart-page .fcx-cart-actions button[name="update_cart"]:not([disabled]):hover,
.fcx-cart-page .fcx-cart-actions button[name="update_cart"]:not([disabled]):focus {
	background: var(--fcx-blue);
	color: #fff;
}

.fcx-cart-page .fcx-cart-actions button[name="update_cart"][disabled] {
	cursor: default;
	opacity: .55;
}

/* --------------------------------------------------------------- Summary */

.fcx-cart-summary {
	background: #fff;
	border: 1px solid var(--fcx-line);
	border-radius: var(--fcx-radius);
	box-shadow: var(--fcx-shadow);
	margin-bottom: 16px;
	padding: 20px 22px;
}

.fcx-cart-page .cart_totals {
	float: none;
	width: 100%;
}

.fcx-cart-page .cart_totals h2 {
	color: var(--fcx-ink);
	font-size: 16px;
	font-weight: 700;
	letter-spacing: -.01em;
	margin: 0 0 14px;
	padding: 0;
}

.fcx-cart-page .cart_totals table.shop_table,
.fcx-cart-page .cart_totals table.shop_table_responsive {
	border: 0;
	border-collapse: collapse;
	margin: 0;
	width: 100%;
}

.fcx-cart-page .cart_totals table th,
.fcx-cart-page .cart_totals table td {
	/* !important beats Storefront's even-row stripe (#fbfbfb), which otherwise
	   puts a grey band behind the coupon-discount row. */
	background: none !important;
	border: 0;
	color: var(--fcx-ink-soft);
	font-size: 14px;
	font-weight: 400;
	padding: 0 0 10px;
	text-align: left;
}

.fcx-cart-page .cart_totals table td {
	color: var(--fcx-ink);
	font-weight: 600;
	text-align: right;
}

.fcx-cart-page .cart_totals table .cart-subtotal th {
	font-weight: 400;
}

/* Grand total row. */
.fcx-cart-page .cart_totals table .order-total th,
.fcx-cart-page .cart_totals table .order-total td {
	border-top: 1px solid var(--fcx-line);
	color: var(--fcx-ink);
	font-size: 17px;
	font-weight: 800;
	padding: 12px 0 0;
}

.fcx-cart-page .cart_totals table .order-total .amount {
	color: var(--fcx-ink);
}

/* Discount row once a coupon sticks. */
.fcx-cart-page .cart_totals table .cart-discount th,
.fcx-cart-page .cart_totals table .cart-discount td {
	color: var(--fcx-green);
	font-weight: 600;
}

.fcx-cart-page .cart_totals .woocommerce-remove-coupon {
	color: var(--fcx-ink-faint);
	font-size: 12.5px;
	margin-left: 6px;
}

/* Proceed-to-checkout CTA — the checkout's place-order button, restated. */
.fcx-cart-page .wc-proceed-to-checkout {
	/* Storefront adds margin-bottom: 1.618em; drop it so the CTA sits flush. */
	margin-bottom: 0;
	padding: 4px 0 0;
}

.fcx-cart-page .wc-proceed-to-checkout a.checkout-button {
	align-items: center;
	background: var(--fcx-blue);
	border: 0;
	border-radius: 11px;
	box-shadow: 0 4px 14px rgba(47, 125, 246, .35);
	color: #fff;
	display: flex;
	font-family: inherit;
	font-size: 16px;
	font-weight: 700;
	justify-content: center;
	letter-spacing: -.01em;
	margin: 16px 0 0;
	padding: 15px 16px;
	text-align: center;
	transition: background .15s, transform .1s;
	width: 100%;
}

.fcx-cart-page .wc-proceed-to-checkout a.checkout-button:hover,
.fcx-cart-page .wc-proceed-to-checkout a.checkout-button:focus {
	background: var(--fcx-blue-dark);
	color: #fff;
}

.fcx-cart-page .wc-proceed-to-checkout a.checkout-button:active {
	transform: scale(.99);
}

/* ------------------------------------------------------------- Empty cart */

/* Centered message + CTA-styled button, matching the checkout. WooCommerce
   renders these two paragraphs (cart-empty.php) with no wrapper of our own. */
.fcx-cart-page .cart-empty.woocommerce-info {
	background: none;
	border: 0;
	color: var(--fcx-ink);
	font-size: 20px;
	font-weight: 700;
	letter-spacing: -.01em;
	margin: 0;
	padding: 64px 0 0;
	text-align: center;
}

/* WooCommerce's info-notice icon. */
.fcx-cart-page .cart-empty.woocommerce-info::before {
	display: none;
}

.fcx-cart-page .return-to-shop {
	margin: 20px 0 64px;
	text-align: center;
}

.fcx-cart-page .return-to-shop a.button {
	background: var(--fcx-blue) !important;
	border: 0 !important;
	border-radius: 11px !important;
	box-shadow: 0 4px 14px rgba(47, 125, 246, .35);
	color: #fff !important;
	display: inline-flex;
	font-family: inherit;
	font-size: 16px;
	font-weight: 700;
	letter-spacing: -.01em;
	padding: 15px 28px !important;
	text-shadow: none;
	transition: background .15s;
}

.fcx-cart-page .return-to-shop a.button:hover,
.fcx-cart-page .return-to-shop a.button:focus {
	background: var(--fcx-blue-dark) !important;
	color: #fff !important;
}

/* --------------------------------------------------------- Guarantee / trust */

.fcx-cart-side .fcx-guarantee {
	background: var(--fcx-green-tint);
	border: 1px solid #bfe8d8;
	border-radius: var(--fcx-radius);
	box-shadow: var(--fcx-shadow);
	display: flex;
	gap: 12px;
	margin: 0 0 16px;
	padding: 16px 20px;
}

.fcx-cart-side .fcx-guarantee-icon {
	color: var(--fcx-green);
	flex: none;
	margin-top: 1px;
}

.fcx-cart-side .fcx-guarantee-title {
	color: #0a7d57;
	font-size: 13.5px;
	font-weight: 700;
	margin: 0;
}

.fcx-cart-side .fcx-guarantee-text {
	color: #256a51;
	font-size: 12.5px;
	line-height: 1.5;
	margin: 2px 0 0;
}

.fcx-cart-side .fcx-trust {
	color: var(--fcx-ink-faint);
	display: flex;
	flex-wrap: wrap;
	font-size: 12px;
	gap: 8px 18px;
	justify-content: center;
	list-style: none;
	margin: 0;
	padding: 0;
}

.fcx-cart-side .fcx-trust li {
	align-items: center;
	display: flex;
	gap: 6px;
	margin: 0;
}

/* ----------------------------------------------------------------- Extras */

/* Cross-sells and the marketing bundle cards, full width below the grid. */
.fcx-cart-extras {
	margin-top: 40px;
}

.fcx-cart-extras .cross-sells {
	margin-bottom: 40px;
}

.fcx-cart-extras .cross-sells > h2 {
	color: var(--fcx-ink);
	font-size: 18px;
	font-weight: 700;
	letter-spacing: -.01em;
	margin: 0 0 18px;
}

/* The site's bundle cards ship with their own layout; only reset the collaterals
   flex rule the inline stylesheet set, which no longer applies here. */
.fcx-cart-extras .bundle-cards-container {
	margin: 0;
}

/* ------------------------------------------------------- Applied-coupon chips */

.fcx-cart-page .fcx-coupon-chips {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-bottom: 14px;
}

.fcx-cart-page .fcx-coupon-chips:not(.fcx-has-coupons) {
	display: none;
	margin: 0;
}

.fcx-cart-page .fcx-coupon-chip {
	align-items: center;
	background: var(--fcx-green-tint);
	border: 1px solid #bfe8d8;
	border-radius: 10px;
	color: #0a7d57;
	display: flex;
	font-size: 13.5px;
	gap: 10px;
	padding: 10px 12px;
}

.fcx-cart-page .fcx-coupon-chip-tick {
	background: url( 'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><circle cx="10" cy="10" r="10" fill="%230e9f6e"/><path d="M5.8 10.4l2.6 2.6 5-5.6" fill="none" stroke="%23fff" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"/></svg>' ) no-repeat center / contain;
	flex: none;
	height: 18px;
	width: 18px;
}

.fcx-cart-page .fcx-coupon-chip-text {
	flex: 1 1 auto;
}

.fcx-cart-page .fcx-coupon-chip-text strong {
	color: #0a7d57;
	font-weight: 800;
}

.fcx-cart-page a.fcx-coupon-chip-x {
	background: none !important;
	border: 0;
	color: #7ba895 !important;
	cursor: pointer;
	flex: none;
	font-size: 18px;
	line-height: 1;
	padding: 0 2px;
	text-decoration: none !important;
}

.fcx-cart-page a.fcx-coupon-chip-x:hover,
.fcx-cart-page a.fcx-coupon-chip-x:focus {
	color: var(--fcx-red) !important;
}

/* The chip carries the remove control now, so hide the inline [Remove] link in
   the totals and make the discount line bold green. */
.fcx-cart-page .cart_totals .cart-discount .woocommerce-remove-coupon {
	display: none;
}

.fcx-cart-page .cart_totals table .cart-discount th,
.fcx-cart-page .cart_totals table .cart-discount td {
	color: var(--fcx-green);
	font-weight: 700;
}

/* -------------------------------------------------------------- Handheld */

@media (max-width: 920px) {
	.fcx-cart-grid {
		display: flex;
		flex-direction: column;
	}

	/* Keep the items first on the cart (unlike the checkout, where the summary
	   leads) — the shopper is still editing quantities here. */
	.fcx-cart-side {
		position: static;
	}

	.fcx-cart-title {
		font-size: 20px;
	}
}

/* 768px matches Storefront's own shop_table_responsive breakpoint, so our clean
   card layout replaces its default stacking rather than fighting it. */
@media (max-width: 768px) {
	.fcx-cart-shell {
		padding: 24px 14px 56px;
	}

	.fcx-cart-title {
		font-size: 19px;
	}

	/* Turn each line item into a stacked card: thumbnail + name on top, then the
	   price / quantity / subtotal as labelled rows (the fixed column widths above
	   would otherwise overflow a phone). */
	.fcx-cart-page .woocommerce-cart-form table.cart,
	.fcx-cart-page .woocommerce-cart-form table.cart tbody {
		display: block;
	}

	.fcx-cart-page .woocommerce-cart-form table.cart thead {
		display: none;
	}

	.fcx-cart-page .woocommerce-cart-form table.cart tr.cart_item {
		border-bottom: 1px solid var(--fcx-line);
		display: block;
		min-height: 76px;
		padding: 16px 14px 12px 74px;
		position: relative;
	}

	.fcx-cart-page .woocommerce-cart-form table.cart td {
		align-items: center;
		border: 0;
		display: flex;
		justify-content: space-between;
		padding: 4px 0;
		text-align: right;
		width: auto !important;
	}

	/* Thumbnail pinned top-left, remove × pinned top-right. The full table prefix
	   is needed so these beat the generic `td` flex rule above on specificity. */
	.fcx-cart-page .woocommerce-cart-form table.cart td.product-thumbnail {
		display: block;
		left: 14px;
		padding: 0;
		position: absolute;
		top: 16px;
		width: 48px;
	}

	.fcx-cart-page .woocommerce-cart-form table.cart td.product-thumbnail img {
		width: 48px;
	}

	.fcx-cart-page .woocommerce-cart-form table.cart td.product-remove {
		display: block;
		padding: 0;
		position: absolute;
		right: 10px;
		top: 12px;
		width: auto;
	}

	/* Align the × glyph inside the remove control on mobile. */
	.fcx-cart-page .woocommerce-cart-form table.cart td.product-remove a.remove::before {
		bottom: 0;
		font-size: 1em;
		left: 0;
		right: 5px;
		top: 5px;
	}

	.fcx-cart-page .woocommerce-cart-form table.cart td.product-name {
		display: block;
		font-weight: 700;
		padding: 0 26px 8px 0;
		text-align: left;
	}

	/* No label in front of the name / thumbnail / remove cells. */
	.fcx-cart-page .woocommerce-cart-form table.cart td.product-name::before,
	.fcx-cart-page .woocommerce-cart-form table.cart td.product-thumbnail::before,
	.fcx-cart-page .woocommerce-cart-form table.cart td.product-remove::before {
		display: none !important;
	}

	/* WooCommerce sets data-title on each cell — use it as the row label. */
	.fcx-cart-page td.product-price::before,
	.fcx-cart-page td.product-quantity::before,
	.fcx-cart-page td.product-subtotal::before {
		color: var(--fcx-ink-soft);
		content: attr(data-title);
		font-size: 12.5px;
		font-weight: 600;
	}

	/* Coupon / update-cart bar stacks vertically. */
	.fcx-cart-page .fcx-cart-actions {
		align-items: stretch;
		flex-direction: column;
	}

	/* Keep the coupon input + Apply on one line; the error still wraps below. */
	.fcx-cart-page .fcx-cart-actions .coupon {
		align-items: center;
		flex-wrap: wrap;
		gap: 8px;
		justify-content: flex-start;
	}

	/* flex-basis 0 so the input never grows enough to push Apply onto its own
	   line — it just shares the row and shrinks. */
	.fcx-cart-page .fcx-cart-actions input#coupon_code {
		flex: 1 1 0;
		max-width: none;
		min-width: 0;
	}

	.fcx-cart-page .fcx-cart-actions button[name="apply_coupon"] {
		flex: none;
	}

	.fcx-cart-page .fcx-cart-actions button[name="update_cart"] {
		margin-left: 0;
		text-align: center;
	}

	/* Topbar on mobile: logo left, cart icon right. Shrink the logo, size the
	   side groups to their content, and drop the centered "Secure checkout"
	   badge + back-link text so nothing overlaps in the narrow header. */
	.fcx-cart-page .site-header .col-full {
		gap: 10px;
	}

	.fcx-cart-page .fcx-logo {
		height: 24px !important;
	}

	.fcx-cart-page .site-branding,
	.fcx-cart-page .fcx-topbar-actions {
		flex: 0 0 auto;
	}

	.fcx-cart-page .fcx-topbar-badge {
		display: none;
	}

	.fcx-cart-page .fcx-topbar-back {
		display: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.fcx-cart-page * {
		animation: none !important;
		transition: none !important;
	}
}
