/* ══════════════════════════════════════════════════════════
   TORXUP — cart drawer, buy box, thank-you page
   Port of type19's cart-checkout.css drawer, re-skinned to the Torxup palette:
   navy #1b4063 · blue #2668a2 · CTA gradient #d77532→#f2b705 · text #2e2e2e
   ══════════════════════════════════════════════════════════ */
:root {
  --torx-navy: #1b4063;
  --torx-blue: #2668a2;
  --torx-text: #2e2e2e;
  --torx-muted: #5b6b7b;
  --torx-line: #e3e8ee;
  --torx-bg: #f6f8fb;
  --torx-cta: linear-gradient(122deg, #d77532 0%, #f2b705 100%);
  --torx-radius: 12px;
  --torx-font: "Roboto", "Inter", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
}

/* ── Overlay ── */
.torx-overlay {
  position: fixed; inset: 0;
  background: rgba(10, 25, 40, 0.55);
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  opacity: 0; pointer-events: none;
  transition: opacity 220ms ease;
  z-index: 99998;
}
.torx-overlay.open { opacity: 1 !important; pointer-events: auto !important; }

/* ── Drawer ── */
.torx-drawer {
  position: fixed; top: 0; right: 0;
  height: 100dvh; width: 440px; max-width: 100vw;
  background: #fff; color: var(--torx-text);
  color-scheme: light;
  font-family: var(--torx-font);
  transform: translateX(100%);
  transition: transform 280ms cubic-bezier(0.2, 0.8, 0.2, 1);
  z-index: 99999;
  display: flex; flex-direction: column;
  box-shadow: -16px 0 48px rgba(0, 0, 0, 0.25);
}
.torx-drawer.open { transform: translateX(0) !important; }
.torx-drawer *, .torx-drawer *::before, .torx-drawer *::after { box-sizing: border-box; }
.torx-drawer p, .torx-drawer h2, .torx-drawer h3, .torx-drawer ul { margin: 0; }

.torx-drawer__head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 18px 22px; border-bottom: 1px solid var(--torx-line); flex-shrink: 0;
}
.torx-drawer__title { font-size: 17px; font-weight: 700; color: var(--torx-navy); letter-spacing: -0.01em; }
.torx-drawer__count { font-size: 12px; color: var(--torx-muted); margin-left: 6px; font-weight: 500; }
.torx-drawer__close {
  background: transparent; border: 0; font-size: 26px; line-height: 1; cursor: pointer;
  color: var(--torx-muted); padding: 4px 8px; border-radius: 6px;
}
.torx-drawer__close:hover { background: var(--torx-bg); color: var(--torx-navy); }

.torx-drawer__body { flex: 1; overflow-y: auto; padding: 16px 22px; -webkit-overflow-scrolling: touch; }
.torx-drawer__foot { border-top: 1px solid var(--torx-line); padding: 14px 22px 18px; flex-shrink: 0; background: #fff; }

/* Dispatch promise strip */
.torx-promise {
  display: flex; gap: 10px; align-items: center;
  background: #eef6ff; border: 1px solid #cfe2f7; color: var(--torx-navy);
  border-radius: 10px; padding: 10px 12px; font-size: 13px; font-weight: 600; margin-bottom: 14px;
}
.torx-promise svg { flex-shrink: 0; }

/* Lines */
.torx-line { display: grid; grid-template-columns: 72px 1fr; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--torx-line); }
.torx-line__img { width: 72px; height: 72px; border-radius: 10px; object-fit: cover; background: var(--torx-bg); border: 1px solid var(--torx-line); }
.torx-line__name { font-size: 15px; font-weight: 700; color: var(--torx-navy); line-height: 1.3; }
.torx-line__name a { color: inherit; text-decoration: none; }
.torx-line__sub { font-size: 12px; color: var(--torx-muted); margin-top: 2px; line-height: 1.4; }
.torx-line__row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; }
.torx-line__price { font-size: 15px; font-weight: 700; color: var(--torx-text); text-align: right; }
.torx-line__was { display: block; font-size: 12px; color: var(--torx-muted); text-decoration: line-through; font-weight: 500; }
.torx-line__tier { display: inline-block; margin-top: 6px; font-size: 11px; font-weight: 700; color: #0b6b3a; background: #e6f7ee; border-radius: 999px; padding: 2px 8px; }
.torx-line__remove { background: none; border: 0; color: var(--torx-muted); font-size: 12px; cursor: pointer; padding: 6px 0 0; text-decoration: underline; }
.torx-line__remove:hover { color: #b3261e; }

/* Quantity stepper (shared with buy box) */
.torx-qty { display: inline-flex; align-items: center; border: 1px solid #cfd6de; border-radius: 10px; overflow: hidden; background: #fff; }
.torx-qty button { width: 36px; height: 38px; border: 0; background: #fff; font-size: 18px; cursor: pointer; color: var(--torx-navy); }
.torx-qty button:hover { background: var(--torx-bg); }
.torx-qty input { width: 46px; height: 38px; border: 0; border-left: 1px solid #e3e8ee; border-right: 1px solid #e3e8ee; text-align: center; font-size: 15px; font-weight: 700; color: var(--torx-text); background: #fff; -moz-appearance: textfield; }
.torx-qty input::-webkit-outer-spin-button, .torx-qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* Empty state */
.torx-empty { text-align: center; padding: 40px 10px; }
.torx-empty p { color: var(--torx-muted); font-size: 15px; margin-bottom: 16px; }

/* Nudge (team tier progress) */
.torx-nudge { margin: 14px 0 0; padding: 12px 14px; border-radius: 10px; background: #fff7e6; border: 1px solid #f5d89a; font-size: 13px; color: #6a4a00; line-height: 1.45; }
.torx-nudge strong { color: #4a3300; }
.torx-nudge--unlocked { background: #e6f7ee; border-color: #a9e2c3; color: #0b6b3a; }
.torx-nudge__btn { display: inline-block; margin-top: 8px; padding: 7px 12px; border-radius: 8px; border: 1px solid #d9a740; background: #fff; color: #4a3300; font-weight: 700; font-size: 13px; cursor: pointer; }
.torx-nudge__btn:hover { background: #fff2d1; }

/* Upsell rail */
.torx-upsell { margin-top: 16px; }
.torx-upsell__title { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--torx-muted); margin-bottom: 8px; }
.torx-upsell__card { display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; align-items: center; padding: 10px; border: 1px solid var(--torx-line); border-radius: 10px; background: var(--torx-bg); }
.torx-upsell__card img { width: 56px; height: 56px; border-radius: 8px; object-fit: cover; }
.torx-upsell__name { font-size: 13px; font-weight: 700; color: var(--torx-navy); line-height: 1.3; }
.torx-upsell__sub { font-size: 12px; color: var(--torx-muted); margin-top: 2px; line-height: 1.35; }
.torx-upsell__btn { padding: 8px 12px; border-radius: 8px; border: 1px solid var(--torx-blue); background: #fff; color: var(--torx-blue); font-weight: 700; font-size: 13px; cursor: pointer; white-space: nowrap; }
.torx-upsell__btn:hover { background: var(--torx-blue); color: #fff; }

/* Totals */
.torx-totals { display: grid; gap: 6px; font-size: 14px; color: var(--torx-text); margin-bottom: 12px; }
.torx-totals div { display: flex; justify-content: space-between; }
.torx-totals .torx-totals__disc { color: #0b6b3a; font-weight: 600; }
.torx-totals .torx-totals__free { color: #0b6b3a; font-weight: 700; }
.torx-totals .torx-totals__total { font-size: 18px; font-weight: 800; color: var(--torx-navy); padding-top: 8px; border-top: 1px solid var(--torx-line); }

/* Buttons */
.torx-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 15px 18px; border: 0; border-radius: 10px; font-family: var(--torx-font); font-size: 16px; font-weight: 800; letter-spacing: 0.01em; cursor: pointer; text-decoration: none; transition: opacity .2s ease, transform .1s ease; }
.torx-btn--primary { background: var(--torx-cta); color: #fff; box-shadow: 0 6px 18px rgba(215, 117, 50, 0.35); }
.torx-btn--primary:hover { opacity: 0.92; }
.torx-btn--primary:active { transform: scale(0.99); }
.torx-btn--primary[disabled] { opacity: 0.6; cursor: wait; }
.torx-btn--ghost { background: #fff; color: var(--torx-navy); border: 1px solid #cfd6de; }
.torx-btn--ghost:hover { background: var(--torx-bg); }
.torx-btn.is-added { background: #0b6b3a; }
.torx-checkout-error { margin: 10px 0 0; font-size: 13px; color: #b3261e; background: #fdecea; border: 1px solid #f5c6c2; border-radius: 8px; padding: 8px 10px; }

.torx-trust { display: flex; flex-wrap: wrap; gap: 6px 14px; justify-content: center; list-style: none; padding: 0; margin: 12px 0 0; font-size: 11.5px; color: var(--torx-muted); font-weight: 600; }
.torx-trust li { display: inline-flex; align-items: center; gap: 5px; }
.torx-trust svg { width: 13px; height: 13px; }

/* Header cart count pill (Woodmart header) */
.wd-header-cart .wd-cart-number.torx-has-items { background: #d77532; color: #fff; }

/* ══════════════ BUY BOX (product pages) ══════════════ */
.torx-buybox { font-family: var(--torx-font); color: var(--torx-text); background: #fff; padding: 36px 20px; scroll-margin-top: 90px; }
.torx-buybox *, .torx-buybox *::before, .torx-buybox *::after { box-sizing: border-box; }
.torx-buybox__inner { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 36px; align-items: center; border: 1px solid var(--torx-line); border-radius: 18px; padding: 28px; box-shadow: 0 12px 40px rgba(27, 64, 99, 0.08); }
.torx-buybox__media img { width: 100%; height: auto; border-radius: 14px; display: block; }
.torx-buybox__eyebrow { font-size: 12px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--torx-blue); margin: 0 0 6px; }
.torx-buybox__title { font-size: 30px; line-height: 1.15; font-weight: 800; color: var(--torx-navy); margin: 0 0 10px; }
.torx-buybox__price { font-size: 32px; font-weight: 800; color: var(--torx-navy); margin: 0 0 6px; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.torx-buybox__each { font-size: 14px; font-weight: 600; color: var(--torx-muted); }
.torx-buybox__was { font-size: 16px; color: var(--torx-muted); text-decoration: line-through; font-weight: 500; }
.torx-buybox__save { font-size: 13px; font-weight: 800; color: #0b6b3a; background: #e6f7ee; border-radius: 999px; padding: 3px 10px; }
.torx-buybox__includes { list-style: none; padding: 0; margin: 12px 0 14px; display: grid; gap: 6px; font-size: 14.5px; line-height: 1.4; }
.torx-buybox__includes li { padding-left: 22px; position: relative; }
.torx-buybox__includes li::before { content: "✓"; position: absolute; left: 0; color: #0b6b3a; font-weight: 800; }
.torx-buybox__badges { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; font-weight: 700; color: var(--torx-navy); margin: 0 0 18px; }
.torx-buybox__badges span { display: inline-flex; align-items: center; gap: 5px; }
.torx-team { border: 1px dashed #d9a740; background: #fffaf0; border-radius: 12px; padding: 12px 14px; margin: 0 0 16px; }
.torx-team__title { font-size: 14px; font-weight: 800; color: #4a3300; margin: 0 0 2px; }
.torx-team__sub { font-size: 12.5px; color: #6a4a00; margin: 0 0 10px; }
.torx-team__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.torx-team__chips button { border: 1px solid #d9a740; background: #fff; color: #4a3300; border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 700; cursor: pointer; }
.torx-team__chips button small { font-weight: 600; opacity: 0.8; }
.torx-team__chips button.is-active { background: #d77532; border-color: #d77532; color: #fff; }
.torx-buybox__row { display: flex; gap: 12px; align-items: stretch; flex-wrap: wrap; }
.torx-buybox__row .torx-qty { height: 54px; }
.torx-buybox__row .torx-qty button { height: 52px; width: 42px; }
.torx-buybox__row .torx-qty input { height: 52px; width: 54px; }
.torx-buybox__row .torx-btn { flex: 1; min-width: 220px; font-size: 17px; }
.torx-buybox__alt { font-size: 13.5px; color: var(--torx-muted); margin: 14px 0 0; }
.torx-buybox__alt a { color: var(--torx-blue); font-weight: 700; }
@media (max-width: 820px) {
  .torx-buybox { padding: 24px 14px; }
  .torx-buybox__inner { grid-template-columns: 1fr; gap: 18px; padding: 18px; }
  .torx-buybox__title { font-size: 24px; }
  .torx-buybox__price { font-size: 28px; }
}

/* ══════════════ THANK-YOU PAGE ══════════════ */
.torx-thanks { font-family: var(--torx-font); color: var(--torx-text); max-width: 720px; margin: 0 auto; padding: 56px 20px 72px; text-align: center; }
.torx-thanks h1 { font-size: 30px; color: var(--torx-navy); margin: 14px 0 8px; }
.torx-thanks p { font-size: 16px; line-height: 1.6; color: var(--torx-muted); margin: 0 0 12px; }
.torx-thanks__ref { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; color: var(--torx-muted); }
.torx-thanks__lines { text-align: left; margin: 22px auto; border: 1px solid var(--torx-line); border-radius: 12px; padding: 14px 18px; }
.torx-thanks__lines div { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; font-size: 14.5px; }
.torx-thanks__lines .is-total { border-top: 1px solid var(--torx-line); margin-top: 6px; padding-top: 10px; font-weight: 800; color: var(--torx-navy); }
.torx-thanks__actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }
.torx-thanks__actions .torx-btn { width: auto; min-width: 200px; }

/* ══════════════ MOBILE CHROME (replaces the Woodmart toolbar) ══════════════ */
.wd-toolbar.torx-toolbar { display: flex !important; align-items: stretch; justify-content: space-around; gap: 0; padding: 4px 6px calc(4px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--torx-line); font-family: var(--torx-font); }
.torx-toolbar__item { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 52px; padding: 4px 2px; border: 0; background: transparent; color: var(--torx-navy); font: inherit; font-size: 11.5px; font-weight: 700; text-decoration: none; position: relative; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.torx-toolbar__item svg { width: 24px; height: 24px; }
.torx-toolbar__basket { color: #b25a17; }
.torx-toolbar__count { position: absolute; top: 2px; right: calc(50% - 22px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: #d77532; color: #fff; font-size: 11px; line-height: 18px; text-align: center; font-weight: 800; }
.torx-menu-buy a { font-weight: 800 !important; color: #b25a17 !important; }

/* Sticky buy bar (product pages, phones and tablets) */
.torx-sticky { position: fixed !important; left: 0; right: 0; bottom: 0; z-index: 9990; display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: #fff; border-top: 1px solid var(--torx-line); box-shadow: 0 -8px 24px rgba(27, 64, 99, 0.12); font-family: var(--torx-font); transform: translateY(110%); transition: transform 220ms ease; }
.torx-sticky.is-visible { transform: translateY(0); }
.torx-sticky__info { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.torx-sticky__info strong { font-size: 13px; color: var(--torx-navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.torx-sticky__info span { font-size: 15px; font-weight: 800; color: var(--torx-text); }
.torx-sticky__btn { width: auto; padding: 12px 18px; font-size: 15px; }
@media (max-width: 1024px) { body:has(.wd-toolbar) .torx-sticky { bottom: calc(60px + env(safe-area-inset-bottom)); } }
@media (min-width: 1025px) { .torx-sticky { display: none; } }

/* ══════════════ REVIEWS ══════════════ */
.torx-stars { color: #f2b705; letter-spacing: 1px; font-size: 15px; }
.torx-rating { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 10px; text-decoration: none; color: var(--torx-text); font-size: 13.5px; font-weight: 600; }
.torx-rating strong { color: var(--torx-navy); }
.torx-rating span { color: var(--torx-muted); text-decoration: underline; }
.torx-reviews { font-family: var(--torx-font); color: var(--torx-text); background: var(--torx-bg); padding: 40px 16px 32px; }
.torx-reviews__head { max-width: 1100px; margin: 0 auto 18px; text-align: center; }
.torx-reviews__head h2 { font-size: 26px; color: var(--torx-navy); margin: 0 0 6px; }
.torx-reviews__summary { margin: 0; font-size: 15px; color: var(--torx-muted); }
.torx-reviews__summary strong { color: var(--torx-navy); }
.torx-reviews__viewport { max-width: 1100px; margin: 0 auto; }
.torx-reviews__track { list-style: none; margin: 0; padding: 4px 2px 12px; display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.torx-reviews__track::-webkit-scrollbar { display: none; }
.torx-review { flex: 0 0 calc(33.333% - 11px); scroll-snap-align: start; background: #fff; border: 1px solid var(--torx-line); border-radius: 14px; padding: 18px 18px 14px; display: flex; flex-direction: column; box-shadow: 0 6px 18px rgba(27,64,99,0.06); }
.torx-review__stars { color: #f2b705; font-size: 16px; letter-spacing: 2px; margin-bottom: 8px; }
.torx-review__text { font-size: 14.5px; line-height: 1.55; margin: 0 0 12px; color: var(--torx-text); }
.torx-review__name { margin-top: auto; font-size: 13px; font-weight: 700; color: var(--torx-navy); }
.torx-review__name span { color: var(--torx-muted); font-weight: 600; }
.torx-reviews__nav { display: flex; justify-content: center; gap: 10px; margin-top: 4px; }
.torx-reviews__nav button { width: 40px; height: 40px; border-radius: 50%; border: 1px solid #cfd6de; background: #fff; color: var(--torx-navy); font-size: 22px; line-height: 1; cursor: pointer; }
@media (max-width: 900px) { .torx-review { flex-basis: calc(50% - 8px); } }
@media (max-width: 600px) { .torx-review { flex-basis: 86%; } .torx-reviews__head h2 { font-size: 22px; } }
/* the WordPress-era carousel snapshot is frozen mid-transform; hide it */
.elementor-widget-wd_testimonials { display: none !important; }
