/* Store theme — Side Cart drawer (2026-07-22 redesign)
   2026-07-22 space pass: chrome trimmed ~100px so three item cards fit
   without scrolling at 800px. Only duplicated information was removed —
   see the item card and footer sections for the specifics. */
.store-drawer{
  --navy:var(--store-primary); --navy-deep:var(--store-primary-dark); --gold:var(--store-accent); --gold-deep:var(--store-accent-dark); --gold-soft:var(--store-accent-soft);
  --ink:var(--store-ink); --muted:var(--store-text-muted); --faint:var(--store-text-subtle); --line:var(--store-line); --line-2:var(--store-line-soft);
  --surface:var(--store-white); --tint:var(--store-surface); --stage-1:var(--store-white); --stage-2:var(--store-surface); --success:var(--store-success); --danger:var(--store-danger);
}
.store-scrim{position:fixed;inset:0;background:color-mix(in srgb, var(--store-backdrop) 50%, transparent);opacity:0;visibility:hidden;transition:opacity .28s;z-index:99998}
.store-scrim.open{opacity:1;visibility:visible}
.store-drawer{position:fixed;top:0;right:0;height:100%;width:min(420px,94vw);background:var(--store-surface);z-index:99999;
  transform:translateX(102%);transition:transform .34s cubic-bezier(.4,0,.1,1);display:flex;flex-direction:column;
  box-shadow:var(--store-shadow-drawer);font-family:var(--store-font-ui);color:var(--store-ink);line-height:1.5}
.store-drawer.open{transform:none}
.store-drawer *,.store-drawer *::before,.store-drawer *::after{box-sizing:border-box}
.store-drawer img{max-width:100%;display:block}

/* header */
.store-drawer-head{flex:none;display:flex;align-items:center;justify-content:space-between;padding:12px 18px 10px;background:var(--surface);border-bottom:1px solid var(--line-2)}
.store-drawer-head h3{margin:0;font-size:16px;font-weight:800;color:var(--ink);display:flex;align-items:center;gap:8px}
.store-cart-count{background:var(--navy);color:var(--store-white);font-size:11px;font-weight:800;min-width:20px;height:20px;padding:0 6px;border-radius:var(--store-radius-pill);display:inline-flex;align-items:center;justify-content:center}
.store-drawer-x{width:30px;height:30px;border:0;border-radius:calc(8px * var(--store-roundness));background:var(--tint);color:var(--muted);font-size:18px;line-height:1;cursor:pointer;flex:none}
.store-drawer-x:hover{background:var(--line);color:var(--ink)}

.store-drawer-body{flex:1;display:flex;flex-direction:column;min-height:0}
.store-cart-content{flex:1;display:flex;flex-direction:column;min-height:0}

/* ---------- reward milestone bar ---------- */
.store-reward{flex:none;background:var(--surface);padding:8px 18px 10px;border-bottom:1px solid var(--line-2)}
.store-miles{position:relative;height:19px}
/* line-height:0 kills the ~5px of phantom leading an inline-block chip inherits */
.store-mile{position:absolute;top:0;white-space:nowrap;line-height:0;transition:.3s}
/* renamed from .store-tag: that class collides with a product-image "Save $X"
   badge in store-product-page.css (position:absolute;top:16px), which dropped the
   milestone pill 16px onto the track whenever the drawer was viewed on a product
   page. Unique name = no collision. */
.store-mstag{display:inline-block;font-size:9px;font-weight:800;letter-spacing:.07em;text-transform:uppercase;
  padding:2px 7px;line-height:13px;border-radius:var(--store-radius-pill);background:var(--store-white);border:1px solid var(--line);color:var(--muted);transition:.3s}
.store-mile.hit .store-mstag{background:var(--gold-soft);border-color:var(--store-accent-line);color:var(--navy)}
/* navy fill measures 9.55:1 against the track; gold was 1.36:1 and vanished */
.store-track{position:relative;height:7px;border-radius:var(--store-radius-pill);background:var(--line-2);margin-top:7px}
.store-fill{position:absolute;top:0;left:0;bottom:0;border-radius:var(--store-radius-pill);background:linear-gradient(90deg,var(--store-primary-light),var(--navy));transition:width .55s cubic-bezier(.4,0,.15,1)}
.store-dot{position:absolute;top:50%;width:11px;height:11px;border-radius:var(--store-radius-round);background:var(--store-white);border:2px solid var(--store-line-strong);transition:.3s;z-index:2}
.store-dot.hit{background:var(--gold);border-color:var(--gold-deep);box-shadow:var(--store-ring-progress)}
.store-msg{font-size:12px;font-weight:700;color:var(--muted);margin-top:8px;display:flex;align-items:center;justify-content:center;gap:6px;text-align:center}
.store-msg b{color:var(--navy);font-weight:800}
.store-tick{color:var(--navy);flex:none}
.store-won{background:var(--gold-soft);border:1px solid var(--store-accent-line);color:var(--navy);font-weight:800;padding:2px 8px;border-radius:var(--store-radius-pill);white-space:nowrap;margin-right:6px}

/* ---------- items ---------- */
.store-cart-items{flex:1;overflow-y:auto;padding:9px 11px;display:flex;flex-direction:column;gap:8px}
/* thumb spans both rows, else it forces row 1 tall and leaves dead space.
   Card height is driven by the text column, not the thumb — which is why the
   thumb could drop 66->56 for free while removing the category eyebrow
   (browsing metadata, redundant once the item is already in the cart)
   is what actually took the card from ~113px to ~93px. */
.store-mini-item{position:relative;display:grid;grid-template-columns:56px 1fr;gap:3px 11px;background:var(--surface);
  border:1px solid var(--line-2);border-radius:calc(12px * var(--store-roundness));padding:10px;box-shadow:var(--store-shadow-item)}
.store-mini-thumb{grid-row:1/3;align-self:start;width:56px;height:56px;border-radius:calc(10px * var(--store-roundness));
  background:linear-gradient(180deg,var(--stage-1),var(--stage-2));border:1px solid var(--line-2);display:grid;place-items:center;overflow:hidden}
.store-mini-thumb img{width:100%;height:100%;object-fit:contain;padding:4px}
.store-mini-meta{min-width:0;padding-right:22px}
.store-drawer .store-mini-name{display:block;font-size:13px;font-weight:700;line-height:1.3;margin:0 0 2px;color:var(--ink) !important;text-decoration:none}
.store-drawer .store-mini-name:hover{color:var(--navy) !important}
/* now carries the chosen variation (e.g. "4mm · Red"); hidden when there is none */
.store-mini-sub{font-size:11px;color:var(--faint)}
.store-mini-rm{position:absolute;top:8px;right:8px;width:22px;height:22px;border:0;border-radius:calc(6px * var(--store-roundness));background:transparent;color:var(--faint);display:grid;place-items:center;cursor:pointer;padding:0}
.store-mini-rm:hover{background:var(--store-danger-soft);color:var(--danger)}
.store-mini-foot{grid-column:2;display:flex;align-items:center;justify-content:space-between;margin-top:5px}
.store-mini-stepper{display:inline-flex;align-items:stretch;height:30px;border:1.5px solid var(--line);border-radius:calc(8px * var(--store-roundness));overflow:hidden;background:var(--surface)}
.store-mini-stepper .store-cqbtn{width:28px;border-radius:calc(3px * var(--store-roundness));border:0;background:transparent;color:var(--navy);font-size:14px;font-weight:700;line-height:1;padding:0;cursor:pointer;display:flex;align-items:center;justify-content:center}
.store-mini-stepper .store-cqbtn:hover{background:var(--navy);color:var(--store-white)}
.store-mini-stepper .store-cq-val{width:30px;display:inline-flex;align-items:center;justify-content:center;font-size:12px;font-weight:800;border-left:1.5px solid var(--line);border-right:1.5px solid var(--line)}
.store-mini-price{font-size:14px;font-weight:800;letter-spacing:-.01em;white-space:nowrap;color:var(--ink)}

/* ---------- footer ---------- */
.store-cart-foot{flex:none;background:var(--surface);border-top:1px solid var(--line-2);padding:3px 18px 14px}
.store-trow{display:flex;justify-content:space-between;align-items:center;font-size:13px;color:var(--muted);margin-bottom:5px}
.store-trow .store-v{font-weight:700;color:var(--ink)}
.store-trow .store-disc{color:var(--success)}
.store-trow .store-muted{color:var(--faint);font-weight:600}
.store-trow-total{font-size:15px;font-weight:800;color:var(--ink);border-top:1px solid var(--line-2);margin-top:4px;padding-top:9px}
.store-trow-total span:last-child{font-size:20px;font-weight:800;letter-spacing:-.02em}
/* replaces a full Shipping row — same promise, one line instead of two columns */
.store-ship-note{font-size:10.5px;color:var(--faint);text-align:right;margin-top:1px}
.store-save-note{font-size:11.5px;font-weight:700;color:var(--success);text-align:right;margin-top:3px}

.store-mini-btn{width:100%;height:48px;border:0;border-radius:var(--store-radius-button-sm);font-family:inherit;font-size:14px;font-weight:800;
  display:flex;align-items:center;justify-content:center;gap:8px;cursor:pointer;text-decoration:none;transition:.15s}
.store-mini-btn svg{flex:none}
.store-drawer .store-mini-checkout{background:var(--gold) !important;color:var(--navy-deep) !important;margin-top:10px;letter-spacing:.02em}
.store-drawer .store-mini-checkout:hover{background:var(--gold-deep) !important;box-shadow:var(--store-glow-sidecart-hover)}
/* secondary: navy outline — a white button on a white footer reads as a box */
.store-drawer .store-mini-viewcart{background:var(--surface) !important;color:var(--navy) !important;border:2px solid var(--navy);height:40px;margin-top:7px;font-size:13px}
.store-drawer .store-mini-viewcart:hover{background:var(--navy) !important;color:var(--store-white) !important}

/* ---------- empty ---------- */
.store-cart-empty{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:40px 24px;color:var(--muted)}
.store-cart-empty svg{color:var(--line);margin-bottom:14px}
.store-cart-empty h4{margin:0 0 5px;font-size:16px;font-weight:800;color:var(--ink)}
.store-cart-empty p{margin:0 0 16px;font-size:13px}
.store-drawer .store-mini-shop{background:var(--navy) !important;color:var(--store-white) !important;width:auto;padding:0 26px;height:46px}
.store-drawer .store-mini-shop:hover{background:var(--navy-deep) !important}

/* Buy Now button on the product page (unchanged behaviour) */
.store-buy-now{background:var(--store-accent) !important;color:var(--store-primary-dark) !important;border:0 !important;font-weight:800 !important}
.store-buy-now:hover{background:var(--store-accent-dark) !important;color:var(--store-primary-dark) !important}
.single_add_to_cart_button.loading{opacity:.7;pointer-events:none}

/* while the server catches up, dim only the totals — the qty already moved */
.store-cart-foot.store-syncing .store-totals{opacity:.45;transition:opacity .15s}
.store-mini-item{transition:opacity .2s,transform .2s}

/* Inset by ~half a label so every milestone label can be centred on its dot,
   including the one at 100%, without spilling out of the drawer. */
.store-drawer .store-bar{position:relative;padding:0 30px}

/* ---------- side-cart upsells (2026-07-22) ---------- */
.store-ups{flex:none;background:var(--surface);border-top:1px solid var(--line-2);padding:8px 11px 2px}
.store-ups-head{display:flex;align-items:center;justify-content:space-between;padding:0 3px 7px}
.store-ups-head h3{margin:0;font-size:12px;font-weight:800;color:var(--ink)}
.store-ups-nav{display:flex;gap:5px}
.store-ups-nav button{width:24px;height:24px;border-radius:calc(6px * var(--store-roundness));border:1px solid var(--line);background:var(--store-white);color:var(--muted);display:grid;place-items:center;cursor:pointer;font-size:14px;line-height:1;padding:0}
.store-ups-nav button:hover:not(:disabled){border-color:var(--navy);color:var(--navy)}
.store-ups-nav button:disabled{opacity:.32;cursor:default}
.store-ups-view{overflow:hidden}
.store-ups-rail{display:flex;transition:transform .35s cubic-bezier(.4,0,.15,1)}
.store-ups-card{flex:0 0 100%;display:grid;grid-template-columns:60px 1fr auto;gap:10px;align-items:center;padding:2px}
.store-ups-thumb{width:60px;height:60px;border-radius:calc(9px * var(--store-roundness));background:linear-gradient(180deg,var(--stage-1),var(--stage-2));border:1px solid var(--line-2);display:grid;place-items:center;overflow:hidden}
.store-ups-thumb img{width:100%;height:100%;object-fit:contain;padding:4px}
.store-ups-meta{min-width:0}
.store-ups-name{font-size:12px;font-weight:700;line-height:1.25;color:var(--ink);overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical}
.store-ups-price{font-size:12px;font-weight:800;margin-top:1px;color:var(--ink)}
.store-ups-price .from{font-weight:600;color:var(--faint);font-size:10.5px}
.store-ups-price .was{color:var(--faint);text-decoration:line-through;font-weight:600;margin-left:5px;font-size:11px}
.store-ups-unlock{display:inline-block;margin-top:3px;font-size:9px;font-weight:800;letter-spacing:.04em;text-transform:uppercase;background:var(--gold-soft);border:1px solid var(--store-accent-line);color:var(--navy);padding:1px 6px;border-radius:var(--store-radius-pill)}
.store-ups-add{height:32px;padding:0 14px;border:0;border-radius:calc(8px * var(--store-roundness));background:var(--navy);color:var(--store-white);font-family:inherit;font-size:12px;font-weight:800;cursor:pointer;white-space:nowrap}
.store-ups-add:hover{background:var(--navy-deep)}

/* ---------- variation picker sheet ---------- */
/* Body-level overlay (moved out of the drawer by JS so it isn't trapped by the
   drawer's transform). Re-declare tokens since they were inherited from .store-drawer. */
.store-pick{position:fixed;inset:0;background:color-mix(in srgb, var(--store-backdrop) 45%, transparent);display:none;align-items:flex-end;justify-content:center;z-index:100000;
  --navy:var(--store-primary);--navy-deep:var(--store-primary-dark);--gold:var(--store-accent);--gold-deep:var(--store-accent-dark);--gold-soft:var(--store-accent-soft);--ink:var(--store-ink);--muted:var(--store-text-muted);--faint:var(--store-text-subtle);--line:var(--store-line);--line-2:var(--store-line-soft);--surface:var(--store-white);--tint:var(--store-surface);
  font-family:var(--store-font-ui);line-height:1.5;color:var(--store-ink)}
.store-pick.open{display:flex}
.store-pick-sheet{width:100%;max-width:480px;background:var(--store-white);border-radius:var(--store-radius-card) var(--store-radius-card) 0 0;padding:16px 18px 18px;transform:translateY(100%);transition:transform .3s cubic-bezier(.4,0,.1,1);max-height:88%;overflow-y:auto;position:relative}
.store-pick.open .store-pick-sheet{transform:none}
/* Desktop: centre the picker as a modal dialog (mobile keeps the bottom-sheet). */
@media (min-width:768px){
  .store-pick{align-items:center}
  .store-pick-sheet{border-radius:var(--store-radius-card);transform:translateY(26px)}
  .store-pick.open .store-pick-sheet{transform:none}
}
.store-pick-sheet h4{margin:0 0 2px;font-size:14px;font-weight:800;color:var(--ink);padding-right:34px}
.store-psub{font-size:11.5px;color:var(--navy);font-weight:700;margin-bottom:13px}
.store-plabel{font-size:9.5px;font-weight:800;letter-spacing:.1em;text-transform:uppercase;color:var(--faint);margin-bottom:6px}
.store-pills{display:flex;gap:6px;margin-bottom:13px}
.store-pill{flex:1;padding:8px 6px;border:1.5px solid var(--line);border-radius:calc(9px * var(--store-roundness));background:var(--store-white);font-size:12px;font-weight:700;color:var(--ink);cursor:pointer;font-family:inherit;text-align:center}
.store-pill.on{border-color:var(--navy);background:var(--navy);color:var(--store-white)}
.store-pill small{display:block;font-size:9.5px;font-weight:600;opacity:.7;margin-top:1px}
.store-sw{display:grid;grid-template-columns:repeat(5,46px);justify-content:start;gap:10px;margin-bottom:14px}
.store-swatch{height:46px;border-radius:calc(8px * var(--store-roundness));border:2px solid var(--store-swatch-line);cursor:pointer;padding:0;position:relative}
.store-swatch:hover{border-color:var(--store-grey-a9)}
.store-swatch.on{border-color:var(--navy);box-shadow:var(--store-ring-option)}
.store-swatch.on::after{content:"";position:absolute;inset:0;border-radius:calc(4px * var(--store-roundness));border:2px solid color-mix(in srgb, var(--store-white) 90%, transparent)}
.store-swatch.on[data-light="1"]::after{border-color:var(--navy);opacity:.5}
.store-pick-foot{display:flex;align-items:center;gap:11px;border-top:1px solid var(--line-2);padding-top:12px}
.store-pick-price{font-size:18px;font-weight:800;color:var(--ink)}
.store-pick-add{flex:1;height:44px;border:0;border-radius:calc(10px * var(--store-roundness));background:var(--gold);color:var(--navy-deep);font-family:inherit;font-size:13.5px;font-weight:800;cursor:pointer}
.store-pick-add:hover{background:var(--gold-deep)}
.store-pick-add:disabled{opacity:.6;cursor:default}

/* Clip the reward-pill row so the end pill wrapper (left:100%) cannot spill
   past the drawer edge and create a stray horizontal scrollbar (2026-07-25). */
.store-drawer .store-miles{overflow:hidden}

/* ---- Upsell picker fixes (2026-07-26) ---- */
/* Close button had NO css -> rendered as a bordered button in flow above the
   title. Pin it to the title row, top-right, borderless. */
.store-pick-x{position:absolute;top:13px;right:13px;width:30px;height:30px;border:0;background:transparent;color:var(--store-grey-8a);font-size:23px;line-height:1;cursor:pointer;padding:0;border-radius:calc(8px * var(--store-roundness));display:flex;align-items:center;justify-content:center}
.store-pick-x:hover{background:var(--store-surface);color:var(--store-ink)}
/* Option pills blanked to white on hover (global button:hover reset dropped
   the bg/text). Restore a readable hover for both states. */
.store-pill:hover{border-color:var(--navy);background:var(--store-white);color:var(--ink)}
.store-pill.on,.store-pill.on:hover,.store-pill.on:focus{border-color:var(--navy);background:var(--navy);color:var(--store-white)}
/* Picker swatches: attributes.css forces .store-swatch{background:white!important};
   repaint from the inline --storesw var with higher specificity so colours show. */
#storePickRows .store-swatch{background:var(--storesw) !important}
/* Footer compare-at price + clearer border on light (white/yellow) swatches */
.store-pick-was{text-decoration:line-through;color:var(--store-grey-9a);font-weight:600;font-size:14px;margin-right:6px}
#storePickRows .store-swatch[data-light="1"]{border-color:var(--store-field-line-2)}
/* Picker swatches now match the product page: 46px rounded squares. Image
   tiles show the swatch image; selected = white-gap + solid navy ring. */
#storePickRows .store-swatch{width:46px;height:46px;border-radius:calc(11px * var(--store-roundness));border-width:1px}
#storePickRows .store-swatch-img{padding:0;background:var(--store-white) !important}
#storePickRows .store-swatch-img img{width:100%;height:100%;object-fit:cover;border-radius:calc(10px * var(--store-roundness));display:block}
#storePickRows .store-swatch.on{border-color:var(--navy);box-shadow:var(--store-ring-swatch-selected)}
#storePickRows .store-swatch.on::after{display:none}

/* Respect the OS 'reduce motion' setting — disable cart animations (scoped to the cart + drawer, not the whole site). */
@media (prefers-reduced-motion: reduce){
  #store-cart-root, #store-cart-root *, #storeDrawer, #storeDrawer *, #storeScrim{ transition-duration:.01ms !important; animation-duration:.01ms !important; scroll-behavior:auto !important; }
}

/* ---- overlay hardening + touch targets (2026-08-14) ----
   The scrim is full-viewport at z-index 99998. It is only non-blocking today
   because visibility:hidden makes it non-hit-testable; pointer-events makes
   that explicit so a future CSS change cannot turn it into a tap blocker. */
.store-scrim { pointer-events: none; }
.store-scrim.open { pointer-events: auto; }

/* Enlarge touch targets on touch devices WITHOUT changing the visual size,
   by projecting an invisible hit area around each control. */
@media (pointer: coarse) {
  .store-drawer-x { position: relative; }
  .store-drawer-x::after { content: ""; position: absolute; inset: -7px; }      /* 30 -> 44 */

  .store-mini-stepper .store-cqbtn { position: relative; }
  .store-mini-stepper .store-cqbtn::after { content: ""; position: absolute; inset: -8px -6px; }  /* 28 -> 44 */

  .store-ups-prev, .store-ups-next { position: relative; }
  .store-ups-prev::after, .store-ups-next::after { content: ""; position: absolute; inset: -10px; } /* 24 -> 44 */
}

/* Quick-add picker rows are built from each product's own options, so a row can
   hold more choices than fit on one line: let the pills wrap. */
#storePickRows .store-pills{flex-wrap:wrap}
#storePickRows .store-pill{flex:1 1 72px}

/* Card logos (the footer icon row, or any element given the store-card-logos class)
   stay hidden while the store only takes offline payments such as cash on delivery. */
body.store-no-card-payments .store-card-logos{display:none !important}

/* The cart page gives .store-cart-items and .store-cart-empty a panel shadow; the side cart
   uses the same class names without one. */
.store-drawer .store-cart-items, .store-drawer .store-cart-empty { box-shadow: none; }
