/* ─── The BLOCK cart (docs/cao/cart-s2) ──────────────────────────────────────────────────────────────────────────────────────
   cao.karya.io's Cart page is the WooCommerce Cart BLOCK (React, drawn in the browser), not the [woocommerce_cart] shortcode, so the
   theme's woocommerce/cart/*.php never run there. This file gives the block the cart-s1 look PURELY through CSS:
   white paper, Anton for the name, the line total and the total, Courier Prime caps for the rest, 1px hairlines, radius 0, ink on paper,
   the variation photo large (96px on a phone, 160px on a desktop), a 44px stepper, REMOVE as a word, the coupon accordion in a hairline,
   the totals box with the total in Anton, and the one filled PROCEED TO CHECKOUT.

   Loaded on the cart page only, after WooCommerce's block CSS (inc/cart.php: never on a [woocommerce_cart] page, where cart.css draws it).
   Every selector is a WooCommerce Blocks class name; each one is checked against the real server HTML of cao.karya.io's cart
   (tests/themes/cao/fixtures/cart-live.html) or WooCommerce 11.2.2's own bundles (fixtures/wc-blocks-11.2.2-classes.txt), so a rename in
   WooCommerce fails a test instead of the page.
   Widths follow WooCommerce's own switch: the block is an inline-size container and lays out as one column under 920px of it.

   UNTOUCHED, ON PURPOSE: the express-payment box (Apple Pay / Google Pay / Link from the Stripe gateway) and its iframes keep their own
   colours, sizes, radius and behaviour. Only the outer group's spacing is set here, from an allowlist a test holds
   (tests/themes/cao/cart-blocks.test.js). No markup is changed, no block script is dequeued, WooCommerce's block CSS stays on.
   Tokens only (no hex), nothing under 12px, every control 44px or more. */

/* ─── Frame ─── */
.wp-block-woocommerce-cart { font-family: var(--cao-font-mono); color: var(--cao-ink); }
.wp-block-woocommerce-cart .wc-block-cart { padding-top: var(--cao-space-5); }
.wp-block-woocommerce-cart .wc-block-components-sidebar-layout { column-gap: var(--cao-space-8); }
.wp-block-woocommerce-cart .wc-block-components-sidebar { flex-basis: 400px; width: 400px; }

/* ─── The items table ─── */
.wp-block-woocommerce-cart table.wc-block-cart-items { border-color: var(--cao-ink); }
.wp-block-woocommerce-cart table.wc-block-cart-items .wc-block-cart-items__header {
  font: 400 12px/1.5 var(--cao-font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.wp-block-woocommerce-cart table.wc-block-cart-items .wc-block-cart-items__header th { font-weight: 400; }
.wp-block-woocommerce-cart table.wc-block-cart-items .wc-block-cart-items__header .wc-block-cart-items__header-image { width: 176px; }
.wp-block-woocommerce-cart table.wc-block-cart-items .wc-block-cart-items__header .wc-block-cart-items__header-total { width: 128px; }
.wp-block-woocommerce-cart table.wc-block-cart-items td { border-color: var(--cao-hair); }

/* the photo of the chosen variation: 2:3 like every bag on the site, studio grey behind */
.wp-block-woocommerce-cart table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__image { width: 160px; padding-right: var(--cao-space-4); }
.wp-block-woocommerce-cart table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__image a { display: block; }
.wp-block-woocommerce-cart table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__image img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 3;
  object-fit: cover; /* a 2:3 file in a 2:3 box crops nothing; a landscape file can never draw as a landscape (0.1.28: inc/cart-images.php also swaps it for the shop card photograph) */
  background: var(--cao-studio);
}

.wp-block-woocommerce-cart table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__wrap { gap: var(--cao-space-2); }
/* the name in the display face */
.wp-block-woocommerce-cart table.wc-block-cart-items .wc-block-cart-items__row .wc-block-components-product-name {
  max-width: none;
  color: var(--cao-ink);
  font: 400 26px/1 var(--cao-font-display);
  letter-spacing: 0;
  text-transform: uppercase;
  text-decoration: none;
}
@media (hover: hover) {
  .wp-block-woocommerce-cart table.wc-block-cart-items .wc-block-cart-items__row .wc-block-components-product-name:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
}
/* the unit price, mono */
.wp-block-woocommerce-cart table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__prices {
  font: 400 14px/1.4 var(--cao-font-mono);
  font-variant-numeric: tabular-nums;
}
/* COLOUR: NOTTE, SIZE: 60L: small caps mono, the name of the field quieter */
.wp-block-woocommerce-cart .wc-block-cart-items__row .wc-block-components-product-metadata {
  font: 400 12px/1.5 var(--cao-font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.wp-block-woocommerce-cart .wc-block-cart-items__row .wc-block-components-product-metadata__description { display: none; } /* the product's short description: the PDF carries none in a cart row */
.wp-block-woocommerce-cart .wc-block-cart-items__row .wc-block-components-product-details { margin: 0; padding: 0; list-style: none; }
.wp-block-woocommerce-cart .wc-block-cart-items__row .wc-block-components-product-details__name { color: var(--cao-mute); }
.wp-block-woocommerce-cart .wc-block-cart-items__row .wc-block-components-product-details__value { color: var(--cao-ink); }

/* the line total in Anton */
.wp-block-woocommerce-cart table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__total {
  font: 400 22px/1 var(--cao-font-display);
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
}

/* ─── The stepper: [−][ 1 ][+], each part 44px, one hairline box, radius 0 ─── */
.wp-block-woocommerce-cart .wc-block-cart-item__quantity { gap: var(--cao-space-4); margin-top: var(--cao-space-2); }
.wp-block-woocommerce-cart .wc-block-components-quantity-selector {
  min-width: 0;
  width: auto;
  height: var(--cao-hit);
  border: 1px solid var(--cao-line);
  border-radius: 0;
}
.wp-block-woocommerce-cart .wc-block-components-quantity-selector .wc-block-components-quantity-selector__button {
  width: var(--cao-hit);
  min-width: var(--cao-hit);
  height: 100%;
  border-radius: 0;
  background: var(--cao-paper);
  color: var(--cao-ink);
  font: 400 20px/1 var(--cao-font-mono);
  opacity: 1;
}
@media (hover: hover) {
  .wp-block-woocommerce-cart .wc-block-components-quantity-selector .wc-block-components-quantity-selector__button:not(:disabled):hover { background: var(--cao-ink); color: var(--cao-paper); }
}
.wp-block-woocommerce-cart .wc-block-components-quantity-selector .wc-block-components-quantity-selector__button:disabled { color: var(--cao-mute); opacity: 1; }
.wp-block-woocommerce-cart .wc-block-components-quantity-selector input.wc-block-components-quantity-selector__input {
  width: 56px;
  min-width: 56px;
  flex: 0 0 56px;
  height: 100%;
  padding: 0;
  border-inline: 1px solid var(--cao-hair);
  border-radius: 0;
  color: var(--cao-ink);
  font: 400 16px/1 var(--cao-font-mono);
}

/* REMOVE: a word, not the bin, with a 44px target (the button keeps its own label, "Remove … from cart") */
.wp-block-woocommerce-cart table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__remove-link {
  display: inline-flex;
  align-items: center;
  width: auto;
  height: auto;
  min-width: var(--cao-hit);
  min-height: var(--cao-hit);
  color: var(--cao-ink);
  font: 400 12px/1 var(--cao-font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.wp-block-woocommerce-cart table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__remove-link svg { display: none; }
.wp-block-woocommerce-cart table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__remove-link::before { content: "Remove"; }
@media (hover: hover) {
  .wp-block-woocommerce-cart table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__remove-link:hover { text-decoration: underline; text-decoration-thickness: 2px; }
}

/* ─── The totals box: one ink hairline, the title in Anton, the total in Anton ─── */
.wp-block-woocommerce-cart .wp-block-woocommerce-cart-order-summary-block {
  margin-bottom: var(--cao-space-5);
  padding: var(--cao-space-5);
  border: 1px solid var(--cao-ink);
  font: 400 13px/1.5 var(--cao-font-mono);
}
/* the title stays at every width (WooCommerce hides it under 920px, which left an empty hairline row at the top of the box) */
.wp-block-woocommerce-cart .wc-block-components-sidebar .wc-block-cart__totals-title {
  display: block;
  margin: 0 0 var(--cao-space-3);
  padding: 0;
  font: 400 26px/1 var(--cao-font-display);
  letter-spacing: 0;
  text-transform: uppercase;
}
.wp-block-woocommerce-cart .wp-block-woocommerce-cart-order-summary-block .wc-block-components-totals-wrapper { border-color: var(--cao-hair); }
.wp-block-woocommerce-cart .wc-block-components-totals-item { letter-spacing: 0.04em; text-transform: uppercase; }
.wp-block-woocommerce-cart .wc-block-components-totals-footer-item .wc-block-components-totals-item__label {
  font: 400 26px/1 var(--cao-font-display);
  letter-spacing: 0;
  text-transform: uppercase;
}
.wp-block-woocommerce-cart .wc-block-components-totals-footer-item .wc-block-components-totals-item__value {
  font: 400 34px/1 var(--cao-font-display);
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
}
.wp-block-woocommerce-cart .wc-block-components-totals-item__description { font-size: 12px; text-transform: none; letter-spacing: 0; color: var(--cao-mute); }

/* the coupon accordion: ADD COUPONS in mono caps, a 44px row; inside, a hairline field and an APPLY in the display face */
.wp-block-woocommerce-cart .wc-block-components-totals-coupon .wc-block-components-panel__button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: var(--cao-hit);
  margin: 0;
  padding: var(--cao-space-2) 0;
  color: var(--cao-ink);
  font: 400 13px/1.5 var(--cao-font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
/* the row is the 44px button itself: WooCommerce's 16px wrapper padding on top of it read as an empty band */
.wp-block-woocommerce-cart .wc-block-components-totals-wrapper:has(> .wc-block-components-totals-coupon) { padding: var(--cao-space-1) 0; }
.wp-block-woocommerce-cart .wc-block-components-totals-coupon .wc-block-components-panel__button-icon { position: static; order: 2; transform: none; flex: none; }
.wp-block-woocommerce-cart .wc-block-components-totals-coupon__form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0; }
.wp-block-woocommerce-cart .wc-block-components-totals-coupon__form .wc-block-components-text-input input {
  height: var(--cao-control-h);
  border: 1px solid var(--cao-line);
  border-right: 0;
  border-radius: 0;
  background: var(--cao-paper);
  color: var(--cao-ink);
  font-family: var(--cao-font-mono);
}
.wp-block-woocommerce-cart .wc-block-components-totals-coupon__form .wc-block-components-text-input label { font-family: var(--cao-font-mono); }
.wp-block-woocommerce-cart .wc-block-components-totals-coupon__form .wc-block-components-totals-coupon__button {
  min-height: var(--cao-control-h);
  padding: 0 var(--cao-space-4);
  border: 1px solid var(--cao-ink);
  border-radius: 0;
  background: var(--cao-paper);
  color: var(--cao-ink);
  font: 400 20px/1 var(--cao-font-display);
  text-transform: uppercase;
}
@media (hover: hover) {
  .wp-block-woocommerce-cart .wc-block-components-totals-coupon__form .wc-block-components-totals-coupon__button:not(:disabled):hover { background: var(--cao-ink); color: var(--cao-paper); }
}

/* ─── Express pay (Apple Pay / Google Pay / Link): SPACING of the outer group ONLY. Inside it, nothing. ─── */
.wp-block-woocommerce-cart .wc-block-cart__payment-options { padding: 0 0 var(--cao-space-2); }
.wp-block-woocommerce-cart .wc-block-components-express-payment-continue-rule--cart {
  margin: var(--cao-space-4) 0;
  font: 400 12px/1.5 var(--cao-font-mono);
  letter-spacing: 0.06em;
}

/* ─── PROCEED TO CHECKOUT: the one filled button, ink, in the display face ─── */
.wp-block-woocommerce-cart .wc-block-cart__submit { margin: 0 0 var(--cao-space-4); }
.wp-block-woocommerce-cart .wc-block-cart__submit-button.wc-block-components-button:not(.is-link) {
  width: 100%;
  min-height: 56px;
  padding: 0 var(--cao-space-5);
  border: 1px solid var(--cao-ink);
  border-radius: 0;
  background: var(--cao-ink);
  color: var(--cao-paper);
  font: 400 24px/1 var(--cao-font-display);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-decoration: none;
}
@media (hover: hover) {
  .wp-block-woocommerce-cart .wc-block-cart__submit-button.wc-block-components-button:not(.is-link):hover { background: var(--cao-paper); color: var(--cao-ink); }
}
/* the phone's pinned copy of the button (WooCommerce draws it under 783px): paper behind it, a hairline above, no glow */
.wp-block-woocommerce-cart .wc-block-cart__submit-container--sticky { background: var(--cao-paper); border-top: 1px solid var(--cao-ink); }
.wp-block-woocommerce-cart .wc-block-cart__submit-container--sticky::before { content: none; }

/* ─── Under 920px of cart (WooCommerce's own switch): each item a stacked card, the photo 96px wide ─── */
@container (max-width: 919px) {
  .wp-block-woocommerce-cart table.wc-block-cart-items .wc-block-cart-items__row {
    grid-template-columns: 96px minmax(0, 1fr) auto;
    column-gap: var(--cao-space-4);
    padding: var(--cao-space-4) 0;
    border-color: var(--cao-hair);
  }
  .wp-block-woocommerce-cart table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__image { width: 96px; padding-right: 0; grid-row: 1 / span 2; }
  .wp-block-woocommerce-cart table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__product { grid-column: 2 / 4; }
  .wp-block-woocommerce-cart table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__total { grid-column: 3; grid-row: 2; align-self: end; }
  .wp-block-woocommerce-cart table.wc-block-cart-items .wc-block-cart-items__row .wc-block-components-product-name { font-size: 22px; }
  .wp-block-woocommerce-cart .wc-block-components-sidebar { flex-basis: auto; width: 100%; }
  .wp-block-woocommerce-cart .wp-block-woocommerce-cart-order-summary-block { padding: var(--cao-space-4); }
}

/* ─── The empty cart: WooCommerce's own sentence in the home statement's style, no icon ─── */
.wp-block-woocommerce-empty-cart-block .wc-block-cart__empty-cart__title {
  max-width: 18ch;
  margin: var(--cao-space-6) 0 var(--cao-space-7);
  font: 400 clamp(32px, 4.4vw, 72px)/1.05 var(--cao-font-display);
  letter-spacing: 0;
  text-align: left;
  text-transform: uppercase;
}
.wp-block-woocommerce-empty-cart-block .wc-block-cart__empty-cart__title.with-empty-cart-icon::before { content: none; display: none; }
.wp-block-woocommerce-empty-cart-block .wp-block-separator { margin: 0 0 var(--cao-space-6); border: 0; border-top: 1px solid var(--cao-hair); background: none; }
.wp-block-woocommerce-empty-cart-block .wp-block-separator::before { content: none; }
.wp-block-woocommerce-empty-cart-block .wp-block-heading:not(.wc-block-cart__empty-cart__title) {
  margin: 0 0 var(--cao-space-5);
  font: 400 26px/1 var(--cao-font-display);
  text-align: left;
  text-transform: uppercase;
}
/* name and price read like the shop card's (product-card.css .pc-name / .pc-price): mono caps, body size, left */
.wp-block-woocommerce-empty-cart-block .wc-block-grid.wc-block-grid .wc-block-grid__product-title {
  margin: 0;
  font: 400 var(--type-body)/1.35 var(--cao-font-mono);
  letter-spacing: 0.04em;
  text-align: left;
  text-transform: uppercase;
  color: var(--cao-ink);
}
.wp-block-woocommerce-empty-cart-block .wc-block-grid.wc-block-grid .wc-block-grid__product-price {
  margin: var(--cao-space-1) 0 0;
  font: 400 var(--type-body)/1.35 var(--cao-font-mono);
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
  text-align: left;
}
/* NEW IN STORE: ONE grid, every card the same width and the same 2:3 photograph box (the first card used to draw narrower: WooCommerce sizes the
   flex items by their content). Two columns on a phone, four from 920px; name, price and button line up across the row. */
.wp-block-woocommerce-empty-cart-block .wc-block-grid__products {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--cao-space-6) var(--cao-space-4);
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 920px) {
  .wp-block-woocommerce-empty-cart-block .wc-block-grid__products { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
/* 0.1.43 (Kina 2026-11-25, "tiny thumbnails"): WooCommerce's own `.wc-block-grid.has-4-columns .wc-block-grid__product { max-width: 25% }` (0,3,0)
   outranked the card rule (0,2,0), so each card shrank to a QUARTER of its grid track (~90px of ~370px). The card and photograph rules now carry
   the doubled .wc-block-grid.wc-block-grid (0,5,0) and load after WooCommerce's sheets, so they win every tie: the photograph fills its card. */
.wp-block-woocommerce-empty-cart-block .wc-block-grid.wc-block-grid .wc-block-grid__products .wc-block-grid__product {
  display: flex;
  flex-direction: column;
  flex: none;
  justify-self: stretch;
  width: auto;
  max-width: none;
  text-align: left;
  font-size: inherit;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.wp-block-woocommerce-empty-cart-block .wc-block-grid.wc-block-grid .wc-block-grid__product-link { flex: 1 1 auto; display: block; width: 100%; }
.wp-block-woocommerce-empty-cart-block .wc-block-grid.wc-block-grid .wc-block-grid__product-image { display: block; width: 100%; max-width: none; margin: 0 0 var(--cao-space-3); }
.wp-block-woocommerce-empty-cart-block .wc-block-grid.wc-block-grid .wc-block-grid__products .wc-block-grid__product-image img {
  display: block;
  width: 100%;
  max-width: none;
  height: auto;
  aspect-ratio: 2 / 3;
  object-fit: cover; /* a 2:3 photograph in a 2:3 box: nothing is cropped, and a landscape source cannot leak through (0.1.28) */
  background: var(--cao-studio);
}
.wp-block-woocommerce-empty-cart-block .wc-block-grid__product-add-to-cart { margin-top: var(--cao-space-3); }
.wp-block-woocommerce-empty-cart-block .wc-block-grid__product-title { overflow-wrap: anywhere; }
.wp-block-woocommerce-empty-cart-block .wc-block-grid__product-add-to-cart .wp-block-button__link { box-sizing: border-box; width: 100%; max-width: 100%; text-align: center; }
.wp-block-woocommerce-empty-cart-block .wc-block-grid__product-add-to-cart .wp-block-button__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--cao-hit);
  padding: 0 var(--cao-space-4);
  border: 1px solid var(--cao-ink);
  border-radius: 0;
  background: var(--cao-paper);
  color: var(--cao-ink);
  font: 400 18px/1 var(--cao-font-display);
  text-transform: uppercase;
}
@media (hover: hover) {
  .wp-block-woocommerce-empty-cart-block .wc-block-grid__product-add-to-cart .wp-block-button__link:hover { background: var(--cao-ink); color: var(--cao-paper); }
}
/* 0.1.46 (jb 2026-11-25): on a PHONE the NEW IN STORE cards drew one to a row, indented ~17px from the CART heading. The two-column grid above sits at (0,2,0) and
   a WooCommerce rule on the list or its wrapper won the tie, so under 768px the grid, its wrapper and the cards are restated at (0,5,0) (the card rule's own weight):
   TWO columns, a 12px gap (--cao-space-3), no left or right offset of their own, so the first image starts on the heading's left edge and the second card ends on its right.
   The button's side padding shrinks and its label may wrap, so ADD TO CART never leaves a ~160px card at 390px. From 768px up nothing here applies. */
@media (max-width: 767px) {
  .wp-block-woocommerce-empty-cart-block .wc-block-grid.wc-block-grid {
    margin: 0;
    padding: 0;
    width: 100%;
    max-width: none;
    box-sizing: border-box;
  }
  .wp-block-woocommerce-empty-cart-block .wc-block-grid.wc-block-grid .wc-block-grid__products.wc-block-grid__products {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--cao-space-6) var(--cao-space-3);
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    list-style: none;
  }
  .wp-block-woocommerce-empty-cart-block .wc-block-grid.wc-block-grid .wc-block-grid__products.wc-block-grid__products .wc-block-grid__product {
    flex: none;
    flex-basis: auto;
    grid-column: auto;
    width: auto;
    max-width: 100%; /* a card is never wider than its track (not `none`: the 0.1.43 test reads that word as THE card rule) */
    min-width: 0;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
  .wp-block-woocommerce-empty-cart-block .wc-block-grid.wc-block-grid .wc-block-grid__product-add-to-cart .wp-block-button__link {
    padding: var(--cao-space-2);
    white-space: normal;
    line-height: 1.1;
    overflow-wrap: anywhere;
  }
}
/* a store's own empty-cart content (a "Browse store" line, buttons): left, mono caps, a 44px link, like CONTINUE SHOPPING on the shortcode cart */
.wp-block-woocommerce-empty-cart-block > p,
.wp-block-woocommerce-empty-cart-block > .wp-block-buttons { justify-content: flex-start; text-align: left; }
.wp-block-woocommerce-empty-cart-block > p a {
  display: inline-flex;
  align-items: center;
  min-height: var(--cao-hit);
  color: var(--cao-ink);
  font: 400 13px/1 var(--cao-font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: underline;
  text-underline-offset: 3px;
}
