/**
 * Cart page — Lovable parity (https://flanfudge-direct.lovable.app/cart)
 *
 * @package FlanFudge
 */

/* Hide duplicate WP page title */
body.flanfudge-shop.woocommerce-cart .ff-shop-header {
	display: none;
}

body.flanfudge-shop.woocommerce-cart .flanfudge-shop-content {
	max-width: none;
}

/* ----- Page head ----- */

.ff-cart-page-head {
	margin-bottom: var(--ff-space-6);
}

.ff-cart-page-head__title {
	font-family: var(--ff-font-display);
	font-size: clamp(1.875rem, 2vw + 1rem, 2.25rem);
	font-weight: var(--ff-weight-medium);
	letter-spacing: -0.02em;
	line-height: 1.15;
	color: var(--ff-foreground);
	margin: 0;
}

/* ----- Empty cart (Lovable) ----- */

.ff-cart-empty {
	text-align: center;
	padding: clamp(64px, 12vw, 96px) var(--ff-gutter);
	max-width: none;
	align-items: center;
}

.ff-cart-empty__title {
	font-family: var(--ff-font-display);
	font-size: clamp(2rem, 4vw, 2.25rem);
	font-weight: var(--ff-weight-medium);
	color: var(--ff-foreground);
	margin: 0 0 var(--ff-space-3);
}

.ff-cart-empty__sub {
	font-size: var(--ff-text-base);
	color: color-mix(in oklch, var(--ff-foreground) 70%, transparent);
	margin: 0 0 var(--ff-space-6);
	line-height: 1.5;
}

.ff-cart-empty__cta {
	margin-inline: auto;
}

/* WhatsApp note under totals (inside order summary card) */
body.flanfudge-shop.woocommerce-cart .ff-cart-support-link {
	display: inline-flex;
	align-items: center;
	gap: var(--ff-space-2);
	margin-top: var(--ff-space-3);
	font-size: var(--ff-text-sm);
	font-weight: var(--ff-weight-medium);
	color: color-mix(in oklch, var(--ff-foreground) 70%, transparent);
	text-decoration: none;
}

body.flanfudge-shop.woocommerce-cart .ff-cart-support-link:hover {
	color: var(--ff-foreground);
}

/* =========================================================================
 * Cart totals sidebar — Lovable stacked row cards
 * https://flanfudge-direct.lovable.app/cart
 * ========================================================================= */

body.flanfudge-shop.woocommerce-cart {
	--ff-cart-totals-row-bg: color-mix(in oklch, var(--ff-mist) 92%, var(--ff-cream));
}

/* Column wrapper — no outer card */
body.flanfudge-shop.woocommerce-cart .wc-block-cart__sidebar,
body.flanfudge-shop.woocommerce-cart .wc-block-components-sidebar {
	min-width: 0;
	width: 100%;
	background: transparent;
	border: 0;
	border-radius: 0;
	padding: 0;
	box-shadow: none;
	position: static;
	top: auto;
}

/* Totals column — vertical stack with cream gaps between row cards */
body.flanfudge-shop.woocommerce-cart .wc-block-cart__sidebar .wp-block-woocommerce-cart-totals-block,
body.flanfudge-shop.woocommerce-cart .cart_totals {
	background: transparent;
	border: 0;
	border-radius: 0;
	padding: 0;
	box-shadow: none;
	position: sticky;
	top: 7rem;
	width: 100%;
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: var(--ff-space-2);
}

body.flanfudge-shop.woocommerce-cart .wc-block-cart__sidebar .wc-block-components-totals-wrapper {
	display: flex;
	flex-direction: column;
	gap: var(--ff-space-2);
	background: transparent;
	border: 0;
	border-radius: 0;
	padding: 0;
	box-shadow: none;
	margin: 0;
}

/* “CART TOTALS” — small caps label above the row cards */
body.flanfudge-shop.woocommerce-cart .cart_totals h2,
body.flanfudge-shop.woocommerce-cart .wc-block-components-totals-title,
body.flanfudge-shop.woocommerce-cart .wc-block-cart__sidebar .wc-block-components-totals-wrapper > h2,
body.flanfudge-shop.woocommerce-cart .wc-block-cart__sidebar .wp-block-woocommerce-cart-totals-block > h2 {
	font-family: inherit;
	font-size: var(--ff-text-xs);
	font-weight: var(--ff-weight-semibold);
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--ff-foreground);
	margin: 0 0 var(--ff-space-1);
	padding: 0;
	border: 0;
	background: transparent;
	line-height: 1.3;
}

/* Shared sage row card (legacy direct children) */
body.flanfudge-shop.woocommerce-cart .wc-block-components-totals-wrapper > .wc-block-components-totals-coupon,
body.flanfudge-shop.woocommerce-cart .wc-block-components-totals-wrapper > .wc-block-components-totals-item,
body.flanfudge-shop.woocommerce-cart .wc-block-components-totals-wrapper > .wc-block-components-totals-shipping,
body.flanfudge-shop.woocommerce-cart .wc-block-components-totals-wrapper > .wc-block-components-totals-footer-item,
body.flanfudge-shop.woocommerce-cart .wc-block-components-totals-wrapper > .wc-block-components-totals-discount,
body.flanfudge-shop.woocommerce-cart .wc-block-components-totals-wrapper > .wc-block-components-totals-fees {
	background: var(--ff-cart-totals-row-bg);
	border: 1px solid color-mix(in oklch, var(--ff-border) 55%, transparent);
	border-radius: var(--ff-radius-xl);
	padding: 14px 16px;
	margin: 0;
	box-shadow: none;
}

/* Order summary shell — no outer border */
body.flanfudge-shop.woocommerce-cart .wp-block-woocommerce-cart-order-summary-block {
	border: 0;
	box-shadow: none;
	background: transparent;
}

/* WC 8.9+ order summary — subtotal, shipping, estimated total (one grouped card) */
body.flanfudge-shop.woocommerce-cart .wp-block-woocommerce-cart-order-summary-totals-block {
	display: flex;
	flex-direction: column;
	gap: 0;
	margin-top: 20px;
	margin-bottom: 0;
	border: 0;
	box-shadow: none;
	background: transparent;
}

body.flanfudge-shop.woocommerce-cart .wp-block-woocommerce-cart-order-summary-totals-block > .wc-block-components-totals-wrapper {
	display: block;
	background: var(--ff-cart-totals-row-bg);
	border: 1px solid color-mix(in oklch, var(--ff-border) 55%, transparent);
	padding: 14px 16px;
	margin: 0;
	box-shadow: none;
	gap: 0;
	border-radius: 0;
}

body.flanfudge-shop.woocommerce-cart .wp-block-woocommerce-cart-order-summary-totals-block > .wc-block-components-totals-wrapper:first-child {
	border-radius: var(--ff-radius-xl) var(--ff-radius-xl) 0 0;
	border-bottom: 0;
}

body.flanfudge-shop.woocommerce-cart .wp-block-woocommerce-cart-order-summary-totals-block > .wc-block-components-totals-wrapper:not(:first-child) {
	border-top: 1px solid color-mix(in oklch, var(--ff-border) 70%, transparent);
}

body.flanfudge-shop.woocommerce-cart .wp-block-woocommerce-cart-order-summary-totals-block > .wc-block-components-totals-wrapper:last-child {
	border-radius: 0 0 var(--ff-radius-xl) var(--ff-radius-xl);
}

body.flanfudge-shop.woocommerce-cart .wp-block-woocommerce-cart-order-summary-totals-block > .wc-block-components-totals-wrapper:only-child {
	border-radius: var(--ff-radius-xl);
	border-bottom: 1px solid color-mix(in oklch, var(--ff-border) 55%, transparent);
}

body.flanfudge-shop.woocommerce-cart .wp-block-woocommerce-cart-order-summary-totals-block > .wc-block-components-totals-wrapper:only-child {
	border-top: 1px solid color-mix(in oklch, var(--ff-border) 55%, transparent);
}

/* Inner rows — flat inside grouped card (no nested boxes) */
body.flanfudge-shop.woocommerce-cart .wp-block-woocommerce-cart-order-summary-totals-block .wc-block-components-totals-item,
body.flanfudge-shop.woocommerce-cart .wp-block-woocommerce-cart-order-summary-totals-block .wc-block-components-totals-footer-item,
body.flanfudge-shop.woocommerce-cart .wp-block-woocommerce-cart-order-summary-totals-block .wc-block-components-totals-shipping {
	background: transparent;
	border: 0;
	border-radius: 0;
	padding: 0;
	margin: 0;
	box-shadow: none;
}

body.flanfudge-shop.woocommerce-cart .wp-block-woocommerce-cart-order-summary-totals-block .wc-block-components-totals-shipping .wc-block-components-panel,
body.flanfudge-shop.woocommerce-cart .wp-block-woocommerce-cart-order-summary-totals-block .wc-block-components-totals-shipping .wc-block-components-panel__content {
	padding: 0;
	margin: 0;
}

/* Estimated total — bolder amount (third row in grouped card) */
body.flanfudge-shop.woocommerce-cart .wp-block-woocommerce-cart-order-summary-total-block .wc-block-components-totals-footer-item .wc-block-components-totals-item__value {
	font-family: var(--ff-font-display);
	font-size: var(--ff-text-lg);
	font-weight: var(--ff-weight-semibold);
}

/* Line inside each row */
body.flanfudge-shop.woocommerce-cart .wc-block-cart__sidebar .wc-block-components-totals-item,
body.flanfudge-shop.woocommerce-cart .wc-block-components-totals-shipping .wc-block-components-totals-item,
body.flanfudge-shop.woocommerce-cart .wc-block-components-totals-footer-item,
body.flanfudge-shop.woocommerce-cart .wc-block-components-totals-discount {
	display: flex;
	flex-wrap: nowrap;
	justify-content: space-between;
	align-items: center;
	gap: var(--ff-space-4);
	width: 100%;
	padding: 0;
	margin: 0;
	border: 0;
	background: transparent;
	font-size: var(--ff-text-sm);
	color: var(--ff-foreground);
}

body.flanfudge-shop.woocommerce-cart .wc-block-cart__sidebar .wc-block-components-totals-item__label,
body.flanfudge-shop.woocommerce-cart .wc-block-cart__sidebar .wc-block-components-totals-item__value {
	font-size: var(--ff-text-sm);
	font-weight: var(--ff-weight-normal);
	color: var(--ff-foreground);
}

body.flanfudge-shop.woocommerce-cart .wc-block-cart__sidebar .wc-block-components-totals-item__value {
	text-align: right;
	white-space: nowrap;
}

/* Legacy estimated total (outside grouped totals — fallback) */
body.flanfudge-shop.woocommerce-cart .wc-block-components-totals-wrapper > .wc-block-components-totals-footer-item .wc-block-components-totals-item__value {
	font-family: var(--ff-font-display);
	font-size: var(--ff-text-lg);
	font-weight: var(--ff-weight-semibold);
}

/* Beat generic .cart_totals card/table rules in woocommerce.css */
body.flanfudge-shop.woocommerce-cart .cart_totals {
	background: transparent;
	border: 0;
	padding: 0;
	box-shadow: none;
}

body.flanfudge-shop.woocommerce-cart .cart_totals table.shop_table tr {
	border-bottom: 0;
}

body.flanfudge-shop.woocommerce-cart .wc-block-cart__sidebar .ff-cart-support-link {
	order: 10;
	margin-top: var(--ff-space-2);
}

/* Proceed to checkout — below row cards */
body.flanfudge-shop.woocommerce-cart .wc-block-cart__submit-container,
body.flanfudge-shop.woocommerce-cart .wc-block-cart__submit,
body.flanfudge-shop.woocommerce-cart .wp-block-woocommerce-cart-totals-block .wc-block-cart__submit-container,
body.flanfudge-shop.woocommerce-cart .wc-block-cart__submit-container {
	margin-top: var(--ff-space-2);
}

body.flanfudge-shop.woocommerce-cart .wp-block-woocommerce-cart-totals-block .wc-block-cart__submit-container {
	margin-top: var(--ff-space-2);
	padding: 0;
	order: 9;
}

body.flanfudge-shop.woocommerce-cart .wc-block-cart__submit-container .wc-block-components-button,
body.flanfudge-shop.woocommerce-cart .wc-block-cart__submit-button,
body.flanfudge-shop.woocommerce-cart .wc-block-cart__submit-container a {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 48px;
	margin: 0;
	padding: 0 24px;
	border-radius: var(--ff-radius-pill);
	background: var(--ff-foreground);
	color: var(--ff-cream);
	border: 1px solid var(--ff-foreground);
	font-family: inherit;
	font-size: var(--ff-text-sm);
	font-weight: var(--ff-weight-semibold);
	text-decoration: none;
	box-shadow: none;
}

body.flanfudge-shop.woocommerce-cart .wc-block-cart__submit-container .wc-block-components-button:hover,
body.flanfudge-shop.woocommerce-cart .wc-block-cart__submit-button:hover {
	background: var(--ff-olive-soft);
	border-color: var(--ff-olive-soft);
	color: var(--ff-cream);
}

/* Classic — each table row = sage card */
body.flanfudge-shop.woocommerce-cart .cart_totals table.shop_table {
	width: 100%;
	margin: 0;
	border: 0;
	border-collapse: separate;
	border-spacing: 0 var(--ff-space-2);
}

body.flanfudge-shop.woocommerce-cart .cart_totals table.shop_table tbody {
	display: block;
}

body.flanfudge-shop.woocommerce-cart .cart_totals table.shop_table tr {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: var(--ff-space-4);
	padding: 14px 16px;
	margin: 0 0 var(--ff-space-2);
	border: 1px solid color-mix(in oklch, var(--ff-border) 55%, transparent);
	border-radius: var(--ff-radius-xl);
	background: var(--ff-cart-totals-row-bg);
}

body.flanfudge-shop.woocommerce-cart .cart_totals table.shop_table tr:last-child {
	margin-bottom: 0;
}

body.flanfudge-shop.woocommerce-cart .cart_totals table.shop_table th {
	font-size: var(--ff-text-sm);
	font-weight: var(--ff-weight-normal);
	color: var(--ff-foreground);
	text-align: left;
	width: auto;
	border: 0;
}

body.flanfudge-shop.woocommerce-cart .cart_totals table.shop_table td {
	font-size: var(--ff-text-sm);
	font-weight: var(--ff-weight-normal);
	color: var(--ff-foreground);
	text-align: right;
	width: auto;
	border: 0;
}

body.flanfudge-shop.woocommerce-cart .cart_totals table.shop_table tr.order-total td {
	font-family: var(--ff-font-display);
	font-size: var(--ff-text-lg);
	font-weight: var(--ff-weight-semibold);
	color: var(--ff-foreground);
}

body.flanfudge-shop.woocommerce-cart .wc-proceed-to-checkout {
	margin: var(--ff-space-2) 0 0;
	padding: 0;
}

body.flanfudge-shop.woocommerce-cart .wc-proceed-to-checkout .checkout-button {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 48px;
	padding: 0 24px;
	border-radius: var(--ff-radius-pill);
	background: var(--ff-foreground);
	color: var(--ff-cream);
	border: 1px solid var(--ff-foreground);
	font-size: var(--ff-text-sm);
	font-weight: var(--ff-weight-semibold);
}

body.flanfudge-shop.woocommerce-cart .wc-proceed-to-checkout .checkout-button:hover {
	background: var(--ff-olive-soft);
	border-color: var(--ff-olive-soft);
}

/* Shipping — flat line item (legacy + grouped order-summary block) */
body.flanfudge-shop.woocommerce-cart .wc-block-components-totals-shipping .wc-block-components-panel,
body.flanfudge-shop.woocommerce-cart .wc-block-components-totals-shipping .wc-block-components-panel__content,
body.flanfudge-shop.woocommerce-cart .cart_totals .woocommerce-shipping-destination {
	background: transparent;
	border: 0;
	box-shadow: none;
	padding: 0;
	margin: 0;
}

body.flanfudge-shop.woocommerce-cart .wc-block-components-totals-shipping .wc-block-components-panel__button,
body.flanfudge-shop.woocommerce-cart .wp-block-woocommerce-cart-order-summary-totals-block .wc-block-components-panel__button {
	display: none;
}

body.flanfudge-shop.woocommerce-cart .wc-block-components-totals-shipping .wc-block-components-panel__content {
	padding: 0;
	margin: 0;
}

/* Prevent double card on shipping when parent block is already styled */
body.flanfudge-shop.woocommerce-cart .wp-block-woocommerce-cart-order-summary-shipping-block.wc-block-components-totals-wrapper > .wc-block-components-totals-shipping {
	background: transparent;
	border: 0;
	border-radius: 0;
	padding: 0;
	margin: 0;
}

/* =========================================================================
 * Coupon row card
 * ========================================================================= */

body.flanfudge-shop.woocommerce-cart .wc-block-components-totals-coupon .wc-block-components-panel {
	background: transparent;
	border: 0;
	margin: 0;
	padding: 0;
}

/* Chevron left, label right (Lovable) */
body.flanfudge-shop.woocommerce-cart .wc-block-components-totals-coupon .wc-block-components-panel__button {
	display: flex;
	flex-direction: row-reverse;
	align-items: center;
	justify-content: space-between;
	gap: var(--ff-space-2);
	width: 100%;
	padding: 0 0 12px;
	margin: 0;
	border: 0;
	border-bottom: 1px solid color-mix(in oklch, var(--ff-border) 70%, transparent);
	background: transparent;
	font-family: inherit;
	font-size: var(--ff-text-sm);
	font-weight: var(--ff-weight-normal);
	color: var(--ff-foreground);
	box-shadow: none;
}

body.flanfudge-shop.woocommerce-cart .wc-block-components-totals-coupon .wc-block-components-panel__button:hover,
body.flanfudge-shop.woocommerce-cart .wc-block-components-totals-coupon .wc-block-components-panel__button:focus {
	color: var(--ff-foreground);
	background: transparent;
}

body.flanfudge-shop.woocommerce-cart .wc-block-components-totals-coupon .wc-block-components-panel__content {
	padding: var(--ff-space-3) 0 0;
	margin: 0;
	background: transparent;
	border: 0;
}

body.flanfudge-shop.woocommerce-cart .wc-block-components-totals-coupon:has(.wc-block-components-panel__content[hidden]) .wc-block-components-panel__button,
body.flanfudge-shop.woocommerce-cart .wc-block-components-totals-coupon:not(:has(.wc-block-components-panel__content:not([hidden]))) .wc-block-components-panel__button {
	border-bottom: 0;
	padding-bottom: 0;
}

/* Input + Apply on one row; “Enter code” helper below the field */
body.flanfudge-shop.woocommerce-cart .wc-block-components-totals-coupon .wc-block-components-totals-coupon__form,
body.flanfudge-shop.woocommerce-cart .wc-block-components-totals-coupon form {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	gap: var(--ff-space-2) var(--ff-space-2);
	margin: 0;
}

body.flanfudge-shop.woocommerce-cart .wc-block-components-totals-coupon .wc-block-components-text-input,
body.flanfudge-shop.woocommerce-cart .wc-block-components-totals-coupon .wc-block-components-totals-coupon__input {
	display: flex;
	flex-direction: column;
	flex: 1 1 10rem;
	min-width: 0;
	margin: 0;
	padding: 0;
	width: auto;
}

/* Reset block floating-label (avoids overlap + blue admin focus ring) */
body.flanfudge-shop.woocommerce-cart .wc-block-components-totals-coupon .wc-block-components-text-input label,
body.flanfudge-shop.woocommerce-cart .wc-block-components-totals-coupon .wc-block-components-totals-coupon__input label {
	position: static;
	transform: none;
	order: 2;
	font-size: var(--ff-text-xs);
	font-weight: var(--ff-weight-medium);
	color: color-mix(in oklch, var(--ff-foreground) 70%, transparent);
	margin: var(--ff-space-1) 0 0;
	padding: 0;
	line-height: 1.35;
	pointer-events: auto;
}

body.flanfudge-shop.woocommerce-cart .wc-block-components-totals-coupon .wc-block-components-text-input input,
body.flanfudge-shop.woocommerce-cart .wc-block-components-totals-coupon .wc-block-components-totals-coupon__input input {
	order: 1;
}

body.flanfudge-shop.woocommerce-cart .wc-block-components-totals-coupon .wc-block-components-text-input input {
	width: 100%;
	min-height: 42px;
	padding: 10px 12px;
	border-radius: var(--ff-radius-xl);
	border: 1px solid var(--ff-border);
	background: var(--ff-cream);
	color: var(--ff-foreground);
	font-family: inherit;
	font-size: var(--ff-text-sm);
	box-shadow: none;
	transition: border-color var(--ff-dur-fast) var(--ff-ease),
		box-shadow var(--ff-dur-fast) var(--ff-ease);
}

body.flanfudge-shop.woocommerce-cart .wc-block-components-totals-coupon .wc-block-components-text-input input:focus,
body.flanfudge-shop.woocommerce-cart .wc-block-components-totals-coupon .wc-block-components-text-input input:focus-visible,
body.flanfudge-shop.woocommerce-cart .wc-block-components-totals-coupon .wc-block-components-text-input.is-active input,
body.flanfudge-shop.woocommerce-cart .wc-block-components-totals-coupon .wc-block-components-totals-coupon__input.is-active input {
	border-color: var(--ff-foreground);
	outline: none;
	box-shadow: 0 0 0 3px rgb(31 42 36 / 0.08);
}

/* Apply — secondary (not checkout primary) */
body.flanfudge-shop.woocommerce-cart .wc-block-components-totals-coupon .wc-block-components-button,
body.flanfudge-shop.woocommerce-cart .wc-block-components-totals-coupon button[type="submit"] {
	flex: 0 0 auto;
	align-self: flex-start;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: auto;
	min-width: 5.5rem;
	min-height: 42px;
	margin: 0;
	padding: 0 18px;
	border-radius: var(--ff-radius-xl);
	background: var(--ff-card);
	color: var(--ff-foreground);
	border: 1px solid var(--ff-border);
	font-family: inherit;
	font-size: var(--ff-text-sm);
	font-weight: var(--ff-weight-semibold);
	box-shadow: none;
}

body.flanfudge-shop.woocommerce-cart .wc-block-components-totals-coupon .wc-block-components-button:hover,
body.flanfudge-shop.woocommerce-cart .wc-block-components-totals-coupon button[type="submit"]:hover {
	background: var(--ff-cream-soft);
	border-color: var(--ff-foreground);
	color: var(--ff-foreground);
}

/* Applied coupon chips */
body.flanfudge-shop.woocommerce-cart .wc-block-components-totals-discount__coupon-list,
body.flanfudge-shop.woocommerce-cart .wc-block-components-totals-coupon .wc-block-components-chip {
	margin-top: var(--ff-space-2);
}

body.flanfudge-shop.woocommerce-cart .wc-block-components-chip {
	border-radius: var(--ff-radius-pill);
	background: var(--ff-cream-soft);
	border: 1px solid var(--ff-border);
	color: var(--ff-foreground);
}

/* Classic cart — coupon row card */
body.flanfudge-shop.woocommerce-cart .cart_totals .coupon,
body.flanfudge-shop.woocommerce-cart table.shop_table .coupon {
	display: flex;
	flex-wrap: wrap;
	gap: var(--ff-space-2);
	align-items: flex-start;
	margin: 0 0 var(--ff-space-2);
	padding: 14px 16px;
	border: 1px solid color-mix(in oklch, var(--ff-border) 55%, transparent);
	border-radius: var(--ff-radius-xl);
	background: var(--ff-cart-totals-row-bg);
}

body.flanfudge-shop.woocommerce-cart .cart_totals .coupon input[name="coupon_code"],
body.flanfudge-shop.woocommerce-cart table.shop_table .coupon input[name="coupon_code"] {
	flex: 1 1 12rem;
	min-height: 42px;
	padding: 10px 12px;
	border-radius: var(--ff-radius-xl);
	border: 1px solid var(--ff-border);
	background: var(--ff-cream);
	color: var(--ff-foreground);
	font-size: var(--ff-text-sm);
}

body.flanfudge-shop.woocommerce-cart .cart_totals .coupon input[name="coupon_code"]:focus,
body.flanfudge-shop.woocommerce-cart table.shop_table .coupon input[name="coupon_code"]:focus {
	border-color: var(--ff-foreground);
	outline: none;
	box-shadow: 0 0 0 3px rgb(31 42 36 / 0.08);
}

body.flanfudge-shop.woocommerce-cart .cart_totals .coupon button[name="apply_coupon"],
body.flanfudge-shop.woocommerce-cart table.shop_table .coupon button[name="apply_coupon"] {
	min-height: 42px;
	padding: 0 18px;
	border-radius: var(--ff-radius-xl);
	border: 1px solid var(--ff-border);
	background: var(--ff-card);
	color: var(--ff-foreground);
	font-size: var(--ff-text-sm);
	font-weight: var(--ff-weight-semibold);
}

body.flanfudge-shop.woocommerce-cart .cart_totals .coupon button[name="apply_coupon"]:hover,
body.flanfudge-shop.woocommerce-cart table.shop_table .coupon button[name="apply_coupon"]:hover {
	border-color: var(--ff-foreground);
	background: var(--ff-cream-soft);
}

/* =========================================================================
 * WooCommerce Blocks cart
 * ========================================================================= */

body.flanfudge-shop.woocommerce-cart .wp-block-woocommerce-cart,
body.flanfudge-shop.woocommerce-cart .wc-block-cart {
	max-width: none;
}

body.flanfudge-shop.woocommerce-cart .wc-block-components-sidebar-layout.wc-block-cart {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: var(--ff-space-10);
	align-items: start;
	margin: 0;
	padding: 0;
}

body.flanfudge-shop.woocommerce-cart
.wc-block-components-sidebar-layout .wc-block-components-main {
	width: 100%;
}

@media (min-width: 1024px) {
	body.flanfudge-shop.woocommerce-cart .wc-block-components-sidebar-layout.wc-block-cart {
		grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
	}
}

/* Line items card */
body.flanfudge-shop.woocommerce-cart .wc-block-cart-items {
	border: 1px solid var(--ff-border);
	border-radius: var(--ff-radius-xl);
	background: var(--ff-card);
	box-shadow: 0 0 0 1px var(--ff-border);
	overflow: hidden;
}

body.flanfudge-shop.woocommerce-cart .wc-block-cart-items__header {
	display: none;
}

body.flanfudge-shop.woocommerce-cart .wc-block-cart-items__row {
	padding: var(--ff-space-4) var(--ff-space-5);
	border-top: 1px solid var(--ff-border);
	align-items: center;
}

body.flanfudge-shop.woocommerce-cart .wc-block-cart-items__row:first-child {
	border-top: 0;
}

body.flanfudge-shop.woocommerce-cart .wc-block-cart-item__image img {
	width: 80px;
	height: 80px;
	object-fit: cover;
	border-radius: var(--ff-radius-xl);
	background: var(--ff-mist);
}

@media (min-width: 768px) {
	body.flanfudge-shop.woocommerce-cart .wc-block-cart-item__image img {
		width: 96px;
		height: 96px;
	}
}

body.flanfudge-shop.woocommerce-cart .wc-block-components-product-name {
	font-family: var(--ff-font-display);
	font-size: var(--ff-text-base);
	font-weight: var(--ff-weight-medium);
	color: var(--ff-foreground);
}

body.flanfudge-shop.woocommerce-cart .wc-block-components-product-price {
	font-size: var(--ff-text-xs);
	color: var(--ff-muted-fg);
}

body.flanfudge-shop.woocommerce-cart .wc-block-components-product-metadata {
	font-size: var(--ff-text-xs);
	color: var(--ff-muted-fg);
}

/* Qty pill */
body.flanfudge-shop.woocommerce-cart .wc-block-components-quantity-selector {
	border: 1px solid var(--ff-border);
	border-radius: var(--ff-radius-pill);
	overflow: hidden;
}

body.flanfudge-shop.woocommerce-cart .wc-block-components-quantity-selector__input,
body.flanfudge-shop.woocommerce-cart .wc-block-components-quantity-selector__button {
	background: transparent;
	border: 0;
	color: var(--ff-foreground);
	min-height: 36px;
}

body.flanfudge-shop.woocommerce-cart .wc-block-cart-item__total {
	font-family: var(--ff-font-display);
	font-size: var(--ff-text-base);
	font-weight: var(--ff-weight-medium);
	color: var(--ff-foreground);
}

body.flanfudge-shop.woocommerce-cart .wc-block-cart-item__remove-link {
	color: color-mix(in oklch, var(--ff-foreground) 60%, transparent);
}

body.flanfudge-shop.woocommerce-cart .wc-block-cart-item__remove-link:hover {
	color: var(--ff-foreground);
}

/* Cross-sells inside cart block */
body.flanfudge-shop.woocommerce-cart .wc-block-cart__cross-sells {
	margin-top: var(--ff-space-8);
}

body.flanfudge-shop.woocommerce-cart .wc-block-cart__cross-sells h2 {
	font-family: var(--ff-font-display);
	font-size: var(--ff-text-xl);
	font-weight: var(--ff-weight-medium);
	margin: 0 0 var(--ff-space-3);
}

/* =========================================================================
 * Classic shortcode cart
 * ========================================================================= */

@media (min-width: 1024px) {
	body.flanfudge-shop.woocommerce-cart .flanfudge-shop-content:has(.woocommerce-cart-form) {
		display: grid;
		grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
		gap: var(--ff-space-10);
		align-items: start;
	}

	body.flanfudge-shop.woocommerce-cart .flanfudge-shop-content:has(.woocommerce-cart-form) .ff-cart-page-head {
		grid-column: 1 / -1;
	}

	body.flanfudge-shop.woocommerce-cart .flanfudge-shop-content:has(.woocommerce-cart-form) .woocommerce-cart-form {
		grid-column: 1;
		grid-row: 1 / span 2;
		margin: 0;
	}

	body.flanfudge-shop.woocommerce-cart .flanfudge-shop-content:has(.woocommerce-cart-form) .cart-collaterals {
		grid-column: 2;
		grid-row: 1;
		margin: 0;
	}

	body.flanfudge-shop.woocommerce-cart .flanfudge-shop-content:has(.woocommerce-cart-form) .cart-collaterals .cart_totals {
		max-width: none;
		margin: 0;
	}
}

/* Items list card */
body.flanfudge-shop.woocommerce-cart table.shop_table.cart {
	display: block;
	border: 1px solid var(--ff-border);
	border-radius: var(--ff-radius-xl);
	background: var(--ff-card);
	box-shadow: 0 0 0 1px var(--ff-border);
	overflow: hidden;
	margin: 0;
}

body.flanfudge-shop.woocommerce-cart table.shop_table.cart thead {
	display: none;
}

body.flanfudge-shop.woocommerce-cart table.shop_table.cart tbody {
	display: block;
}

body.flanfudge-shop.woocommerce-cart table.shop_table.cart tbody tr.cart_item {
	display: grid;
	grid-template-columns: 80px 1fr auto;
	grid-template-rows: auto auto;
	gap: var(--ff-space-3) var(--ff-space-4);
	padding: var(--ff-space-4) var(--ff-space-5);
	border-top: 1px solid var(--ff-border);
	align-items: center;
}

@media (min-width: 768px) {
	body.flanfudge-shop.woocommerce-cart table.shop_table.cart tbody tr.cart_item {
		grid-template-columns: 96px 1fr auto auto;
		grid-template-rows: auto auto;
	}
}

body.flanfudge-shop.woocommerce-cart table.shop_table.cart tbody tr.cart_item:first-child {
	border-top: 0;
}

body.flanfudge-shop.woocommerce-cart table.shop_table.cart td {
	border: 0;
	padding: 0;
	background: transparent;
}

body.flanfudge-shop.woocommerce-cart table.shop_table.cart .product-thumbnail {
	grid-column: 1;
	grid-row: 1 / span 2;
}

body.flanfudge-shop.woocommerce-cart table.shop_table.cart .product-thumbnail img {
	width: 80px;
	height: 80px;
	border-radius: var(--ff-radius-xl);
	background: var(--ff-mist);
}

@media (min-width: 768px) {
	body.flanfudge-shop.woocommerce-cart table.shop_table.cart .product-thumbnail img {
		width: 96px;
		height: 96px;
	}
}

body.flanfudge-shop.woocommerce-cart table.shop_table.cart .product-name {
	grid-column: 2;
	grid-row: 1;
	font-family: var(--ff-font-display);
	font-size: var(--ff-text-base);
}

body.flanfudge-shop.woocommerce-cart table.shop_table.cart .product-price {
	grid-column: 2;
	grid-row: 2;
	font-size: var(--ff-text-xs);
	color: var(--ff-muted-fg);
}

body.flanfudge-shop.woocommerce-cart table.shop_table.cart .product-quantity {
	grid-column: 3;
	grid-row: 1 / span 2;
}

body.flanfudge-shop.woocommerce-cart table.shop_table.cart .product-quantity .qty {
	border: 1px solid var(--ff-border);
	border-radius: var(--ff-radius-pill);
	min-height: 36px;
	padding: 0 10px;
	background: var(--ff-cream);
}

body.flanfudge-shop.woocommerce-cart table.shop_table.cart .product-subtotal {
	grid-column: 4;
	grid-row: 1 / span 2;
	font-family: var(--ff-font-display);
	font-weight: var(--ff-weight-medium);
}

body.flanfudge-shop.woocommerce-cart table.shop_table.cart .product-remove {
	grid-column: 2;
	grid-row: 1;
	justify-self: end;
	align-self: start;
}

body.flanfudge-shop.woocommerce-cart table.shop_table.cart .product-remove a {
	background: transparent;
	color: color-mix(in oklch, var(--ff-foreground) 60%, transparent);
	width: auto;
	height: auto;
	border-radius: 0;
	font-size: 0;
}

body.flanfudge-shop.woocommerce-cart table.shop_table.cart .product-remove a::before {
	content: "×";
	font-size: 1.25rem;
	line-height: 1;
}

body.flanfudge-shop.woocommerce-cart table.shop_table.cart tbody tr:not(.cart_item) {
	display: block;
	padding: var(--ff-space-4) var(--ff-space-5);
	border-top: 1px solid var(--ff-border);
}

body.flanfudge-shop.woocommerce-cart table.shop_table.cart .actions {
	display: flex;
	flex-wrap: wrap;
	gap: var(--ff-space-3);
	align-items: center;
}

