/*
 * Board 12 (CartCheckout) — S272P-d4 T17 + T1L, built by S273P-b12. Loads only on the cart, checkout and order-received pages
 * (inc/cart-checkout.php). Source: records/2026-10-04-checkout-kit/S272P-d4-build.py PROD + DESK. Board-only rules
 * (.st-*, .vp-mark, .gw-logo, the info/message mask icons, the absolute cart bar) do not ship. T15a is in tokens.css.
 */
ul.woocommerce-error a { font-weight: var(--fw-subhead); text-decoration: underline; text-underline-offset: 3px; }
/* inline links that stand alone get 2 px block padding: their box reaches 24 px (2.5.8) without moving a line */
:is(ul.woocommerce-error, td.product-name, .drjafari-cart-slot) a { padding-block: 2px; }

/* page head: the same head as the consult page (T16) */
:is(.woocommerce-cart, .woocommerce-checkout) .entry-title { margin: 0; font-size: 26px; font-weight: var(--fw-display); line-height: 1.5; color: var(--teal-deep); }
:is(.woocommerce-cart, .woocommerce-checkout) .woocommerce { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
:is(.woocommerce-cart, .woocommerce-checkout) .woocommerce > * { min-width: 0; margin: 0; }
:is(.woocommerce-cart, .woocommerce-checkout) .woocommerce-notices-wrapper:empty { display: none; }
:is(.woocommerce-cart, .woocommerce-checkout) .woocommerce :is(.woocommerce-message, .woocommerce-info, .woocommerce-error) { margin: 0; }

/* steps (hook H1): numbered, the current step named; on a phone only the current label shows */
.drjafari-steps { display: flex; align-items: center; gap: 8px; margin: 0; padding: 0; list-style: none; counter-reset: drjstep; }
.drjafari-steps li { display: flex; align-items: center; gap: 8px; flex: 1 1 0; min-width: 0; font-size: 13px; font-weight: var(--fw-subhead);
  line-height: 1.6; color: var(--slate); white-space: nowrap; }
.drjafari-steps li::before { counter-increment: drjstep; content: counter(drjstep, persian); flex: none; display: grid; place-items: center;
  box-sizing: border-box; width: 28px; height: 28px; border: 1.5px solid var(--teal-soft); border-radius: 50%; background: #fff;
  color: var(--teal); font-size: 13px; font-weight: var(--fw-heading); }
.drjafari-steps li::after { content: ""; flex: 1 1 auto; min-width: 12px; height: 2px; border-radius: 2px; background: var(--teal-soft); }
.drjafari-steps li:last-child { flex: none; }
.drjafari-steps li:last-child::after { display: none; }
.drjafari-steps [aria-current="step"] { color: var(--teal-deep); font-weight: var(--fw-display); }
.drjafari-steps li[aria-current="step"]:not(:last-child) { flex: 0 1 auto; }
.drjafari-steps [aria-current="step"]::before { border-color: var(--teal); background: var(--teal); color: #fff; }
.drjafari-steps .is-done::before { content: ""; border-color: var(--teal-soft); background: var(--teal-wash) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230E5C57' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12.5 4 4L18 8.5'/%3E%3C/svg%3E") center / 18px no-repeat; }
.drjafari-steps .is-done::after { background: var(--teal); }
.drjafari-steps [aria-current="step"].is-done::before { border-color: var(--teal); background: var(--teal) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12.5 4 4L18 8.5'/%3E%3C/svg%3E") center / 18px no-repeat; }
.drjafari-steps li:not([aria-current]) > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); }

/* ---- cart: the items (phone: one card per line) ---- */
.woocommerce-cart table.shop_table.cart { display: block; width: 100%; margin: 0; border: 1px solid var(--line); border-radius: var(--radius-card);
  background: #fff; overflow: hidden; }
.woocommerce-cart table.cart thead { display: none; }
.woocommerce-cart table.cart tbody { display: block; container: drjcart / inline-size; }
.woocommerce-cart table.cart tr.cart_item { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto;
  grid-template-areas: "thumb name name" "thumb price price" "remove qty sub"; column-gap: 12px; row-gap: 4px; align-items: center;
  padding: 16px; border-top: 1px solid var(--line); }
.woocommerce-cart table.cart tr.cart_item:first-child { border-top: 0; }
.woocommerce-cart table.cart td { display: block; padding: 0; border: 0; background: transparent; font-size: 14px; line-height: 1.8; color: var(--ink); text-align: start; }
.woocommerce-cart table.cart td::before { display: none; }
.woocommerce-cart table.cart td.product-thumbnail { grid-area: thumb; align-self: start; }
.woocommerce-cart table.cart td.product-thumbnail img { display: block; box-sizing: border-box; width: 64px; height: 64px; object-fit: contain;
  border: 1px solid var(--line); border-radius: var(--radius-btn-max); background: #fff; }
.woocommerce-cart table.cart td.product-name { grid-area: name; font-weight: var(--fw-subhead); }
.woocommerce-cart table.cart td.product-name a { color: var(--ink); text-decoration: none; }
.woocommerce-cart table.cart td.product-name a:hover { color: var(--teal); text-decoration: underline; text-underline-offset: 3px; }
.woocommerce-cart table.cart td.product-price { grid-area: price; font-size: 13px; color: var(--slate); }
.woocommerce-cart table.cart td.product-quantity { grid-area: qty; margin-top: 8px; }
.woocommerce-cart table.cart td.product-subtotal { grid-area: sub; margin-top: 8px; font-weight: var(--fw-heading); white-space: nowrap; }
.woocommerce-cart table.cart td.product-remove { grid-area: remove; margin-top: 8px; }
/* a narrow line (tbody < 370: phones under ~404 px) puts the subtotal under the stepper; 1.4.10 at 320 */
@container drjcart (max-width: 369px) {
  .woocommerce-cart table.cart tr.cart_item { grid-template-areas: "thumb name name" "thumb price price" "remove qty qty" "remove sub sub"; }
  .woocommerce-cart table.cart td.product-subtotal { margin-top: 0; text-align: end; }
}
.woocommerce-cart .woocommerce table.cart a.remove { display: grid; place-items: center; box-sizing: border-box; width: 44px; height: 44px;
  margin: 0; border: 1px solid var(--line); border-radius: var(--radius-btn); background: #fff; color: var(--slate) !important;
  font-size: 0; line-height: 0; text-decoration: none; }
.woocommerce-cart .woocommerce table.cart a.remove::before { content: ""; width: 20px; height: 20px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7h16M10 11v6M14 11v6M6 7l1 12a2 2 0 0 0 2 2h6a2 2 0 0 0 2-2l1-12M9 7V4h6v3'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7h16M10 11v6M14 11v6M6 7l1 12a2 2 0 0 0 2 2h6a2 2 0 0 0 2-2l1-12M9 7V4h6v3'/%3E%3C/svg%3E") center / contain no-repeat; }
.woocommerce-cart .woocommerce table.cart a.remove:hover { border-color: var(--orange-soft); background: var(--orange-tint) !important; color: var(--warm-ink) !important; }
.woocommerce-cart .woocommerce table.cart a.remove:focus-visible { outline: 2px solid var(--teal-mid); outline-offset: 2px; }
/* the stepper at 44 in the cart (the PDP keeps its 38) */
.woocommerce-cart table.cart .quantity { height: 44px; border-width: 1px; border-color: var(--slate); border-radius: var(--radius-btn-max); }
.woocommerce-cart table.cart .quantity .qty { width: 44px; height: 42px; padding: 0; border: 0; font-size: 15px; color: var(--ink); }
.woocommerce-cart table.cart .drjafari-qty-btn { width: 44px; height: 42px; min-height: 42px; padding: 0; }

/* the out-of-stock line (hooks H2 + H3) */
.woocommerce-cart table.cart tr.drjafari-cart-item--oos td.product-thumbnail img { opacity: .55; }
.woocommerce-cart table.cart tr.drjafari-cart-item--oos :is(td.product-price, td.product-subtotal) { color: var(--slate); }
.woocommerce-cart table.cart tr.drjafari-cart-item--oos .quantity { display: none; }
.woocommerce-cart .woocommerce table.cart tr.drjafari-cart-item--oos a.remove { border: 1.5px solid var(--warm-ink); color: var(--warm-ink) !important; }
.drjafari-cart-oos { display: inline-flex; align-items: center; margin-inline-start: 8px; padding: 1px 10px; border-radius: 20px;
  background: var(--orange-tint); color: var(--warm-ink); font-size: 12px; font-weight: var(--fw-heading); line-height: 1.8; vertical-align: 1px; }

/* the actions row: coupon + update (J1 hides update while auto-update runs) */
.woocommerce-cart table.cart tr:has(> td.actions) { display: block; border-top: 1px solid var(--line); }
.woocommerce-cart table.cart td.actions { display: block; padding: 16px; }
.woocommerce-cart table.cart td.actions .coupon { display: flex; gap: 8px; float: none; }
.woocommerce-cart table.cart td.actions .coupon .input-text { flex: 1 1 auto; box-sizing: border-box; width: auto; min-width: 0; height: 44px; margin: 0;
  padding: 8px 14px; border: 1px solid var(--slate); border-radius: var(--radius-btn-max); background: #fff; color: var(--ink);
  font: var(--fw-body) 14px/1.7 var(--font-brand); }
.woocommerce-cart table.cart td.actions .coupon .input-text:focus { padding: 7px 13px; border: 2px solid var(--teal-mid); outline: 2px solid transparent; box-shadow: 0 0 0 4px rgba(26, 128, 121, .22); }
:is(.woocommerce-cart, .woocommerce-checkout) :is(button[name="apply_coupon"], .checkout_coupon button) { flex: none; min-height: 44px; margin: 0; padding: 8px 18px;
  border: 1.5px solid var(--teal-soft); border-radius: var(--radius-btn-max); background: #fff; color: var(--teal);
  font: var(--fw-heading) 14px/1.6 var(--font-brand); cursor: pointer; }
:is(.woocommerce-cart, .woocommerce-checkout) :is(button[name="apply_coupon"], .checkout_coupon button):hover { border-color: var(--teal); background: var(--teal-wash); }
.woocommerce-cart button[name="update_cart"] { float: none; margin: 12px 0 0; min-height: 44px; padding: 8px 4px; border: 0; background: none;
  color: var(--teal); font: var(--fw-subhead) 14px/1.6 var(--font-brand); text-decoration: underline; text-underline-offset: 3px; }
.woocommerce-cart button[name="update_cart"]:disabled { color: var(--slate); text-decoration: none; cursor: default; }
.woocommerce-cart form.drjafari-cart-autoupdate button[name="update_cart"] { display: none; }

/* ---- cart: the totals card ---- */
.woocommerce-cart .cart-collaterals { width: auto; }
.woocommerce-cart .cart-collaterals .cart_totals { float: none; width: auto; box-sizing: border-box; padding: 20px; border: 1px solid var(--line);
  border-radius: var(--radius-card); background: #fff; }
:is(.cart_totals h2, #order_review_heading) { margin: 0 0 4px; font-size: 18px; font-weight: var(--fw-display); line-height: 1.6; color: var(--teal-deep); }
:is(.cart_totals, .woocommerce-checkout-review-order, .woocommerce-order-details) table.shop_table { display: block; width: 100%; margin: 0; border: 0; }
:is(.cart_totals, .woocommerce-checkout-review-order, .woocommerce-order-details) table.shop_table :is(thead, tbody, tfoot) { display: block; }
:is(.cart_totals, .woocommerce-checkout-review-order, .woocommerce-order-details) table.shop_table tr { display: flex; flex-wrap: wrap; align-items: baseline;
  justify-content: space-between; gap: 4px 16px; padding: 12px 0; border-top: 1px solid var(--line); }
:is(.cart_totals, .woocommerce-checkout-review-order, .woocommerce-order-details) table.shop_table :is(tbody, thead) > tr:first-child { border-top: 0; }
:is(.cart_totals, .woocommerce-checkout-review-order, .woocommerce-order-details) table.shop_table :is(th, td) { display: block; padding: 0; border: 0;
  background: transparent; font-size: 14px; line-height: 1.8; color: var(--ink); text-align: start; }
:is(.cart_totals, .woocommerce-checkout-review-order, .woocommerce-order-details) table.shop_table td::before { display: none; }
:is(.cart_totals, .woocommerce-checkout-review-order, .woocommerce-order-details) table.shop_table th { font-weight: var(--fw-subhead); color: var(--slate); }
:is(.cart_totals, .woocommerce-checkout-review-order, .woocommerce-order-details) table.shop_table thead th { font-size: 12.5px; }
:is(.cart_totals, .woocommerce-checkout-review-order, .woocommerce-order-details) table.shop_table td:last-child { text-align: end; white-space: nowrap; }
:is(.cart_totals, .woocommerce-checkout-review-order, .woocommerce-order-details) table.shop_table tr.shipping td { flex: 1 1 100%; text-align: start; white-space: normal; }
:is(.cart_totals, .woocommerce-checkout-review-order, .woocommerce-order-details) table.shop_table .order-total :is(th, td) { font-size: 18px; font-weight: var(--fw-display); color: var(--ink); }
:is(.woocommerce-checkout-review-order, .woocommerce-order-details) td.product-name { flex: 1 1 0; min-width: 0; }
:is(.woocommerce-checkout-review-order, .woocommerce-order-details) .product-quantity { font-weight: var(--fw-heading); color: var(--slate); }
.woocommerce-order-details td.product-name a { color: var(--ink); text-decoration: none; }
/* shipping options: a radio row per method, the selected one teal */
ul.woocommerce-shipping-methods { display: grid; gap: 8px; margin: 8px 0 0; padding: 0; list-style: none; }
ul.woocommerce-shipping-methods li { display: flex; align-items: center; gap: 10px; box-sizing: border-box; min-height: 44px; margin: 0; padding: 8px 12px;
  border: 1px solid var(--teal-soft); border-radius: var(--radius-btn-max); background: #fff; font-size: 14px; }
ul.woocommerce-shipping-methods li:has(input:checked) { border-color: var(--teal); background: var(--teal-wash); box-shadow: inset 0 0 0 1px var(--teal); }
ul.woocommerce-shipping-methods li label { flex: 1 1 auto; cursor: pointer; }
:is(ul.woocommerce-shipping-methods, ul.wc_payment_methods) input[type="radio"] { flex: none; width: 20px; height: 20px; margin: 0; accent-color: var(--teal); }
.woocommerce-shipping-destination { margin: 8px 0 0; font-size: 13px; color: var(--slate); }
.woocommerce-shipping-calculator { margin: 0; }
.shipping-calculator-button { display: inline-flex; align-items: center; min-height: 32px; color: var(--teal); font-size: 13px; font-weight: var(--fw-subhead); text-underline-offset: 3px; }
.shipping-calculator-button::after { display: none; }
/* the conversion: one orange per view (S272 ONE list gains these two selectors) */
.woocommerce-cart .wc-proceed-to-checkout { padding: 16px 0 0; }
.woocommerce-cart .wc-proceed-to-checkout a.checkout-button { display: flex; align-items: center; justify-content: center; box-sizing: border-box; width: 100%;
  min-height: 52px; margin: 0; padding: 12px 24px; border-radius: var(--radius-btn-max); font: var(--fw-heading) 16px/1.5 var(--font-brand); text-decoration: none; }
.woocommerce-cart .wc-proceed-to-checkout a.checkout-button, .woocommerce #payment #place_order { background: var(--orange-cta); color: #fff; }
.woocommerce-cart .wc-proceed-to-checkout a.checkout-button:is(:hover, :focus), .woocommerce #payment #place_order:is(:hover, :focus) { background: var(--orange-cta-hover); color: #fff; }
.woocommerce-cart .wc-proceed-to-checkout a.checkout-button:focus-visible, .woocommerce #payment #place_order:focus-visible { outline: 2px solid var(--teal-mid); outline-offset: 2px; }
.drjafari-cart-blocked { display: flex; gap: 8px; margin: 16px 0 0; padding: 12px 14px; border-radius: var(--radius-btn-max); background: var(--orange-tint);
  color: var(--warm-ink); font-size: 14px; font-weight: var(--fw-subhead); line-height: 1.8; }
.drjafari-cart-blocked::before { content: ""; flex: none; width: 20px; height: 20px; margin-top: 3px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7.5v5.5M12 16.4v.1'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7.5v5.5M12 16.4v.1'/%3E%3C/svg%3E") center / contain no-repeat; }
.drjafari-pay-line { display: flex; align-items: center; gap: 8px; margin: 12px 0 0; font-size: 13px; line-height: 1.8; color: var(--slate); }
.drjafari-pay-line::before { content: ""; flex: none; width: 18px; height: 18px; background: var(--teal);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='11' width='14' height='10' rx='2'/%3E%3Cpath d='M8 11V8a4 4 0 0 1 8 0v3'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='11' width='14' height='10' rx='2'/%3E%3Cpath d='M8 11V8a4 4 0 0 1 8 0v3'/%3E%3C/svg%3E") center / contain no-repeat; }
.drjafari-cart-slot { margin: 8px 0 0; font-size: 13px; line-height: 1.8; color: var(--slate); }
.drjafari-cart-slot a { color: var(--teal); text-underline-offset: 3px; }

/* phone: the cart bar (hook H7, J2), the PDP sticky-buybar pattern; hidden while the card's own CTA is on screen */
.drjafari-cart-bar { position: fixed; inset-inline: 0; bottom: 0; z-index: 30; display: flex; align-items: center; gap: 12px; box-sizing: border-box;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: #fff;
  box-shadow: 0 -6px 24px rgba(10, 58, 56, .10); }
.drjafari-cart-bar[hidden] { display: none; }
/* 2.4.11 Focus Not Obscured: while the bar shows, focused controls scroll clear of it */
@media (max-width: 768px) { html:has(.drjafari-cart-bar:not([hidden])) { scroll-padding-bottom: 88px; } }
.drjafari-cart-bar__total { display: flex; flex-direction: column; flex: none; font-size: 12px; line-height: 1.5; color: var(--slate); }
.drjafari-cart-bar__total strong { font-size: 16px; font-weight: var(--fw-display); color: var(--ink); }
.drjafari-cart-bar__cta { display: flex; flex: 1 1 auto; align-items: center; justify-content: center; min-height: 48px; border-radius: var(--radius-btn-max);
  background: var(--orange-cta); color: #fff; font-size: 15px; font-weight: var(--fw-heading); text-decoration: none; }

/* ---- cart: empty (hook H8; Woo's own .return-to-shop is replaced by the actions row) ---- */
.woocommerce-cart .wc-empty-cart-message { margin: 0; }
.woocommerce-cart .wc-empty-cart-message .cart-empty.woocommerce-info { display: flex; flex-direction: column; align-items: center; gap: 12px; margin: 0;
  padding: 32px 20px 8px; border: 1px solid var(--line); border-bottom: 0; border-radius: var(--radius-card) var(--radius-card) 0 0; background: #fff;
  color: var(--ink); font-size: 17px; font-weight: var(--fw-heading); line-height: 1.8; text-align: center; }
.woocommerce-cart .wc-empty-cart-message .cart-empty.woocommerce-info::before { content: ""; width: 64px; height: 64px; border-radius: 50%;
  background: var(--teal-wash) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230E5C57' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 4h2l2.4 11.2a1.6 1.6 0 0 0 1.6 1.3h8.4a1.6 1.6 0 0 0 1.6-1.2L21 8H6.2'/%3E%3Ccircle cx='9.5' cy='20' r='1'/%3E%3Ccircle cx='17.5' cy='20' r='1'/%3E%3C/svg%3E") center / 30px no-repeat; -webkit-mask: none; mask: none; }
.woocommerce-cart .return-to-shop { display: none; }
.drjafari-empty-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 12px; margin: -16px 0 0; padding: 8px 20px 32px;
  border: 1px solid var(--line); border-top: 0; border-radius: 0 0 var(--radius-card) var(--radius-card); background: #fff; }
.drjafari-empty-actions a { display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; min-height: 48px; padding: 10px 22px;
  border-radius: var(--radius-btn-max); font-size: 15px; font-weight: var(--fw-heading); text-decoration: none; }
.drjafari-empty-actions .is-shop { background: var(--teal); color: #fff; }
.drjafari-empty-actions .is-shop:hover { background: var(--teal-deep); }
.drjafari-empty-actions .is-consult { border: 1.5px solid var(--teal-soft); background: #fff; color: var(--teal); }
.drjafari-empty-actions .is-consult:hover { border-color: var(--teal); background: var(--teal-wash); }
.drjafari-empty-actions a:focus-visible { outline: 2px solid var(--teal-mid); outline-offset: 2px; }

/* ---- the Rx add attempt (hook H9: the cannot-be-purchased message carries the PDP's Rx notice) ---- */
.drjafari-rx-cart { display: flex; flex-direction: column; gap: 6px; }
.drjafari-rx-cart__title { font-weight: var(--fw-display); color: var(--warm-ink); }
.drjafari-rx-cart__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.woocommerce-error .drjafari-rx-cart__actions a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 16px;
  border-radius: var(--radius-btn-max); font-weight: var(--fw-heading); text-decoration: none; }
.woocommerce-error .drjafari-rx-cart__actions .is-send { background: var(--teal); color: #fff; }
.woocommerce-error .drjafari-rx-cart__actions .is-consult { border: 1.5px solid var(--teal); background: #fff; color: var(--teal); }

/* ---- checkout ---- */
.woocommerce-checkout form.checkout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; margin: 0; }
.woocommerce-checkout form.checkout > * { min-width: 0; margin: 0; }
.woocommerce-checkout #customer_details.col2-set { display: grid; gap: 16px; width: auto; float: none; }
.woocommerce-checkout #customer_details :is(.col-1, .col-2) { float: none; width: auto; box-sizing: border-box; padding: 20px; border: 1px solid var(--line);
  border-radius: var(--radius-card); background: #fff; }
.woocommerce-checkout #customer_details h3 { margin: 0 0 16px; font-size: 18px; font-weight: var(--fw-display); line-height: 1.6; color: var(--teal-deep); }
.woocommerce-checkout #customer_details h3#ship-to-different-address { margin: 0; font-size: 15px; }
.woocommerce-checkout :is(.woocommerce-billing-fields__field-wrapper, .woocommerce-shipping-fields__field-wrapper) { display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.woocommerce-checkout .form-row { float: none; width: auto; grid-column: 1 / -1; margin: 0; padding: 0; }
.woocommerce-checkout .form-row > label { display: block; margin: 0 0 8px; font-size: 14px; font-weight: var(--fw-subhead); line-height: 1.8; color: var(--ink); }
.woocommerce-checkout .form-row :is(.required) { border: 0; color: var(--warm-ink); text-decoration: none; }
.woocommerce-checkout .form-row .optional { font-weight: var(--fw-body); color: var(--slate); }
.woocommerce-checkout .form-row :is(input.input-text, select, textarea) { display: block; box-sizing: border-box; width: 100%; max-width: none; min-height: 48px;
  margin: 0; padding: 10px 14px; border: 1px solid var(--slate); border-radius: var(--radius-btn-max); background: #fff; color: var(--ink);
  font: var(--fw-body) 15px/1.7 var(--font-brand); box-shadow: none; }
.woocommerce-checkout .form-row :is(input[type="tel"], input[type="email"], #billing_postcode, #shipping_postcode) { direction: ltr; text-align: right; }
.woocommerce-checkout .form-row textarea { min-height: 96px; resize: vertical; }
.woocommerce-checkout .form-row :is(input.input-text, select, textarea):hover { border-color: var(--teal); }
.woocommerce-checkout .form-row :is(input.input-text, select, textarea):focus { padding: 9px 13px; border: 2px solid var(--teal-mid);
  outline: 2px solid transparent; box-shadow: 0 0 0 4px rgba(26, 128, 121, .22); }
/* Woo paints validated fields green and invalid ones dark red: both repointed, the error never colour alone */
.woocommerce-checkout .form-row.woocommerce-validated :is(input.input-text, select) { border-color: var(--slate); }
.woocommerce-checkout .form-row.woocommerce-invalid :is(input.input-text, select) { padding: 9px 13px; border: 2px solid var(--warm-ink); }
.woocommerce-checkout .form-row.woocommerce-invalid > label { color: var(--warm-ink); }
.woocommerce-checkout .checkout-inline-error-message { display: flex; align-items: flex-start; gap: 6px; margin: 8px 0 0; font-size: 13px;
  font-weight: var(--fw-subhead); line-height: 1.7; color: var(--warm-ink); }
.woocommerce-checkout .checkout-inline-error-message::before { content: ""; flex: none; width: 18px; height: 18px; margin-top: 2px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7.5v5.5M12 16.4v.1'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7.5v5.5M12 16.4v.1'/%3E%3C/svg%3E") center / contain no-repeat; }
.woocommerce-checkout label.checkbox { display: flex; align-items: center; gap: 10px; min-height: 44px; margin: 0; font-size: 15px; font-weight: var(--fw-subhead); cursor: pointer; }
.woocommerce-checkout input[type="checkbox"] { flex: none; width: 20px; height: 20px; margin: 0; accent-color: var(--teal); }
.woocommerce-checkout .woocommerce-additional-fields { margin-top: 16px; }
.woocommerce-checkout .woocommerce-form-coupon-toggle .woocommerce-info a { font-weight: var(--fw-heading); color: var(--teal); text-underline-offset: 3px; }
/* the order card: heading + review drawn as one card */
.woocommerce-checkout #order_review_heading { box-sizing: border-box; margin: 0; padding: 20px 20px 0; border: 1px solid var(--line); border-bottom: 0;
  border-radius: var(--radius-card) var(--radius-card) 0 0; background: #fff; }
.woocommerce-checkout #order_review { box-sizing: border-box; margin-top: -16px; padding: 4px 20px 20px; border: 1px solid var(--line); border-top: 0;
  border-radius: 0 0 var(--radius-card) var(--radius-card); background: #fff; }
/* payment: Woo's grey box and its triangle go; a radio row per gateway */
.woocommerce-checkout #payment { margin-top: 12px; padding: 16px 0 0; border-top: 1px solid var(--line); border-radius: 0; background: transparent; }
.woocommerce-checkout #payment ul.payment_methods { display: grid; gap: 8px; margin: 0; padding: 0; border: 0; list-style: none; }
.woocommerce-checkout #payment ul.payment_methods li { box-sizing: border-box; margin: 0; padding: 10px 12px; border: 1px solid var(--teal-soft);
  border-radius: var(--radius-btn-max); background: #fff; line-height: 1.8; }
.woocommerce-checkout #payment ul.payment_methods li:has(input:checked) { border-color: var(--teal); background: var(--teal-wash); box-shadow: inset 0 0 0 1px var(--teal); }
.woocommerce-checkout #payment ul.payment_methods li > label { display: inline-flex; align-items: center; gap: 10px; min-height: 28px; font-size: 15px;
  font-weight: var(--fw-heading); color: var(--ink); cursor: pointer; }
.woocommerce-checkout #payment ul.payment_methods li img { max-height: 28px; width: auto; margin: 0; margin-inline-start: 8px; vertical-align: middle; }
.woocommerce-checkout #payment ul.payment_methods li input[type="radio"] { margin-inline-end: 8px; vertical-align: middle; }
.woocommerce-checkout #payment div.payment_box { margin: 6px 0 0; padding: 0; background: transparent; color: var(--slate); font-size: 13px; line-height: 1.8; }
.woocommerce-checkout #payment div.payment_box::before { display: none; }
.woocommerce-checkout #payment div.payment_box p { margin: 0; }
.woocommerce-checkout #payment div.form-row.place-order { margin: 16px 0 0; padding: 0; }
.woocommerce-checkout .woocommerce-privacy-policy-text p { margin: 0 0 12px; font-size: 12.5px; line-height: 1.9; color: var(--slate); }
.woocommerce-checkout #payment #place_order { float: none; display: flex; align-items: center; justify-content: center; box-sizing: border-box; width: 100%;
  min-height: 52px; margin: 0; padding: 12px 24px; border: 0; border-radius: var(--radius-btn-max); font: var(--fw-heading) 16px/1.5 var(--font-brand); cursor: pointer; }
.drjafari-pay-redirect { margin: 10px 0 0; font-size: 12.5px; line-height: 1.8; color: var(--slate); text-align: center; }

/* ---- order received (thankyou.php stock + hooks H1, H11, H12) ---- */
.woocommerce-order { display: grid; gap: 16px; }
.woocommerce-order > * { margin: 0; }
.woocommerce-order p.woocommerce-thankyou-order-received { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 28px 20px;
  border: 1px solid var(--line); border-radius: var(--radius-card); background: #fff; color: var(--teal-deep); font-size: 20px;
  font-weight: var(--fw-display); line-height: 1.7; text-align: center; }
.woocommerce-order p.woocommerce-thankyou-order-received::before { content: ""; width: 64px; height: 64px; border-radius: 50%;
  background: var(--teal-wash) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230E5C57' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12.5 4 4L18 8.5'/%3E%3C/svg%3E") center / 34px no-repeat; }
ul.woocommerce-order-overview { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
ul.woocommerce-order-overview li { display: flex; flex-direction: column; gap: 2px; box-sizing: border-box; margin: 0; padding: 12px 16px; float: none;
  border: 1px solid var(--line); border-radius: var(--radius-btn-max); background: #fff; color: var(--slate); font-size: 12.5px; line-height: 1.7; text-transform: none; }
ul.woocommerce-order-overview li strong { display: block; color: var(--ink); font-size: 15px; font-weight: var(--fw-heading); line-height: 1.7; }
.woocommerce-order .drj-order-support { display: flex; gap: 10px; margin: 0; padding: 14px 16px; border-radius: var(--radius-btn-max); background: var(--teal-wash);
  color: var(--teal); font-size: 14px; font-weight: var(--fw-subhead); line-height: 1.9; }
.woocommerce-order .drj-order-support::before { content: ""; flex: none; width: 20px; height: 20px; margin-top: 4px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 4h4l2 5-2.5 1.5a11 11 0 0 0 5 5L15 13l5 2v4a2 2 0 0 1-2 2A16 16 0 0 1 3 6a2 2 0 0 1 2-2z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 4h4l2 5-2.5 1.5a11 11 0 0 0 5 5L15 13l5 2v4a2 2 0 0 1-2 2A16 16 0 0 1 3 6a2 2 0 0 1 2-2z'/%3E%3C/svg%3E") center / contain no-repeat; }
.woocommerce-order :is(.woocommerce-order-details, .woocommerce-customer-details) { box-sizing: border-box; padding: 20px; border: 1px solid var(--line);
  border-radius: var(--radius-card); background: #fff; }
.woocommerce-order :is(.woocommerce-order-details__title, .woocommerce-column__title) { margin: 0 0 4px; font-size: 18px; font-weight: var(--fw-display); line-height: 1.6; color: var(--teal-deep); }
.woocommerce-order .woocommerce-customer-details address { margin: 0; padding: 0; border: 0; font-style: normal; font-size: 14px; line-height: 2; color: var(--ink); }
.woocommerce-order .woocommerce-customer-details address p { margin: 0; }
.woocommerce-order .woocommerce-customer-details--phone { direction: ltr; text-align: right; }
.drjafari-thanks-actions { display: flex; flex-wrap: wrap; gap: 8px 12px; }
.drjafari-thanks-actions a { display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; min-height: 48px; padding: 10px 22px;
  border-radius: var(--radius-btn-max); font-size: 15px; font-weight: var(--fw-heading); text-decoration: none; }
.drjafari-thanks-actions .is-shop { background: var(--teal); color: #fff; }
.drjafari-thanks-actions .is-orders { border: 1.5px solid var(--teal-soft); background: #fff; color: var(--teal); }
.drjafari-thanks-slot { margin: 0; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-btn-max); background: #fff; font-size: 14px; line-height: 1.9; color: var(--ink); }

/* ---- WooCommerce's smallscreen.css (<= 768) outranks the phone cards above: its zebra tint, its hidden thumbnail, its
   float:left data-title labels and its text-align !important. Re-won here with one more class (S272P-d4 §DISSENT 1). ---- */
@media (max-width: 768px) {
  .woocommerce-cart #content table.cart td.product-thumbnail { display: block; }
  .woocommerce-cart .woocommerce table.shop_table_responsive tr:nth-child(n) td { background-color: transparent; }
  .woocommerce-cart .woocommerce table.shop_table_responsive tr td::before { display: none; }
  .woocommerce-cart .woocommerce table.shop_table_responsive tr td.product-subtotal { text-align: end !important; }
}
/* the empty cart's recently-viewed row: cards are drawn by cart.js from the PDP's localStorage list; hidden until it has some
   (the grid/scroll rules are .drjafari-related-carousel's, shipped) */
#drjafari-cart-recent { display: none; margin: 0; }
#drjafari-cart-recent.is-populated { display: block; }
#drjafari-cart-recent h2 { margin: 8px 0 12px; font-size: 18px; font-weight: var(--fw-display); color: var(--teal-deep); }

/* Woo's float/width pairs (.woocommerce form .form-row-first, 47%) outrank the grid rule above: re-won with one more class */
.woocommerce-checkout .woocommerce form.checkout .form-row { float: none; width: auto; }

/* Woo's green (validated) and dark-red (invalid) borders outrank the board's slate / warm-ink fields: re-won with more classes */
.woocommerce-checkout .woocommerce form.checkout .form-row.woocommerce-validated :is(input.input-text, select, textarea) { border-color: var(--slate); }
.woocommerce-checkout .woocommerce form.checkout .form-row.woocommerce-invalid :is(input.input-text, select, textarea) { border-color: var(--warm-ink); }

/* the empty-cart actions row joins the message card above it: the grid's `> * { margin: 0 }` reset outranks the -16px pull */
.woocommerce-cart .woocommerce > .drjafari-empty-actions { margin-top: -16px; }
/* T2 underlines every inline link in .entry-content (0,3,1): the button-shaped links of this board are not inline links */
.entry-content :is(.drjafari-empty-actions, .drjafari-thanks-actions, .drjafari-rx-cart__actions, .drjafari-cart-bar) a:not(.drjafari-btn):not(.button) { text-decoration: none; }

/* totals tables: Woo's tfoot rules (bold, a rule above every cell) outrank the board's flex rows; its smallscreen CSS hides every
   tbody <th> (the cart totals lost their labels at <= 768) */
.woocommerce :is(.cart_totals, .woocommerce-checkout-review-order, .woocommerce-order-details) table.shop_table :is(th, td) { border: 0; }
.woocommerce :is(.cart_totals, .woocommerce-checkout-review-order, .woocommerce-order-details) table.shop_table tfoot th { font-weight: var(--fw-subhead); }
.woocommerce :is(.cart_totals, .woocommerce-checkout-review-order, .woocommerce-order-details) table.shop_table tfoot td { font-weight: var(--fw-body); }
.woocommerce :is(.cart_totals, .woocommerce-checkout-review-order, .woocommerce-order-details) table.shop_table .order-total :is(th, td) { font-weight: var(--fw-display); }
@media (max-width: 768px) {
  .woocommerce .cart_totals table.shop_table_responsive tbody th { display: block; }
}
/* order received: the overview cards (Woo's float + dashed rule + clearfix pseudo-elements fight the grid) and the address columns */
.woocommerce-order ul.woocommerce-order-overview.order_details::before, .woocommerce-order ul.woocommerce-order-overview.order_details::after { display: none; }
.woocommerce-order > ul.woocommerce-order-overview.order_details { margin: 0; }
.woocommerce-order ul.woocommerce-order-overview.order_details li { float: none; margin: 0; padding: 12px 16px; border: 1px solid var(--line); }
.woocommerce-order .woocommerce-customer-details .woocommerce-columns { display: grid; gap: 16px; }
.woocommerce-order .woocommerce-customer-details .woocommerce-column { float: none; width: auto; }
.woocommerce-order .woocommerce-customer-details :is(.woocommerce-customer-details--phone, .woocommerce-customer-details--email) { padding: 0; }
.woocommerce-order .woocommerce-customer-details :is(.woocommerce-customer-details--phone, .woocommerce-customer-details--email)::before { display: none; }
.woocommerce-order .woocommerce-customer-details--email { overflow-wrap: anywhere; direction: ltr; text-align: right; }

/* ---- T1L: the two new conversion selectors join the S272 ONE rest list and hover list (repeated here, tokens.css is not edited) ---- */
.woocommerce-cart .wc-proceed-to-checkout a.checkout-button,
.woocommerce #payment #place_order,
.drjafari-cart-bar__cta { background: var(--orange-cta); color: #fff; }
.woocommerce-cart .wc-proceed-to-checkout a.checkout-button:hover, .woocommerce-cart .wc-proceed-to-checkout a.checkout-button:focus,
.woocommerce #payment #place_order:hover, .woocommerce #payment #place_order:focus,
.drjafari-cart-bar__cta:hover, .drjafari-cart-bar__cta:focus { background: var(--orange-cta-hover); color: #fff; }

/* ==== >= 769 ==== */
@media (min-width: 769px) {
  :is(.woocommerce-cart, .woocommerce-checkout) .entry-title { font-size: 32px; }
  .drjafari-steps { max-width: 760px; }
  .drjafari-steps li { font-size: 14px; }
  .drjafari-steps li[aria-current="step"]:not(:last-child) { flex: 1 1 0; }
  .drjafari-steps li:not([aria-current]) > span { position: static; width: auto; height: auto; overflow: visible; clip: auto; }
  /* cart: items right, totals card left (RTL), the card sticky */
  .woocommerce-cart .woocommerce { grid-template-columns: minmax(0, 1fr) 360px; column-gap: 32px; row-gap: 16px; }
  .woocommerce-cart .woocommerce > * { grid-column: 1 / -1; }
  .woocommerce-cart .woocommerce > form.woocommerce-cart-form { grid-column: 1; }
  .woocommerce-cart .woocommerce > .cart-collaterals { grid-column: 2; position: sticky; top: 24px; }
  /* >= 769 the items are a real table again (row semantics come back; the phone cards are Woo's own stacked mode) */
  .woocommerce-cart table.shop_table.cart { display: table; border-collapse: separate; border-spacing: 0; }
  .woocommerce-cart table.cart thead { display: table-header-group; }
  .woocommerce-cart table.cart tbody { display: table-row-group; container-type: normal; }
  .woocommerce-cart table.cart tr.cart_item, .woocommerce-cart table.cart tr:has(> td.actions) { display: table-row; }
  .woocommerce-cart table.cart thead th { padding: 10px 16px; border: 0; background: var(--teal-wash); font-size: 12.5px; font-weight: var(--fw-subhead);
    line-height: 1.8; color: var(--slate); text-align: start; }
  .woocommerce-cart table.cart td { display: table-cell; padding: 16px; border-top: 1px solid var(--line); vertical-align: middle; }
  .woocommerce-cart table.cart tr.cart_item:first-child td { border-top: 0; }
  .woocommerce-cart table.cart td.product-remove { width: 44px; padding-inline: 16px 0; }
  .woocommerce-cart table.cart td.product-thumbnail { width: 72px; padding-inline-end: 0; }
  .woocommerce-cart table.cart td.product-thumbnail img { width: 72px; height: 72px; }
  .woocommerce-cart table.cart td.product-price { font-size: 14px; white-space: nowrap; }
  .woocommerce-cart table.cart :is(td.product-quantity, td.product-subtotal, td.product-remove) { margin: 0; }
  .woocommerce-cart table.cart td.actions { display: table-cell; padding: 16px; }
  .woocommerce-cart table.cart td.actions .coupon { display: inline-flex; width: 360px; max-width: 100%; vertical-align: middle; }
  .woocommerce-cart button[name="update_cart"] { float: inline-end; margin: 0; }
  /* checkout: the form right, the order card left (RTL) */
  .woocommerce-checkout form.checkout { grid-template-columns: minmax(0, 1fr) 400px; column-gap: 32px;
    grid-template-areas: "notices notices" "details heading" "details review"; grid-template-rows: auto auto 1fr; }
  .woocommerce-checkout form.checkout > .woocommerce-NoticeGroup { grid-area: notices; }
  .woocommerce-checkout #customer_details { grid-area: details; }
  .woocommerce-checkout #order_review_heading { grid-area: heading; }
  .woocommerce-checkout #order_review { grid-area: review; }
  .woocommerce-checkout #customer_details :is(.col-1, .col-2) { padding: 28px; }
  .woocommerce-checkout :is(.form-row-first, .form-row-last, #billing_state_field, #billing_city_field, #billing_phone_field, #billing_email_field) { grid-column: auto; }
  /* order received */
  ul.woocommerce-order-overview { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .woocommerce-order { grid-template-columns: minmax(0, 1fr) 360px; column-gap: 32px; align-items: start; }
  .woocommerce-order > * { grid-column: 1 / -1; }
  .woocommerce-order > .woocommerce-order-details { grid-column: 1; }
  .woocommerce-order > .woocommerce-customer-details { grid-column: 2; grid-row: span 2; }
  /* the cart bar is a phone control (J2): the card's own button is always in reach on desktop */
  .drjafari-cart-bar { display: none; }
}
