/* =========================================================
   Seed City — Cart Polish v2.3.2
   THE FIX THAT ACTUALLY WORKS

   Problem: WooCommerce sanitizes cart_item_name filter and strips <input> tags
   Solution: JavaScript moves WooCommerce's native quantity input into our card

   - Uses WooCommerce's real quantity input (not custom HTML)
   - Moves it via JavaScript after page load
   - Styles it to look like minicart
   - All functionality works (update cart, validation, etc)
   ========================================================= */

:root {
  --c-leaf: #AFEA80;
  --c-forest: #1C3A2A;
  --c-gold: #FFD600;
  --c-ink: #111827;
  --c-muted: #6B7280;

  --sc-border: rgba(28,58,42,.14);
  --sc-border2: rgba(17,24,39,.10);
  --sc-card: #fff;
  --sc-radius: 18px;
  --sc-radius-sm: 14px;
  --sc-shadow-sm: 0 1px 0 rgba(0,0,0,.04);
  --sc-shadow-md: 0 10px 18px rgba(0,0,0,.08);
  --sc-ring: 0 0 0 3px rgba(255,214,0,.32);

  --mc-thumb: 64px;
  --mc-pill-h: 26px;
  --mc-gap: 8px;
  --mc-pad: 10px;
}

/* ========== GENERAL CART LAYOUT ========== */
.sc-cart-polish-v2 .woocommerce {
  max-width: 100% !important;
}

/* ========== LINKS ========== */
.sc-cart-polish-v2 .woocommerce a {
  color: var(--c-forest) !important;
  text-decoration-color: rgba(255,214,0,.65) !important;
  text-underline-offset: 3px !important;
}

.sc-cart-polish-v2 .woocommerce a:hover {
  text-decoration-color: rgba(255,214,0,.95) !important;
}

/* ========== NOTICES ========== */
.sc-cart-polish-v2 .woocommerce-info::before,
.sc-cart-polish-v2 .woocommerce-message::before,
.sc-cart-polish-v2 .woocommerce-error::before {
  content: none !important;
  display: none !important;
}

.sc-cart-polish-v2 .woocommerce-info,
.sc-cart-polish-v2 .woocommerce-message,
.sc-cart-polish-v2 .woocommerce-error {
  border-radius: var(--sc-radius) !important;
  border: 1px solid var(--sc-border) !important;
  box-shadow: var(--sc-shadow-sm) !important;
  padding: 12px 14px !important;
  margin-bottom: 18px !important;
}

.sc-cart-polish-v2 .woocommerce-info {
  background: rgba(175,234,128,.18) !important;
}

.sc-cart-polish-v2 .woocommerce-message {
  background: rgba(175,234,128,.14) !important;
}

.sc-cart-polish-v2 .woocommerce-error {
  background: rgba(239,68,68,.10) !important;
  border-color: rgba(239,68,68,.22) !important;
}

/* ========== CART FORM CONTAINER ========== */
.sc-cart-polish-v2 .woocommerce-cart-form {
  background: var(--sc-card) !important;
  border: 1px solid var(--sc-border) !important;
  border-radius: var(--sc-radius) !important;
  box-shadow: var(--sc-shadow-sm) !important;
  padding: 14px !important;
  margin-bottom: 18px !important;
}

/* ========== KILL WOO TABLE LAYOUT ========== */
.sc-cart-polish-v2 .woocommerce-cart-form__contents {
  border: none !important;
  width: 100% !important;
  max-width: 100% !important;
}

.sc-cart-polish-v2 .woocommerce-cart-form__contents thead {
  display: none !important;
}

.sc-cart-polish-v2 .woocommerce-cart-form__contents,
.sc-cart-polish-v2 .woocommerce-cart-form__contents tbody,
.sc-cart-polish-v2 .woocommerce-cart-form__contents tr,
.sc-cart-polish-v2 .woocommerce-cart-form__contents td,
.sc-cart-polish-v2 .woocommerce-cart-form__contents th {
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
}

/* Make cart rows block-level for card layout */
.sc-cart-polish-v2 .woocommerce-cart-form__contents tr.cart_item,
.sc-cart-polish-v2 .woocommerce-cart-form__contents tr.woocommerce-cart-form__cart-item {
  display: block !important;
  width: 100% !important;
  margin: 0 0 var(--mc-gap) !important;
  padding: 0 !important;
}

.sc-cart-polish-v2 .woocommerce-cart-form__contents tr.cart_item td,
.sc-cart-polish-v2 .woocommerce-cart-form__contents tr.woocommerce-cart-form__cart-item td {
  display: block !important;
  width: 100% !important;
  padding: 0 !important;
}

/* Hide original Woo columns - we render everything in the card */
.sc-cart-polish-v2 .woocommerce-cart-form__contents td.product-remove,
.sc-cart-polish-v2 .woocommerce-cart-form__contents td.product-thumbnail,
.sc-cart-polish-v2 .woocommerce-cart-form__contents td.product-price,
.sc-cart-polish-v2 .woocommerce-cart-form__contents td.product-quantity,
.sc-cart-polish-v2 .woocommerce-cart-form__contents td.product-subtotal {
  display: none !important;
}

/* Hide thead quantity column too */
.sc-cart-polish-v2 .woocommerce-cart-form__contents th.product-quantity {
  display: none !important;
}

/* Hide Woo's variation display under the name */
.sc-cart-polish-v2 .woocommerce-cart-form__contents td.product-name dl.variation,
.sc-cart-polish-v2 .woocommerce-cart-form__contents td.product-name .variation {
  display: none !important;
}

.sc-cart-polish-v2 .woocommerce-cart-form__contents td.product-name {
  padding: 0 !important;
}

/* ========== MINICART-STYLE PRODUCT CARDS ========== */
.sc-cart-polish-v2 .sc-cart-card {
  position: relative !important;
  display: grid !important;
  grid-template-columns: var(--mc-thumb) 1fr !important;
  grid-template-rows: auto !important;
  gap: 8px 10px !important;
  padding: var(--mc-pad) !important;
  border-radius: var(--sc-radius-sm) !important;
  border: 1px solid var(--sc-border) !important;

  /* Minicart gradient */
  background:
    linear-gradient(180deg, rgba(175,234,128,.09), rgba(255,255,255,.98) 62%),
    #fff !important;

  box-shadow: 0 1px 0 rgba(0,0,0,.02) !important;
  transition: box-shadow .15s ease, border-color .15s ease, transform .12s ease !important;
}

.sc-cart-polish-v2 .sc-cart-card:hover {
  border-color: rgba(255,214,0,.30) !important;
  box-shadow: 0 9px 18px rgba(0,0,0,.09) !important;
  transform: translateY(-1px) !important;
}

/* ========== REMOVE BUTTON (TOP-RIGHT X) ========== */
.sc-cart-polish-v2 .sc-cart-remove {
  position: absolute !important;
  top: 8px !important;
  right: 8px !important;
  inset: 8px 8px auto auto !important;
  margin: 0 !important;
  padding: 0 !important;

  width: 28px !important;
  height: 28px !important;
  border-radius: 999px !important;
  border: 1px solid rgba(17,24,39,.12) !important;
  background: #fff !important;

  color: rgba(17,24,39,.70) !important;
  text-decoration: none !important;
  font-size: 18px !important;
  line-height: 1 !important;
  text-align: center !important;

  display: grid !important;
  place-items: center !important;
  align-content: center !important;
  justify-content: center !important;
  z-index: 20 !important;

  transition: all .15s ease !important;
}

.sc-cart-polish-v2 .sc-cart-remove:hover {
  background: rgba(255,214,0,.14) !important;
  border-color: rgba(255,214,0,.45) !important;
  box-shadow: 0 0 0 2px rgba(255,214,0,.14) !important;
}

/* ========== THUMBNAIL ========== */
.sc-cart-polish-v2 .sc-cart-thumb {
  display: block !important;
  position: relative !important;      /* CHANGED: anchor ::before */
  overflow: visible !important;        /* CHANGED: stop radius clipping */
  border-radius: 14px !important;
  text-decoration: none !important;
  grid-column: 1 !important;
  grid-row: 1 / -1 !important;
}

.sc-cart-polish-v2 .sc-cart-thumb img {
  width: var(--mc-thumb) !important;
  height: var(--mc-thumb) !important;
  object-fit: cover !important;
  border-radius: 14px !important;
  border: 1px solid rgba(17,24,39,.10) !important;
  background: rgba(238,241,244,.70) !important;
  display: block !important;
  transition: transform .22s ease !important;
  will-change: transform !important;
}

/* Hover zoom effect like minicart */
.sc-cart-polish-v2 .sc-cart-card:hover .sc-cart-thumb img {
  transform: scale(1.22) !important;
}

/* No image fallback */
.sc-cart-polish-v2 .sc-cart-thumb-noimg {
  width: var(--mc-thumb) !important;
  height: var(--mc-thumb) !important;
  display: grid !important;
  place-items: center !important;
  border-radius: 14px !important;
  border: 1px solid rgba(17,24,39,.10) !important;
  background: rgba(238,241,244,.70) !important;
  color: rgba(17,24,39,.55) !important;
  font-size: 9px !important;
  font-weight: 900 !important;
  text-transform: uppercase !important;
  letter-spacing: .02em !important;
}

/* ========== FREE SEED BADGE ========== */
/* Gold dot indicator on free seed thumbnails */
.sc-cart-polish-v2 .sc-cart-card--freebie .sc-cart-thumb::before {
  content: '';
  position: absolute;
  top: 0px;                              /* CHANGED: sit on corner */
  left: 0px;                             /* CHANGED: sit on corner */
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--c-gold, #FFD600);
  box-shadow: 0 0 0 2px rgba(255, 214, 0, 0.2);
  z-index: 10;
  pointer-events: none;
}

/* ========== MAIN CONTENT STACK ========== */
.sc-cart-polish-v2 .sc-cart-main {
  min-width: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
  /* Removed padding-right - let each child handle its own spacing */
}

/* ========== TITLE ========== */
.sc-cart-polish-v2 .sc-cart-title {
  color: var(--c-forest) !important;
  font-size: 13.5px !important;
  font-weight: 950 !important;
  line-height: 1.12 !important;
  text-decoration: none !important;

  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;

  padding-right: 34px !important; /* respect X button space */
}

.sc-cart-polish-v2 .sc-cart-title:hover {
  text-decoration: underline !important;
  text-decoration-color: rgba(255,214,0,.65) !important;
  text-underline-offset: 3px !important;
}

/* ========== BRAND ========== */
.sc-cart-polish-v2 .sc-cart-brand {
  font-size: 11.5px !important;
  font-weight: 900 !important;
  color: rgba(17,24,39,.55) !important;
  letter-spacing: .01em !important;
  text-transform: uppercase !important;
  line-height: 1.1 !important;

  padding-right: 34px !important; /* respect X button space */
}

/* ========== META ROW (PACK SIZE + UNIT PRICE) ========== */
.sc-cart-polish-v2 .sc-cart-meta {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  flex-wrap: wrap !important;
  margin-top: 2px !important;
}

.sc-cart-polish-v2 .sc-cart-pill {
  display: inline-flex !important;
  align-items: center !important;
  height: var(--mc-pill-h) !important;
  padding: 0 10px !important;
  padding-top: 2px !important;
  border-radius: 999px !important;
  background: rgba(175,234,128,.11) !important;
  border: 1px solid rgba(28,58,42,.15) !important;
  color: rgba(17,24,39,.92) !important;
  font-size: 11.5px !important;
  font-weight: 950 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

.sc-cart-polish-v2 .sc-cart-unit-dash {
  margin: 0 2px !important;
  color: rgba(17,24,39,.40) !important;
}

/* Keep price aligned in pill */
.sc-cart-polish-v2 .sc-cart-pill .woocommerce-Price-amount,
.sc-cart-polish-v2 .sc-cart-pill .woocommerce-Price-amount * {
  display: inline-flex !important;
  align-items: center !important;
  line-height: 1 !important;
}

/* ========== CONTROLS ROW (QTY + SUBTOTAL) ========== */
/* REPLACED: sc-cart-controls */
.sc-cart-polish-v2 .sc-cart-controls {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
  width: 100% !important;
  margin-top: 6px !important;
}

/* ========== QUANTITY CONTROLS (MOVED FROM WOO COLUMN) ========== */

/* Container for moved quantity input */
/* REPLACED: sc-cart-qty-moved */
.sc-cart-polish-v2 .sc-cart-qty-moved {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 3px !important;
  border-radius: 999px !important;
  border: 1px solid rgba(28,58,42,.17) !important;
  background: rgba(175,234,128,.11) !important;
  box-sizing: border-box !important;
  min-width: 0 !important;
}

/* +/- buttons */
/* REPLACED: qty button rules */
.sc-cart-polish-v2 .sc-cart-qty-btn,
.sc-cart-polish-v2 .sc-cart-qty-moved button {
  width: 32px !important;
  height: 32px !important;
  border-radius: 999px !important;
  border: 1px solid rgba(28,58,42,.14) !important;
  background: #fff !important;
  cursor: pointer !important;

  display: grid !important;
  place-items: center !important;

  font-weight: 950 !important;
  font-size: 16px !important;
  line-height: 1 !important;
  color: var(--c-forest) !important;

  padding: 0 !important;
  margin: 0 !important;

  transition: background .15s ease, box-shadow .15s ease, border-color .15s ease !important;
}

.sc-cart-polish-v2 .sc-cart-qty-btn:hover,
.sc-cart-polish-v2 .sc-cart-qty-moved button:hover {
  background: rgba(255,214,0,.12) !important;
  border-color: rgba(255,214,0,.42) !important;
  box-shadow: 0 0 0 2px rgba(255,214,0,.12) !important;
}

.sc-cart-polish-v2 .sc-cart-qty-btn:focus-visible,
.sc-cart-polish-v2 .sc-cart-qty-moved button:focus-visible {
  outline: none !important;
  box-shadow: var(--sc-ring) !important;
  border-color: rgba(255,214,0,.55) !important;
}

/* Quantity input field */
/* REPLACED: qty input rules */
.sc-cart-polish-v2 .sc-cart-qty-input,
.sc-cart-polish-v2 .sc-cart-qty-moved input.qty {
  width: 44px !important;
  min-width: 44px !important;
  max-width: 44px !important;
  height: 32px !important;
  border-radius: 10px !important;
  border: 1px solid rgba(28,58,42,.14) !important;
  background: #fff !important;
  text-align: center !important;
  font-weight: 950 !important;
  font-size: 13px !important;
  color: var(--c-ink) !important;
  outline: none !important;
  box-sizing: border-box !important;
  padding: 0 !important;
  margin: 0 !important;
  appearance: textfield !important;
  -moz-appearance: textfield !important;
  flex: 0 0 44px !important;
}

.sc-cart-polish-v2 .sc-cart-qty-input:focus,
.sc-cart-polish-v2 .sc-cart-qty-moved input.qty:focus {
  border-color: rgba(255,214,0,.60) !important;
  box-shadow: 0 0 0 2px rgba(255,214,0,.14) !important;
}

/* Remove spinner arrows */
.sc-cart-polish-v2 .sc-cart-qty-input::-webkit-outer-spin-button,
.sc-cart-polish-v2 .sc-cart-qty-input::-webkit-inner-spin-button,
.sc-cart-polish-v2 .sc-cart-qty-moved input.qty::-webkit-outer-spin-button,
.sc-cart-polish-v2 .sc-cart-qty-moved input.qty::-webkit-inner-spin-button {
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
}

/* Hide any labels/extra elements from Woo */
.sc-cart-polish-v2 .sc-cart-qty-moved label,
.sc-cart-polish-v2 .sc-cart-qty-moved .screen-reader-text {
  display: none !important;
}

/* Sold individually fallback */
.sc-cart-polish-v2 .sc-cart-qty-static {
  height: var(--mc-pill-h) !important;
  padding: 0 14px !important;
  padding-top: 2px !important;
  border-radius: 999px !important;
  border: 1px solid rgba(28,58,42,.17) !important;
  background: rgba(175,234,128,.11) !important;
  font-size: 11.5px !important;
  font-weight: 950 !important;
  color: rgba(17,24,39,.92) !important;
  display: inline-flex !important;
  align-items: center !important;
  white-space: nowrap !important;
  line-height: 1 !important;
}

/* ========== SUBTOTAL (GOLD PILL) ========== */
.sc-cart-polish-v2 .sc-cart-total {
  justify-self: end !important;
  text-align: right !important;
}

.sc-cart-polish-v2 .sc-cart-total .woocommerce-Price-amount {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 6px 10px !important;
  border-radius: 12px !important;
  background: rgba(255,214,0,.13) !important;
  border: 1px solid rgba(255,214,0,.30) !important;
  color: var(--c-forest) !important;
  font-weight: 950 !important;
  font-size: 13px !important;
  white-space: nowrap !important;
}

.sc-cart-polish-v2 .sc-cart-total .woocommerce-Price-amount *,
.sc-cart-polish-v2 .sc-cart-total .woocommerce-Price-amount bdi {
  line-height: 1 !important;
  display: inline-flex !important;
  align-items: center !important;
}

/* ========== COUPON + UPDATE CART BUTTONS ========== */
.sc-cart-polish-v2 .actions {
  display: flex !important;
  gap: 10px !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  padding: 10px 0 !important;
}

.sc-cart-polish-v2 .coupon {
  display: flex !important;
  gap: 10px !important;
  flex-wrap: wrap !important;
  align-items: center !important;
}

.sc-cart-polish-v2 .coupon input.input-text {
  border-radius: 14px !important;
  border: 1px solid var(--sc-border) !important;
  padding: 10px 12px !important;
  background: #fff !important;
  min-width: 200px !important;
  height: 42px !important;
  font-size: 14px !important;
  transition: border-color .2s ease, box-shadow .2s ease !important;
}

.sc-cart-polish-v2 .coupon input.input-text:focus {
  border-color: rgba(255,214,0,.45) !important;
  box-shadow: var(--sc-ring) !important;
  outline: none !important;
}

/* ========== BUTTONS (GRADIENT STYLE LIKE CHECKOUT) ========== */
.sc-cart-polish-v2 .woocommerce button.button,
.sc-cart-polish-v2 .woocommerce a.button,
.sc-cart-polish-v2 .woocommerce input.button {
  border-radius: 999px !important;
  padding: 10px 14px !important;
  min-height: 42px !important;
  font-weight: 950 !important;
  font-size: 14px !important;
  text-decoration: none !important;

  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;

  border: 1px solid rgba(28,58,42,.26) !important;
  color: var(--c-forest) !important;

  box-shadow: 0 10px 16px rgba(0,0,0,.07) !important;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease, border-color .12s ease !important;
  cursor: pointer !important;
}

/* Regular buttons (not .alt) - gradient */
.sc-cart-polish-v2 .woocommerce button.button:not(.alt),
.sc-cart-polish-v2 .woocommerce input.button:not(.alt),
.sc-cart-polish-v2 .woocommerce a.button:not(.alt) {
  background: linear-gradient(90deg, rgba(175,234,128,.42), rgba(255,214,0,.34)) !important;
}

/* Hover state */
.sc-cart-polish-v2 .woocommerce button.button:hover,
.sc-cart-polish-v2 .woocommerce input.button:hover,
.sc-cart-polish-v2 .woocommerce a.button:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 14px 22px rgba(0,0,0,.10) !important;
  border-color: rgba(255,214,0,.55) !important;
}

/* Active/click state */
.sc-cart-polish-v2 .woocommerce button.button:active,
.sc-cart-polish-v2 .woocommerce input.button:active,
.sc-cart-polish-v2 .woocommerce a.button:active {
  transform: scale(.98) !important;
  box-shadow: 0 6px 16px rgba(0,0,0,.12) !important;
}

/* Focus visible for accessibility */
.sc-cart-polish-v2 .woocommerce button.button:focus-visible,
.sc-cart-polish-v2 .woocommerce input.button:focus-visible,
.sc-cart-polish-v2 .woocommerce a.button:focus-visible {
  outline: none !important;
  box-shadow: var(--sc-ring), 0 14px 22px rgba(0,0,0,.10) !important;
}

/* Disabled buttons */
.sc-cart-polish-v2 .woocommerce button.button:disabled,
.sc-cart-polish-v2 .woocommerce input.button:disabled {
  opacity: 0.5 !important;
  cursor: not-allowed !important;
  transform: none !important;
}

/* ========== CART TOTALS BOX ========== */
.sc-cart-polish-v2 .cart-collaterals {
  margin-top: 18px !important;
}

.sc-cart-polish-v2 .cart-collaterals .cart_totals {
  background: var(--sc-card) !important;
  border: 1px solid var(--sc-border) !important;
  border-radius: var(--sc-radius) !important;
  box-shadow: var(--sc-shadow-sm) !important;
  padding: 18px !important;
}

.sc-cart-polish-v2 .cart-collaterals .cart_totals h2 {
  color: var(--c-forest) !important;
  margin: 0 0 12px !important;
  font-weight: 950 !important;
  letter-spacing: .01em !important;
}

/* Hide shipping section from cart (we do it at checkout) */
.sc-cart-polish-v2 .cart_totals .shipping,
.sc-cart-polish-v2 .cart_totals tr.woocommerce-shipping-totals,
.sc-cart-polish-v2 .woocommerce-shipping-calculator,
.sc-cart-polish-v2 .shipping-calculator-form,
.sc-cart-polish-v2 .shipping-calculator-button {
  display: none !important;
}

/* Clean table styling */
.sc-cart-polish-v2 .cart_totals table,
.sc-cart-polish-v2 .cart_totals tbody,
.sc-cart-polish-v2 .cart_totals tr,
.sc-cart-polish-v2 .cart_totals th,
.sc-cart-polish-v2 .cart_totals td {
  border: none !important;
  background: transparent !important;
}

.sc-cart-polish-v2 .cart_totals th {
  color: rgba(17,24,39,.55) !important;
  font-weight: 700 !important;
  padding: 10px 0 !important;
  text-align: left !important;
}

.sc-cart-polish-v2 .cart_totals td {
  padding: 10px 0 !important;
  text-align: right !important;
  color: var(--c-forest) !important;
  font-weight: 700 !important;
}

/* Order total row */
.sc-cart-polish-v2 .cart_totals tr.order-total th,
.sc-cart-polish-v2 .cart_totals tr.order-total td {
  padding-top: 14px !important;
  border-top: 2px solid rgba(28,58,42,.14) !important;
  font-size: 16px !important;
  font-weight: 950 !important;
}

/* Proceed to checkout button */
.sc-cart-polish-v2 .wc-proceed-to-checkout {
  padding-top: 14px !important;
}

.sc-cart-polish-v2 .wc-proceed-to-checkout a.checkout-button {
  width: 100% !important;
  background: linear-gradient(90deg, rgba(255,214,0,.52), rgba(175,234,128,.30)) !important;
  border-color: rgba(28,58,42,.32) !important;
  position: relative !important;
  overflow: hidden !important;
}

/* Shine effect on checkout button (like checkout page) */
.sc-cart-polish-v2 .wc-proceed-to-checkout a.checkout-button::after {
  content: "" !important;
  position: absolute !important;
  inset: -40% -60% !important;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.55), transparent) !important;
  transform: rotate(14deg) translateX(-70%) !important;
  opacity: 0 !important;
  transition: opacity .18s ease !important;
  pointer-events: none !important;
}

.sc-cart-polish-v2 .wc-proceed-to-checkout a.checkout-button:hover::after {
  opacity: 1 !important;
  animation: sc-shine .55s ease !important;
}

@keyframes sc-shine {
  to { transform: rotate(14deg) translateX(170%); }
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
  /* REPLACED: responsive sc-cart-controls */
  .sc-cart-polish-v2 .sc-cart-controls {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 8px !important;
  }

  .sc-cart-polish-v2 .sc-cart-qty-moved {
    max-width: 100% !important;
  }

  .sc-cart-polish-v2 .sc-cart-total {
    justify-self: start !important;
    text-align: left !important;
  }
}

@media (max-width: 600px) {
  :root {
    --mc-thumb: 58px;
  }

  .sc-cart-polish-v2 .sc-cart-card {
    grid-template-columns: var(--mc-thumb) 1fr !important;
    gap: 8px !important;
  }

  .sc-cart-polish-v2 .sc-cart-main {
    padding-right: 32px !important;
  }

  .sc-cart-polish-v2 .coupon {
    width: 100% !important;
  }

  .sc-cart-polish-v2 .coupon input.input-text {
    flex: 1 !important;
    min-width: 0 !important;
  }

  .sc-cart-polish-v2 .actions {
    flex-direction: column !important;
    align-items: stretch !important;
  }

  .sc-cart-polish-v2 .actions button {
    width: 100% !important;
  }
}

/* ========== BREAKDANCE TBODY FIX ========== */
.sc-cart-polish-v2 .breakdance-woocommerce table.shop_table tbody,
.sc-cart-polish-v2 .breakdance-woocommerce .woocommerce-cart-form__contents tbody {
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
}

/* =========================================================
   Cart table: kill the native price/subtotal columns
   (we show totals inside the card)
   ========================================================= */
body.sc-cart-polish-v2 td.product-price,
body.sc-cart-polish-v2 th.product-price,
body.sc-cart-polish-v2 td.product-subtotal,
body.sc-cart-polish-v2 th.product-subtotal {
  display: none !important;
}

/* If Breakdance/Woo sneaks spans back in, nuke them too */
body.sc-cart-polish-v2 td.product-price > span,
body.sc-cart-polish-v2 td.product-subtotal > span,
body.sc-cart-polish-v2 td.product-subtotal bdi {
  display: none !important;
}

/* =========================================================
   Moved qty widget layout (stop input hiding under buttons)
   ========================================================= */
/* REPLACED: bottom overrides to match new flex model */
body.sc-cart-polish-v2 .sc-cart-controls .quantity.sc-cart-qty-moved {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  width: auto !important;
}

/* Make sure buttons don’t overlap the input */
body.sc-cart-polish-v2 .sc-cart-controls .quantity.sc-cart-qty-moved > button {
  position: static !important;
  flex: 0 0 32px !important;
  width: 32px !important;
  height: 32px !important;
  padding: 0 !important;
}

/* Force the input to be the fixed-width pill we want */
body.sc-cart-polish-v2 .sc-cart-controls .quantity.sc-cart-qty-moved input.qty.sc-cart-qty-input,
body.sc-cart-polish-v2 .sc-cart-controls .quantity.sc-cart-qty-moved input.qty {
  width: 44px !important;
  min-width: 44px !important;
  max-width: 44px !important;
  flex: 0 0 44px !important;
  padding: 0 !important;
  text-align: center !important;
  appearance: textfield !important;
}

/* Optional: keep the whole controls row aligned nicely */
/* REPLACED: bottom sc-cart-controls override to match flex */
body.sc-cart-polish-v2 .sc-cart-controls {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
}

/* =========================================================
   Qty Widget — Hard Reset + Rebuild (Breakdance/Woo overrides)
   Scope: ONLY our moved qty widget inside the cart card
   ========================================================= */

/* 1) Hard reset the wrapper and its children (kills random top/right/transform) */
body.sc-cart-polish-v2 .sc-cart-controls .quantity.sc-cart-qty-moved,
body.sc-cart-polish-v2 .sc-cart-controls .quantity.sc-cart-qty-moved * {
  box-sizing: border-box !important;
}

body.sc-cart-polish-v2 .sc-cart-controls .quantity.sc-cart-qty-moved {
  /* kill layout pollution */
  position: static !important;
  inset: auto !important;
  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  left: auto !important;
  transform: none !important;

  /* rebuild */
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;

  padding: 3px !important;
  border-radius: 999px !important;
  border: 1px solid rgba(28,58,42,.17) !important;
  background: rgba(175,234,128,.11) !important;

  width: auto !important;
  min-width: 0 !important;
  max-width: 100% !important;
}

/* If Breakdance adds extra wrappers inside .quantity, force them to not break layout */
body.sc-cart-polish-v2 .sc-cart-controls .quantity.sc-cart-qty-moved > * {
  position: static !important;
  inset: auto !important;
  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  left: auto !important;
  transform: none !important;
}

/* 2) Buttons: kill any absolute positioning + rebuild */
body.sc-cart-polish-v2 .sc-cart-controls .quantity.sc-cart-qty-moved > button,
body.sc-cart-polish-v2 .sc-cart-controls .quantity.sc-cart-qty-moved .sc-cart-qty-btn,
body.sc-cart-polish-v2 .sc-cart-controls .quantity.sc-cart-qty-moved button {
  /* kill inherited crap */
  appearance: none !important;
  -webkit-appearance: none !important;
  position: static !important;
  inset: auto !important;
  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  left: auto !important;
  transform: none !important;
  float: none !important;

  /* size + layout */
  flex: 0 0 32px !important;
  width: 32px !important;
  min-width: 32px !important;
  max-width: 32px !important;
  height: 32px !important;

  display: grid !important;
  place-items: center !important;

  /* look */
  border-radius: 999px !important;
  border: 1px solid rgba(28,58,42,.14) !important;
  background: #fff !important;
  cursor: pointer !important;

  padding: 0 !important;
  margin: 0 !important;

  font: inherit !important;
  font-weight: 950 !important;
  font-size: 16px !important;
  line-height: 1 !important;
  color: var(--c-forest) !important;

  transition: background .15s ease, box-shadow .15s ease, border-color .15s ease !important;
}

body.sc-cart-polish-v2 .sc-cart-controls .quantity.sc-cart-qty-moved > button:hover,
body.sc-cart-polish-v2 .sc-cart-controls .quantity.sc-cart-qty-moved button:hover {
  background: rgba(255,214,0,.12) !important;
  border-color: rgba(255,214,0,.42) !important;
  box-shadow: 0 0 0 2px rgba(255,214,0,.12) !important;
}

body.sc-cart-polish-v2 .sc-cart-controls .quantity.sc-cart-qty-moved > button:focus-visible,
body.sc-cart-polish-v2 .sc-cart-controls .quantity.sc-cart-qty-moved button:focus-visible {
  outline: none !important;
  box-shadow: var(--sc-ring) !important;
  border-color: rgba(255,214,0,.55) !important;
}

/* 3) Input: force fixed width, remove any 100% nonsense, kill transforms */
body.sc-cart-polish-v2 .sc-cart-controls .quantity.sc-cart-qty-moved input.qty,
body.sc-cart-polish-v2 .sc-cart-controls .quantity.sc-cart-qty-moved input.qty.sc-cart-qty-input {
  /* kill inherited crap */
  appearance: textfield !important;
  -webkit-appearance: none !important;
  -moz-appearance: textfield !important;
  position: static !important;
  inset: auto !important;
  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  left: auto !important;
  transform: none !important;
  float: none !important;

  /* size */
  flex: 0 0 44px !important;
  width: 44px !important;
  min-width: 44px !important;
  max-width: 44px !important;
  height: 32px !important;

  /* look */
  border-radius: 10px !important;
  border: 1px solid rgba(28,58,42,.14) !important;
  background: #fff !important;

  padding: 0 !important;
  margin: 0 !important;

  text-align: center !important;
  font: inherit !important;
  font-weight: 950 !important;
  font-size: 13px !important;
  line-height: 1 !important;
  color: var(--c-ink) !important;

  outline: none !important;
}

body.sc-cart-polish-v2 .sc-cart-controls .quantity.sc-cart-qty-moved input.qty:focus {
  border-color: rgba(255,214,0,.60) !important;
  box-shadow: 0 0 0 2px rgba(255,214,0,.14) !important;
}

/* Remove spinner arrows */
body.sc-cart-polish-v2 .sc-cart-controls .quantity.sc-cart-qty-moved input.qty::-webkit-outer-spin-button,
body.sc-cart-polish-v2 .sc-cart-controls .quantity.sc-cart-qty-moved input.qty::-webkit-inner-spin-button {
  -webkit-appearance: none !important;
  appearance: none !important;
  margin: 0 !important;
}

/* 4) Breakdance/Woo love injecting labels/screenreader junk in odd places */
body.sc-cart-polish-v2 .sc-cart-controls .quantity.sc-cart-qty-moved label,
body.sc-cart-polish-v2 .sc-cart-controls .quantity.sc-cart-qty-moved .screen-reader-text {
  display: none !important;
}

/* 5) Safety: if some theme adds pseudo elements to .quantity, kill them */
body.sc-cart-polish-v2 .sc-cart-controls .quantity.sc-cart-qty-moved::before,
body.sc-cart-polish-v2 .sc-cart-controls .quantity.sc-cart-qty-moved::after {
  content: none !important;
  display: none !important;
}

/* =========================================================
   Qty Widget — Minicart layout (full-width pill + wide input)
   - pill: 100% width of left column
   - minus: left, plus: right
   - input: stretches to fill middle
   ========================================================= */

/* Make the controls row give the qty area full available width */
body.sc-cart-polish-v2 .sc-cart-controls {
  display: grid !important;
  grid-template-columns: 1fr auto !important; /* qty gets the space */
  align-items: center !important;
  gap: 10px !important;
  width: 100% !important;
}

/* Full-width pill */
body.sc-cart-polish-v2 .sc-cart-controls .quantity.sc-cart-qty-moved {
  width: 100% !important;
  max-width: 100% !important;

  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
}

/* Minus stays left */
body.sc-cart-polish-v2 .sc-cart-controls .quantity.sc-cart-qty-moved > button:first-of-type {
  order: 1 !important;
}

/* Input becomes wide + flexible in the middle */
body.sc-cart-polish-v2 .sc-cart-controls .quantity.sc-cart-qty-moved input.qty,
body.sc-cart-polish-v2 .sc-cart-controls .quantity.sc-cart-qty-moved input.qty.sc-cart-qty-input {
  order: 2 !important;

  flex: 1 1 auto !important;     /* THIS is the key */
  width: auto !important;        /* undo 44px */
  min-width: 40px !important;    /* stops it collapsing */
  max-width: none !important;

  height: 32px !important;
}

/* Plus stays right */
body.sc-cart-polish-v2 .sc-cart-controls .quantity.sc-cart-qty-moved > button:last-of-type {
  order: 3 !important;
}

/* Buttons stay fixed width */
body.sc-cart-polish-v2 .sc-cart-controls .quantity.sc-cart-qty-moved > button {
  flex: 0 0 32px !important;
  width: 32px !important;
  min-width: 32px !important;
  max-width: 32px !important;
  height: 32px !important;
}

/* =========================================================
   Baseline 2 tweaks (2026-01-29)
   - Hide native remove link (belt + braces)
   - Prevent qty "move + restyle" flash (hide moved widget until prepared)
   - Align Update Basket to the right, lined up with coupon
   ========================================================= */

/* Hide Woo's native remove link (even if a theme re-shows the column) */
body.sc-cart-polish-v2 table > tbody > tr.woocommerce-cart-form__cart-item.cart_item > td.product-remove > a {
  display: none !important;
}

/* Reserve space where the qty widget will land (prevents layout jump) */
body.sc-cart-polish-v2 .sc-cart-qty-placeholder {
  min-height: 40px !important; /* approx pill height */
}

/* Hide the moved Woo qty widget until we've finished classing/styling it */
body.sc-cart-polish-v2 .quantity.sc-cart-qty-moved {
  visibility: hidden !important;
  opacity: 0 !important;
}

body.sc-cart-polish-v2 .quantity.sc-cart-qty-moved.sc-qty-ready {
  visibility: visible !important;
  opacity: 1 !important;
  transition: opacity .08s linear !important;
}

/* Actions row: keep coupon left, push Update Basket to the right */
body.sc-cart-polish-v2 .woocommerce-cart-form .actions {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
}

body.sc-cart-polish-v2 .woocommerce-cart-form .actions .coupon {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
}

body.sc-cart-polish-v2 .woocommerce-cart-form .actions button[name="update_cart"],
body.sc-cart-polish-v2 .woocommerce-cart-form .actions input[name="update_cart"],
body.sc-cart-polish-v2 .woocommerce-cart-form .actions .button[name="update_cart"] {
  margin-left: auto !important; /* shove to the right */
  align-self: center !important;
}

/* =========================================================
   v2.3.2 fixes (2026-01-29)
   - Prettier pack-size pill text (PHP now outputs human text)
   - Style sale price (del/ins) inside unit-price pill
   - Kill initial "shuffle" by hiding cart form until JS finishes moving qty
   - Actions row: keep coupon at top, force Update basket to the bottom
   ========================================================= */

/* 1) No ugly initial shuffle: hide cart form until JS adds body.sc-cart-ready */
body.sc-cart-polish-v2 .woocommerce-cart-form {
  opacity: 0 !important;
  visibility: hidden !important;
}

body.sc-cart-polish-v2.sc-cart-ready .woocommerce-cart-form {
  opacity: 1 !important;
  visibility: visible !important;
  transition: opacity .10s linear !important;
}

/* 2) Unit-price pill: make sale prices look deliberate */
body.sc-cart-polish-v2 .sc-cart-pill--price {
  gap: 8px !important;
}

body.sc-cart-polish-v2 .sc-cart-pill--price del,
body.sc-cart-polish-v2 .sc-cart-pill--price ins {
  text-decoration: none !important;
  background: transparent !important;
  border: 0 !important;
}

body.sc-cart-polish-v2 .sc-cart-pill--price del .woocommerce-Price-amount {
  opacity: .55 !important;
  text-decoration: line-through !important;
  text-decoration-thickness: 2px !important;
  text-decoration-color: rgba(17,24,39,.35) !important;
}

body.sc-cart-polish-v2 .sc-cart-pill--price ins .woocommerce-Price-amount {
  opacity: 1 !important;
  font-weight: 950 !important;
  color: var(--c-forest) !important;
}

/* Slightly de-emphasise the currency symbol in the old price */
body.sc-cart-polish-v2 .sc-cart-pill--price del .woocommerce-Price-currencySymbol {
  opacity: .75 !important;
}

/* 3) Actions cell: coupon at top, Update basket pinned to bottom */
body.sc-cart-polish-v2 .woocommerce-cart-form__contents td.actions {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 10px !important;
  padding-top: 14px !important;
}

body.sc-cart-polish-v2 .woocommerce-cart-form__contents td.actions .coupon {
  order: 1 !important;
}

/* Keep update basket at the bottom of the TD */
body.sc-cart-polish-v2 .woocommerce-cart-form__contents td.actions button[name="update_cart"],
body.sc-cart-polish-v2 .woocommerce-cart-form__contents td.actions input[name="update_cart"],
body.sc-cart-polish-v2 .woocommerce-cart-form__contents td.actions .button[name="update_cart"] {
  order: 2 !important;
  margin-top: auto !important;
  align-self: flex-end !important;
}

/* Mobile: make Update basket full-width (still at bottom) */
@media (max-width: 600px) {
  body.sc-cart-polish-v2 .woocommerce-cart-form__contents td.actions button[name="update_cart"],
  body.sc-cart-polish-v2 .woocommerce-cart-form__contents td.actions input[name="update_cart"],
  body.sc-cart-polish-v2 .woocommerce-cart-form__contents td.actions .button[name="update_cart"] {
    align-self: stretch !important;
    width: 100% !important;
  }
}

/* 4) Qty punch animation (used by JS for max/min feedback) */
body.sc-cart-polish-v2 .sc-cart-qty-moved--shake {
  animation: sc-cart-shake .32s ease !important;
}
@keyframes sc-cart-shake {
  0% { transform: translateX(0); }
  20% { transform: translateX(-3px); }
  40% { transform: translateX(3px); }
  60% { transform: translateX(-2px); }
  80% { transform: translateX(2px); }
  100% { transform: translateX(0); }
}

/* =========================================================
   Cart notices: keep visible + scroll target + longer highlight
   ========================================================= */

.woocommerce-cart .woocommerce-notices-wrapper {
  scroll-margin-top: 96px; /* keep clear of sticky headers */
}

.woocommerce-cart .woocommerce-notices-wrapper .woocommerce-message,
.woocommerce-cart .woocommerce-notices-wrapper .woocommerce-error,
.woocommerce-cart .woocommerce-notices-wrapper .woocommerce-info {
  opacity: 1 !important;
  transform: none !important;
}

/* When a notice triggers, keep it visually "hot" for longer */
body.sc-cart-notice-hot .woocommerce-cart .woocommerce-notices-wrapper .woocommerce-error,
body.sc-cart-notice-hot .woocommerce-cart .woocommerce-notices-wrapper .woocommerce-message,
body.sc-cart-notice-hot .woocommerce-cart .woocommerce-notices-wrapper .woocommerce-info {
  animation: scNoticePulse 6s ease-out 1;
}

@keyframes scNoticePulse {
  0%   { filter: saturate(1.2) contrast(1.05); }
  15%  { filter: saturate(1.6) contrast(1.15); }
  100% { filter: saturate(1) contrast(1); }
}

/* =========================================================
   Notices: kill list markers + stop "fast disappear" styling
   ========================================================= */

.sc-cart-polish-v2 .woocommerce-notices-wrapper ul.woocommerce-error,
.sc-cart-polish-v2 .woocommerce-notices-wrapper ul.woocommerce-message,
.sc-cart-polish-v2 .woocommerce-notices-wrapper ul.woocommerce-info {
  list-style: none !important;
  padding-left: 0 !important;
  margin-left: 0 !important;
}

.sc-cart-polish-v2 .woocommerce-notices-wrapper ul.woocommerce-error > li,
.sc-cart-polish-v2 .woocommerce-notices-wrapper ul.woocommerce-message > li,
.sc-cart-polish-v2 .woocommerce-notices-wrapper ul.woocommerce-info > li {
  list-style: none !important;
  margin: 0 !important;
  padding-left: 15px !important;
}

/* If anything tries to hide notices with inline styles, override it */
body.sc-cart-notice-pin .sc-cart-polish-v2 .woocommerce-notices-wrapper .woocommerce-message,
body.sc-cart-notice-pin .sc-cart-polish-v2 .woocommerce-notices-wrapper .woocommerce-error,
body.sc-cart-notice-pin .sc-cart-polish-v2 .woocommerce-notices-wrapper .woocommerce-info {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
  height: auto !important;
  max-height: none !important;
}

/* =========================================================
   Kill Breakdance Woo notice icons (error/info/success)
   ========================================================= */

.woocommerce-cart .woocommerce-notices-wrapper .woocommerce-error,
.woocommerce-cart .woocommerce-notices-wrapper .woocommerce-info,
.woocommerce-cart .woocommerce-notices-wrapper .woocommerce-message {
  padding-left: 15px !important; /* remove icon gutter */
}

.woocommerce-cart .woocommerce-notices-wrapper .woocommerce-error::before,
.woocommerce-cart .woocommerce-notices-wrapper .woocommerce-info::before,
.woocommerce-cart .woocommerce-notices-wrapper .woocommerce-message::before,
.woocommerce-cart .woocommerce-notices-wrapper .woocommerce-error li::before,
.woocommerce-cart .woocommerce-notices-wrapper .woocommerce-info li::before,
.woocommerce-cart .woocommerce-notices-wrapper .woocommerce-message li::before,
.woocommerce-cart .woocommerce-notices-wrapper .woocommerce-error::after,
.woocommerce-cart .woocommerce-notices-wrapper .woocommerce-info::after,
.woocommerce-cart .woocommerce-notices-wrapper .woocommerce-message::after,
.woocommerce-cart .woocommerce-notices-wrapper .woocommerce-error li::after,
.woocommerce-cart .woocommerce-notices-wrapper .woocommerce-info li::after,
.woocommerce-cart .woocommerce-notices-wrapper .woocommerce-message li::after {
  content: none !important;
  display: none !important;
  background: none !important;
  background-image: none !important;
  mask-image: none !important;
  -webkit-mask-image: none !important;
}

/* Also kill list markers if anything tries that route */
.woocommerce-cart .woocommerce-notices-wrapper ul,
.woocommerce-cart .woocommerce-notices-wrapper li {
  list-style: none !important;
  list-style-image: none !important;
}

/* Cart notice LI: give the actual message line a left gutter */
body.woocommerce-cart .woocommerce-notices-wrapper > ul > li {
  padding-left: 10px !important;
}

/* =========================================================
   Product Category Colors (Feminised/Auto/Regular/CBD)
   Applies to ALL products based on their group mapping
   ========================================================= */

/* Feminised - Green (default/fallback) */
.sc-cart-polish-v2 .sc-cart-card[data-product-group="fem"] {
  background:
    linear-gradient(to right, rgba(175,234,128,.10) 0%, rgba(255,255,255,.98) 70%),
    linear-gradient(180deg, rgba(175,234,128,.09), rgba(255,255,255,.98) 62%),
    #fff !important;
  border-left: 2px solid rgba(175,234,128,.35) !important;
}

/* Autoflowering - Purple/Blue */
.sc-cart-polish-v2 .sc-cart-card[data-product-group="auto"] {
  background:
    linear-gradient(to right, rgba(184,197,242,.10) 0%, rgba(255,255,255,.98) 70%),
    linear-gradient(180deg, rgba(184,197,242,.09), rgba(255,255,255,.98) 62%),
    #fff !important;
  border-left: 2px solid rgba(184,197,242,.35) !important;
}

/* Regular - Brown */
.sc-cart-polish-v2 .sc-cart-card[data-product-group="reg"] {
  background:
    linear-gradient(to right, rgba(229,212,193,.12) 0%, rgba(255,255,255,.98) 70%),
    linear-gradient(180deg, rgba(229,212,193,.09), rgba(255,255,255,.98) 62%),
    #fff !important;
  border-left: 2px solid rgba(229,212,193,.45) !important;
}

/* CBD - Amber/Orange */
.sc-cart-polish-v2 .sc-cart-card[data-product-group="cbd"] {
  background:
    linear-gradient(to right, rgba(255,212,163,.10) 0%, rgba(255,255,255,.98) 70%),
    linear-gradient(180deg, rgba(255,212,163,.09), rgba(255,255,255,.98) 62%),
    #fff !important;
  border-left: 2px solid rgba(255,212,163,.40) !important;
}

/* Hover states for cards maintain category color hints */
.sc-cart-polish-v2 .sc-cart-card[data-product-group="fem"]:hover {
  border-left-color: rgba(175,234,128,.55) !important;
}

.sc-cart-polish-v2 .sc-cart-card[data-product-group="auto"]:hover {
  border-left-color: rgba(184,197,242,.55) !important;
}

.sc-cart-polish-v2 .sc-cart-card[data-product-group="reg"]:hover {
  border-left-color: rgba(229,212,193,.65) !important;
}

.sc-cart-polish-v2 .sc-cart-card[data-product-group="cbd"]:hover {
  border-left-color: rgba(255,212,163,.60) !important;
}

/* Kill WooCommerce's &nbsp; after cart item name */
.sc-cart-polish-v2 .woocommerce-cart-form__contents td.product-name {
  line-height: 0 !important;
}

/* Restore normal line-height inside the card */
.sc-cart-polish-v2 .sc-cart-card {
  line-height: normal !important;
}

/* Replace the global nuke with a scoped reset */
.sc-cart-polish-v2 .sc-cart-card * { line-height: normal !important; } /* or remove entirely */

/* =========================================================
   FORCE CART LAYOUT TO ALWAYS STACK (desktop behaves like mobile)
   - Cart form first
   - Totals second
   ========================================================= */

/* Breakdance cart wrapper is a flex row on desktop. Kill that. */
body.sc-cart-polish-v2.woocommerce-cart .woocommerce,
body.sc-cart-polish-v2 .bde-cart .woocommerce,
body.sc-cart-polish-v2 .breakdance-woocommerce .woocommerce {
  display: flex !important;
  flex-direction: column !important;
  flex-wrap: nowrap !important;
  align-items: stretch !important;
  column-gap: 0 !important;
  row-gap: 18px !important; /* spacing between the two blocks */
}

/* Make sure both sections take full width */
body.sc-cart-polish-v2.woocommerce-cart .woocommerce-cart-form,
body.sc-cart-polish-v2 .breakdance-woocommerce .woocommerce-cart-form {
  width: 100% !important;
  flex: 0 0 auto !important;
  order: 1 !important;
}

body.sc-cart-polish-v2.woocommerce-cart .cart-collaterals,
body.sc-cart-polish-v2 .breakdance-woocommerce .cart-collaterals {
  width: 100% !important;
  max-width: 100% !important;
  flex: 0 0 auto !important;
  order: 2 !important;

  /* Breakdance uses a fluidWidthOnMobile() helper + vars; stomp them. */
  align-self: stretch !important;
}

/* If cross-sells exist, keep them after totals */
body.sc-cart-polish-v2.woocommerce-cart .cross-sells,
body.sc-cart-polish-v2 .breakdance-woocommerce .cross-sells {
  order: 3 !important;
  width: 100% !important;
}

@media (max-width: 768px) {
  /* Force baseline alignment for Woo price fragments (fix £ sitting high) */
  body.sc-cart-polish-v2 .sc-cart-pill .woocommerce-Price-amount,
  body.sc-cart-polish-v2 .sc-cart-total .woocommerce-Price-amount,
  body.sc-cart-polish-v2 .sc-cart-pill .woocommerce-Price-amount bdi,
  body.sc-cart-polish-v2 .sc-cart-total .woocommerce-Price-amount bdi {
    display: inline-flex !important;
    align-items: baseline !important;
    line-height: 1 !important;
  }

  body.sc-cart-polish-v2 .sc-cart-pill .woocommerce-Price-currencySymbol,
  body.sc-cart-polish-v2 .sc-cart-total .woocommerce-Price-currencySymbol {
    display: inline-block !important;
    vertical-align: baseline !important;
    line-height: 1 !important;
  }
}

/* Very narrow screens: controls span full card width WITHOUT breaking the right-column stack */
@media (max-width: 600px) {
  .sc-cart-polish-v2 .woocommerce-cart-form { padding-left:0px !important; padding-right:0px !important; padding-top:0px !important; }
  div.section-container { padding-left:0px !important; padding-right:0px !important; }
  .breakdance-woocommerce .woocommerce-cart-form__contents tbody { gap:10px !important; }

  /* Keep your normal 2-col card grid (don’t mess with grid rows/areas) */
  body.sc-cart-polish-v2 .sc-cart-card{
    display: grid !important;
    grid-template-columns: var(--mc-thumb) 1fr !important;
    grid-template-rows: auto !important;
    gap: 8px 10px !important; /* match your base card gap */
  }

  /* IMPORTANT: do NOT flatten sc-cart-main (that caused the big vertical gap) */
  body.sc-cart-polish-v2 .sc-cart-main{
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;       /* tighter stack under title */
    min-width: 0 !important;
  }

  /* Remove X button padding on mobile - title and brand can use full width */
  body.sc-cart-polish-v2 .sc-cart-title,
  body.sc-cart-polish-v2 .sc-cart-brand {
    padding-right: 0 !important;
  }

  /* Extend meta row (pills) into X button space on mobile */
  body.sc-cart-polish-v2 .sc-cart-meta {
    margin-right: -30px !important;
  }

  /* Let controls “bleed” under the thumbnail so it’s full width */
  body.sc-cart-polish-v2 .sc-cart-controls{
    width: calc(100% + var(--mc-thumb) + 10px + 30px) !important;  /* + thumbnail + gap + X space */
    margin-left: calc(-1 * (var(--mc-thumb) + 10px)) !important;
    margin-right: -30px !important;  /* extend into X button space */
    box-sizing: border-box !important;
    margin-top: 6px !important;
  }

  /* Optional: subtotal aligns left when full width */
  body.sc-cart-polish-v2 .sc-cart-total{
    justify-self: start !important;
    text-align: left !important;
  }
}

/* Pack pill: fit available space, truncate with ellipsis when needed */
.sc-cart-polish-v2 .sc-cart-pill--pack {
  min-width: 0 !important;
  max-width: 100% !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

@media (min-width: 600px) {
  body.sc-cart-polish-v2 .sc-cart-controls {
    padding-right: 34px !important;
  }
}

@media (max-width: 600px) {
  body.sc-cart-polish-v2 a.sc-cart-title.notranslate {
    padding-right: 10px !important;
  }
  body.sc-cart-polish-v2 div.sc-cart-brand.notranslate {
    padding-right: 10px !important;
  }
  .scfs-wrap .sc-cart-main {
    padding-right: 0 !important;
  }
  body.sc-cart-polish-v2 .scfs-wrap .sc-cart-controls { margin-right:0px !important; width: calc(100% + var(--mc-thumb) + 20px) !important; }
}

/* =========================================================
   FREEBIE BADGE FIX (belt + braces)
   - If any theme/plugin reintroduces overflow:hidden on the thumb,
     this block forces the correct behavior at the end of the file.
   ========================================================= */
body.sc-cart-polish-v2 .sc-cart-card--freebie .sc-cart-thumb{
  position: relative !important;
  overflow: visible !important;
}

body.sc-cart-polish-v2 .sc-cart-card--freebie .sc-cart-thumb::before{
  top: 0px !important;
  left: 0px !important;
  pointer-events: none !important;
}

body.sc-cart-polish-v2 .woocommerce-cart-form__cart-item.cart_item { margin-top:3px !important; }
body.sc-cart-polish-v2 .sc-cart-card--freebie:hover .sc-cart-thumb::before{
  top: -5px !important;
  left: -5px !important;
}