/* ==========================================================================
   CART + CHECKOUT — cookartn.com/cart/
   ==========================================================================
   The cart page previously had no stylesheet of its own. It printed the
   WooCommerce cart block against the theme's bare defaults, which is why the
   summary rendered "Shipment / Calculate shipping" overlapping the delivery
   row and the checkout button came out in the block editor's default purple.
   Everything here consumes tokens.css; nothing below redefines a token.
   ========================================================================== */

/* ── Page frame ─────────────────────────────────────────────────────────── */

.ca-cart-pg {
  background: var(--ivory);
  font-family: var(--ff);
  color: var(--ink-2);
  min-height: 60vh;
}

.ca-cart-pg__head {
  background: var(--espresso);
  color: var(--on-dark);
  padding: clamp(1.75rem, 5vw, 3.25rem) 0 clamp(1.5rem, 4vw, 2.5rem);
}

.ca-cart-pg__head-inner {
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gut);
}

.ca-cart-pg__crumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--t-sm);
  color: var(--on-dark-2);
  margin-bottom: var(--s-3);
}
.ca-cart-pg__crumb a { color: inherit; text-decoration: none; }
.ca-cart-pg__crumb a:hover { color: var(--on-dark); text-decoration: underline; }
.ca-cart-pg__crumb span[aria-hidden] { opacity: 0.5; }

.ca-cart-pg__title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--s-3);
}
.ca-cart-pg__title {
  margin: 0;
  font-size: var(--t-3xl);
  line-height: var(--lh-tight);
  font-weight: 400;
  color: var(--on-dark);
  letter-spacing: -0.015em;
}
.ca-cart-pg__title strong { font-weight: 700; }

.ca-cart-pg__count {
  font-size: var(--t-xs);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-weight: 600;
  color: var(--on-dark);
  background: var(--accent);
  padding: 0.35rem 0.7rem;
  border-radius: var(--r-pill);
  white-space: nowrap;
}

.ca-cart-pg__body {
  max-width: var(--shell);
  margin-inline: auto;
  padding: clamp(1.75rem, 5vw, 3.25rem) var(--gut) var(--s-7);
}

/* ── Two-column layout ──────────────────────────────────────────────────── */

.ca-cart-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: clamp(1.25rem, 2.5vw, 2rem);
  align-items: start;
}

/* Basket + suggestions share the left column. */
.ca-cart-main {
  display: grid;
  gap: var(--s-3);
  min-width: 0;
}

@media (max-width: 960px) {
  .ca-cart-grid { grid-template-columns: minmax(0, 1fr); }
}

/* Stacked, the column gap becomes vertical dead space between the basket and
   the summary — up to 3rem of it, reading as a page break in the middle of one
   continuous flow. */
@media (max-width: 620px) {
  .ca-cart-grid { gap: 0.85rem; }
}

/* ── Line items ─────────────────────────────────────────────────────────── */

.ca-cart-lines {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-panel);
  box-shadow: var(--d-ambient);
  overflow: hidden;
}

.ca-cart-line {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) auto auto 32px;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-3);
  border-bottom: 1px solid var(--line-soft);
  transition: opacity var(--t-fast) var(--ease);
}
.ca-cart-line:last-of-type { border-bottom: 0; }
.ca-cart-line.is-busy { opacity: 0.5; pointer-events: none; }
.ca-cart-line.is-leaving { opacity: 0; transform: translateX(-8px); }

.ca-cart-line__media {
  width: 88px;
  aspect-ratio: 1;
  border-radius: var(--r-ui);
  overflow: hidden;
  background: var(--ivory-2);
}
.ca-cart-line__media img,
.ca-cart-line__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ca-cart-line__name {
  margin: 0 0 0.2rem;
  font-size: var(--t-base);
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink);
}
.ca-cart-line__name a { color: inherit; text-decoration: none; }
.ca-cart-line__name a:hover { text-decoration: underline; }

.ca-cart-line__meta {
  margin: 0 0 0.25rem;
  font-size: var(--t-xs);
  color: var(--ink-3);
}
/* WooCommerce wraps variation data in <dl><dt>/<dd>, which stacks into four
   lines for "Couleur: Marron". Flatten it to one. */
.ca-cart-line__meta dl,
.ca-cart-line__meta dt,
.ca-cart-line__meta dd,
.ca-cart-line__meta p {
  display: inline;
  margin: 0;
  font-size: inherit;
}
.ca-cart-line__meta dt::after { content: ' '; }

.ca-cart-line__unit {
  margin: 0;
  font-size: var(--t-sm);
  color: var(--ink-3);
}
.ca-cart-line__unit span { font-size: var(--t-xs); }

.ca-cart-line__total {
  margin: 0;
  font-size: var(--t-base);
  font-weight: 700;
  color: var(--ink);
  text-align: right;
  white-space: nowrap;
  min-width: 6.5ch;
}

.ca-cart-line__remove {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--ink-3);
  cursor: pointer;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.ca-cart-line__remove:hover { background: var(--accent-wash); color: var(--accent); }

/* ── Quantity stepper ───────────────────────────────────────────────────── */

.ca-cart-qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--r-ui);
  overflow: hidden;
  background: var(--surface);
}
.ca-cart-qty__btn {
  width: 34px;
  height: 34px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 1.05rem;
  line-height: 1;
  cursor: pointer;
  transition: background var(--t-fast) var(--ease);
}
.ca-cart-qty__btn:hover:not(:disabled) { background: var(--ivory-2); }
.ca-cart-qty__btn:disabled { opacity: 0.3; cursor: not-allowed; }
.ca-cart-qty__val {
  min-width: 2.25rem;
  text-align: center;
  font-size: var(--t-sm);
  font-weight: 600;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
/* Neutral, not a warning. This was copper — the same colour the page uses for
   the free-delivery nudge — so a basket with three lines at their cap showed
   three alarm-coloured notices under an order the customer had done nothing
   wrong to build. It is a limit, stated once, where the limit is reached. */
.ca-cart-qty__max {
  margin: 0.35rem 0 0;
  font-size: 0.7rem;
  color: var(--ink-3);
  text-align: center;
}
.ca-cart-qty__max[hidden] { display: none; }

.ca-cart-lines__more {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: var(--s-3);
  font-size: var(--t-sm);
  font-weight: 500;
  color: var(--ink-2);
  text-decoration: none;
  border-top: 1px solid var(--line-soft);
  width: 100%;
  box-sizing: border-box;
  transition: color var(--t-fast) var(--ease);
}
.ca-cart-lines__more:hover { color: var(--accent); }

/* ── Summary ────────────────────────────────────────────────────────────── */

.ca-cart-side__sticky {
  position: sticky;
  top: calc(var(--header-rest) + 1rem);
  display: grid;
  gap: var(--s-3);
}
@media (max-width: 960px) {
  .ca-cart-side__sticky { position: static; }
}

.ca-cart-sum {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-panel);
  box-shadow: var(--d-ambient);
  padding: var(--s-3) var(--s-3) var(--s-2);
}

.ca-cart-sum__title {
  margin: 0 0 var(--s-2);
  font-size: var(--t-base);
  font-weight: 700;
  color: var(--ink);
}

.ca-cart-sum__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s-2);
  padding: 0.55rem 0;
  font-size: var(--t-sm);
  color: var(--ink-2);
}
.ca-cart-sum__row strong {
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}

.ca-cart-sum__row--total {
  border-top: 1px solid var(--line);
  margin-top: 0.35rem;
  padding-top: var(--s-2);
  font-size: var(--t-base);
}
.ca-cart-sum__row--total span { font-weight: 600; color: var(--ink); }
.ca-cart-sum__row--total strong {
  font-size: var(--t-xl);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.ca-cart-sum__nudge {
  margin: 0.25rem 0 0.35rem;
  padding: 0.5rem 0.65rem;
  font-size: var(--t-xs);
  color: var(--copper-ink);
  background: var(--copper-wash);
  border-radius: var(--r-ui);
}
.ca-cart-sum__nudge strong { color: inherit; font-weight: 700; }
.ca-cart-sum__nudge[hidden] { display: none; }

/* WooCommerce prints its own amount markup inside our spans; keep it inline so
   a <bdi> or <span class="woocommerce-Price-amount"> cannot introduce a line
   break in the middle of a total. */
.ca-cart-sum .woocommerce-Price-amount,
.ca-cart-line__total .woocommerce-Price-amount,
.ca-cart-buy__total .woocommerce-Price-amount { white-space: nowrap; }

/* ── Delivery form ──────────────────────────────────────────────────────── */

.ca-cart-form {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-panel);
  box-shadow: var(--d-ambient);
  padding: var(--s-3);
}

.ca-cart-form__title {
  margin: 0 0 var(--s-2);
  font-size: var(--t-xs);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-weight: 700;
  color: var(--ink-3);
}

/* Floating label: the placeholder is a single space, so :placeholder-shown is
   true only while the field is genuinely empty. */
.ca-cart-form__field { position: relative; margin-bottom: 0.7rem; }

.ca-cart-form__input {
  width: 100%;
  box-sizing: border-box;
  padding: 1.15rem 0.85rem 0.45rem;
  font-family: var(--ff);
  font-size: var(--t-sm);
  color: var(--ink);
  background: var(--ivory);
  border: 1px solid var(--line);
  border-radius: var(--r-ui);
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.ca-cart-form__input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-wash);
}
.ca-cart-form__input.has-error {
  border-color: var(--accent);
  background: var(--accent-wash);
}

.ca-cart-form__label {
  position: absolute;
  left: 0.9rem;
  top: 0.75rem;
  font-size: var(--t-sm);
  color: var(--ink-3);
  pointer-events: none;
  transform-origin: left top;
  transition: transform var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.ca-cart-form__input:not(:placeholder-shown) + .ca-cart-form__label,
.ca-cart-form__input:focus + .ca-cart-form__label {
  transform: translateY(-0.55rem) scale(0.78);
  color: var(--ink-3);
}
.ca-cart-form__input:focus + .ca-cart-form__label { color: var(--accent); }

.ca-cart-form__error {
  display: none;
  margin: 0 0 0.65rem;
  padding: 0.55rem 0.7rem;
  font-size: var(--t-xs);
  color: var(--accent-deep);
  background: var(--accent-wash);
  border-radius: var(--r-ui);
}
.ca-cart-form__error.is-visible { display: block; }

/* ── Primary CTA ────────────────────────────────────────────────────────── */

.ca-cart-buy {
  position: relative;
  width: 100%;
  border: 0;
  border-radius: var(--r-ui);
  padding: 0.95rem 1rem;
  font-family: var(--ff);
  font-size: var(--t-sm);
  font-weight: 700;
  color: var(--on-dark);
  background: linear-gradient(to bottom, var(--accent-lift), var(--accent));
  box-shadow: var(--d-lift), var(--d-rim);
  cursor: pointer;
  transition: transform var(--t-fast) var(--ease), filter var(--t-fast) var(--ease);
}
.ca-cart-buy:hover:not(:disabled) { filter: brightness(1.05); }
.ca-cart-buy:active:not(:disabled) { transform: translateY(1px); }
.ca-cart-buy:disabled { opacity: 0.75; cursor: wait; }

.ca-cart-buy__default,
.ca-cart-buy__loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}
.ca-cart-buy__loading { display: none; }
.ca-cart-buy.is-loading .ca-cart-buy__default { display: none; }
.ca-cart-buy.is-loading .ca-cart-buy__loading { display: flex; }

.ca-cart-buy__total {
  padding-left: 0.55rem;
  border-left: 1px solid oklch(0.985 0 0 / 0.28);
  font-weight: 700;
}
.ca-cart-buy__total .woocommerce-Price-amount { color: inherit; }

.ca-cart-buy__label--short { display: none; }
@media (max-width: 420px) {
  .ca-cart-buy__label--full { display: none; }
  .ca-cart-buy__label--short { display: inline; }
}

.ca-cart-spinner {
  width: 15px;
  height: 15px;
  border: 2px solid oklch(0.985 0 0 / 0.35);
  border-top-color: var(--on-dark);
  border-radius: var(--r-pill);
  animation: ca-cart-spin 0.7s linear infinite;
}
@keyframes ca-cart-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .ca-cart-spinner { animation-duration: 2s; }
  .ca-cart-line { transition: none; }
}

/* ── Trust row ──────────────────────────────────────────────────────────── */

.ca-cart-trust {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem 1rem;
  padding: 0 var(--s-2);
}
.ca-cart-trust__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: var(--t-xs);
  color: var(--ink-3);
}
.ca-cart-trust__badge svg { color: var(--copper); flex: none; }

/* ── Empty state ────────────────────────────────────────────────────────── */

/* Compact on purpose. This card used to run ~560px tall on its own, so the
   products underneath — the only thing on the page that can turn an empty cart
   into an order — started below the fold. It states the situation and gets out
   of the way. */
.ca-cart-empty { padding: 0; }
.ca-cart-empty__inner {
  max-width: 560px;
  margin-inline: auto;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-panel);
  box-shadow: var(--d-ambient);
  padding: var(--s-4) var(--s-3);
}
.ca-cart-empty__icon { margin-bottom: var(--s-2); }
.ca-cart-empty__icon svg { width: 44px; height: 44px; }
.ca-cart-empty__title {
  margin: 0 0 0.45rem;
  font-size: var(--t-xl);
  font-weight: 700;
  color: var(--ink);
}
.ca-cart-empty__sub {
  margin: 0 auto var(--s-3);
  max-width: 38ch;
  font-size: var(--t-sm);
  line-height: var(--lh-body);
  color: var(--ink-3);
}
.ca-cart-empty__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  font-size: var(--t-sm);
  font-weight: 700;
  color: var(--on-dark);
  text-decoration: none;
  background: linear-gradient(to bottom, var(--accent-lift), var(--accent));
  border-radius: var(--r-ui);
  box-shadow: var(--d-lift), var(--d-rim);
  transition: filter var(--t-fast) var(--ease);
}
.ca-cart-empty__cta:hover { filter: brightness(1.05); }
.ca-cart-empty__perks {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem 1.1rem;
  margin-top: var(--s-3);
  padding-top: var(--s-2);
  border-top: 1px solid var(--line-soft);
}
.ca-cart-empty__perks span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: var(--t-xs);
  color: var(--ink-3);
}
.ca-cart-empty__perks svg { color: var(--copper); flex: none; }

/* ── Smart cart (suggestions) ───────────────────────────────────────────────
   Lives in the LEFT column under the basket, not below both columns. A cart
   with one line leaves that column empty from the first row to the fold while
   the summary and delivery form fill the right — and suggestions placed under
   both columns sat below the order form, which nobody scrolls past. */

.ca-cross {
  margin-top: var(--s-3);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-panel);
  box-shadow: var(--d-ambient);
  padding: var(--s-3);
}

.ca-cross__head { margin-bottom: var(--s-3); }

/* Empty-cart variant. No two-column layout here, so the section runs the full
   page width — constrained to the reading shell and given a fourth column so
   the cards stay a sensible size instead of stretching to 430px each. */
.ca-cross--empty {
  max-width: var(--shell-md);
  margin-inline: auto;
  margin-top: var(--s-3);
}
@media (min-width: 961px) {
  .ca-cross--empty .ca-cross__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .ca-cross--empty .ca-cross__grid > :nth-child(n + 5) { display: none; }
}

/* ── Free-delivery progress ─────────────────────────────────────────────────
   The threshold as a bar instead of a sentence in the summary. It sits with
   the products that can close it, which is the only place the information is
   actionable. */

.ca-cross__progress {
  margin: 0 0 var(--s-3);
  padding-bottom: var(--s-3);
  border-bottom: 1px solid var(--line-soft);
}
.ca-cross__progress[hidden] { display: none; }

.ca-cross__bar {
  height: 7px;
  border-radius: var(--r-pill);
  background: var(--ivory-2);
  overflow: hidden;
}
.ca-cross__bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(to right, var(--copper), var(--accent));
  /* Animates as the quantity steppers move the basket toward the floor. */
  transition: width var(--t-med) var(--ease);
}
@media (prefers-reduced-motion: reduce) {
  .ca-cross__bar span { transition: none; }
}

.ca-cross__progress-label {
  margin: 0.5rem 0 0;
  font-size: var(--t-sm);
  color: var(--ink-2);
}
.ca-cross__progress-label strong { color: var(--ink); font-weight: 700; }
.ca-cross__progress-label .woocommerce-Price-amount {
  color: var(--accent);
  white-space: nowrap;
}

.ca-cross__title {
  margin: 0 0 0.3rem;
  font-size: var(--t-xl);
  font-weight: 700;
  line-height: var(--lh-head);
  color: var(--ink);
  letter-spacing: -0.015em;
}
/* The gap amount is the point of the sentence — it is the one number that
   tells the customer what adding something is worth. */
.ca-cross__title .woocommerce-Price-amount {
  color: var(--accent);
  white-space: nowrap;
}

.ca-cross__sub {
  margin: 0;
  font-size: var(--t-sm);
  color: var(--ink-3);
  max-width: 60ch;
}

/* Three across inside the left column (~890px at the 1320px shell), not four
   across the full page — the cards keep a usable image size instead of
   shrinking to fit a width they no longer have. */
.ca-cross__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s-2);
}

.ca-cross__card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-panel);
  overflow: hidden;
  transition: box-shadow var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.ca-cross__card:hover { box-shadow: var(--d-lift); }

/* The single product that closes the free-delivery gap is the recommendation.
   One card is marked, never several — a highlight on everything highlights
   nothing. Ranking guarantees it is the first card. */
.ca-cross__card.is-closer { border-color: var(--accent); }
.ca-cross__card.is-closer ~ .ca-cross__card.is-closer { border-color: var(--line); }

.ca-cross__link {
  display: flex;
  flex-direction: column;
  flex: 1;
  text-decoration: none;
  color: inherit;
}

.ca-cross__media {
  position: relative;
  aspect-ratio: 1;
  background: var(--ivory-2);
  overflow: hidden;
}
.ca-cross__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform var(--t-med) var(--ease);
}
.ca-cross__card:hover .ca-cross__media img { transform: scale(1.04); }

.ca-cross__flag {
  position: absolute;
  left: 0.5rem;
  top: 0.5rem;
  padding: 0.25rem 0.5rem;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--on-dark);
  background: var(--accent);
  border-radius: var(--r-pill);
}

.ca-cross__name {
  margin: 0.65rem 0.7rem 0.25rem;
  font-size: var(--t-sm);
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink);
  /* Names run to 70+ characters; three lines is enough to identify a product
     and keeps every card in the row the same height. */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ca-cross__price {
  margin: auto 0.7rem 0.35rem;
  font-size: var(--t-base);
  font-weight: 700;
  color: var(--ink);
}

/* Names the colour the button is about to add, so a one-tap add is never a
   surprise. */
.ca-cross__variant {
  margin: 0 0.7rem 0.5rem;
  font-size: var(--t-xs);
  color: var(--ink-3);
}

.ca-cross__btn {
  display: block;
  width: calc(100% - 1.4rem);
  margin: 0 0.7rem 0.7rem;
  padding: 0.6rem 0.5rem;
  font-family: var(--ff);
  font-size: var(--t-sm);
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  color: var(--accent);
  background: var(--surface);
  border: 1.5px solid var(--accent);
  border-radius: var(--r-ui);
  cursor: pointer;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.ca-cross__btn:hover { background: var(--accent-wash); }
.ca-cross__btn:disabled { opacity: 0.6; cursor: wait; }

.ca-cross__btn-done { display: none; }
.ca-cross__btn.is-done {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-dark);
  transition: none;
}
.ca-cross__btn.is-done .ca-cross__btn-default { display: none; }
.ca-cross__btn.is-done .ca-cross__btn-done { display: inline; }

/* ── Mobile order bar — DELETED ─────────────────────────────────────────────
   This was a fixed total + "Commander" bar pinned to the bottom on mobile. It
   never showed: the theme already pins .ca-bottom there, a 58px nav at
   z-index 900, so the bar rendered underneath it and out of sight.

   It is not being raised above that nav — it is being removed. Two stacked
   fixed bars would eat 120px of a 844px phone screen, and .ca-bottom already
   carries a Panier item with the live count. The page only needs to stop its
   own content from ending underneath that nav. */
@media (max-width: 960px) {
  .ca-cart-bar { display: none; }

  /* 58px nav + breathing room + the iPhone home indicator. */
  .ca-cart-pg__body {
    padding-bottom: calc(58px + 1.5rem + env(safe-area-inset-bottom, 0px));
  }
}

/* ── Narrow screens ─────────────────────────────────────────────────────── */

/* Six are fetched so the left column always has enough to fill; narrower
   breakpoints show fewer rather than shrinking the cards. */
.ca-cross__grid > :nth-child(n + 7) { display: none; }

@media (max-width: 1180px) {
  .ca-cross__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ca-cross__grid > :nth-child(n + 5) { display: none; }
}

@media (max-width: 960px) {
  /* Stacked layout: the column is full width again, so three fit. */
  .ca-cross__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ca-cross__grid > :nth-child(n + 4) { display: none; }
}

@media (max-width: 620px) {
  /* The third column was a fixed 30px sized for the × button, and the line
     total was placed in it — so "188,000 DT" rendered into 30px and clipped to
     "188,0" against the card edge. The column is now auto: it takes the width
     the total actually needs, and the × sits at its right edge. */
  .ca-cart-line {
    grid-template-columns: 56px minmax(0, 1fr) auto;
    grid-template-areas:
      "media info   remove"
      "media qty    total";
    row-gap: 0.55rem;
    column-gap: 0.7rem;
    padding: 0.75rem;
  }
  .ca-cart-line__media { grid-area: media; width: 56px; align-self: start; }
  .ca-cart-line__info  { grid-area: info; }
  .ca-cart-line__qty   { grid-area: qty; justify-self: start; }
  .ca-cart-line__remove{ grid-area: remove; justify-self: end; align-self: start; }
  .ca-cart-line__total {
    grid-area: total;
    text-align: right;
    align-self: center;
    /* The desktop reservation of 6.5ch is what pushed this into the × column's
       width in the first place. Here the column sizes to the content. */
    min-width: 0;
    white-space: nowrap;
  }

  .ca-cart-line__name { font-size: 0.9rem; line-height: 1.25; }
  .ca-cart-line__meta { margin-bottom: 0.15rem; }
  .ca-cart-line__unit { font-size: 0.75rem; }
  .ca-cart-qty__max { text-align: left; font-size: 0.66rem; }

  /* The stepper was a 124px bordered box (44px + 44px + a 2.25rem readout)
     sitting next to a clipped total — the heaviest object on the card, for the
     least important job. Same touch target, less furniture. */
  .ca-cart-qty__val { min-width: 1.75rem; }

  .ca-cart-sum,
  .ca-cart-form { padding: 0.85rem; }
  .ca-cart-side__sticky { gap: 0.7rem; }
  .ca-cart-sum__row { padding: 0.45rem 0; }

  /* Two across, not one: stacked cards would be several screens of scrolling
     between the basket and the order form. */
  .ca-cross__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.7rem; }
  .ca-cross__grid > :nth-child(n + 5) { display: none; }
  .ca-cross__grid > :nth-child(-n + 4) { display: flex; }
  .ca-cross__name { -webkit-line-clamp: 2; font-size: 0.82rem; }
  .ca-cross__price { font-size: var(--t-sm); }
  /* "Ajouter au panier" is 17 characters in a half-width card; it wraps rather
     than being truncated to something the customer has to guess at. */
  .ca-cross__btn { font-size: 0.76rem; line-height: 1.25; padding-inline: 0.35rem; }
  .ca-cross__variant { font-size: 0.68rem; margin-bottom: 0.4rem; }

  .ca-cross { padding: 0.85rem; margin-top: 0; }
  .ca-cross__title { font-size: var(--t-lg); }
  .ca-cross__head { margin-bottom: 0.85rem; }
  .ca-cross__progress { margin-bottom: 0.85rem; padding-bottom: 0.85rem; }
  .ca-cross__progress-label { font-size: 0.78rem; }

  /* The black band was ~187px of an 844px phone screen — 22% of the viewport
     spent on a breadcrumb and the word "Panier" before a single product. The
     display size is for a desktop hero; here it is a page title. */
  .ca-cart-pg__head { padding: 1rem 0 0.9rem; }
  .ca-cart-pg__title { font-size: var(--t-2xl); }
  .ca-cart-pg__crumb { margin-bottom: 0.55rem; font-size: 0.75rem; }
  .ca-cart-pg__count { font-size: 0.63rem; padding: 0.26rem 0.55rem; }
  .ca-cart-pg__body { padding-top: 1.1rem; }
  .ca-cart-pg__title-row { gap: 0.55rem; }
  .ca-cart-lines__more { padding: 0.8rem 0.75rem; }

  /* Titles carry the full brand token now, so the longest run to three lines
     and push the price row down. Two lines identifies the product; the rest is
     on the product page one tap away. */
  .ca-cart-line__name {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
}

/* Trust row: three badges need ~380px of one line, so at 390px the third
   wrapped alone and the row read as a mistake. On a phone they become one
   quiet sentence — same three facts, no icons, no ragged second line. */
@media (max-width: 620px) {
  .ca-cart-trust {
    gap: 0 0.4rem;
    padding: 0 0.25rem;
  }
  .ca-cart-trust__badge svg { display: none; }
  .ca-cart-trust__badge { font-size: 0.72rem; }
  .ca-cart-trust__badge + .ca-cart-trust__badge::before {
    content: "·";
    margin-right: 0.4rem;
    color: var(--line);
  }
}

/* Touch targets. 34px steppers are fine under a mouse and under the 44px floor
   for a thumb, which is how almost every order on this store is placed. */
@media (pointer: coarse) {
  .ca-cart-qty__btn { width: 42px; height: 42px; }
  .ca-cart-line__remove { width: 38px; height: 38px; }
  .ca-cross__btn { padding-block: 0.8rem; }
}
