/* =====================================================================
   Beauty Retouch — Cart page (/woo-cart) restyle · brpdp v2 design system
   ---------------------------------------------------------------------
   Scoped to  body.brpdp-v2.brpdp-cart  so nothing leaks off the cart page.
   Enqueued on is_cart() from inc/brpdp-enqueue.php (depends on brpdp-tokens
   + the legacy 'woocommerce-cart' handle so this wins on source order).

   Uses the global --brpdp-* tokens from inc/brpdp-tokens.css.
   The classic [woocommerce_cart] shortcode DOM we target:
     .woocommerce
       > .woocommerce-notices-wrapper
       > .ra-cart-head            (our header, injected via woocommerce_before_cart)
       > form.woocommerce-cart-form  > table.cart > tbody > tr.cart_item / td.actions
       > .cart-collaterals        > .cart_totals   (cross-sells already removed)
   ===================================================================== */

/* ---------------------------------------------------------------------
   0 · Page shell — hide the legacy WPBakery <h4> heading + its spacer,
   give the cart room to breathe, kill the qodef content gutter cap.
   --------------------------------------------------------------------- */
body.brpdp-v2.brpdp-cart .wpb_text_column,
body.brpdp-v2.brpdp-cart .wpb_text_column + .vc_empty_space { display: none !important; }

body.brpdp-v2.brpdp-cart .qodef-content-inner,
body.brpdp-v2.brpdp-cart .qodef-content { background: transparent; }

body.brpdp-v2.brpdp-cart .qodef-grid-row,
body.brpdp-v2.brpdp-cart .qodef-page-content-holder { max-width: none; padding: 0; }
body.brpdp-v2.brpdp-cart .vc_column-inner { padding-left: 0 !important; padding-right: 0 !important; }

/* ---------------------------------------------------------------------
   1 · The two-column grid lives on the shortcode's .woocommerce wrapper.
       Header + notices span full width; items left, summary right.
   --------------------------------------------------------------------- */
/* This theme is NOT border-box globally; the cart's padded cards/inputs
   need it or width:100% + padding overflows the viewport on mobile. */
body.brpdp-v2.brpdp-cart .woocommerce,
body.brpdp-v2.brpdp-cart .woocommerce *,
body.brpdp-v2.brpdp-cart .woocommerce *::before,
body.brpdp-v2.brpdp-cart .woocommerce *::after { box-sizing: border-box; }

/* Font consistency — the parent theme pins text inputs to Montserrat via an
   inline `body.page .qodef-wrapper input[type=text]{Montserrat!important}`
   rule (specificity 0,3,2, printed after this file). Beat it with the [type]
   attribute (0,4,2) so every cart field uses the brand stack. Qty stays mono. */
body.brpdp-v2.brpdp-cart .woocommerce input[type],
body.brpdp-v2.brpdp-cart .woocommerce textarea,
body.brpdp-v2.brpdp-cart .woocommerce select,
body.brpdp-v2.brpdp-cart .woocommerce input[type]::placeholder,
body.brpdp-v2.brpdp-cart .woocommerce textarea::placeholder { font-family: var(--brpdp-sans) !important; }
body.brpdp-v2.brpdp-cart .cart_item .quantity input[type].qty { font-family: var(--brpdp-mono) !important; }
body.brpdp-v2.brpdp-cart .woocommerce {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  column-gap: 44px;
  row-gap: 0;
  align-items: start;
  max-width: 1180px;
  width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding: 56px var(--brpdp-gutter) 96px;
  color: var(--brpdp-ink);
  font-family: var(--brpdp-sans);
  font-feature-settings: "tnum" 1;
}
body.brpdp-v2.brpdp-cart .woocommerce > * { min-width: 0; }
body.brpdp-v2.brpdp-cart .woocommerce > .woocommerce-notices-wrapper { grid-column: 1 / -1; }
body.brpdp-v2.brpdp-cart .woocommerce > .ra-cart-head { grid-column: 1 / -1; }
body.brpdp-v2.brpdp-cart .woocommerce > form.woocommerce-cart-form { grid-column: 1; }
body.brpdp-v2.brpdp-cart .woocommerce > .cart-collaterals { grid-column: 2; }
body.brpdp-v2.brpdp-cart .woocommerce > wc-order-attribution-inputs { display: none; }

/* ---------------------------------------------------------------------
   2 · Editorial header (injected)
   --------------------------------------------------------------------- */
body.brpdp-v2.brpdp-cart .ra-cart-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
  margin-bottom: 40px;
}
body.brpdp-v2.brpdp-cart .ra-cart-head__top {
  display: flex; justify-content: flex-end; align-items: center; gap: 16px;
}
body.brpdp-v2.brpdp-cart .ra-cart-head__eyebrow {
  font-family: var(--brpdp-mono); font-size: 11px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--brpdp-muted);
}
body.brpdp-v2.brpdp-cart .ra-cart-head__back {
  font-family: var(--brpdp-mono); font-size: 11px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--brpdp-ink); text-decoration: none;
  display: inline-flex; align-items: center; gap: 7px; transition: color .15s;
}
body.brpdp-v2.brpdp-cart .ra-cart-head__back:hover { color: var(--brpdp-accent); }
body.brpdp-v2.brpdp-cart .ra-cart-head h1 {
  font-family: var(--brpdp-sans); font-size: clamp(30px, 4vw, 46px); font-weight: 600;
  letter-spacing: -.035em; line-height: .98; margin: 0; color: var(--brpdp-ink);
}
/* the global brpdp chrome styles heading <em> as serif-italic (!important),
   so re-assert Geist 600 here with !important to keep the whole title uniform */
body.brpdp-v2.brpdp-cart .ra-cart-head h1 em {
  font-family: var(--brpdp-sans) !important; font-style: normal !important; font-weight: 600 !important; letter-spacing: -.035em;
}
body.brpdp-v2.brpdp-cart .ra-cart-head__meta {
  font-family: var(--brpdp-mono); font-size: 12px; color: var(--brpdp-muted);
  margin-top: 14px; letter-spacing: .02em;
}

/* ---------------------------------------------------------------------
   3 · Line items — convert the responsive shop table into cards
   --------------------------------------------------------------------- */
body.brpdp-v2.brpdp-cart form.woocommerce-cart-form { margin: 0; }
body.brpdp-v2.brpdp-cart table.cart,
body.brpdp-v2.brpdp-cart table.cart tbody { display: block; width: 100%; border: 0; margin: 0; background: none; }
body.brpdp-v2.brpdp-cart table.cart thead { display: none; }

/* (the "Selected panels" label + rule were removed per request) */

body.brpdp-v2.brpdp-cart table.cart tbody tr { display: block; }

/* Item card + middle-column stack (name row / quantity row); subtotal spans both */
body.brpdp-v2.brpdp-cart table.cart tbody tr.cart_item {
  position: relative;
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) auto;
  grid-template-areas:
    "thumb name subtotal"
    "thumb qty  subtotal";
  align-items: center;
  gap: 8px 22px;
  background: var(--brpdp-paper);
  border: 1px solid var(--brpdp-line);
  border-radius: 12px;
  padding: 18px 22px 18px 20px;
  margin-bottom: 14px;
  transition: border-color .15s, box-shadow .15s;
}
body.brpdp-v2.brpdp-cart table.cart tbody tr.cart_item:hover {
  border-color: rgba(17,17,16,0.20);
  box-shadow: 0 4px 18px rgba(17,17,16,0.05);
}
/* reset every td, then re-place */
body.brpdp-v2.brpdp-cart table.cart tbody tr.cart_item td {
  display: block; border: 0; padding: 0; margin: 0; width: auto; font-weight: 400;
  background: none; text-align: left;
}
body.brpdp-v2.brpdp-cart table.cart tbody tr.cart_item td::before { display: none !important; } /* kill responsive data-title labels */

/* thumbnail */
body.brpdp-v2.brpdp-cart td.product-thumbnail { grid-area: thumb; align-self: center; }
body.brpdp-v2.brpdp-cart td.product-thumbnail a,
body.brpdp-v2.brpdp-cart td.product-thumbnail img {
  display: block; width: 88px; height: 88px; margin: 0;
}
body.brpdp-v2.brpdp-cart td.product-thumbnail img {
  border-radius: 9px; object-fit: cover; border: 1px solid var(--brpdp-line);
  background: var(--brpdp-bg-2);
}

/* name */
body.brpdp-v2.brpdp-cart td.product-name {
  grid-area: name; align-self: end;
  font-size: 17px; font-weight: 500; letter-spacing: -.01em;
  line-height: 1.25; color: var(--brpdp-ink);
}
body.brpdp-v2.brpdp-cart td.product-name a { color: inherit; text-decoration: none; }
body.brpdp-v2.brpdp-cart td.product-name a:hover { color: var(--brpdp-accent); }
body.brpdp-v2.brpdp-cart td.product-name .backorder_notification {
  font-family: var(--brpdp-mono); font-size: 10.5px; text-transform: uppercase;
  letter-spacing: .06em; color: var(--brpdp-accent); margin-top: 6px; font-weight: 400;
}

/* quantity box (plain input — theme outputs no +/- steppers) */
body.brpdp-v2.brpdp-cart td.product-quantity { grid-area: qty; align-self: start; }
body.brpdp-v2.brpdp-cart .cart_item .quantity { margin-top: 12px; }
body.brpdp-v2.brpdp-cart .cart_item .quantity input.qty {
  width: 66px; height: 38px; padding: 0 6px; text-align: center;
  font-family: var(--brpdp-mono); font-size: 13px; color: var(--brpdp-ink);
  background: var(--brpdp-bg); border: 1px solid var(--brpdp-line); border-radius: 999px;
  -moz-appearance: textfield; transition: border-color .15s, box-shadow .15s;
}
body.brpdp-v2.brpdp-cart .cart_item .quantity input.qty:focus {
  outline: none; border-color: var(--brpdp-ink); box-shadow: 0 0 0 3px rgba(17,17,16,0.06);
}

/* price column stays hidden (matches existing behaviour) — needs the full
   card path to beat the `tr.cart_item td { display:block }` reset above */
body.brpdp-v2.brpdp-cart table.cart tbody tr.cart_item td.product-price { display: none !important; }

/* subtotal — the WC/Subscriptions price string; emphasise the amounts */
body.brpdp-v2.brpdp-cart td.product-subtotal {
  grid-area: subtotal; align-self: center; justify-self: end; text-align: right; max-width: 190px;
  font-family: var(--brpdp-sans); font-size: 12px; line-height: 1.5; color: var(--brpdp-muted);
}
body.brpdp-v2.brpdp-cart td.product-subtotal .woocommerce-Price-amount,
body.brpdp-v2.brpdp-cart td.product-subtotal .amount {
  font-family: var(--brpdp-mono); font-size: 15px; font-weight: 500; color: var(--brpdp-ink);
  white-space: nowrap;
}
body.brpdp-v2.brpdp-cart td.product-subtotal a { color: var(--brpdp-muted); text-decoration: underline; text-underline-offset: 2px; }
body.brpdp-v2.brpdp-cart td.product-subtotal a:hover { color: var(--brpdp-accent); }

/* remove × — small circular button, top-right */
body.brpdp-v2.brpdp-cart td.product-remove {
  position: absolute; top: 14px; right: 14px; width: 26px; height: 26px;
}
body.brpdp-v2.brpdp-cart td.product-remove a.remove {
  width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--brpdp-line);
  background: var(--brpdp-paper); color: var(--brpdp-muted) !important;
  font-size: 17px; line-height: 24px; text-align: center; text-decoration: none;
  display: flex; align-items: center; justify-content: center; transition: all .15s;
}
body.brpdp-v2.brpdp-cart td.product-remove a.remove:hover {
  border-color: var(--brpdp-accent); color: var(--brpdp-accent) !important;
  background: var(--brpdp-paper);
}

/* ---------------------------------------------------------------------
   4 · Actions row (coupon + update cart) — a bar below the items
   --------------------------------------------------------------------- */
body.brpdp-v2.brpdp-cart table.cart tbody tr:has(td.actions),
body.brpdp-v2.brpdp-cart table.cart tbody td.actions { display: block; }
body.brpdp-v2.brpdp-cart td.actions {
  display: flex !important; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 22px; padding: 0;
}
body.brpdp-v2.brpdp-cart td.actions .coupon {
  display: flex; gap: 6px; align-items: center; flex: 0 1 auto;
}
body.brpdp-v2.brpdp-cart td.actions .coupon label { display: none; }
body.brpdp-v2.brpdp-cart td.actions .coupon input#coupon_code {
  flex: 0 1 280px; width: 280px; max-width: 100%; min-width: 0; height: 46px; margin: 0 !important; border: 1px solid var(--brpdp-line);
  border-radius: 999px; background: var(--brpdp-paper); padding: 0 20px;
  font-family: var(--brpdp-sans); font-size: 14px; color: var(--brpdp-ink);
  transition: border-color .15s, box-shadow .15s;
}
body.brpdp-v2.brpdp-cart td.actions .coupon input#coupon_code::placeholder { color: var(--brpdp-muted); }
body.brpdp-v2.brpdp-cart td.actions .coupon input#coupon_code:focus {
  outline: none; border-color: var(--brpdp-ink); box-shadow: 0 0 0 3px rgba(17,17,16,0.06);
}

/* ghost pill buttons (Apply coupon, Update cart) */
body.brpdp-v2.brpdp-cart td.actions button[name="apply_coupon"],
body.brpdp-v2.brpdp-cart td.actions button[name="update_cart"] {
  height: 46px; padding: 0 22px; border-radius: 999px; border: 1px solid var(--brpdp-ink);
  background: transparent; color: var(--brpdp-ink);
  font-family: var(--brpdp-sans); font-size: 12px; font-weight: 500; letter-spacing: .05em;
  text-transform: uppercase; cursor: pointer; white-space: nowrap;
  transition: background .18s, color .18s, transform .12s; flex: 0 0 auto; margin: 0 !important;
}
body.brpdp-v2.brpdp-cart td.actions button[name="apply_coupon"]:hover,
body.brpdp-v2.brpdp-cart td.actions button[name="update_cart"]:hover {
  background: var(--brpdp-ink); color: var(--brpdp-bg);
}
body.brpdp-v2.brpdp-cart td.actions button[name="update_cart"] { margin-left: auto; }
body.brpdp-v2.brpdp-cart td.actions button[name="update_cart"][disabled] { opacity: .45; cursor: default; }

/* ---------------------------------------------------------------------
   5 · Order summary card (.cart_totals)
   --------------------------------------------------------------------- */
body.brpdp-v2.brpdp-cart .cart-collaterals { width: 100%; }
body.brpdp-v2.brpdp-cart .cart-collaterals .cross-sells { display: none; }
body.brpdp-v2.brpdp-cart .cart_totals {
  position: sticky; top: 32px; width: 100%; float: none;
  background: var(--brpdp-paper); border: 1px solid var(--brpdp-line);
  border-radius: 14px; padding: 28px 26px; box-shadow: 0 1px 3px rgba(17,17,16,0.04);
}
/* heading: replace "Cart Totals" text with "Order Summary" (serif accent) */
body.brpdp-v2.brpdp-cart .cart_totals h2 {
  font-size: 0 !important; letter-spacing: normal; text-align: left; margin: 0 0 20px;
  padding-bottom: 20px; border-bottom: 1px solid var(--brpdp-line); line-height: 1;
}
body.brpdp-v2.brpdp-cart .cart_totals h2::before {
  content: "Order "; font-family: var(--brpdp-sans); font-size: 19px; font-weight: 600;
  letter-spacing: -.02em; color: var(--brpdp-ink);
}
body.brpdp-v2.brpdp-cart .cart_totals h2::after {
  content: "Summary"; font-family: var(--brpdp-sans); font-style: normal; font-weight: 600;
  font-size: 19px; letter-spacing: -.02em; color: var(--brpdp-ink);
}

/* totals table */
body.brpdp-v2.brpdp-cart .cart_totals table.shop_table {
  width: 100%; border: 0; margin: 0; background: none; border-collapse: collapse;
}
body.brpdp-v2.brpdp-cart .cart_totals table.shop_table tr { border: 0; }
body.brpdp-v2.brpdp-cart .cart_totals table.shop_table th,
body.brpdp-v2.brpdp-cart .cart_totals table.shop_table td {
  border: 0; padding: 8px 0; background: none; vertical-align: baseline;
}
body.brpdp-v2.brpdp-cart .cart_totals table.shop_table th {
  font-family: var(--brpdp-sans); font-weight: 400; font-size: 14px; color: var(--brpdp-ink-2); text-align: left;
}
body.brpdp-v2.brpdp-cart .cart_totals table.shop_table td {
  font-family: var(--brpdp-mono); font-size: 14px; color: var(--brpdp-ink); text-align: right;
}
body.brpdp-v2.brpdp-cart .cart_totals .cart-subtotal { border-bottom: 1px solid var(--brpdp-line); }

/* discount rows in accent red */
body.brpdp-v2.brpdp-cart .cart_totals .cart-discount th,
body.brpdp-v2.brpdp-cart .cart_totals .cart-discount td,
body.brpdp-v2.brpdp-cart .cart_totals .cart-discount td a { color: var(--brpdp-accent); }
body.brpdp-v2.brpdp-cart .cart_totals .cart-discount td a { text-decoration: underline; text-underline-offset: 2px; }

/* grand total — emphasised */
body.brpdp-v2.brpdp-cart .cart_totals .order-total th,
body.brpdp-v2.brpdp-cart .cart_totals .order-total td {
  padding-top: 16px; border-top: 1px solid var(--brpdp-ink);
}
body.brpdp-v2.brpdp-cart .cart_totals .order-total th {
  font-size: 16px; font-weight: 600; letter-spacing: -.01em; color: var(--brpdp-ink);
}
body.brpdp-v2.brpdp-cart .cart_totals .order-total td { font-size: 20px; font-weight: 500; }
body.brpdp-v2.brpdp-cart .cart_totals .order-total .woocommerce-Price-amount { font-size: 20px; }
body.brpdp-v2.brpdp-cart .cart_totals .includes_tax,
body.brpdp-v2.brpdp-cart .cart_totals small { font-family: var(--brpdp-sans); font-size: 11px; color: var(--brpdp-muted); }

/* WC Subscriptions "Recurring totals" — all rows live in the same table.
   tr.recurring-totals is the <th colspan=2> heading; the value rows carry
   .recurring-total (singular). Set the block apart and mute it so the
   one-time Total stays the hero. */
body.brpdp-v2.brpdp-cart .cart_totals tr.recurring-totals th {
  font-family: var(--brpdp-mono); font-size: 10px; font-weight: 400; letter-spacing: .1em;
  text-transform: uppercase; color: var(--brpdp-muted); text-align: left;
  border-top: 1px dashed var(--brpdp-line); padding: 18px 0 4px; margin: 0;
}
body.brpdp-v2.brpdp-cart .cart_totals tr.recurring-total th,
body.brpdp-v2.brpdp-cart .cart_totals tr.recurring-total td {
  font-size: 12.5px !important; color: var(--brpdp-muted) !important; font-weight: 400 !important;
  border-top: 0 !important; border-bottom: 0 !important; padding: 5px 0 !important;
}
body.brpdp-v2.brpdp-cart .cart_totals tr.recurring-total td .woocommerce-Price-amount {
  font-size: 12.5px !important; font-weight: 400;
}
body.brpdp-v2.brpdp-cart .cart_totals tr.recurring-total td small,
body.brpdp-v2.brpdp-cart .cart_totals .first-payment-date {
  display: block; font-family: var(--brpdp-mono); font-size: 10px; letter-spacing: .04em;
  color: var(--brpdp-muted); margin-top: 5px; text-align: right;
}

/* hide shipping rows (digital products; matches legacy behaviour) */
body.brpdp-v2.brpdp-cart .cart_totals .woocommerce-shipping-totals,
body.brpdp-v2.brpdp-cart .cart_totals tr.shipping { display: none; }

/* ---------------------------------------------------------------------
   6 · Proceed-to-checkout — EXACT match of the slideout cart's primary CTA
       (.ralab-ajax-cart__btn--primary, which mirrors checkout's Pay Now):
       solid red, 8px radius, 18/24 padding, 600/14px/0.06em uppercase,
       no arrow, no hover lift.
   --------------------------------------------------------------------- */
body.brpdp-v2.brpdp-cart .wc-proceed-to-checkout { max-width: none; padding: 0; margin-top: 22px; }
body.brpdp-v2.brpdp-cart .wc-proceed-to-checkout a.checkout-button {
  display: flex !important; align-items: center; justify-content: center; gap: 0;
  width: 100% !important; height: auto; margin: 0; padding: 18px 24px;
  background: var(--brpdp-accent); color: var(--brpdp-accent-ink);
  border: none; border-radius: 8px; box-shadow: none;
  font-family: var(--brpdp-sans); font-weight: 600; font-size: 14px;
  letter-spacing: 0.06em; line-height: 1.2; text-transform: uppercase; text-decoration: none;
  cursor: pointer; transition: background 0.15s ease, transform 0.1s ease;
}
body.brpdp-v2.brpdp-cart .wc-proceed-to-checkout a.checkout-button::after { content: none !important; }
body.brpdp-v2.brpdp-cart .wc-proceed-to-checkout a.checkout-button:hover {
  background: #a30505; color: var(--brpdp-accent-ink); filter: none;
}
body.brpdp-v2.brpdp-cart .wc-proceed-to-checkout a.checkout-button:active { transform: translateY(1px); }
body.brpdp-v2.brpdp-cart .wc-proceed-to-checkout a.checkout-button:focus-visible {
  outline: 0; box-shadow: 0 0 0 3px rgba(199, 6, 6, 0.18);
}
@media (max-width: 768px) {
  body.brpdp-v2.brpdp-cart .wc-proceed-to-checkout a.checkout-button { font-size: 13px; padding: 16px 18px; }
}

/* Stripe express-checkout buttons (Apple Pay / Google Pay / Link) render as a
   second child of .wc-proceed-to-checkout — give them room below Proceed. */
body.brpdp-v2.brpdp-cart .wc-proceed-to-checkout > div { margin-top: 14px; }

/* reassurance line under the CTA / express buttons */
body.brpdp-v2.brpdp-cart .wc-proceed-to-checkout::after {
  content: "Secure checkout · Instant access";
  display: block; text-align: center; margin-top: 16px;
  font-family: var(--brpdp-mono); font-size: 10px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--brpdp-muted);
}

/* ---------------------------------------------------------------------
   7 · Empty cart state
   --------------------------------------------------------------------- */
/* on an empty cart the two-column grid still applies — span these full width
   so the message + CTA sit centered under the header */
body.brpdp-v2.brpdp-cart .woocommerce > .wc-empty-cart-message,
body.brpdp-v2.brpdp-cart .woocommerce > .cart-empty,
body.brpdp-v2.brpdp-cart .woocommerce > .return-to-shop { grid-column: 1 / -1; }
body.brpdp-v2.brpdp-cart .cart-empty,
body.brpdp-v2.brpdp-cart .wc-empty-cart-message {
  font-family: var(--brpdp-sans); font-style: normal; font-weight: 600; font-size: clamp(26px, 4vw, 40px);
  letter-spacing: -1px; color: var(--brpdp-ink); text-align: center; margin: 40px 0 24px; line-height: 1.15;
}
body.brpdp-v2.brpdp-cart .return-to-shop { text-align: center; margin-top: 8px; }
body.brpdp-v2.brpdp-cart .return-to-shop a.button {
  display: inline-flex; align-items: center; gap: 10px; height: 52px; padding: 0 32px;
  background: var(--brpdp-ink); color: var(--brpdp-bg); border: 1px solid var(--brpdp-ink);
  border-radius: 999px; font-family: var(--brpdp-sans); font-size: 13px; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase; text-decoration: none;
  transition: background .18s, border-color .18s;
}
body.brpdp-v2.brpdp-cart .return-to-shop a.button:hover {
  background: var(--brpdp-accent); border-color: var(--brpdp-accent); color: #fff;
}
/* the parent theme appends an icon-font arrow to every .button via ::after;
   suppress it here since the label already carries a → */
body.brpdp-v2.brpdp-cart .return-to-shop a.button::after { content: none !important; }

/* ---------------------------------------------------------------------
   8 · Responsive
   --------------------------------------------------------------------- */
@media (max-width: 900px) {
  body.brpdp-v2.brpdp-cart .woocommerce {
    grid-template-columns: 1fr; column-gap: 0; padding: 40px var(--brpdp-gutter) 72px;
  }
  body.brpdp-v2.brpdp-cart .woocommerce > .cart-collaterals { grid-column: 1; margin-top: 36px; }
  body.brpdp-v2.brpdp-cart .cart_totals { position: static; }
  body.brpdp-v2.brpdp-cart .ra-cart-head__back { display: none; }
}

@media (max-width: 560px) {
  body.brpdp-v2.brpdp-cart table.cart tbody tr.cart_item {
    grid-template-columns: 66px minmax(0, 1fr);
    grid-template-areas:
      "thumb name"
      "thumb qty"
      "thumb subtotal";
    gap: 6px 16px; padding: 16px; padding-right: 44px; align-items: start;
  }
  /* the theme's responsive-table CSS hides td.product-thumbnail img on mobile;
     force it back (the card keeps the 66px thumb column). */
  body.brpdp-v2.brpdp-cart table.cart td.product-thumbnail a,
  body.brpdp-v2.brpdp-cart table.cart td.product-thumbnail img { display: block !important; width: 66px; height: 66px; }
  body.brpdp-v2.brpdp-cart td.product-name { align-self: start; }
  body.brpdp-v2.brpdp-cart td.product-subtotal {
    grid-area: subtotal; align-self: start; justify-self: start; text-align: left; max-width: none; margin-top: 2px;
  }
  body.brpdp-v2.brpdp-cart .cart_item .quantity { margin-top: 8px; }
  body.brpdp-v2.brpdp-cart td.actions { flex-direction: column; align-items: stretch; }
  body.brpdp-v2.brpdp-cart td.actions .coupon { min-width: 0; }
  body.brpdp-v2.brpdp-cart td.actions .coupon input#coupon_code { width: 100%; flex: 1 1 auto; }
  body.brpdp-v2.brpdp-cart td.actions button[name="update_cart"] { margin-left: 0; }
}
