/* =========================================================================
   AltTune — Woo CART / CHECKOUT / THANK-YOU.
   Owned by the cart/checkout agent. Scope EVERYTHING under .at-woo.
   Shared base (inputs, notices, price type) lives in woo-shared.css.

   Cart/checkout are SHORTCODE pages rendered through page.php, so the
   `.at-woo` scope is emitted by the theme template overrides themselves
   (woocommerce/cart/cart.php, cart-empty.php, checkout/form-checkout.php,
   checkout/thankyou.php). The only out-of-scope rules below are the two
   body-class rules that hide page.php's duplicate <h1> — the templates
   render their own hero header instead.
   ========================================================================= */

/* page.php prints `<h1 class="display-2">Cart</h1>` above the shortcode
   output; the Woo templates render a proper hero, so hide the duplicate. */
body.woocommerce-cart .alttune-page > .at-section--simple > .at-container > h1.display-2,
body.woocommerce-checkout .alttune-page > .at-section--simple > .at-container > h1.display-2 {
  display: none;
}

/* -------------------------------------------------------------------------
   Hero — same language as the site page heroes (eyebrow + display title)
   but compact: we are already inside page.php's .at-container, so the
   nested .at-container resets its own gutter/max-width.
   ---------------------------------------------------------------------- */
.at-woo .at-woo-hero {
  background: transparent;
  padding: 8px 0 36px;
  border-bottom: 1px solid var(--steel-silver);
  margin-bottom: var(--space-6, 40px);
}
.at-woo .at-woo-hero .at-container {
  max-width: none;
  padding-inline: 0;
}
.at-woo .at-woo-hero .at-eyebrow { margin: 0 0 12px; }
.at-woo .at-woo-hero .display-2 {
  margin: 0;
  font-size: clamp(32px, 4vw, 52px);
  line-height: 0.98;
}

/* =========================================================================
   CART
   ========================================================================= */
/* The cart-form is a card that MATCHES the totals card on the right: same white
   surface, same 1px border, same 20px radius — so the two columns read as a pair.
   (The table itself carries a plugin-injected 1px/5px-radius border; reset it.) */
.at-woo .woocommerce-cart-form {
  width: 100%;
  min-width: 0;
  background: #fff;
  border: 1px solid var(--steel-silver);
  border-radius: 20px;
  padding: 6px 28px;
}
.at-woo .woocommerce-cart-form .at-cart-table { border: 0 !important; border-radius: 0 !important; }

/* Match the site content width used by single-product / shop (1440), not the
   global 1280 — the cart's table + totals (≈912 + 360 + gap) needs the room, or
   the table overflows into the totals card. Cart/checkout are shortcode pages
   rendered through page.php, so the container is `.alttune-page .at-container`
   (no `.at-woo` ancestor). */
body.woocommerce-cart .alttune-page .at-container,
body.woocommerce-checkout .alttune-page .at-container { max-width: 1440px; }

/* The cart hero is a utility header, not a landing hero — make it shorter than
   the shop's (≈430px → ≈260px) and trim the gap down to the content. */
body.woocommerce-cart .at-shop-hero .av-hero-shape {
  aspect-ratio: 1860 / 280;
  max-height: 300px;
}
body.woocommerce-cart .at-shop-hero.av-hero { margin-bottom: 0; }
body.woocommerce-cart .at-shop-hero .av-hero-content { padding-top: 0; padding-bottom: 0; }
body.woocommerce-cart .alttune-page .at-section--simple { padding-top: 20px; }
body.woocommerce-cart .at-cart-page { margin-top: 0; }

/* Checkout: tighten the gap between the (compact) shop hero and the form — the
   default .at-section--simple top padding is too tall under a hero. */
body.woocommerce-checkout .at-shop-hero.av-hero { margin-bottom: 0; }
body.woocommerce-checkout .alttune-page .at-section--simple { padding-top: 12px; }

.at-cart-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 40px;
  align-items: start;
}
@media (max-width: 980px) {
  .at-cart-layout { grid-template-columns: 1fr; gap: 28px; }
}
/* The table must never push past its grid column (which caused it to slide
   under the totals card). table-layout:fixed pins it to 100% of the column;
   explicit widths on the fixed columns let the name column take the rest. */
.at-woo .at-cart-table { table-layout: fixed; }
.at-woo .at-cart-table .product-remove    { width: 32px; }
.at-woo .at-cart-table .product-thumbnail  { width: 88px; }
.at-woo .at-cart-table .product-price      { width: 110px; }
.at-woo .at-cart-table .product-quantity   { width: 124px; }
.at-woo .at-cart-table .product-subtotal   { width: 110px; }
.at-woo .at-cart-table td.product-name     { width: auto; word-break: break-word; }

/* ---- Cart table as clean rows ---- */
.at-woo .at-cart-table {
  width: 100%;
  border-collapse: collapse;
  border: 0;
}
/* Inside the card, the last row must not draw a bottom rule against the edge. */
.at-woo .at-cart-table tr:last-child td { border-bottom: 0; }
.at-woo .at-cart-table thead th {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-3);
  text-align: left;
  padding: 0 12px 14px 0;
  border-bottom: 1px solid var(--steel-silver);
}
.at-woo .at-cart-table thead th.product-price,
.at-woo .at-cart-table thead th.product-subtotal { text-align: right; padding-right: 4px; }

.at-woo .at-cart-table td {
  padding: 22px 12px 22px 0;
  border-bottom: 1px solid var(--steel-silver-100);
  vertical-align: top;
  background: transparent;
}
.at-woo .at-cart-table td.product-price,
.at-woo .at-cart-table td.product-subtotal {
  text-align: right;
  white-space: nowrap;
  font-family: var(--font-display);
  font-weight: 500; /* thinner — prices were too heavy */
  color: var(--fg-1);
}
/* A plugin's frontend.css sets the cells to vertical-align:middle, so on a tall
   line (a tool with an add-ons box) the price floated beside the protocols.
   Pin it to the top so it sits on the product-name line, and keep a little
   breathing room from the right edge. */
.at-woo .at-cart-table td.product-price,
.at-woo .at-cart-table td.product-subtotal,
.at-woo .at-cart-table th.product-price,
.at-woo .at-cart-table th.product-subtotal { vertical-align: top !important; }
.at-woo .at-cart-table th.product-subtotal,
.at-woo .at-cart-table td.product-subtotal { padding-right: 4px; }

/* Remove control — quiet circle, danger on hover */
.at-woo .at-cart-table td.product-remove { width: 36px; padding-right: 4px; }
.at-woo .at-cart-table a.remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--steel-silver);
  border-radius: 50%;
  color: var(--fg-3);
  font-size: 18px;
  font-weight: 400;
  line-height: 1;
  text-decoration: none;
  transition: color var(--dur-base) ease, border-color var(--dur-base) ease;
}
.at-woo .at-cart-table a.remove:hover {
  color: var(--danger);
  border-color: var(--danger);
  background: transparent;
}

/* Thumbnail — a plugin's frontend.css forces `width:96px !important` +
   object-fit:cover (crops + upscales small images). Beat it with a body-scoped
   !important so the product shot shows whole, centered in a tidy square. */
.at-woo .at-cart-table td.product-thumbnail { width: 88px; }
body.woocommerce-cart .at-woo .at-cart-table td.product-thumbnail img,
body.woocommerce-checkout .at-woo .at-cart-table td.product-thumbnail img {
  display: block;
  width: 72px !important;
  height: 72px !important;
  object-fit: contain !important;
  object-position: center;
  background: var(--steel-silver-100);
  border-radius: var(--radius-md, 12px);
  padding: 8px;
  box-sizing: border-box;
}

/* Name + item meta */
.at-woo .at-cart-table td.product-name {
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 600; /* thinner — restrained, not bold */
  line-height: 1.35;
  letter-spacing: -0.005em;
}
.at-woo .at-cart-table td.product-name > a {
  color: var(--fg-1);
  text-decoration: none;
  transition: color var(--dur-base) ease;
}
.at-woo .at-cart-table td.product-name > a:hover { color: var(--performance-orange-700); }

/* Item data injected via woocommerce_get_item_data — alientech-sync emits
   "Included add-ons", "Bundle includes", "You save" lines here. Render as
   intentional spec lines: mono micro-label + quiet value. */
.at-woo dl.variation {
  margin: 10px 0 0;
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 4px 12px;
  font-weight: 400;
}
.at-woo dl.variation dt {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-3);
  margin: 0;
  padding-top: 2px;
}
.at-woo dl.variation dd {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 1.45;
  color: var(--fg-2);
}
.at-woo dl.variation dd p { margin: 0; }
/* "You save" style rows read as a positive accent */
.at-woo dl.variation dd ins {
  text-decoration: none;
  box-shadow: inset 0 -2px 0 var(--performance-orange);
}

.at-woo .backorder_notification {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--fg-3);
}

/* Quantity steppers */
.at-woo .at-qty {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid var(--steel-silver);
  border-radius: var(--radius-md, 8px);
  overflow: hidden;
  background: #fff;
}
.at-woo .at-qty .quantity { display: inline-flex; }
.at-woo .at-qty .qty,
.at-woo .at-qty input.qty {
  width: 46px;
  border: 0;
  border-radius: 0;
  padding: 9px 4px;
  text-align: center;
  font-family: var(--font-display);
  font-weight: 600; /* thinner — was 700 */
  font-size: 14px;
}
.at-woo .at-qty .qty:focus { box-shadow: none; border: 0; }
.at-woo .at-qty-btn {
  width: 36px;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  color: var(--fg-2);
  font-family: var(--font-sans);
  transition: background var(--dur-fast) ease, color var(--dur-fast) ease;
}
.at-woo .at-qty-btn:hover { background: var(--steel-silver-100); color: var(--fg-1); }
.at-woo .at-qty[data-sold-individually] .at-qty-btn { opacity: 0.35; cursor: default; }
.at-woo .at-qty[data-sold-individually] .at-qty-btn:hover { background: transparent; color: var(--fg-2); }

/* Actions row: coupon left, update right — flex keeps both groups on one
   baseline (no float/clearfix needed). */
.at-woo .at-cart-table td.actions {
  border-bottom: 0;
  padding: var(--space-5, 24px) 0 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3, 12px);
}
.at-woo .at-cart-table .coupon {
  display: inline-flex;
  gap: var(--space-2, 8px);
  align-items: center;
}
.at-woo .at-cart-table .coupon #coupon_code {
  width: 190px;
  padding: 10px 14px;
  font-size: 13px;
}
.at-woo .at-cart-table button[name="update_cart"] { margin-left: auto; }
.at-woo .at-cart-table button[name="update_cart"]:disabled {
  opacity: 0.4;
  cursor: default;
}

/* Bundle overlap notices (woocommerce_after_cart_table) — woo-shared.css
   already styles .woocommerce-info; just give them breathing room here. */
.at-woo .woocommerce-cart-form .woocommerce-info,
.at-woo .woocommerce-cart-form + .woocommerce-info {
  margin-top: var(--space-4, 20px);
  margin-bottom: 0;
}

/* ---- Totals card — LIGHT surface (matches the checkout summary card) ---- */
.at-woo .cart-collaterals { min-width: 0; }
.at-woo .cart-collaterals .cross-sells { display: none; } /* keep the cart focused */

/* WooCommerce core forces `.woocommerce .cart-collaterals .cart_totals
   { float:right; width:48% }` (specificity 0,3,0) which breaks our grid column.
   Match that depth (+ .at-woo) to win and clear the float. */
.at-woo .cart-collaterals .cart_totals,
.at-woo .cart_totals {
  float: none;
  width: 100%;
  min-width: 0;
  background: #fff;
  color: var(--fg-1);
  border: 1px solid var(--steel-silver);
  border-radius: 20px;
  padding: 28px;
}
.at-woo .cart_totals h2 {
  font-family: var(--font-display);
  font-weight: 600; /* thinner — premium, not heavy */
  font-size: 18px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-1);
  margin: 0 0 18px;
}
.at-woo .cart_totals table.shop_table {
  width: 100%;
  border: 0;
  border-collapse: collapse;
  margin: 0;
}
.at-woo .cart_totals th,
.at-woo .cart_totals td {
  background: transparent;
  border: 0;
  border-top: 1px solid var(--steel-silver-100);
  padding: 13px 0;
  text-align: left;
  vertical-align: top;
}
.at-woo .cart_totals tr:first-child th,
.at-woo .cart_totals tr:first-child td { border-top: 0; }
.at-woo .cart_totals th {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-3);
  width: 42%;
  padding-right: 12px;
}
.at-woo .cart_totals td {
  text-align: right;
  font-family: var(--font-display);
  font-weight: 500; /* thinner — prices were too heavy */
  font-size: 15px;
  color: var(--fg-1);
  word-break: break-word;
}
.at-woo .cart_totals td .woocommerce-Price-amount,
.at-woo .cart_totals td .amount { color: var(--fg-1); font-weight: 500; }
.at-woo .cart_totals .order-total td,
.at-woo .cart_totals .order-total td .woocommerce-Price-amount {
  font-size: 22px;
  font-weight: 600; /* total a touch stronger, still not black */
  letter-spacing: -0.01em;
}
.at-woo .cart_totals .order-total td small.includes_tax,
.at-woo .cart_totals td small.includes_tax {
  display: block;
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 11px;
  color: var(--fg-3);
  margin-top: 4px;
}
.at-woo .cart_totals td small.includes_tax .woocommerce-Price-amount {
  font-size: 11px;
  color: var(--fg-2);
  font-weight: 400;
}

/* Shipping rows */
.at-woo .cart_totals .woocommerce-shipping-methods {
  list-style: none;
  margin: 0;
  padding: 0;
  text-align: right;
}
.at-woo .cart_totals .woocommerce-shipping-methods li { margin: 0 0 6px; }
.at-woo .cart_totals .woocommerce-shipping-methods label {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 400;
  color: var(--fg-2);
}
.at-woo .cart_totals .woocommerce-shipping-methods input[type="radio"] { accent-color: var(--performance-orange); }
.at-woo .cart_totals .woocommerce-shipping-destination {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 12px;
  color: var(--fg-3);
  margin: 6px 0 0;
}
.at-woo .cart_totals .shipping-calculator-button,
.at-woo .cart_totals a {
  color: var(--fg-1);
  text-decoration: underline;
  text-decoration-color: var(--performance-orange);
  text-underline-offset: 3px;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 12px;
}
.at-woo .cart_totals .shipping-calculator-form { margin-top: 12px; text-align: left; }
.at-woo .cart_totals .shipping-calculator-form .form-row { margin: 0 0 10px; }
.at-woo .cart_totals .shipping-calculator-form button {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 10px 18px;
  border-radius: 8px;
  border: 1px solid var(--steel-silver);
  background: transparent;
  color: var(--fg-1);
  cursor: pointer;
}

/* Proceed to checkout */
.at-woo .wc-proceed-to-checkout {
  padding: 20px 0 0;
  margin: 0;
}
.at-woo .wc-proceed-to-checkout .checkout-button.at-btn {
  width: 100%;
  justify-content: center;
  font-size: 13px;
  padding: 16px 24px;
  text-decoration: none; /* kill the inherited link underline */
}
.at-woo .wc-proceed-to-checkout a.checkout-button,
.at-woo .wc-proceed-to-checkout a.checkout-button span { text-decoration: none; }

/* -------------------------------------------------------------------------
   WooCommerce paints .button / .button.alt purple (#a46497) with its own
   box-shadow — wherever we layer .at-btn on a Woo button, strip WC's chrome
   so the AltTune button (black + contained orange wipe) wins. Buttons keep
   .at-btn-primary's overflow:hidden so the skew wipe never leaks out.
   ---------------------------------------------------------------------- */
.at-woo .button.at-btn,
.at-woo a.button.at-btn,
.at-woo button.button.at-btn,
.at-woo input.button.at-btn {
  background-image: none !important;
  box-shadow: none !important;
  text-shadow: none !important;
  /* WC sets overflow:visible (wipe leaks), font-size:100%, font-weight:700,
     padding:.618em 1em, border-radius:3px on .button — re-assert the at-btn
     frame here at winning specificity (0,3,0 > WC's 0,2,1). */
  overflow: hidden;
  position: relative;
  isolation: isolate;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 14px 24px;
  border-radius: 8px;
}
.at-woo .button.at-btn-sm,
.at-woo button.button.at-btn-sm,
.at-woo input.button.at-btn-sm { font-size: 10px; padding: 10px 18px; }
.at-woo .button.at-btn-primary,
.at-woo a.button.at-btn-primary,
.at-woo button.button.at-btn-primary,
.at-woo input.button.at-btn-primary {
  background-color: var(--rubber-black) !important;
  border-color: var(--rubber-black) !important;
  color: #fff !important;
}
.at-woo .button.at-btn-primary:hover,
.at-woo a.button.at-btn-primary:hover,
.at-woo button.button.at-btn-primary:hover { border-color: var(--performance-orange) !important; }
.at-woo .button.at-btn-light,
.at-woo button.button.at-btn-light {
  background-color: var(--steel-silver-100) !important;
  border-color: var(--steel-silver) !important;
  color: var(--fg-1) !important;
}

/* ---- Empty cart state ---- */
.at-woo.at-cart-page.is-empty .wc-empty-cart-message { display: none; } /* template renders the premium state below */
.at-cart-empty {
  text-align: center;
  padding: 72px 0 96px;
}
.at-cart-empty-label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-3);
  margin-bottom: 18px;
}
.at-cart-empty-title {
  font-family: var(--font-display);
  font-weight: 600; /* thinner — premium, not heavy */
  font-size: clamp(26px, 3vw, 40px);
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: var(--fg-1);
  margin: 0 0 10px;
}
.at-cart-empty-sub {
  font-family: var(--font-sans);
  font-size: 15px;
  color: var(--fg-2);
  margin: 0 0 28px;
}

/* =========================================================================
   CHECKOUT
   ========================================================================= */
.at-checkout-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 440px;
  gap: 56px;
  align-items: start;
}
.at-checkout-main { min-width: 0; }

/* Section headings (Billing details / Ship to a different address / Your order) */
.at-woo .woocommerce-billing-fields > h3,
.at-woo .woocommerce-shipping-fields h3,
.at-woo .woocommerce-additional-fields > h3,
.at-woo #order_review_heading {
  font-family: var(--font-display);
  font-weight: 600; /* de-bolded — hierarchy via size + tracking, not weight */
  font-size: 17px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fg-1);
  margin: 0 0 18px;
}
.at-woo #ship-to-different-address {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  letter-spacing: 0.04em;
}
.at-woo #ship-to-different-address label { cursor: pointer; }

/* Field grid — replace WC float layout */
.at-woo .at-checkout-layout .col2-set { width: 100%; }
.at-woo .at-checkout-layout .col2-set .col-1,
.at-woo .at-checkout-layout .col2-set .col-2 {
  float: none;
  width: 100%;
  margin: 0;
}
.at-woo .at-checkout-layout .col2-set .col-2 { margin-top: 32px; }

.at-woo .woocommerce-billing-fields__field-wrapper,
.at-woo .woocommerce-shipping-fields__field-wrapper,
.at-woo .woocommerce-additional-fields__field-wrapper {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 16px;
}
.at-woo .at-checkout-layout .form-row,
.at-woo form.checkout .form-row {
  float: none;
  width: auto;
  margin: 0;
  padding: 0;
}
.at-woo form.checkout .form-row-wide,
.at-woo form.checkout .notes { grid-column: 1 / -1; }
.at-woo form.checkout .form-row label {
  display: block;
  margin: 0 0 6px;
}
.at-woo form.checkout .form-row .woocommerce-input-wrapper { display: block; }

/* select2 (country/state dropdowns) — match the input chrome */
.at-woo .select2-container .select2-selection--single {
  height: auto;
  border: 1px solid var(--steel-silver);
  border-radius: 10px;
  background: #fff;
  transition: border-color var(--dur-base) ease;
}
.at-woo .select2-container .select2-selection--single .select2-selection__rendered {
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.4;
  color: var(--fg-1);
  padding: 13px 32px 13px 14px;
}
.at-woo .select2-container .select2-selection--single .select2-selection__arrow {
  height: 100%;
  right: 10px;
}
.at-woo .select2-container--open .select2-selection--single,
.at-woo .select2-container--focus .select2-selection--single {
  border-color: var(--rubber-black);
}

/* Login / coupon toggles above the form */
.at-woo .woocommerce-form-login-toggle,
.at-woo .woocommerce-form-coupon-toggle { margin-bottom: var(--space-4, 20px); }
.at-woo form.woocommerce-form-login,
.at-woo form.checkout_coupon {
  border: 1px solid var(--steel-silver);
  border-radius: var(--radius-md, 12px);
  padding: 22px;
  margin-bottom: var(--space-5, 28px);
}
.at-woo form.checkout_coupon {
  display: none; /* WC toggles it open */
}
.at-woo form.checkout_coupon p { margin: 0 0 12px; }
.at-woo form.checkout_coupon button { white-space: nowrap; }

/* ---- Order summary card (right column, sticky) ---- */
.at-checkout-summary { min-width: 0; }
.at-checkout-summary-card {
  position: sticky;
  top: 110px;
  background: #fff;
  border: 1px solid var(--steel-silver);
  border-radius: 20px;
  padding: 28px;
  box-shadow: 0 18px 48px rgba(5, 5, 5, 0.06);
}

/* Review-order table */
.at-woo table.woocommerce-checkout-review-order-table {
  width: 100%;
  border: 0;
  border-collapse: collapse;
  margin: 0;
}
.at-woo .woocommerce-checkout-review-order-table th,
.at-woo .woocommerce-checkout-review-order-table td {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--steel-silver-100);
  padding: 12px 0;
  text-align: left;
  vertical-align: top;
  font-family: var(--font-sans);
  font-size: 13.5px;
}
.at-woo .woocommerce-checkout-review-order-table thead th {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-3);
  border-bottom: 1px solid var(--steel-silver);
  padding: 0 0 10px;
}
.at-woo .woocommerce-checkout-review-order-table .product-total,
.at-woo .woocommerce-checkout-review-order-table tfoot td { text-align: right; }
.at-woo .woocommerce-checkout-review-order-table .cart_item .product-name {
  font-weight: 600;
  color: var(--fg-1);
  padding-right: 14px;
}
.at-woo .woocommerce-checkout-review-order-table .product-quantity {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-3);
}
.at-woo .woocommerce-checkout-review-order-table tfoot th {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-3);
  padding-right: 12px;
  width: 46%;
}
.at-woo .woocommerce-checkout-review-order-table tfoot td {
  font-family: var(--font-display);
  font-weight: 600; /* de-bolded total values — emphasis via size, not weight */
}
.at-woo .woocommerce-checkout-review-order-table .order-total th { color: var(--fg-1); }
.at-woo .woocommerce-checkout-review-order-table .order-total td .woocommerce-Price-amount { font-size: 20px; }
/* …but the "(Includes $X GST)" amount must NOT inherit that 20px — keep it at
   the small caption size like the rest of the fine print. */
.at-woo .woocommerce-checkout-review-order-table .order-total td small.includes_tax .woocommerce-Price-amount {
  font-size: 11px;
  font-weight: 400;
  color: var(--fg-3);
}
.at-woo .woocommerce-checkout-review-order-table .order-total td,
.at-woo .woocommerce-checkout-review-order-table .order-total th { border-bottom: 0; }
.at-woo .woocommerce-checkout-review-order-table small.includes_tax {
  display: block;
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 11px;
  color: var(--fg-3);
  margin-top: 3px;
}
.at-woo .woocommerce-checkout-review-order-table .woocommerce-shipping-methods {
  list-style: none;
  margin: 0;
  padding: 0;
  text-align: right;
  font-family: var(--font-sans);
  font-weight: 400;
}
.at-woo .woocommerce-checkout-review-order-table .woocommerce-shipping-methods li { margin: 0 0 6px; }

/* ---- Review-order CONDENSE + BALANCE -----------------------------------
   A plugin's frontend.css inflates this table: bold (700) names, heavy padding,
   and — worst — a ~54%-wide price column that strands the amount far from the
   name. Beat it with the full selector path + !important: weight 500, tight
   even padding, and a price column that shrinks to its content so name and
   amount sit close and balanced. */
.at-woo .woocommerce-checkout-review-order-table tbody tr.cart_item td.product-name,
.at-woo .woocommerce-checkout-review-order-table tbody tr.cart_item td.product-name a,
.at-woo .woocommerce-checkout-review-order-table tbody tr.cart_item td.product-total {
  font-weight: 500 !important;
  font-size: 13px !important;
  line-height: 1.35 !important;
  color: var(--fg-1) !important;
  padding: 9px 0 !important;
  vertical-align: top !important;
}
/* Balanced columns: name/label takes ~62%, price/value ~38% (was ~54%, which
   stranded the amount). Prices never wrap; the shipping MESSAGE may. */
.at-woo .woocommerce-checkout-review-order-table tbody tr.cart_item td.product-name,
.at-woo .woocommerce-checkout-review-order-table tfoot th { width: 62% !important; }
.at-woo .woocommerce-checkout-review-order-table tbody tr.cart_item td.product-total,
.at-woo .woocommerce-checkout-review-order-table tfoot td {
  width: 38% !important;
  text-align: right !important;
  padding-left: 14px !important;
}
.at-woo .woocommerce-checkout-review-order-table tbody tr.cart_item td.product-total { white-space: nowrap !important; }
.at-woo .woocommerce-checkout-review-order-table tfoot td { font-weight: 500 !important; }

/* A plugin strips the row borders (border-bottom:0 !important), so products run
   together. Draw a divider BEFORE each product after the first — a clean line
   between items that sits after the previous item's add-ons, not inside them. */
.at-woo .woocommerce-checkout-review-order-table tbody tr.cart_item ~ tr.cart_item td {
  border-top: 1px solid var(--steel-silver-100) !important;
  padding-top: 13px !important;
}

/* Item data lines inside the review table reuse the dl.variation styling
   from the cart (defined above) — they inherit automatically. */

/* Payment methods */
.at-woo #payment {
  background: transparent;
  border-radius: 0;
  margin-top: 18px;
}
.at-woo #payment ul.payment_methods {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
  border: 1px solid var(--steel-silver);
  border-radius: var(--radius-md, 12px);
  overflow: hidden;
}
.at-woo #payment ul.payment_methods li { position: relative; }
.at-woo #payment ul.payment_methods li.wc_payment_method { border-top: 1px solid var(--steel-silver-100); }
.at-woo #payment ul.payment_methods li.wc_payment_method:first-child { border-top: 0; }
.at-woo #payment ul.payment_methods li.wc_payment_method > label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 600;
}
.at-woo #payment ul.payment_methods li.wc_payment_method > input[type="radio"] {
  position: absolute;
  opacity: 0;
}
.at-woo #payment ul.payment_methods li.wc_payment_method > label::before {
  content: "";
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--steel-silver);
  border-radius: 50%;
  transition: border-color var(--dur-fast) ease, box-shadow var(--dur-fast) ease;
}
.at-woo #payment ul.payment_methods li.wc_payment_method > input[type="radio"]:checked + label::before {
  border-color: var(--rubber-black);
  box-shadow: inset 0 0 0 4px var(--rubber-black);
}
.at-woo #payment ul.payment_methods li.wc_payment_method > label img {
  max-height: 22px;
  width: auto;
}
.at-woo #payment div.payment_box {
  background: var(--steel-silver-100);
  margin: 0 16px 14px;
  padding: 14px 16px;
  border-radius: var(--radius-sm, 8px);
  font-size: 13px;
  line-height: 1.5;
  color: var(--fg-2);
}
.at-woo #payment div.payment_box::before { display: none; }
.at-woo #payment .woocommerce-privacy-policy-text,
.at-woo #payment .woocommerce-terms-and-conditions-wrapper {
  font-size: 12px;
  line-height: 1.55;
  color: var(--fg-3);
  margin-bottom: 14px;
}
.at-woo #payment .woocommerce-privacy-policy-text a,
.at-woo #payment .woocommerce-terms-and-conditions-wrapper a { color: var(--fg-2); }
.at-woo #payment .place-order { padding: 0; margin: 0; }

/* Place order — full-width primary */
.at-woo #place_order.at-btn {
  width: 100%;
  justify-content: center;
  font-size: 13px;
  padding: 16px 24px;
}
.at-woo #place_order:disabled { opacity: 0.5; cursor: default; }

/* =========================================================================
   ORDER RECEIVED / THANK-YOU
   ========================================================================= */
.at-woo .woocommerce-thankyou-order-received {
  font-family: var(--font-sans);
  font-size: 16px;
  color: var(--fg-1);
  margin: 0 0 24px;
}
.at-woo ul.woocommerce-order-overview {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 0 0 var(--space-6, 40px);
  padding: 0;
}
.at-woo ul.woocommerce-order-overview li {
  flex: 1 1 160px;
  border: 1px solid var(--steel-silver) !important; /* WC core uses border-right dividers */
  border-radius: var(--radius-md, 12px);
  padding: 14px 16px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-3);
  margin: 0;
  float: none;
}
.at-woo ul.woocommerce-order-overview li strong {
  display: block;
  margin-top: 8px;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600; /* de-bolded overview values — size carries the emphasis */
  letter-spacing: 0;
  text-transform: none;
  color: var(--fg-1);
}

.at-woo .woocommerce-order-details,
.at-woo .woocommerce-customer-details { margin-bottom: var(--space-6, 40px); }
.at-woo .woocommerce-order-details__title,
.at-woo .woocommerce-customer-details h2,
.at-woo .woocommerce-column__title {
  font-family: var(--font-display);
  font-weight: 600; /* de-bolded — matches checkout section headings */
  font-size: 17px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fg-1);
  margin: 0 0 16px;
}
.at-woo table.woocommerce-table--order-details {
  width: 100%;
  border: 1px solid var(--steel-silver);
  border-radius: var(--radius-md, 12px);
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
}
.at-woo table.woocommerce-table--order-details th,
.at-woo table.woocommerce-table--order-details td {
  border: 0;
  border-bottom: 1px solid var(--steel-silver-100);
  padding: 13px 16px;
  text-align: left;
  font-family: var(--font-sans);
  font-size: 13.5px;
  background: transparent;
}
.at-woo table.woocommerce-table--order-details thead th {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-3);
  background: var(--steel-silver-100);
}
.at-woo table.woocommerce-table--order-details tfoot th {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.at-woo table.woocommerce-table--order-details tfoot td { font-family: var(--font-display); font-weight: 600; /* de-bolded order totals */ }
.at-woo table.woocommerce-table--order-details tfoot tr:last-child th,
.at-woo table.woocommerce-table--order-details tfoot tr:last-child td { border-bottom: 0; }
.at-woo table.woocommerce-table--order-details .product-total { text-align: right; }

.at-woo .woocommerce-customer-details address {
  border: 1px solid var(--steel-silver);
  border-radius: var(--radius-md, 12px);
  padding: 18px;
  font-style: normal;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--fg-2);
}
.at-woo .woocommerce-columns--addresses {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.at-woo .woocommerce-columns--addresses .woocommerce-column { width: auto; float: none; }

/* =========================================================================
   RESPONSIVE — theme breakpoints 1100 / 720 / 380
   ========================================================================= */
@media (max-width: 1100px) {
  .at-cart-layout,
  .at-checkout-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }
  .at-checkout-summary-card { position: static; }
  .at-woo .at-woo-hero { padding-bottom: 26px; }
}

@media (max-width: 720px) {
  /* Cart table collapses to item cards */
  .at-woo .at-cart-table,
  .at-woo .at-cart-table tbody { display: block; width: 100%; }
  .at-woo .at-cart-table thead { display: none; }
  .at-woo .at-cart-table tr.woocommerce-cart-form__cart-item {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 2px 16px;
    position: relative;
    padding: 18px 0;
    border-bottom: 1px solid var(--steel-silver-100);
  }
  .at-woo .at-cart-table td {
    display: block;
    border: 0;
    padding: 0;
  }
  .at-woo .at-cart-table td.product-thumbnail { grid-column: 1; grid-row: 1 / span 4; width: auto; }
  .at-woo .at-cart-table td.product-thumbnail img { width: 76px; height: 76px; }
  .at-woo .at-cart-table td.product-name { grid-column: 2; padding-right: 40px; }
  .at-woo .at-cart-table td.product-remove {
    position: absolute;
    top: 18px;
    right: 0;
    width: auto;
    padding: 0;
  }
  .at-woo .at-cart-table td.product-price { display: none; }
  .at-woo .at-cart-table td.product-quantity { grid-column: 2; margin-top: 14px; }

  /* Comfortable touch targets — stepper buttons ≥40px tap area */
  .at-woo .at-qty .qty,
  .at-woo .at-qty input.qty { width: 52px; padding: 11px 4px; }
  .at-woo .at-qty-btn { width: 42px; min-height: 42px; font-size: 18px; }
  .at-woo .at-cart-table td.product-subtotal {
    grid-column: 2;
    text-align: left;
    margin-top: 10px;
    font-size: 15px;
    white-space: normal;
  }
  .at-woo .at-cart-table td.product-subtotal::before {
    content: attr(data-title);
    display: inline-block;
    margin-right: 10px;
    font-family: var(--font-mono);
    font-size: 10.5px;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--fg-3);
  }

  /* Actions stack full-width on mobile */
  .at-woo .at-cart-table td.actions {
    display: block;
    padding-top: var(--space-5, 24px);
  }
  .at-woo .at-cart-table .coupon {
    display: flex;
    width: 100%;
    gap: var(--space-2, 8px);
    margin-bottom: var(--space-3, 12px);
  }
  .at-woo .at-cart-table .coupon #coupon_code { flex: 1 1 auto; width: auto; min-width: 0; }
  .at-woo .at-cart-table .coupon button[name="apply_coupon"] { flex: 0 0 auto; }
  .at-woo .at-cart-table button[name="update_cart"] {
    margin-left: 0;
    width: 100%;
    justify-content: center;
  }

  .at-woo .cart_totals { padding: 22px; }

  /* Checkout fields single column */
  .at-woo .woocommerce-billing-fields__field-wrapper,
  .at-woo .woocommerce-shipping-fields__field-wrapper,
  .at-woo .woocommerce-additional-fields__field-wrapper {
    grid-template-columns: minmax(0, 1fr);
  }
  .at-checkout-summary-card { padding: 22px; border-radius: 16px; }
  .at-woo .woocommerce-columns--addresses { grid-template-columns: 1fr; }
  .at-woo .at-woo-hero .display-2 { font-size: clamp(26px, 8vw, 34px); }
  .at-cart-empty { padding: 56px 0 72px; }
}

@media (max-width: 380px) {
  .at-woo .at-cart-table tr.woocommerce-cart-form__cart-item { grid-template-columns: 60px minmax(0, 1fr); }
  .at-woo .at-cart-table td.product-thumbnail img { width: 60px; height: 60px; }
  .at-woo .at-cart-table .coupon { flex-wrap: wrap; }
  .at-woo .at-cart-table .coupon .at-btn { width: 100%; justify-content: center; }
  .at-woo .cart_totals { padding: 18px; border-radius: 16px; }
  .at-checkout-summary-card { padding: 18px; }
  .at-woo ul.woocommerce-order-overview li { flex-basis: 100%; }
  /* Empty state: tighten vertical rhythm on narrow screens */
  .at-cart-empty { padding: 48px 0 64px; }
}

/* =========================================================================
   PROTOCOL ADD-ONS under a KESS3 line (cart + checkout review)
   ========================================================================= */
.at-woo ul.at-cart-addons {
  list-style: none;
  margin: 8px 0 0;
  padding: 8px 0 0;
  border-top: 1px dashed var(--steel-silver);
}
.at-woo .at-cart-addon {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 4px;
  font-family: var(--font-sans);
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--fg-2);
}
/* Price aligns to the name's FIRST line, not centred against a wrapped name
   (a plugin forces align-items:center on this row — out-specify it). */
.at-woo .woocommerce-checkout-review-order-table .at-cart-addon,
.at-woo .at-cart-table .at-cart-addon,
.at-minicart .at-cart-addon { align-items: flex-start !important; }
/* The mini-cart sits outside .at-woo, so the "+"-before-name reset needs an
   un-scoped selector there too. */
.at-minicart .at-cart-addon__name::before { content: none !important; }
.at-woo .at-cart-addon:last-child { margin-bottom: 0; }
.at-woo .at-cart-addon__name { min-width: 0; }
/* No marker before the name — the price already carries a "+" prefix, so a
   second "+" / bullet here just doubled up and misaligned. */
.at-woo .at-cart-addon__name::before { content: none !important; }
.at-woo .at-cart-addon__price {
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-1);
  white-space: nowrap;
}
/* The "Included add-ons" key label WC prints above the list — keep it quiet. */
.at-woo .woocommerce-checkout-review-order-table .at-cart-addons,
.at-woo .at-cart-table .at-cart-addons { margin-top: 6px; }

/* Tighten the add-ons block to its product — the gap was huge (wrap margin-top
   10px ABOVE + row td padding-bottom 14px BELOW). Pull both in. */
.at-woo .woocommerce-checkout-review-order-table .at-cart-addons-wrap,
.at-woo .at-cart-table .at-cart-addons-wrap {
  margin-top: 0 !important;
  padding-bottom: 0 !important;
}
/* The plugin pins this with `body .woocommerce table.shop_table tr… > td`
   (0,3,4 + !important); out-specify it with a body-class prefix + child combinator. */
body.woocommerce-checkout .at-woo .woocommerce-checkout-review-order-table tr.at-cart-addons-row > td,
body.woocommerce-cart .at-woo .at-cart-table tr.at-cart-addons-row > td {
  padding-top: 0 !important;
  padding-bottom: 8px !important;
}

/* =========================================================================
   CHECKOUT POLISH + ADDRESS AUTOCOMPLETE
   ========================================================================= */

/* Soft focus ring on every field — quiet, premium, no orange. */
.at-woo form.checkout .input-text:focus,
.at-woo form.checkout textarea:focus,
.at-woo .select2-container--focus .select2-selection--single {
  border-color: var(--rubber-black);
  box-shadow: 0 0 0 3px rgba(5, 5, 5, 0.06);
  outline: 0;
}

/* Place order: keep the black button, but lighter weight (no 700) so it reads
   refined rather than heavy. */
.at-woo #place_order.at-btn {
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* The address field is the smart one — hint it with a faint pin on the right. */
.at-woo .at-address-autocomplete .input-text {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none'%3E%3Cpath d='M8 14s5-4.2 5-8A5 5 0 0 0 3 6c0 3.8 5 8 5 8z' stroke='%238a8a8a' stroke-width='1.3'/%3E%3Ccircle cx='8' cy='6' r='1.6' stroke='%238a8a8a' stroke-width='1.3'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}

/* Suggestion dropdown */
.at-woo .woocommerce-input-wrapper { position: relative; }
.at-addr-suggest {
  position: absolute;
  left: 0; right: 0; top: calc(100% + 6px);
  z-index: 30;
  background: #fff;
  border: 1px solid var(--steel-silver);
  border-radius: var(--radius-md, 12px);
  box-shadow: 0 16px 42px rgba(5, 5, 5, 0.13);
  overflow: hidden;
  max-height: 330px; overflow-y: auto;
}
.at-addr-suggest__item {
  display: flex; align-items: flex-start; gap: 11px;
  width: 100%;
  padding: 11px 14px;
  border: 0; border-bottom: 1px solid var(--steel-silver-100);
  background: transparent; cursor: pointer; text-align: left;
  font-family: var(--font-sans);
  transition: background var(--dur-fast, 120ms) ease;
}
.at-addr-suggest__item:last-of-type { border-bottom: 0; }
.at-addr-suggest__item:hover,
.at-addr-suggest__item.is-active { background: rgba(5, 5, 5, 0.045); }
.at-addr-suggest__pin { flex: 0 0 auto; color: var(--fg-3); margin-top: 1px; }
.at-addr-suggest__txt { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.at-addr-suggest__main { font-size: 14px; color: var(--fg-1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.at-addr-suggest__sub { font-size: 12px; color: var(--fg-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.at-addr-suggest__state {
  padding: 14px; font-size: 13px; color: var(--fg-3);
  font-family: var(--font-sans);
}
.at-addr-suggest__foot {
  padding: 8px 14px;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.07em;
  color: var(--fg-3);
  border-top: 1px solid var(--steel-silver-100);
  background: var(--steel-silver-100);
}

/* =========================================================================
   ORDER CONFIRMATION — success banner + what-happens-next
   ========================================================================= */
.at-thx-banner {
  display: flex; align-items: flex-start; gap: 16px;
  padding: 22px 24px;
  border: 1px solid var(--steel-silver);
  border-radius: 18px;
  background: #fff;
  margin: 0 0 28px;
}
.at-thx-check {
  flex: 0 0 auto;
  width: 46px; height: 46px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--rubber-black); color: #fff;
}
.at-thx-banner-body { min-width: 0; }
.at-thx-banner-title {
  font-family: var(--font-display);
  font-size: 18px; font-weight: 600; letter-spacing: 0.01em;
  color: var(--fg-1);
  margin: 2px 0 6px;
}
.at-thx-banner-text {
  font-family: var(--font-sans);
  font-size: 14px; line-height: 1.6; color: var(--fg-2);
  margin: 0;
}

.at-thx-next { margin: 0 0 var(--space-6, 40px); }
.at-thx-next-h {
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 500; letter-spacing: 0.13em; text-transform: uppercase;
  color: var(--fg-3);
  margin: 0 0 14px;
}
.at-thx-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  list-style: none; margin: 0; padding: 0;
}
.at-thx-step {
  border: 1px solid var(--steel-silver);
  border-radius: var(--radius-md, 12px);
  padding: 16px 18px;
}
.at-thx-step-n {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--steel-silver-100); color: var(--fg-2);
  font-family: var(--font-mono); font-size: 12px;
  margin-bottom: 10px;
}
.at-thx-step-t {
  font-family: var(--font-sans);
  font-size: 14px; font-weight: 500; color: var(--fg-1);
  margin: 0 0 4px;
}
.at-thx-step-d {
  font-family: var(--font-sans);
  font-size: 13px; line-height: 1.5; color: var(--fg-3);
  margin: 0;
}
.at-thx-actions {
  display: flex; flex-wrap: wrap; gap: 12px;
  margin: 4px 0 var(--space-6, 40px);
}

@media (max-width: 720px) {
  .at-thx-steps { grid-template-columns: 1fr; }
  .at-thx-banner { padding: 18px; }
}
