/* Tindeq cart. Page layout only; the nav, footer, atoms and reset live in
   base.css.
   Ported from Claude Design project 43e41638 · "Cart.dc.html", boards 1B
   (cart page, desktop 1440) and 1D (cart page, mobile 390).

   READ THIS BEFORE EDITING.
   Every row, stepper, coupon field, total and button on this page is
   WooCommerce's own markup, printed by [woocommerce_cart]. This file only
   changes how it looks. It must not hide anything Woo prints, because the
   Request-a-Quote mu-plugin and PayPal Payments both inject their buttons into
   .wc-proceed-to-checkout and a display:none written for tidiness would delete
   revenue silently.

   THE TWO-COLUMN TRICK.
   Woo's output is flat:

     div.woocommerce
       ├ div.woocommerce-notices-wrapper
       ├ form.woocommerce-cart-form        (the items table)
       └ div.cart-collaterals
           ├ div.cross-sells               (only if a product has any)
           └ div.cart_totals               (totals + checkout button)

   The design wants the form at 745px on the left and the totals sticky at
   471px on the right. Rather than move Woo's markup, .woocommerce and
   .cart-collaterals are set to display:contents, which dissolves those two
   wrappers and promotes their children to grid items of .tq-cart__cols. Then
   each known child is pinned to a column. Two consequences to remember:

     1. display:contents keeps ::before/::after — and Woo gives .woocommerce
        and .cart-collaterals clearfix pseudo-elements, which would otherwise
        arrive as two empty grid items. They are switched off below.
     2. Woo's float/width layout rules (.cart_totals { float:right; width:48% })
        are inert as floats on a grid item but the *width* is not, so it is
        re-declared.

   Where display:contents is unsupported the page falls back to Woo's own
   stacked layout, which is exactly what the site does today. Nothing breaks.

   SPECIFICITY. Woo's stylesheets are printed before ours but many of their
   selectors are strong (.woocommerce table.shop_table td is 0-2-2), so almost
   every rule here is written as `.tq .tq-cart__cols .woocommerce …`. That is
   deliberate, not accidental verbosity: it buys us the cascade without
   !important. The handful that remain each answer an !important of Woo's:
   a.remove's hardcoded red, and the text-align and zebra background the
   responsive-table stylesheet forces on every cell under 768px. Each is
   commented where it appears; do not add a seventh without one. */

/* ------------------------------------------------------- breadcrumb + head */

.tq .tq-cart__top { padding-top: 18px; }

.tq .tq-cart__crumb ol { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.tq .tq-cart__crumb li {
  font-family: var(--tq-mono); font-size: 11px; line-height: 1.4;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--tq-mute);
}
.tq .tq-cart__crumb li:last-child { color: var(--tq-ink); }
.tq .tq-cart__crumb li + li::before { content: "/"; margin-right: 8px; color: var(--tq-hairline); }
.tq .tq-cart__crumb a:hover { color: var(--tq-ink); }

.tq .tq-cart__head {
  padding: 36px 0 12px;
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 48px;
}
.tq .tq-cart__title {
  font-family: var(--tq-serif); font-weight: 400;
  font-size: 46px; line-height: 1; letter-spacing: -.025em;
  color: var(--tq-ink);
}
.tq .tq-cart__count {
  padding-bottom: 6px;
  font-family: var(--tq-mono); font-size: 11px; line-height: 1.4;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--tq-mute);
}
.tq .tq-cart__count-sep { color: var(--tq-hairline); margin: 0 2px; }
.tq .tq-cart__count .tq-cart-count { color: var(--tq-ink); }

/* ------------------------------------------------------------ the columns */

.tq .tq-cart__cols {
  padding-top: 20px;
  padding-bottom: 72px;
  display: grid;
  grid-template-columns: minmax(0, 745fr) minmax(0, 471fr);  /* the design's ratio, exactly */
  gap: 0 64px;
  align-items: start;
}

/* Without display:contents the two columns cannot exist at all — Woo's own
   wrapper would be the only grid item — so the grid collapses to one column
   and the page falls back to exactly the stack the site ships today. */
@supports not (display: contents) {
  .tq .tq-cart__cols { grid-template-columns: minmax(0, 1fr); }
}

/* Dissolve Woo's two wrappers (see the note at the top) … */
.tq .tq-cart__cols .woocommerce,
.tq .tq-cart__cols .cart-collaterals { display: contents; }
/* … and with them, their clearfix pseudo-elements. */
.tq .tq-cart__cols .woocommerce::before,
.tq .tq-cart__cols .woocommerce::after,
.tq .tq-cart__cols .cart-collaterals::before,
.tq .tq-cart__cols .cart-collaterals::after { display: none; }

.tq .tq-cart__cols .woocommerce-notices-wrapper { grid-column: 1 / -1; }
.tq .tq-cart__cols .woocommerce-cart-form { grid-column: 1; min-width: 0; margin: 0; }
.tq .tq-cart__cols .woocommerce .cart_totals { grid-column: 2; width: 100%; float: none; }
.tq .tq-cart__foot { grid-column: 1; }

/* Cross-sells are off in the design and unset in the shop today, but if a
   product ever gets one they must not land in the 471px column. `order` moves
   them below everything without touching the markup — grid places items in
   order-modified document order. */
.tq .tq-cart__cols .woocommerce .cross-sells {
  grid-column: 1 / -1; order: 4;
  width: 100%; float: none;
  padding-top: 48px;
}

/* Notices ---------------------------------------------------------------- */

.tq .tq-cart__cols .woocommerce-message,
.tq .tq-cart__cols .woocommerce-info,
.tq .tq-cart__cols .woocommerce-error {
  margin: 0 0 24px; padding: 14px 18px;
  border: 1px solid var(--tq-hairline);
  border-left: 2px solid var(--tq-ink);
  border-radius: var(--tq-radius);
  background: var(--tq-snow-2);
  color: var(--tq-ink-2);
  font-size: 14px; list-style: none;
}
.tq .tq-cart__cols .woocommerce-error { border-left-color: var(--tq-outdoor); }
.tq .tq-cart__cols .woocommerce-message::before,
.tq .tq-cart__cols .woocommerce-info::before,
.tq .tq-cart__cols .woocommerce-error::before { display: none; }

/* ---------------------------------------------------------- the item table */

.tq .tq-cart__cols .woocommerce table.shop_table {
  width: 100%; margin: 0;
  border: 0; border-radius: 0;
  border-collapse: collapse; border-spacing: 0;
  font-family: var(--tq-sans);
}
.tq .tq-cart__cols .woocommerce table.shop_table th,
.tq .tq-cart__cols .woocommerce table.shop_table td {
  border: 0; padding: 0;
  font-size: 15px; line-height: 1.5;
}

/* Header row: the design's "Item / Line total" rule, kept as Woo's six real
   column headers (two of which are screen-reader only already). */
.tq .tq-cart__cols .woocommerce table.cart thead th {
  padding: 0 16px 12px 0;
  border-bottom: 1px solid var(--tq-ink);
  font-family: var(--tq-mono); font-size: 10px; font-weight: 400; line-height: 1.4;
  letter-spacing: .16em; text-transform: uppercase; text-align: left;
  color: var(--tq-mute);
}
.tq .tq-cart__cols .woocommerce table.cart thead th.product-subtotal { padding-right: 0; text-align: right; }
/* Only the two fixed cells are given a width. Price, quantity and subtotal are
   left to the auto table algorithm, which hands the slack to the name column —
   pinning all five made "Progressor 200 Rechargeable" wrap to three lines in a
   686px column. */
.tq .tq-cart__cols .woocommerce table.cart thead th.product-remove    { width: 44px; }
.tq .tq-cart__cols .woocommerce table.cart thead th.product-thumbnail { width: 134px; }
.tq .tq-cart__cols .woocommerce table.cart td.product-name            { width: 40%; }

.tq .tq-cart__cols .woocommerce table.cart tbody td {
  padding: 24px 16px 24px 0;
  border-bottom: 1px solid var(--tq-hairline);
  vertical-align: middle;
}
.tq .tq-cart__cols .woocommerce table.cart tbody td.product-subtotal { padding-right: 0; }

/* Remove. Woo hard-codes a.remove to red with !important, and hovers it to
   white-on-red; the design's × is a quiet mute glyph that inverts to onyx, so
   this is one of the places the file has to answer !important in kind. It is
   also the only 44px-square target in the row, so it earns the size. */
.tq .tq-cart__cols .woocommerce a.remove {
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; margin: 0;
  font-size: 20px; font-weight: 400; line-height: 1;
  color: var(--tq-mute) !important;
  background: transparent;
}
.tq .tq-cart__cols .woocommerce a.remove:hover {
  color: var(--tq-paper) !important;
  background: var(--tq-onyx);
}

/* Thumbnail. The well is the anchor so that mix-blend-mode lands on the image
   alone — putting a background and multiply on the same element would darken
   the well against the page. Product shots are on a light ground, so
   multiplying onto snow removes their box without a cut-out. */
.tq .tq-cart__cols .woocommerce td.product-thumbnail a {
  display: flex; align-items: center; justify-content: center;
  width: 118px; height: 118px; padding: 12px;
  border: 1px solid var(--tq-hairline); border-radius: 6px;
  background: var(--tq-snow-2);
}
.tq .tq-cart__cols .woocommerce table.cart td.product-thumbnail img {
  width: auto; height: auto; max-width: 100%; max-height: 100%;
  object-fit: contain;
  mix-blend-mode: multiply;
  box-shadow: none;
}
/* Woo prints the thumbnail bare, with no anchor, when a cart line has no
   permalink (a deleted or hidden product). There is no well to size against
   then, so the image caps itself. */
.tq .tq-cart__cols .woocommerce table.cart td.product-thumbnail > img { max-width: 118px; max-height: 118px; }

/* Name. The design sets it in Instrument Serif at 26px; the design system
   forbids the serif below 30px and PORTING.md makes that binding, so it is
   Archivo at the weight that holds the same place in the row. Same call as
   the shop cards — change both together or neither. */
.tq .tq-cart__cols .woocommerce td.product-name {
  font-size: 20px; font-weight: 500; line-height: 1.2; letter-spacing: -.01em;
  color: var(--tq-ink);
}
.tq .tq-cart__cols .woocommerce td.product-name a:hover {
  text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px;
}
/* Variation / add-on metadata Woo prints under the name. */
.tq .tq-cart__cols .woocommerce td.product-name dl.variation,
.tq .tq-cart__cols .woocommerce td.product-name .wc-item-meta {
  margin: 6px 0 0;
  font-family: var(--tq-mono); font-size: 11px; line-height: 1.6;
  letter-spacing: .06em; text-transform: none;
  color: var(--tq-mute);
}
.tq .tq-cart__cols .woocommerce td.product-name dl.variation dt,
.tq .tq-cart__cols .woocommerce td.product-name dl.variation dd { display: inline; margin: 0; font-weight: 400; }
.tq .tq-cart__cols .woocommerce td.product-name dl.variation p { display: inline; margin: 0; }

/* Unit price stays, quietly — the design only shows "x each" above one unit,
   Woo shows it always, and a visible unit price is never the wrong answer.

   nowrap is load-bearing, not cosmetic: the base currency is NOK and Woo
   formats it "1 699 kr" with a SPACE thousands separator, so an auto-width
   table column happily breaks the number across two lines. Measured on
   staging with one line in the cart: the price column settled at 58px and
   "1 699 kr" rendered as "1 / 699 kr". Telling the two money columns not to
   wrap makes the table algorithm reserve the width instead. */
.tq .tq-cart__cols .woocommerce td.product-price {
  font-size: 14px;
  white-space: nowrap;
  color: var(--tq-ink-2);
}
.tq .tq-cart__cols .woocommerce td.product-subtotal {
  font-size: 18px; font-weight: 500;
  white-space: nowrap;
  text-align: right;
  color: var(--tq-ink);
}

/* Quantity. The design draws a −/1/+ stepper; WooCommerce's classic cart has a
   number input and its own update mechanics, so the input is dressed as the
   design's pill rather than replaced. Rebuilding it would mean owning
   cart[key][qty], the nonce and the update_cart round-trip — and the browser's
   own spinner is a real, accessible stepper. */
.tq .tq-cart__cols .woocommerce .quantity { display: inline-flex; }
.tq .tq-cart__cols .woocommerce .quantity .qty {
  width: 96px; height: 44px;
  padding: 0 4px 0 12px;
  border: 1px solid var(--tq-hairline);
  border-radius: var(--tq-radius-pill);
  background: var(--tq-snow-2);
  color: var(--tq-ink);
  font-family: var(--tq-mono); font-size: 14px; font-weight: 500;
  text-align: center;
}
.tq .tq-cart__cols .woocommerce .quantity .qty:focus {
  outline: 2px solid var(--tq-ink); outline-offset: 2px;
  border-color: var(--tq-ink);
}

/* Coupon + update row ---------------------------------------------------- */

/* The actions cell keeps display:table-cell on purpose. It carries colspan="6",
   and a `td` switched to flex is re-wrapped by the browser in an anonymous
   table cell that loses the colspan — the whole row would then collapse into
   the 52px remove column. Woo already floats .coupon left and right-aligns the
   rest, which is the design's arrangement; only the spacing changes. */
.tq .tq-cart__cols .woocommerce table.cart td.actions {
  padding: 24px 0 0;
  border-bottom: 0;
  text-align: right;
}
.tq .tq-cart__cols .woocommerce table.cart td.actions::after {
  content: ""; display: block; clear: both;   /* .coupon floats */
}
.tq .tq-cart__cols .woocommerce table.cart td.actions .coupon {
  float: left;
  display: flex; align-items: center; gap: 8px;
  padding: 0; margin: 0;
}
/* IDs beat everything Woo has, which is the point here — Woo floats and sizes
   this input from three different rules. */
.tq .tq-cart__cols #coupon_code {
  float: none;
  width: 220px; height: 44px; margin: 0; padding: 0 16px;
  border: 1px solid var(--tq-hairline);
  border-radius: var(--tq-radius-pill);
  background: var(--tq-paper);
  color: var(--tq-ink);
  font-family: var(--tq-sans); font-size: 15px; line-height: 1;
}
.tq .tq-cart__cols #coupon_code::placeholder { color: var(--tq-mute); }

/* ------------------------------------------------------------- the buttons */

/* One pill for everything Woo and its plugins print as a .button inside the
   cart. .checkout-button gets the filled treatment below; everything else —
   Apply coupon, Update cart, Return to shop, Request a quote — is the ghost. */
.tq .tq-cart__cols .woocommerce a.button,
.tq .tq-cart__cols .woocommerce button.button,
.tq .tq-cart__cols .woocommerce input.button {
  display: inline-flex; align-items: center; justify-content: center;
  height: 44px; min-height: 44px; padding: 0 22px;
  border: 1px solid var(--tq-ink);
  border-radius: var(--tq-radius-pill);
  background: transparent;
  color: var(--tq-ink);
  font-family: var(--tq-sans); font-size: 15px; font-weight: 500; line-height: 1;
  text-decoration: none; text-transform: none;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease, opacity 160ms ease;
}
.tq .tq-cart__cols .woocommerce a.button:hover,
.tq .tq-cart__cols .woocommerce button.button:hover,
.tq .tq-cart__cols .woocommerce input.button:hover {
  background: var(--tq-ink); color: var(--tq-paper);
}
.tq .tq-cart__cols .woocommerce button.button:disabled,
.tq .tq-cart__cols .woocommerce button.button[disabled],
.tq .tq-cart__cols .woocommerce button.button:disabled[disabled] {
  opacity: .35; cursor: not-allowed;
  background: transparent; color: var(--tq-ink);
}

/* ------------------------------------------------------- the summary card */

.tq .tq-cart__cols .woocommerce .cart_totals {
  position: sticky; top: 88px;
  display: flex; flex-direction: column; gap: 18px;
  padding: 26px;
  border: 1px solid var(--tq-hairline);
  border-radius: var(--tq-radius);
  background: var(--tq-snow-2);
  /* No overflow:hidden — express-checkout buttons render their own iframes in
     here and clipping them is how you lose a PayPal button. */
}
.tq .tq-cart__cols .woocommerce .cart_totals h2 {
  font-family: var(--tq-mono); font-size: 11px; font-weight: 400; line-height: 1.4;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--tq-ink);
}
.tq .tq-cart__cols .woocommerce .cart_totals table.shop_table {
  margin: 0;
  border-top: 1px solid var(--tq-hairline);
}
.tq .tq-cart__cols .woocommerce .cart_totals table.shop_table th {
  width: 40%;
  padding: 12px 12px 12px 0;
  font-size: 15px; font-weight: 400; text-align: left;
  color: var(--tq-ink-2);
}
.tq .tq-cart__cols .woocommerce .cart_totals table.shop_table td {
  padding: 12px 0;
  font-size: 15px; text-align: right;
  white-space: nowrap;   /* same NOK "1 699 kr" break as the item table */
  color: var(--tq-ink);
}
/* …except the shipping cell, which holds a method list, a destination line and
   the whole calculator form. Those must wrap. */
.tq .tq-cart__cols .woocommerce .cart_totals tr.woocommerce-shipping-totals td { white-space: normal; }
.tq .tq-cart__cols .woocommerce .cart_totals tr.cart-discount th,
.tq .tq-cart__cols .woocommerce .cart_totals tr.cart-discount td { color: var(--tq-clinic); }

/* The one big number. */
.tq .tq-cart__cols .woocommerce .cart_totals tr.order-total th,
.tq .tq-cart__cols .woocommerce .cart_totals tr.order-total td {
  padding-top: 18px;
  border-top: 1px solid var(--tq-ink);
}
.tq .tq-cart__cols .woocommerce .cart_totals tr.order-total th {
  font-family: var(--tq-mono); font-size: 11px;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--tq-ink);
  vertical-align: baseline;
}
.tq .tq-cart__cols .woocommerce .cart_totals tr.order-total td {
  font-size: 30px; font-weight: 500; line-height: 1; letter-spacing: -.025em;
  vertical-align: baseline;
}
.tq .tq-cart__cols .woocommerce .cart_totals tr.order-total td small,
.tq .tq-cart__cols .woocommerce .cart_totals .includes_tax {
  display: block;
  margin-top: 8px;
  font-family: var(--tq-mono); font-size: 11px; font-weight: 400;
  letter-spacing: .06em; text-transform: none;
  color: var(--tq-mute);
}

/* Shipping row: the method list, the "Change address" toggle and the
   calculator, all Woo's. This cell opts out of the summary table's right
   alignment — a list of shipping methods and a form read left. */
.tq .tq-cart__cols .woocommerce .cart_totals tr.woocommerce-shipping-totals th { width: 30%; vertical-align: top; }
.tq .tq-cart__cols .woocommerce .cart_totals tr.woocommerce-shipping-totals td { text-align: left; }
.tq .tq-cart__cols .woocommerce ul#shipping_method { display: flex; flex-direction: column; gap: 8px; }
.tq .tq-cart__cols .woocommerce ul#shipping_method li { margin: 0; padding: 0; text-indent: 0; display: flex; align-items: baseline; gap: 8px; }
.tq .tq-cart__cols .woocommerce ul#shipping_method input[type="radio"] { margin: 0; flex: none; }
.tq .tq-cart__cols .woocommerce ul#shipping_method label { font-size: 14px; color: var(--tq-ink); margin: 0; }
.tq .tq-cart__cols .woocommerce .woocommerce-shipping-destination,
.tq .tq-cart__cols .woocommerce .woocommerce-shipping-totals td p {
  margin-top: 8px;
  font-family: var(--tq-mono); font-size: 11px; line-height: 1.6;
  letter-spacing: .06em;
  color: var(--tq-mute);
}
.tq .tq-cart__cols .woocommerce a.shipping-calculator-button {
  display: inline-block;
  margin-top: 8px;
  font-family: var(--tq-mono); font-size: 10px;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--tq-ink-2);
  border-bottom: 1px solid var(--tq-hairline);
}
.tq .tq-cart__cols .woocommerce a.shipping-calculator-button:hover { color: var(--tq-ink); border-bottom-color: var(--tq-ink); }
.tq .tq-cart__cols .woocommerce .shipping-calculator-form { margin-top: 14px; text-align: left; }
.tq .tq-cart__cols .woocommerce .shipping-calculator-form p { margin-bottom: 10px; }
.tq .tq-cart__cols .woocommerce .shipping-calculator-form input.input-text,
.tq .tq-cart__cols .woocommerce .shipping-calculator-form select,
.tq .tq-cart__cols .woocommerce .select2-container .select2-selection--single {
  width: 100%; height: 44px;
  padding: 0 12px;
  border: 1px solid var(--tq-hairline); border-radius: 6px;
  background: var(--tq-paper);
  color: var(--tq-ink);
  font-family: var(--tq-sans); font-size: 15px; line-height: 42px;
}
.tq .tq-cart__cols .select2-container .select2-selection--single .select2-selection__rendered { line-height: 42px; padding: 0; color: var(--tq-ink); }
.tq .tq-cart__cols .select2-container .select2-selection--single .select2-selection__arrow { height: 42px; }

/* Checkout + whatever else hooks woocommerce_proceed_to_checkout. */
.tq .tq-cart__cols .woocommerce .wc-proceed-to-checkout {
  display: flex; flex-direction: column; gap: 10px;
  padding: 0;
}
.tq .tq-cart__cols .woocommerce .wc-proceed-to-checkout a.checkout-button {
  display: flex; width: 100%; height: 52px; margin: 0; padding: 0 24px;
  border: 0;
  background: var(--tq-onyx); color: var(--tq-paper);
  font-size: 16px; font-weight: 500;
}
.tq .tq-cart__cols .woocommerce .wc-proceed-to-checkout a.checkout-button:hover {
  background: var(--tq-onyx); color: var(--tq-paper); opacity: .88;
}
/* Anything else in this block — the Request-a-Quote button, an express
   payment wrapper — gets the full width of the card and 48px, one step under
   the primary.
   `:not(.checkout-button)` is load-bearing: .checkout-button also carries the
   `button` class, so this rule matched it too, and at equal specificity but
   later in the file it silently overrode the 52px set above — the primary
   button rendered at 48px. Measured in a browser against the real
   stylesheets: 48px before, 52px after. */
.tq .tq-cart__cols .woocommerce .wc-proceed-to-checkout > * { max-width: 100%; }
.tq .tq-cart__cols .woocommerce .wc-proceed-to-checkout a.button:not(.checkout-button),
.tq .tq-cart__cols .woocommerce .wc-proceed-to-checkout button.button,
.tq .tq-cart__cols .woocommerce .wc-proceed-to-checkout input.button { width: 100%; height: 48px; }

/* The Request-a-Quote button — the mu-plugin "Tindeq Request-a-Quote", hooked
   on woocommerce_proceed_to_checkout at priority 25 (source read at
   ~/tindeq-website/checkout-probe/tindeq-request-a-quote.php). It prints its
   own INLINE style:
       style="display:block;margin-top:12px;text-align:center;
              background:#2e75b6;color:#fff;"
   An inline style outranks every selector in this file, so without the rule
   below the summary card shows a corporate-blue button with its label pinned
   to the top of the pill (display:block kills the inline-flex centring) and
   no hover state — the only off-palette element on the page. Confirmed in a
   browser against the real mu-plugin markup and the real stylesheets.
   !important is the only thing that answers an inline style. It is scoped to
   that plugin's own class, and it changes appearance ONLY — the href, the
   class list, the hook and the quote flow all stay the plugin's. If the
   mu-plugin ever drops its inline style this rule becomes a no-op. */
.tq .tq-cart__cols .woocommerce .wc-proceed-to-checkout a.tindeq-request-quote {
  display: inline-flex !important;
  margin-top: 0 !important;
  background: transparent !important;
  color: var(--tq-ink) !important;
}
.tq .tq-cart__cols .woocommerce .wc-proceed-to-checkout a.tindeq-request-quote:hover {
  background: var(--tq-ink) !important;
  color: var(--tq-paper) !important;
}

/* ------------------------------------------------------------ empty state */

.tq .tq-cart__cols--empty { padding-bottom: 96px; }
.tq .tq-cart__cols .wc-empty-cart-message,
.tq .tq-cart__cols .woocommerce .cart-empty,
.tq .tq-cart__cols .tq-cart__empty-lede,
.tq .tq-cart__cols .woocommerce .return-to-shop { grid-column: 1 / -1; }

/* Woo prints the headline, we print the middle line, Woo prints the button;
   `order` interleaves them without touching anyone's markup. */
.tq .tq-cart__cols .wc-empty-cart-message { order: 1; }
.tq .tq-cart__cols .tq-cart__empty-lede   { order: 2; }
.tq .tq-cart__cols .woocommerce .return-to-shop { order: 3; }

.tq .tq-cart__cols .woocommerce .cart-empty {
  margin: 24px 0 0; padding: 0;
  border: 0; border-radius: 0; background: none;
  font-family: var(--tq-serif); font-weight: 400;
  font-size: 38px; line-height: 1.05; letter-spacing: -.02em;
  color: var(--tq-ink);
}
.tq .tq-cart__cols .woocommerce .cart-empty::before { display: none; }
.tq .tq-cart__cols .tq-cart__empty-lede {
  max-width: 44ch; margin: 16px 0 0;
  font-size: 16px; line-height: 1.55;
  color: var(--tq-ink-2);
  text-wrap: pretty;
}
.tq .tq-cart__cols .woocommerce .return-to-shop { margin: 24px 0 0; }
.tq .tq-cart__cols .woocommerce .return-to-shop a.button {
  height: 52px; padding: 0 30px;
  border: 0;
  background: var(--tq-onyx); color: var(--tq-paper);
  font-size: 16px;
}
.tq .tq-cart__cols .woocommerce .return-to-shop a.button:hover {
  background: var(--tq-onyx); color: var(--tq-paper); opacity: .88;
}

/* ------------------------------------------------------------- foot row */

.tq .tq-cart__foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
  padding-top: 20px;
}
.tq .tq-cart__back {
  font-size: 15px; color: var(--tq-ink);
  text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px;
  padding: 10px 0;
}
.tq .tq-cart__origin {
  font-family: var(--tq-mono); font-size: 11px; line-height: 1.6;
  letter-spacing: .06em;
  color: var(--tq-mute);
}

/* ------------------------------------------------------------ responsive */

@media (max-width: 1279px) {
  .tq .tq-cart__head  { padding: 30px 0 12px; gap: 32px; }
  .tq .tq-cart__title { font-size: 42px; }
  .tq .tq-cart__cols  { gap: 0 48px; }
  .tq .tq-cart__cols .woocommerce .cart_totals { padding: 22px; }
}

/* One column from the 768 board down: the summary becomes a card under the
   items, which is also how the mobile board draws it, and the page never has
   two competing checkout buttons on screen at once. */
@media (max-width: 1023px) {
  .tq .tq-cart__cols {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }
  .tq .tq-cart__cols .woocommerce-cart-form,
  .tq .tq-cart__cols .woocommerce .cart_totals,
  .tq .tq-cart__foot { grid-column: 1; }
  .tq .tq-cart__cols .woocommerce .cart_totals { position: static; margin-top: 32px; }
  .tq .tq-cart__foot { order: 3; padding-top: 24px; }
  .tq .tq-cart__cols .woocommerce .cross-sells { padding-top: 40px; }
  .tq .tq-cart__title { font-size: 38px; }
}

/* Woo's own responsive-table stylesheet switches the item table to blocks at
   max-width:768px, so the typography that dresses it has to switch at exactly
   the same width — 767 would leave a one-pixel window with block rows and
   desktop cells. This is the only media query in the port that is not on the
   1279 / 1023 / 767 grid, and Woo chose it, not us. */
@media (max-width: 768px) {
  .tq .tq-cart__top   { padding-top: 16px; }
  .tq .tq-cart__head  { padding: 14px 0 18px; gap: 8px; flex-direction: column; align-items: flex-start; }
  .tq .tq-cart__title { font-size: 32px; line-height: 1.02; letter-spacing: -.02em; }
  .tq .tq-cart__count { padding-bottom: 0; font-size: 10px; letter-spacing: .16em; }
  .tq .tq-cart__cols  { padding-top: 4px; padding-bottom: 56px; }

  /* THE MOBILE ROW.
     Woo's responsive stylesheet turns every cell into its own right-aligned
     line with a floated "PRODUCT:" label — six lines per item, the thumbnail
     stranded on one of them. Board 1D draws one row instead: the shot on the
     left, the name and line total on one baseline, the unit price under them,
     the stepper and Remove on the last line. So the table becomes a block, the
     tbody becomes a block, and each item row becomes a three-area grid.

     The !importants below answer Woo's own: it forces `text-align: right` on
     every responsive cell and stripes every second row with a background. */
  .tq .tq-cart__cols .woocommerce table.cart,
  .tq .tq-cart__cols .woocommerce table.cart tbody { display: block; width: 100%; }
  .tq .tq-cart__cols .woocommerce table.cart thead { display: none; }
  .tq .tq-cart__cols .woocommerce table.cart tbody tr { display: block; }

  .tq .tq-cart__cols .woocommerce table.cart tbody tr.cart_item {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr) auto;
    grid-template-areas:
      "shot name  total"
      "shot price price"
      "shot qty   remove";
    column-gap: 14px; row-gap: 6px;
    align-items: start;
    padding: 18px 0;
    border-bottom: 1px solid var(--tq-hairline);
  }
  .tq .tq-cart__cols .woocommerce table.cart tbody tr.cart_item td {
    display: block;
    width: auto;
    padding: 0;
    border: 0;
    background: none !important;
    text-align: left !important;
  }
  .tq .tq-cart__cols .woocommerce table.cart tbody tr.cart_item td.product-thumbnail { grid-area: shot; }
  .tq .tq-cart__cols .woocommerce table.cart tbody tr.cart_item td.product-name      { grid-area: name; }
  .tq .tq-cart__cols .woocommerce table.cart tbody tr.cart_item td.product-subtotal  { grid-area: total; text-align: right !important; }
  .tq .tq-cart__cols .woocommerce table.cart tbody tr.cart_item td.product-price     { grid-area: price; }
  .tq .tq-cart__cols .woocommerce table.cart tbody tr.cart_item td.product-quantity  { grid-area: qty; }
  .tq .tq-cart__cols .woocommerce table.cart tbody tr.cart_item td.product-remove    { grid-area: remove; justify-self: end; }

  /* Only the unit price keeps Woo's data-title label; every other cell is
     unambiguous once it is in position. */
  .tq .tq-cart__cols .woocommerce table.cart tbody tr.cart_item td::before { display: none; }
  .tq .tq-cart__cols .woocommerce table.cart tbody tr.cart_item td.product-price::before {
    display: inline;
    float: none;
    font-family: var(--tq-mono); font-size: 10px; font-weight: 400;
    letter-spacing: .14em; text-transform: uppercase;
    color: var(--tq-mute);
  }

  .tq .tq-cart__cols .woocommerce td.product-thumbnail a { width: 76px; height: 76px; padding: 8px; }
  .tq .tq-cart__cols .woocommerce table.cart td.product-thumbnail > img { max-width: 76px; max-height: 76px; }
  .tq .tq-cart__cols .woocommerce td.product-name { font-size: 18px; line-height: 1.15; }
  .tq .tq-cart__cols .woocommerce td.product-price { font-size: 13px; }
  .tq .tq-cart__cols .woocommerce td.product-subtotal { font-size: 16px; }
  .tq .tq-cart__cols .woocommerce .quantity .qty { width: 88px; }
  .tq .tq-cart__cols .woocommerce a.remove { margin-top: -4px; }

  /* The actions row is not a .cart_item; it stays a plain block. Woo stripes
     it because it is an even row, which the design has no band for. */
  .tq .tq-cart__cols .woocommerce table.cart tbody tr td.actions {
    display: block;
    text-align: left !important;
    background: none !important;
    border-bottom: 0;
  }

  /* Summary table. Woo hides the <th> under 768px and re-prints the label as
     td::before, so the label needs dressing there instead. */
  .tq .tq-cart__cols .woocommerce .cart_totals table.shop_table td { background: none !important; }
  .tq .tq-cart__cols .woocommerce .cart_totals table.shop_table td::before {
    float: left;
    font-family: var(--tq-sans); font-size: 15px; font-weight: 400;
    color: var(--tq-ink-2);
  }
  .tq .tq-cart__cols .woocommerce .cart_totals tr.order-total td::before {
    font-family: var(--tq-mono); font-size: 11px; font-weight: 400;
    letter-spacing: .18em; text-transform: uppercase;
    color: var(--tq-ink);
  }
  .tq .tq-cart__cols .woocommerce .cart_totals tr.woocommerce-shipping-totals td::before { display: none; }
  .tq .tq-cart__cols .woocommerce .cart_totals tr.woocommerce-shipping-totals th { display: block; width: auto; padding-bottom: 4px; }

  /* Coupon on its own full-width line, "Update cart" below it. */
  .tq .tq-cart__cols .woocommerce table.cart td.actions { padding: 18px 0 0; }
  .tq .tq-cart__cols .woocommerce table.cart td.actions .coupon { width: 100%; margin-bottom: 12px; }
  .tq .tq-cart__cols #coupon_code { width: auto; flex: 1 1 auto; min-width: 0; }
  .tq .tq-cart__cols .woocommerce table.cart td.actions button.button { width: 100%; }
  .tq .tq-cart__cols .woocommerce table.cart td.actions .coupon button.button { width: auto; flex: none; }

  .tq .tq-cart__cols .woocommerce .cart_totals { padding: 18px; gap: 14px; }
  .tq .tq-cart__cols .woocommerce .cart_totals tr.order-total td { font-size: 24px; }

  .tq .tq-cart__cols .woocommerce .cart-empty { font-size: 30px; }
  .tq .tq-cart__foot { flex-direction: column; align-items: flex-start; gap: 10px; }
}
