/* ==========================================================================
   Focused Nutrition Design: surface "cart" (handle fnd-surface-cart, after fn.css).
   Port of mock/css/pages/cart.css around the REAL WooCommerce Cart block: the block keeps its own markup and
   behaviour (line items, quantity, remove + undo notice, coupons, delivery estimate, proceed to checkout); this
   sheet only restyles it. Extras around it: .cart-head (title, count, steps), .cart-empty (empty hero + categories),
   .cart-extras (delivery / store / questions + consultation card), .cart-recs (recommendations rail).
   Scope: body.fnd-surface-cart / .cart-* classes. The block lives in a CSS container (WooCommerce sets
   container-type on .wp-block-woocommerce-cart), so block layout rules use @container like WooCommerce does.
   ========================================================================== */

/* ---- Page head ---------------------------------------------------------- */
.cart-head {
  padding: var(--s-5) 0;
  border-bottom: 1px solid var(--fn-line);
  background: radial-gradient(60% 140% at 100% 0%, rgba(247, 123, 1, .07), transparent 60%), #fff;
}
.cart-head__row {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
  gap: var(--s-4) var(--s-6); margin-top: var(--s-3);
}
.cart-head__title {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px;
  font-size: var(--fn-fs-h1); line-height: 1.1; letter-spacing: -.02em;
}
.cart-head__title:focus-visible { outline-offset: 6px; }
.cart-head__count {
  display: inline-flex; align-items: center; height: 28px; padding: 0 12px;
  border-radius: var(--r-pill); background: var(--fn-ink); color: #fff;
  font-size: 13px; font-weight: 700; letter-spacing: .01em; line-height: 1; transform: translateY(1px);
}
.cart-head__count[hidden] { display: none; }

.cart-steps {
  display: flex; align-items: center; list-style: none; margin: 0; padding: 0;
  width: 100%; font-size: 12px; font-weight: 700; color: var(--fn-meta);
}
.cart-steps li { display: flex; align-items: center; gap: 8px; flex: 1; white-space: nowrap; }
.cart-steps li:last-child { flex: none; }
.cart-steps li:not(:last-child)::after {
  content: ""; flex: 1; height: 2px; min-width: 16px; margin: 0 10px; border-radius: 2px; background: var(--fn-line-2);
}
.cart-steps__n {
  display: grid; place-items: center; flex: none; width: 26px; height: 26px; border-radius: 50%;
  border: 1.5px solid var(--fn-line-2); background: #fff; color: var(--fn-meta);
  font-size: 12px; font-variant-numeric: tabular-nums;
}
.cart-steps .is-current { color: var(--fn-ink); }
.cart-steps .is-current .cart-steps__n { background: var(--fn-orange); border-color: var(--fn-orange); color: var(--fn-ink); box-shadow: 0 0 0 4px rgba(247, 123, 1, .18); }
.cart-steps .is-current::after { background: linear-gradient(90deg, var(--fn-orange), var(--fn-line-2) 70%); }
@media (min-width: 768px) {
  .cart-head { padding: var(--s-6) 0; }
  .cart-steps { width: auto; min-width: 420px; font-size: 13px; }
  .cart-steps__n { width: 28px; height: 28px; }
}

/* ---- Body / state ------------------------------------------------------- */
.cart-body { padding-block: var(--s-5) var(--s-7); display: flex; flex-direction: column; gap: var(--s-6); }
@media (min-width: 768px) { .cart-body { padding-block: var(--s-6) var(--s-8); } }
@media (min-width: 1024px) { .cart-body { padding-block: var(--s-7) var(--s-8); } }

/* Empty state (main[data-cart-state] is set by the server for the first paint, then follows the block). */
.cart-main[data-cart-state="full"] .cart-empty { display: none; }
.cart-main[data-cart-state="empty"] .cart-extras { display: none; }
/* our hero replaces the block's own empty message and its "New in store" grid (the rail below shows real products) */
body.fnd-surface-cart .fnd-cart__block .wp-block-woocommerce-empty-cart-block { display: none; }
.cart-main[data-cart-state="empty"] .wp-block-woocommerce-cart.is-loading .wp-block-woocommerce-filled-cart-block,
.cart-main[data-cart-state="empty"] .wp-block-woocommerce-cart.is-loading + .wc-block-cart--skeleton { display: none; }
/* the footer consultation band repeats the advice card while the cart has items */
body.fnd-surface-cart:has(.cart-main[data-cart-state="full"]) .fn-footer__cta { display: none; }

/* ==========================================================================
   The WooCommerce Cart block, restyled
   ========================================================================== */
body.fnd-surface-cart .fnd-cart__block { --wc-separator-color: var(--fn-line); color: var(--fn-ink); font-family: var(--fn-font); }
body.fnd-surface-cart .fnd-cart__block .wp-block-woocommerce-cart { margin: 0; max-width: none; }
body.fnd-surface-cart .fnd-cart__block .wp-block-woocommerce-cart.alignwide { margin-inline: 0; width: 100%; }
body.fnd-surface-cart .fnd-cart__block .wc-block-components-sidebar-layout { margin: 0; padding: 0; }
@container (min-width: 920px) {
  body.fnd-surface-cart .fnd-cart__block .wc-block-components-sidebar-layout { column-gap: 40px; align-items: flex-start; flex-wrap: nowrap; }
  body.fnd-surface-cart .fnd-cart__block .wc-block-components-sidebar { flex: 0 0 380px; width: 380px; }
}
@container (min-width: 1180px) {
  body.fnd-surface-cart .fnd-cart__block .wc-block-components-sidebar-layout { column-gap: 48px; }
  body.fnd-surface-cart .fnd-cart__block .wc-block-components-sidebar { flex-basis: 400px; width: 400px; }
}

/* ---- Items panel -------------------------------------------------------- */
body.fnd-surface-cart .fnd-cart__block .wc-block-cart__main {
  background: #fff; border: 1px solid var(--fn-line); border-radius: var(--r-lg); padding: 0; overflow: hidden;
}
body.fnd-surface-cart .fnd-cart__block .wc-block-cart__main > .wc-block-cart-items { margin: 0; border: 0; width: 100%; }
/* rows are grids: the table and its body become plain blocks so each row spans the full panel width */
body.fnd-surface-cart .fnd-cart__block table.wc-block-cart-items,
body.fnd-surface-cart .fnd-cart__block table.wc-block-cart-items > tbody { display: block; width: 100%; border-collapse: collapse; }
body.fnd-surface-cart .fnd-cart__block table.wc-block-cart-items > thead { display: none; }
/* the mock's panel head (Product / Total), from WooCommerce's own table header */
@container (min-width: 600px) {
  body.fnd-surface-cart .fnd-cart__block table.wc-block-cart-items > thead { display: block; }
  body.fnd-surface-cart .fnd-cart__block table.wc-block-cart-items .wc-block-cart-items__header {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; padding: 14px 24px; border-bottom: 1px solid var(--fn-line);
    font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--fn-meta);
  }
  body.fnd-surface-cart .fnd-cart__block .wc-block-cart-items__header th { padding: 0; border: 0; text-align: left; font-weight: 700; background: none; }
  body.fnd-surface-cart .fnd-cart__block .wc-block-cart-items__header .wc-block-cart-items__header-product { display: none; }
  body.fnd-surface-cart .fnd-cart__block .wc-block-cart-items__header .wc-block-cart-items__header-total { text-align: right; }
}
body.fnd-surface-cart .fnd-cart__block table.wc-block-cart-items .wc-block-cart-items__row {
  display: grid; grid-template-columns: 84px minmax(0, 1fr) auto; column-gap: 14px; align-items: start;
  padding: 16px 14px; border-bottom: 1px solid var(--fn-line); border-top: 0;
  transition: opacity var(--t) var(--ease), background-color 1.2s var(--ease);
}
body.fnd-surface-cart .fnd-cart__block table.wc-block-cart-items .wc-block-cart-items__row:last-child { border-bottom: 0; }
@container (min-width: 600px) {
  body.fnd-surface-cart .fnd-cart__block table.wc-block-cart-items .wc-block-cart-items__row {
    grid-template-columns: 104px minmax(0, 1fr) auto; column-gap: 24px; padding: 20px 24px; align-items: center;
  }
}
body.fnd-surface-cart .fnd-cart__block table.wc-block-cart-items td { padding: 0; margin: 0; border: 0; vertical-align: top; background: none; }
body.fnd-surface-cart .fnd-cart__block table.wc-block-cart-items .wc-block-cart-item__image { grid-column: 1; grid-row: 1; padding: 0; }
body.fnd-surface-cart .fnd-cart__block table.wc-block-cart-items .wc-block-cart-item__product { grid-column: 2; grid-row: 1; min-width: 0; }
body.fnd-surface-cart .fnd-cart__block table.wc-block-cart-items .wc-block-cart-item__total { grid-column: 3; grid-row: 1; align-self: start; text-align: right; padding-top: 2px; }
@container (min-width: 600px) {
  body.fnd-surface-cart .fnd-cart__block table.wc-block-cart-items .wc-block-cart-item__total { align-self: center; padding-top: 0; }
}

/* thumbnail: the warm image well of the mock */
body.fnd-surface-cart .fnd-cart__block .wc-block-cart-item__image a {
  display: block; aspect-ratio: 1; border-radius: var(--r-md); overflow: hidden;
  background: radial-gradient(70% 50% at 50% 85%, rgba(0, 0, 0, .06), transparent 70%), var(--fn-warm);
}
body.fnd-surface-cart .fnd-cart__block .wc-block-cart-item__image img {
  width: 100%; height: 100%; object-fit: contain; padding: 8%; box-sizing: border-box; mix-blend-mode: multiply;
  transition: transform var(--t-slow) var(--ease);
}
@media (hover: hover) and (pointer: fine) {
  body.fnd-surface-cart .fnd-cart__block .wc-block-cart-item__image a:hover img { transform: scale(1.05); }
}

/* name, prices, details */
body.fnd-surface-cart .fnd-cart__block .wc-block-cart-item__wrap { gap: 6px; align-items: flex-start; }
/* the mock's category eyebrow above the name: the line's real primary category (data-fn-cat, set by cart.js) */
body.fnd-surface-cart .fnd-cart__block .wc-block-cart-item__wrap[data-fn-cat]::before {
  content: attr(data-fn-cat); display: block; order: -1; margin-bottom: -2px;
  font-family: var(--fn-font); font-size: 11px; font-weight: 700; letter-spacing: .1em; line-height: 1.3; text-transform: uppercase; color: var(--fn-meta);
}
body.fnd-surface-cart .fnd-cart__block table.wc-block-cart-items .wc-block-components-product-name {
  font-family: var(--fn-font); font-size: 15px; font-weight: 700; line-height: 1.3; color: var(--fn-ink);
  text-decoration: none; max-width: 40ch; border-radius: 3px;
}
body.fnd-surface-cart .fnd-cart__block table.wc-block-cart-items .wc-block-components-product-name:hover {
  text-decoration: underline; text-decoration-color: var(--fn-orange); text-decoration-thickness: 2px; text-underline-offset: 3px;
}
@container (min-width: 600px) {
  body.fnd-surface-cart .fnd-cart__block table.wc-block-cart-items .wc-block-components-product-name { font-size: 17px; }
}
body.fnd-surface-cart .fnd-cart__block .wc-block-cart-item__prices { font-size: 13px; color: var(--fn-meta); font-variant-numeric: tabular-nums; }
body.fnd-surface-cart .fnd-cart__block .wc-block-cart-item__prices .wc-block-components-product-price__value::after { content: " each"; }
body.fnd-surface-cart .fnd-cart__block .wc-block-cart-item__prices del { color: var(--fn-meta); }
body.fnd-surface-cart .fnd-cart__block .wc-block-cart-item__prices ins { text-decoration: none; color: var(--fn-ink); font-weight: 700; }
/* the product's long short-description is noise in a cart line (the mock shows none); variation details stay */
body.fnd-surface-cart .fnd-cart__block .wc-block-cart-item__product .wc-block-components-product-metadata__description { display: none; }
body.fnd-surface-cart .fnd-cart__block .wc-block-components-product-details {
  display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 0; padding: 0; list-style: none;
}
body.fnd-surface-cart .fnd-cart__block .wc-block-components-product-details li,
body.fnd-surface-cart .fnd-cart__block .wc-block-components-product-details > span {
  display: inline-flex; align-items: center; gap: 4px; min-height: 24px; padding: 0 9px; margin: 0;
  border-radius: var(--r-xs); background: var(--fn-warm-2); font-size: 12px; font-weight: 700; color: var(--fn-ink);
}
body.fnd-surface-cart .fnd-cart__block .wc-block-components-product-details__name { font-weight: 400; color: var(--fn-ink-2); }
/* the block's " / " between values: the chips already separate them (the checkout summary keeps it, inline text there) */
body.fnd-surface-cart .fnd-cart__block .wc-block-components-product-details > span > span[aria-hidden="true"] { display: none; }
body.fnd-surface-cart .fnd-cart__block .wc-block-components-product-badge,
body.fnd-surface-cart .fnd-cart__block .wc-block-components-sale-badge {
  border-radius: var(--r-xs); border: 1px solid var(--fn-line-2); font-size: 11px; font-weight: 700; padding: 2px 6px;
}
body.fnd-surface-cart .fnd-cart__block .wc-block-components-product-low-stock-badge,
body.fnd-surface-cart .fnd-cart__block .wc-block-components-product-backorder-badge { color: var(--fn-danger); border-color: currentColor; }

/* quantity stepper + remove (WooCommerce's own controls) */
body.fnd-surface-cart .fnd-cart__block table.wc-block-cart-items .wc-block-cart-item__quantity { gap: 6px; margin-top: 6px; }
body.fnd-surface-cart .fnd-cart__block .wc-block-components-quantity-selector {
  display: inline-flex; align-items: stretch; width: auto; height: 44px; margin: 0;
  border: 1.5px solid var(--fn-line-2); border-radius: var(--r-sm); background: #fff; overflow: hidden;
  transition: border-color var(--t-fast) var(--ease);
}
body.fnd-surface-cart .fnd-cart__block .wc-block-components-quantity-selector::after { display: none; }
body.fnd-surface-cart .fnd-cart__block .wc-block-components-quantity-selector:hover { border-color: #a8a8a8; }
body.fnd-surface-cart .fnd-cart__block .wc-block-components-quantity-selector:focus-within { border-color: var(--fn-ink); box-shadow: 0 0 0 3px var(--fn-orange-glow); }
body.fnd-surface-cart .fnd-cart__block .wc-block-components-quantity-selector input.wc-block-components-quantity-selector__input {
  width: 40px; min-width: 40px; height: 100%; padding: 0; margin: 0; border: 0; background: transparent; box-shadow: none;
  font-family: var(--fn-font); font-size: 16px; font-weight: 700; color: var(--fn-ink); text-align: center; font-variant-numeric: tabular-nums;
  -moz-appearance: textfield; appearance: textfield;
}
body.fnd-surface-cart .fnd-cart__block .wc-block-components-quantity-selector input::-webkit-outer-spin-button,
body.fnd-surface-cart .fnd-cart__block .wc-block-components-quantity-selector input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
body.fnd-surface-cart .fnd-cart__block .wc-block-components-quantity-selector input:focus { outline: none; box-shadow: none; }
body.fnd-surface-cart .fnd-cart__block .wc-block-components-quantity-selector .wc-block-components-quantity-selector__button {
  width: 40px; min-width: 40px; height: 100%; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent;
  font-family: var(--fn-font-text); font-size: 20px; line-height: 1; color: var(--fn-ink); opacity: 1; cursor: pointer;
  transition: background-color var(--t-fast) var(--ease);
}
body.fnd-surface-cart .fnd-cart__block .wc-block-components-quantity-selector .wc-block-components-quantity-selector__button:hover { background: var(--fn-warm); }
body.fnd-surface-cart .fnd-cart__block .wc-block-components-quantity-selector .wc-block-components-quantity-selector__button:focus-visible { outline: 2px solid var(--fn-ink); outline-offset: -2px; box-shadow: none; }
body.fnd-surface-cart .fnd-cart__block .wc-block-components-quantity-selector .wc-block-components-quantity-selector__button:disabled { color: #c4c4c4; background: transparent; cursor: default; }
body.fnd-surface-cart .fnd-cart__block table.wc-block-cart-items .wc-block-cart-item__quantity .wc-block-cart-item__remove-link {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: var(--r-sm);
  color: var(--fn-ink-2); text-decoration: none; font-size: 13px; font-weight: 700;
  transition: color var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease);
}
body.fnd-surface-cart .fnd-cart__block table.wc-block-cart-items .wc-block-cart-item__quantity .wc-block-cart-item__remove-link svg { width: 22px; height: 22px; }
body.fnd-surface-cart .fnd-cart__block table.wc-block-cart-items .wc-block-cart-item__quantity .wc-block-cart-item__remove-link:hover { color: var(--fn-danger); background: #fdf1f0; }
body.fnd-surface-cart .fnd-cart__block table.wc-block-cart-items .wc-block-cart-item__quantity .wc-block-cart-item__remove-link:focus-visible { outline: 2px solid var(--fn-ink); outline-offset: 1px; }

/* line total */
body.fnd-surface-cart .fnd-cart__block table.wc-block-cart-items .wc-block-cart-item__total { font-size: 17px; font-weight: 700; color: var(--fn-ink); font-variant-numeric: tabular-nums; }
body.fnd-surface-cart .fnd-cart__block .wc-block-cart-item__total-price-and-sale-badge-wrapper { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
@container (min-width: 600px) {
  body.fnd-surface-cart .fnd-cart__block table.wc-block-cart-items .wc-block-cart-item__total { font-size: 19px; }
}
body.fnd-surface-cart .fnd-cart__block table.wc-block-cart-items .wc-block-cart-items__row.is-disabled { opacity: .55; }

/* cross-sells (only when products have real cross-sells set) */
body.fnd-surface-cart .fnd-cart__block .wp-block-woocommerce-cart-cross-sells-block { padding: 20px 24px; border-top: 1px solid var(--fn-line); background: var(--fn-warm); }
body.fnd-surface-cart .fnd-cart__block .wp-block-woocommerce-cart-cross-sells-block h2 { font-size: 18px; margin: 0 0 12px; }

/* ---- Summary: the dark card -------------------------------------------- */
body.fnd-surface-cart .fnd-cart__block .wc-block-cart__sidebar {
  position: relative; isolation: isolate; overflow: hidden;
  margin: 0; padding: 24px 20px; border-radius: var(--r-lg);
  background: var(--fn-black); color: #fff; --wc-separator-color: var(--fn-dark-line);
  box-shadow: 0 24px 60px -24px rgba(0, 0, 0, .45);
}
body.fnd-surface-cart .fnd-cart__block .wc-block-cart__sidebar::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(80% 60% at 100% 0%, rgba(247, 123, 1, .14), transparent 60%);
}
@container (max-width: 919px) {
  body.fnd-surface-cart .fnd-cart__block .wc-block-cart__sidebar { margin-top: var(--s-5); margin-bottom: 0; order: 1; }
}
@container (min-width: 920px) {
  body.fnd-surface-cart .fnd-cart__block .wc-block-cart__sidebar { position: sticky; top: calc(var(--fn-sticky-top) + 24px); padding: 28px; }
}
@media (min-width: 768px) { body.fnd-surface-cart .fnd-cart__block .wc-block-cart__sidebar { padding: 28px; } }

body.fnd-surface-cart .fnd-cart__block .wc-block-cart .wc-block-cart__totals-title,
body.fnd-surface-cart .fnd-cart__block .wc-block-cart .wc-block-components-sidebar .wc-block-cart__totals-title {
  display: block; padding: 0 0 6px; margin: 0; font-family: var(--fn-font); font-size: 20px; font-weight: 700;
  letter-spacing: -.01em; line-height: 1.2; text-transform: none; color: #fff; background: none;
}
body.fnd-surface-cart .fnd-cart__block .wc-block-cart__sidebar .wc-block-components-totals-wrapper {
  padding: 14px 0; border-top: 1px solid var(--fn-dark-line); border-color: var(--fn-dark-line);
}
body.fnd-surface-cart .fnd-cart__block .wc-block-cart__sidebar .wc-block-components-totals-wrapper:empty { display: none; }
body.fnd-surface-cart .fnd-cart__block .wc-block-cart__sidebar .wp-block-woocommerce-cart-order-summary-totals-block { padding: 0; border: 0; }
body.fnd-surface-cart .fnd-cart__block .wc-block-cart__sidebar .wp-block-woocommerce-cart-order-summary-totals-block > .wc-block-components-totals-wrapper:first-child { border-top: 1px solid var(--fn-dark-line); }
body.fnd-surface-cart .fnd-cart__block .wc-block-cart__sidebar .wp-block-woocommerce-cart-order-summary-totals-block > .wc-block-components-totals-wrapper + .wc-block-components-totals-wrapper { border-top: 0; padding-top: 0; }
body.fnd-surface-cart .fnd-cart__block .wc-block-cart__sidebar .wc-block-components-totals-item,
body.fnd-surface-cart .fnd-cart__block .wc-block-cart__sidebar .wc-block-components-totals-coupon,
body.fnd-surface-cart .fnd-cart__block .wc-block-cart__sidebar .wc-block-components-panel { padding-left: 0; padding-right: 0; }
body.fnd-surface-cart .fnd-cart__block .wc-block-cart__sidebar .wc-block-components-totals-item { font-size: 15px; gap: 4px 16px; }
body.fnd-surface-cart .fnd-cart__block .wc-block-cart__sidebar .wc-block-components-totals-item__label { color: var(--fn-on-dark); font-weight: 400; }
body.fnd-surface-cart .fnd-cart__block .wc-block-cart__sidebar .wc-block-components-totals-item__value { color: #fff; font-weight: 700; font-variant-numeric: tabular-nums; }
body.fnd-surface-cart .fnd-cart__block .wc-block-cart__sidebar .wc-block-components-totals-item__description { font-size: 13px; color: var(--fn-on-dark-2); }
body.fnd-surface-cart .fnd-cart__block .wc-block-cart__sidebar .wc-block-components-totals-shipping__via { color: var(--fn-on-dark); font-size: 13px; }
body.fnd-surface-cart .fnd-cart__block .wc-block-cart__sidebar a,
body.fnd-surface-cart .fnd-cart__block .wc-block-cart__sidebar .wc-block-components-totals-shipping__change-address__link,
body.fnd-surface-cart .fnd-cart__block .wc-block-cart__sidebar .wc-block-components-shipping-calculator-address__link {
  color: #fff; text-decoration: underline; text-decoration-color: var(--fn-orange); text-decoration-thickness: 2px; text-underline-offset: 3px;
}
body.fnd-surface-cart .fnd-cart__block .wc-block-cart__sidebar .wc-block-components-radio-control__option { color: #fff; }

/* coupon panel ("Add coupons") */
body.fnd-surface-cart .fnd-cart__block .wc-block-cart__sidebar .wc-block-components-panel__button {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; margin: 0; padding: 0;
  font-family: var(--fn-font); font-size: 14px; font-weight: 700; color: #fff; background: none; border: 0; cursor: pointer;
}
body.fnd-surface-cart .fnd-cart__block .wc-block-cart__sidebar .wc-block-components-panel__button::before {
  content: ""; flex: none; width: 18px; height: 18px; background: var(--fn-orange);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 12V4h8l10 10-8 8L3 12Z'/%3E%3Ccircle cx='7.5' cy='8.5' r='1.5'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 12V4h8l10 10-8 8L3 12Z'/%3E%3Ccircle cx='7.5' cy='8.5' r='1.5'/%3E%3C/svg%3E") center / contain no-repeat;
}
body.fnd-surface-cart .fnd-cart__block .wc-block-cart__sidebar .wc-block-components-panel__button { justify-content: flex-start; text-align: left; }
body.fnd-surface-cart .fnd-cart__block .wc-block-cart__sidebar .wc-block-components-panel__button > svg,
body.fnd-surface-cart .fnd-cart__block .wc-block-cart__sidebar .wc-block-components-panel__button-icon {
  order: 2; margin-left: auto; fill: #fff; color: #fff; position: static; transform: none; transition: transform var(--t) var(--ease);
}
body.fnd-surface-cart .fnd-cart__block .wc-block-cart__sidebar .wc-block-components-panel__button:focus-visible { outline: 2px solid var(--fn-orange); outline-offset: 2px; border-radius: 6px; }
body.fnd-surface-cart .fnd-cart__block .wc-block-cart__sidebar .wc-block-components-panel__content { padding: 4px 0 6px; }
body.fnd-surface-cart .fnd-cart__block .wc-block-components-totals-coupon__form { display: flex; gap: 8px; align-items: stretch; margin: 0; }
body.fnd-surface-cart .fnd-cart__block .wc-block-components-totals-coupon__form .wc-block-components-text-input { flex: 1; margin: 0; }
body.fnd-surface-cart .fnd-cart__block .wc-block-cart__sidebar .wc-block-components-text-input input {
  min-height: 48px; height: 48px; border: 1.5px solid transparent; border-radius: var(--r-sm); background: #fff; color: var(--fn-ink);
  font-family: var(--fn-font-text); font-size: 16px; box-shadow: none;
}
body.fnd-surface-cart .fnd-cart__block .wc-block-cart__sidebar .wc-block-components-text-input input:focus { border-color: var(--fn-orange); box-shadow: 0 0 0 3px var(--fn-orange-glow); outline: none; }
body.fnd-surface-cart .fnd-cart__block .wc-block-cart__sidebar .wc-block-components-text-input label { color: var(--fn-meta); font-family: var(--fn-font-text); }
body.fnd-surface-cart .fnd-cart__block .wc-block-components-totals-coupon__button {
  min-height: 48px; height: 48px; padding: 0 20px; border-radius: var(--r-sm); border: 1.5px solid #fff;
  background: #fff; color: var(--fn-ink); font-family: var(--fn-font); font-size: 15px; font-weight: 700; cursor: pointer;
  transition: background-color var(--t) var(--ease), border-color var(--t) var(--ease);
}
body.fnd-surface-cart .fnd-cart__block .wc-block-components-totals-coupon__button:hover { background: var(--fn-orange); border-color: var(--fn-orange); }
body.fnd-surface-cart .fnd-cart__block .wc-block-components-totals-coupon__button:disabled { opacity: .55; cursor: default; background: #fff; border-color: #fff; }
/* applying a coupon: WooCommerce dims the form to 25% (dark grey on the black card, code hard to read). Show a
   readable, dimmed version of the white idle state instead: translucent fields, white code and a white spinner. */
body.fnd-surface-cart .fnd-cart__block .wc-block-cart__sidebar .wc-block-components-totals-coupon .wc-block-components-loading-mask .wc-block-components-loading-mask__children { opacity: 1; }
body.fnd-surface-cart .fnd-cart__block .wc-block-cart__sidebar .wc-block-components-totals-coupon .wc-block-components-loading-mask .wc-block-components-text-input input { opacity: .8; }
body.fnd-surface-cart .fnd-cart__block .wc-block-cart__sidebar .wc-block-components-totals-coupon__form .wc-block-components-text-input input:disabled {
  background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .18); color: #fff; -webkit-text-fill-color: #fff; opacity: 1;
}
body.fnd-surface-cart .fnd-cart__block .wc-block-cart__sidebar .wc-block-components-totals-coupon__form .wc-block-components-text-input input:disabled + label { color: var(--fn-on-dark-2); }
body.fnd-surface-cart .fnd-cart__block .wc-block-cart__sidebar .wc-block-components-totals-coupon__button.wc-block-components-totals-coupon__button--loading,
body.fnd-surface-cart .fnd-cart__block .wc-block-cart__sidebar .wc-block-components-loading-mask .wc-block-components-totals-coupon__button:disabled {
  opacity: 1; background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .18); color: #fff;
}
body.fnd-surface-cart .fnd-cart__block .wc-block-cart__sidebar .wc-block-components-totals-coupon__button--loading .wc-block-components-spinner,
body.fnd-surface-cart .fnd-cart__block .wc-block-cart__sidebar .wc-block-components-totals-coupon .wc-block-components-loading-mask .components-spinner { color: #fff; }
body.fnd-surface-cart .fnd-cart__block .wc-block-cart__sidebar .wc-block-components-validation-error,
body.fnd-surface-cart .fnd-cart__block .wc-block-cart__sidebar .wc-block-components-validation-error > p { color: #ffb4a8; font-family: var(--fn-font-text); font-size: 13px; line-height: 1.45; }
body.fnd-surface-cart .fnd-cart__block .wc-block-cart__sidebar .wc-block-components-validation-error svg { fill: #ffb4a8; }
body.fnd-surface-cart .fnd-cart__block .wc-block-cart__sidebar .wc-block-components-text-input.has-error input { border-color: #ff7a66; }
body.fnd-surface-cart .fnd-cart__block .wc-block-cart__sidebar .wc-block-components-chip {
  background: var(--fn-dark-2); color: #fff; border: 1px solid var(--fn-dark-line); border-radius: var(--r-pill);
}
body.fnd-surface-cart .fnd-cart__block .wc-block-cart__sidebar .wc-block-components-chip__remove-icon { fill: #fff; }

/* estimated total */
body.fnd-surface-cart .fnd-cart__block .wc-block-cart__sidebar .wc-block-components-totals-footer-item { align-items: baseline; padding-top: 4px; }
body.fnd-surface-cart .fnd-cart__block .wc-block-cart__sidebar .wc-block-components-totals-footer-item .wc-block-components-totals-item__label { font-size: 16px; font-weight: 700; color: #fff; }
body.fnd-surface-cart .fnd-cart__block .wc-block-cart__sidebar .wc-block-components-totals-footer-item .wc-block-components-totals-item__label::after {
  content: "BSD"; margin-left: 8px; font-size: 11px; font-weight: 700; letter-spacing: .14em; color: var(--fn-on-dark-2);
}
body.fnd-surface-cart .fnd-cart__block .wc-block-cart__sidebar .wc-block-components-totals-footer-item .wc-block-components-totals-item__value { font-size: 32px; line-height: 1; letter-spacing: -.02em; }
body.fnd-surface-cart .fnd-cart__block .wc-block-cart__sidebar .wc-block-components-totals-footer-item .wc-block-components-totals-item__description { font-size: 13px; line-height: 1.5; color: var(--fn-on-dark-2); }

/* proceed to checkout */
body.fnd-surface-cart .fnd-cart__block .wc-block-cart__submit { margin: 18px 0 0; }
body.fnd-surface-cart .fnd-cart__block .wc-block-cart__submit-container { padding: 0; }
body.fnd-surface-cart .fnd-cart__block .wc-block-cart__submit-button.wc-block-components-button,
body.fnd-surface-cart .fnd-cart__block a.wc-block-cart__submit-button {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 56px; padding: 0 24px;
  border: 1.5px solid var(--fn-orange); border-radius: 10px; background: var(--fn-orange); color: var(--fn-ink);
  font-family: var(--fn-font); font-size: 16px; font-weight: 700; line-height: 1.1; text-decoration: none; box-shadow: none;
  transition: background-color var(--t) var(--ease), border-color var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
body.fnd-surface-cart .fnd-cart__block a.wc-block-cart__submit-button::before {
  content: ""; flex: none; width: 18px; height: 18px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='10.5' width='14' height='10' rx='2'/%3E%3Cpath d='M8 10.5V8a4 4 0 0 1 8 0v2.5'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='10.5' width='14' height='10' rx='2'/%3E%3Cpath d='M8 10.5V8a4 4 0 0 1 8 0v2.5'/%3E%3C/svg%3E") center / contain no-repeat;
}
body.fnd-surface-cart .fnd-cart__block a.wc-block-cart__submit-button:hover { background: var(--fn-orange-2); border-color: var(--fn-orange-2); box-shadow: 0 8px 24px rgba(247, 123, 1, .35); color: var(--fn-ink); }
body.fnd-surface-cart .fnd-cart__block a.wc-block-cart__submit-button:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
body.fnd-surface-cart .fnd-cart__block a.wc-block-cart__submit-button .wc-block-components-button__text { display: inline; }
/* phones: WooCommerce's own sticky "Proceed to checkout" bar, in the store's dark style */
@media (max-width: 782px) {
  body.fnd-surface-cart .fnd-cart__block .wc-block-cart .wc-block-cart__submit-container--sticky {
    z-index: var(--z-sticky); padding: 12px var(--fn-gutter) calc(12px + env(safe-area-inset-bottom));
    background: var(--fn-black); border-top: 1px solid var(--fn-dark-line); box-shadow: 0 -12px 32px -12px rgba(0, 0, 0, .45);
    transition: none; /* WooCommerce's "transition: all" would fade in from white */
  }
  body.fnd-surface-cart .fnd-cart__block .wc-block-cart .wc-block-cart__submit-container--sticky::before { display: none; }
  body.fnd-surface-cart:has(.wc-block-cart__submit-container--sticky) { padding-bottom: calc(80px + env(safe-area-inset-bottom)); }
  body.fnd-surface-cart:has(.wc-block-cart__submit-container--sticky) .fn-toasts { bottom: calc(92px + env(safe-area-inset-bottom)); }
  /* the block's own notices (errors, "removed" + Undo) float just above that bar, never over the checkout button */
  body.fnd-surface-cart:has(.wc-block-cart__submit-container--sticky) .fnd-cart__block .wc-block-components-notice-snackbar-list { bottom: calc(88px + env(safe-area-inset-bottom)); left: 12px; right: 12px; }
}
body.fnd-surface-cart .fnd-cart__block .wc-block-cart__payment-options:empty { display: none; }

/* notices (errors, coupon messages, "removed from your cart" with Undo) */
/* anything the block scrolls or focuses into view stays clear of the sticky header (and the admin bar). The html rule
   beats WordPress's own html { scroll-padding-top: admin bar } and only applies on this surface. */
html:has(> body.fnd-surface-cart) { scroll-padding-top: calc(var(--fn-bar-h) + var(--wp-admin--admin-bar--height, 0px) + 16px); }
body.fnd-surface-cart .fnd-cart__block .wc-block-components-notice-banner,
body.fnd-surface-cart .fnd-cart__block .wc-block-components-validation-error,
body.fnd-surface-cart .fnd-cart__block .wc-block-components-text-input { scroll-margin-top: calc(var(--fn-sticky-top) + 16px); }
body.fnd-surface-cart .fnd-cart__block .wc-block-components-notice-banner {
  margin: 0 0 16px; padding: 14px 16px; border-radius: var(--r-md); border: 1px solid var(--fn-line-2);
  background: #fff; color: var(--fn-ink); font-family: var(--fn-font-text); font-size: 14px; line-height: 1.5;
}
body.fnd-surface-cart .fnd-cart__block .wc-block-components-notice-banner.is-error { border-color: var(--fn-danger); background: #fff8f7; }
body.fnd-surface-cart .fnd-cart__block .wc-block-components-notice-banner.is-success { border-color: var(--fn-success); background: #f3faf5; }
body.fnd-surface-cart .fnd-cart__block .wc-block-components-notice-snackbar-list .wc-block-components-notice-banner {
  background: var(--fn-black); color: #fff; border-color: var(--fn-black); box-shadow: var(--sh-deep);
}
body.fnd-surface-cart .fnd-cart__block .wc-block-components-notice-snackbar-list .wc-block-components-notice-banner svg { fill: var(--fn-orange); background: none; }
body.fnd-surface-cart .fnd-cart__block .wc-block-components-notice-snackbar-list .wc-block-components-button,
body.fnd-surface-cart .fnd-cart__block .wc-block-components-notice-banner a { color: inherit; text-decoration: underline; text-decoration-color: var(--fn-orange); text-decoration-thickness: 2px; text-underline-offset: 3px; }

/* skeleton while the block hydrates */
body.fnd-surface-cart .fnd-cart__block .wc-block-cart--skeleton .wc-block-cart__main,
body.fnd-surface-cart .fnd-cart__block .wc-block-cart--is-loading .wc-block-cart__main { min-height: 240px; }

/* ---- Delivery / store / questions + consultation card ------------------ */
.cart-extras { display: grid; gap: var(--s-4); }
@media (min-width: 1024px) { .cart-extras { grid-template-columns: minmax(0, 1fr) 380px; gap: 40px; align-items: stretch; } }
@media (min-width: 1280px) { .cart-extras { grid-template-columns: minmax(0, 1fr) 400px; gap: 48px; } }
.cart-perks { list-style: none; margin: 0; padding: 0; display: grid; border-radius: var(--r-lg); background: var(--fn-warm); }
.cart-perk { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; min-width: 0; }
.cart-perk + .cart-perk { border-top: 1px solid var(--fn-line); }
@media (min-width: 768px) {
  .cart-perks { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; background: none; border-radius: 0; }
  .cart-perk { padding: 18px; border-radius: var(--r-lg); background: var(--fn-warm); }
  .cart-perk + .cart-perk { border-top: 0; }
}
.cart-perk__icon { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--fn-orange-tint); color: var(--fn-ink); }
.cart-perk__icon svg { width: 18px; height: 18px; }
.cart-nowrap { white-space: nowrap; }
.cart-perk__title { font-size: 15px; font-weight: 700; line-height: 1.3; }
.cart-perk__text { font-size: 14px; line-height: 1.45; color: var(--fn-ink); margin-top: 4px; }
.cart-perk__sub { font-size: 13px; line-height: 1.45; color: var(--fn-meta); margin-top: 4px; overflow-wrap: anywhere; }
.cart-perk .fn-link { font-weight: 700; }
.cart-perk__sub .fn-link { font-weight: 400; color: var(--fn-ink-2); }

.cart-advice { display: flex; gap: 14px; align-items: flex-start; padding: 20px; border-radius: var(--r-lg); border: 1px solid var(--fn-line); background: #fff; }
.cart-advice__icon { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--fn-orange-tint); color: var(--fn-ink); }
.cart-advice__icon svg { width: 22px; height: 22px; }
.cart-advice__title { font-size: 15px; font-weight: 700; }
.cart-advice__text { font-size: 14px; color: var(--fn-ink-2); margin: 4px 0 10px; line-height: 1.5; }

/* ---- Empty state -------------------------------------------------------- */
.cart-empty { display: flex; flex-direction: column; gap: var(--s-7); }
.cart-empty__hero {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 48px 20px 40px; border-radius: 20px; background: var(--fn-black); color: #fff;
}
.cart-empty__hero::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background: url("../../brand/slider-bg.jpg") center / cover no-repeat;
  opacity: .55; filter: grayscale(1) contrast(1.25) brightness(.7);
}
.cart-empty__hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(50% 60% at 50% 18%, rgba(247, 123, 1, .22), transparent 70%), linear-gradient(180deg, rgba(13, 13, 13, .35), rgba(13, 13, 13, .9));
}
@media (min-width: 768px) { .cart-empty__hero { padding: 72px 40px 56px; } }
.cart-empty__art { position: relative; width: 112px; height: 112px; display: grid; place-items: center; margin-bottom: 24px; }
.cart-empty__icon {
  position: relative; z-index: 2; display: grid; place-items: center; width: 88px; height: 88px; border-radius: 50%;
  background: var(--fn-orange); color: var(--fn-ink); box-shadow: 0 18px 48px rgba(247, 123, 1, .45), inset 0 -6px 14px rgba(0, 0, 0, .12);
}
.cart-empty__icon svg { width: 40px; height: 40px; }
.cart-empty__ring { position: absolute; inset: 0; border-radius: 50%; border: 1.5px solid rgba(247, 123, 1, .45); animation: cart-ring 3.2s var(--ease) infinite; }
.cart-empty__ring--2 { animation-delay: 1.6s; }
@keyframes cart-ring { 0% { transform: scale(.78); opacity: .9; } 100% { transform: scale(1.35); opacity: 0; } }
.cart-empty__title { font-size: clamp(30px, 3vw + 16px, 48px); line-height: 1.05; letter-spacing: -.02em; color: #fff; scroll-margin-top: calc(var(--fn-sticky-top, 64px) + 24px); }
.cart-empty__title:focus-visible { outline-offset: 6px; }
.cart-empty__lead { margin-top: 12px; max-width: 46ch; font-size: clamp(16px, .4vw + 14px, 18px); line-height: 1.55; color: var(--fn-on-dark); }
.cart-empty__btns { display: flex; flex-direction: column; gap: 12px; width: 100%; max-width: 340px; margin-top: 28px; }
.cart-empty__btns .fn-btn { width: 100%; }
@media (min-width: 640px) { .cart-empty__btns { flex-direction: row; justify-content: center; width: auto; max-width: none; } .cart-empty__btns .fn-btn { width: auto; } }
.cart-empty__chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--fn-dark-line); width: 100%; max-width: 820px; }
.cart-empty__chips .fn-chip { background: rgba(255, 255, 255, .08); color: #fff; border-color: rgba(255, 255, 255, .14); }
.cart-empty__chips .fn-chip:hover { background: var(--fn-orange); color: var(--fn-ink); border-color: var(--fn-orange); }
@media (max-width: 639.98px) {
  .cart-empty__chips {
    flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none;
    width: calc(100% + 40px); margin-inline: -20px; padding-inline: 20px;
    -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 40px), transparent);
            mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 40px), transparent);
  }
  .cart-empty__chips::-webkit-scrollbar { display: none; }
  .cart-empty__chips .fn-chip { flex: none; }
}
.cart-empty__cats .fn-tile:not(.fn-tile--photo):not(.fn-tile--type) { --tile-bg: var(--fn-warm); border-color: transparent; }
.cart-empty__cats .fn-tiles:empty { display: none; }

/* ---- Recommendations ---------------------------------------------------- */
.cart-recs[hidden] { display: none; }
.cart-recs .fn-sechead { align-items: flex-end; }
.cart-recs__nav { display: flex; gap: 8px; flex: none; }
.cart-recs__prev svg { transform: rotate(180deg); }
.cart-recs__nav .fn-iconbtn[disabled] { opacity: .35; box-shadow: none; cursor: default; background: #fff; }
.cart-rail { padding-bottom: 20px; margin-bottom: -8px; }
@media (max-width: 767.98px) {
  .cart-recs { padding-top: var(--s-6); }
  .cart-rail { grid-auto-columns: 44%; scroll-padding-inline: var(--fn-gutter); }
  .cart-rail .fn-card__cat { display: none; }
}
.cart-rail .fn-card__cta:not(.fn-btn--soft):not(.is-done) {
  --btn-bg: transparent; --btn-fg: var(--fn-ink); --btn-bd: var(--fn-ink);
  --btn-bg-h: var(--fn-ink); --btn-fg-h: #fff; --btn-bd-h: var(--fn-ink);
}
.cart-rail .fn-card { transition: opacity 300ms var(--ease), transform 300ms var(--ease); }
.cart-rail .fn-card.cart-rail__gone { opacity: 0; transform: scale(.96); pointer-events: none; transition-delay: 500ms; }
@media (min-width: 1024px) {
  .cart-rail { grid-auto-columns: calc((100% - 3 * var(--fn-gap)) / 4); margin-inline: 0; padding-inline: 0; scroll-padding-inline: 0; }
}

/* ---- Motion / print ----------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .cart-empty__ring { animation: none; opacity: .4; transform: scale(1.12); }
  .cart-empty__ring--2 { display: none; }
  .cart-rail .fn-card,
  body.fnd-surface-cart .fnd-cart__block .wc-block-cart-item__image img { transition: none; }
}
@media print {
  .cart-recs, .cart-advice, .cart-perks, .cart-empty__chips { display: none !important; }
}
