/* ============================================================
   SHOP — Formulary card system (approved concept, ported live)
   Self-contained: brand-literal colors, .fx-* namespace.
   Loaded LAST so it wins over shop-light / shop-cc-chrome for
   the member catalogue cards + grid. JS/cart/admin untouched.
   Vial-forward card: blank vial + live crest/name/mg label overlay.
   ============================================================ */
:root{
  --fx-bg2:#0F0C08;--fx-text:#EEE9DF;--fx-text2:#C8BFB0;--fx-muted:#897C6B;--fx-muted2:#A89B89;
  --fx-gold:#C4943A;--fx-gold2:#E2B76A;--fx-gold3:#F2D79A;--fx-sage:#8FAF9A;--fx-blush:#B8836A;
  --fx-line:rgba(196,148,58,.18);--fx-line2:rgba(196,148,58,.36);
  --fx-glass:linear-gradient(165deg,#13100B,#0C0906);
  --fx-goldgrad:linear-gradient(135deg,#C4943A,#F2D79A 55%,#E2B76A);
  --fx-play:'Playfair Display',Georgia,serif;--fx-sans:'Sora','DM Sans',system-ui,sans-serif;
}

/* Container-driven columns: cards stay ~280-330px at ANY window width, so the
   vial/label never shrinks just because the window got wider. auto-fill packs
   as many ~290px columns as the (max 1320px) container allows: 4 wide → 3 → 2 → 1.
   Replaces viewport breakpoints that fought the container cap and made cards
   SMALLER when the screen got bigger. */
#shopContentCompounds.grid,#shopContentSupplies.grid{
  display:grid !important;grid-template-columns:repeat(auto-fill,minmax(min(100%,290px),1fr)) !important;gap:20px !important;margin-bottom:36px !important;
}
@media(max-width:760px){#shopContentCompounds.grid,#shopContentSupplies.grid{gap:12px !important}}

/* ── card ── */
.card.fx-card{
  position:relative;display:flex;flex-direction:column;padding:0 !important;
  border:1px solid var(--fx-line) !important;border-radius:16px !important;background:var(--fx-glass) !important;
  color:var(--fx-text) !important;overflow:hidden;cursor:pointer;
  box-shadow:0 1px 2px rgba(0,0,0,.4),0 16px 38px rgba(0,0,0,.4) !important;
  transition:transform .3s cubic-bezier(.16,1,.3,1),border-color .3s,box-shadow .3s !important;
}
.card.fx-card:hover{transform:translateY(-5px) !important;border-color:var(--fx-line2) !important;
  box-shadow:0 1px 2px rgba(0,0,0,.5),0 28px 56px rgba(0,0,0,.55),0 0 30px rgba(196,148,58,.13) !important}

/* vial stage */
/* vial-blank.png is mostly transparent padding (bottle = ~35% of image width,
   22% empty above it). So we OVERSIZE the image and crop the empty margins with
   overflow:hidden — the bottle fills the card instead of floating in a void. */
.fx-vialwrap{position:relative;display:flex;justify-content:center;align-items:center;overflow:hidden;
  aspect-ratio:1/1.5;padding:0;
  background:radial-gradient(58% 44% at 50% 52%,rgba(196,148,58,.24),transparent 70%),linear-gradient(180deg,rgba(0,0,0,.4),transparent 58%)}
.fx-vial{position:relative;width:172%;max-width:none;line-height:0}
.fx-vial-img{display:block !important;width:100% !important;height:auto !important;filter:drop-shadow(0 16px 26px rgba(0,0,0,.72))}
.fx-vial-custom{width:auto !important;max-width:100% !important;max-height:248px !important;margin:0 auto}
.fx-vial-supply{font-size:54px;line-height:2.6;filter:drop-shadow(0 8px 16px rgba(0,0,0,.5))}
/* PRINTED LABEL — measured band: 45.7-77.8% of image, flat face 34% wide.
   crest + compound name fill the black label; radial mask fades edges to the vial curve. */
/* 3-part label: crest (top), name + dose (center), "Coleman & Company" (base).
   space-between puts the crest in the upper area, the maker mark at the foot. */
/* Center the whole cluster (crest + name + dose + maker mark) as ONE balanced
   group. Consistent for 1-line and 3-line names — no bottom-heavy/sparse variance
   that space-between produced. */
.fx-label{position:absolute;left:50%;transform:translateX(-50%);top:45%;height:33%;width:46%;
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;padding:1% 0;text-align:center;pointer-events:none;
  -webkit-mask:radial-gradient(172% 100% at 50% 50%,#000 73%,transparent 99%);mask:radial-gradient(172% 100% at 50% 50%,#000 73%,transparent 99%)}
.fx-lab-crest{height:auto;width:42%;max-width:48%;object-fit:contain;filter:drop-shadow(0 1px 3px rgba(0,0,0,.85));flex:0 0 auto}
/* flex:0 0 auto — never let the column shrink/clip the name; if the stack is
   too tall, shopFitLabels() shrinks the font (it measures the real height). */
/* width:76% — keep name/dose on the bottle's flat black label face. The band is
   46% of the vial but the printed flat face is ~34%, so text constrained to ~76%
   of the band wraps WITHIN the label instead of spilling onto the curved glass.
   Width-relative, so it holds at every window width (no JS-width guessing). */
.fx-lab-mid{display:flex;flex-direction:column;align-items:center;gap:2px;flex:0 0 auto;width:76%}
/* name + dose auto-fit by shopFitLabels(): font-size set inline per card so the
   full compound name AND dose always fit the band — no clamp, no truncation */
.fx-lab-name{font-family:var(--fx-play);font-weight:600;font-size:14px;letter-spacing:.005em;line-height:1.06;
  color:var(--fx-gold3);text-shadow:0 1px 2px rgba(0,0,0,.95);max-width:100%;
  word-break:normal;overflow-wrap:break-word;hyphens:none}
.fx-lab-mg{font-family:var(--fx-sans);font-weight:700;font-size:9px;letter-spacing:.18em;color:var(--fx-gold2);
  text-transform:uppercase;text-shadow:0 1px 2px rgba(0,0,0,.95);line-height:1}
.fx-lab-brand{font-family:var(--fx-sans);font-weight:600;font-size:6px;letter-spacing:.14em;text-transform:uppercase;
  color:var(--fx-gold2);text-shadow:0 1px 2px rgba(0,0,0,.95);line-height:1;flex:0 0 auto;white-space:nowrap;max-width:84%}
/* header crest replaces the old orb cluster above MEMBER FORMULARY — sized to match other pages */
.header-logo .header-crest{width:clamp(104px,13vw,132px);height:auto;display:block;margin:0 auto .7rem;filter:drop-shadow(0 6px 16px rgba(0,0,0,.6))}

/* body */
.fx-body{padding:14px 16px 0;text-align:left}
.fx-cat{font-family:var(--fx-sans);font-size:9px;letter-spacing:.2em;text-transform:uppercase;color:var(--fx-gold2);
  font-weight:600;display:block;margin-bottom:6px;line-height:1.35;min-height:2.4em}
.fx-name{font-family:var(--fx-play) !important;font-weight:500 !important;font-size:20px !important;line-height:1.05 !important;
  margin:0 0 8px !important;color:var(--fx-text) !important;text-align:left !important}
.fx-dose{display:inline-block;font-family:var(--fx-sans);font-size:10px;letter-spacing:.1em;text-transform:uppercase;
  color:var(--fx-muted2) !important;border:1px solid var(--fx-line);border-radius:50px;padding:3px 10px;margin-bottom:10px}
.fx-note{font-family:var(--fx-sans);font-size:11.5px;color:var(--fx-text2) !important;font-style:italic;line-height:1.45;
  border:none !important;padding:0 !important;margin:0 !important;text-align:left !important;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;min-height:34px}

/* midline + prices/stock */
.fx-rule{height:1px;margin:12px 16px 0;background:linear-gradient(to right,transparent,var(--fx-line2),transparent)}
.fx-foot{display:flex;align-items:flex-start;justify-content:space-between;gap:8px;padding:12px 16px 0;min-height:22px}
.fx-prices{display:flex;gap:14px}
.fx-price{display:flex;flex-direction:column;line-height:1}
.fx-price b{font-family:var(--fx-play);font-weight:500;font-size:17px;
  background:var(--fx-goldgrad);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}
.fx-price span{font-family:var(--fx-sans);font-size:9px;letter-spacing:.12em;text-transform:uppercase;color:var(--fx-muted2);margin-top:3px}
.fx-foot-guest{font-family:var(--fx-sans);font-size:10px;letter-spacing:.08em;text-transform:uppercase;color:var(--fx-muted2)}
.fx-stk{font-family:var(--fx-sans);font-size:9px;letter-spacing:.08em;text-transform:uppercase;padding:4px 9px;border-radius:50px;white-space:nowrap}
.fx-stk.in{color:var(--fx-sage);background:rgba(143,175,154,.1);border:1px solid rgba(143,175,154,.3)}
.fx-stk.low{color:var(--fx-blush);background:rgba(184,131,106,.1);border:1px solid rgba(184,131,106,.3)}

/* actions */
.fx-actions{display:flex;flex-wrap:wrap;gap:7px;align-items:stretch;padding:14px 16px 16px;margin-top:auto}
/* out-of-stock: full-width sage "Request Stock" (group-buy backorder) */
.fx-card .add-btn.fx-restock{flex:1 1 100% !important;width:auto !important;height:auto !important;min-height:0 !important;margin:0 !important;
  background:rgba(143,175,154,.10) !important;border:1px solid rgba(143,175,154,.42) !important;color:var(--fx-sage) !important;
  font-family:var(--fx-sans) !important;font-size:10px !important;font-weight:600 !important;letter-spacing:.14em;text-transform:uppercase;
  padding:11px !important;border-radius:11px !important;box-shadow:none !important}
.fx-card .add-btn.fx-restock::before{content:none !important}
.fx-card .add-btn.fx-restock:hover{background:rgba(143,175,154,.2) !important;filter:none;transform:translateY(-1px)}
.fx-q{flex:1 1 0;min-width:0;display:inline-flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;padding:9px 4px;
  border-radius:11px;border:1px solid var(--fx-line2);background:linear-gradient(160deg,rgba(242,215,154,.12),rgba(196,148,58,.04));
  color:var(--fx-gold3);font-family:var(--fx-sans);font-size:9px;font-weight:600;letter-spacing:.12em;text-transform:uppercase;cursor:pointer;transition:.22s}
.fx-q:hover{background:var(--fx-goldgrad);color:#2A1808;border-color:var(--fx-line2);transform:translateY(-1px)}
.fx-q svg{width:15px;height:15px;stroke:currentColor;fill:none;stroke-width:1.6}
/* small square gold add (overrides inherited .add-btn) */
.fx-card .add-btn{flex:0 0 46px !important;width:46px !important;height:auto !important;min-height:0 !important;margin:0 !important;padding:0 !important;
  border-radius:11px !important;border:1px solid var(--fx-line2) !important;cursor:pointer;display:grid !important;place-items:center !important;
  background:var(--fx-goldgrad) !important;color:#2A1808 !important;font-size:0 !important;
  box-shadow:0 4px 12px rgba(0,0,0,.32) !important;
  transition:filter .2s,transform .2s !important}
.fx-card .add-btn::before{content:'+';font-size:22px !important;font-weight:400;line-height:1;color:#2A1808;font-family:var(--fx-sans)}
.fx-card .add-btn:hover{filter:brightness(1.07);transform:translateY(-1px)}
/* guest 'view pricing' add → wide gold pill instead of square */
.fx-card.is-guest .add-btn{flex:1 1 auto !important;width:auto !important;background:rgba(196,148,58,.08) !important;color:var(--fx-gold3) !important;
  border:1px solid var(--fx-line2) !important;font-size:10px !important;letter-spacing:.14em;text-transform:uppercase;padding:0 16px !important;height:42px !important}
.fx-card.is-guest .add-btn::before{content:none}
.fx-card.is-guest .add-btn:hover{background:var(--fx-goldgrad) !important;color:#2A1808 !important;filter:none;transform:translateY(-1px)}

/* kill the old gold-line underline (concept doesn't use it) */
.fx-card .gold-line{display:none !important}

/* ── members-only gate: kill blue, matched plaque buttons ── */
.shop-gate::before{background:var(--fx-goldgrad) !important}           /* top bar gold not blue */
.shop-gate-eyebrow{color:var(--fx-gold2) !important}
.shop-gate-rule{background:linear-gradient(90deg,transparent,var(--fx-gold2),transparent) !important;width:48px !important;height:1px !important}
.shop-gate-actions{display:flex;gap:18px;justify-content:center;align-items:center;flex-wrap:wrap;margin-top:30px}
/* both buttons = rendered 3D plaque, identical size — Sign in SILVER, Apply GOLD.
   Ancestor-qualified to out-specify shop-maison's .shop-gate-btn:first-of-type (0,2,0). */
.shop-gate .shop-gate-btn--primary,.shop-gate .shop-gate-btn--ghost{
  border:0 !important;box-shadow:none !important;border-radius:0 !important;
  background-repeat:no-repeat !important;background-position:center !important;background-size:100% 100% !important;background-color:transparent !important;
  color:#2A1808 !important;font-family:var(--fx-sans) !important;font-weight:700 !important;
  text-transform:uppercase;letter-spacing:.14em !important;text-shadow:0 1px 0 rgba(255,247,224,.55) !important;
  aspect-ratio:1280/416;width:clamp(210px,22vw,248px) !important;padding:0 6% !important;white-space:nowrap;
  display:inline-flex !important;align-items:center;justify-content:center;
  filter:drop-shadow(0 10px 22px rgba(0,0,0,.5));transition:transform .2s,filter .2s !important;
}
.shop-gate .shop-gate-btn--primary{background-image:url('../logo-kit/buttons/plaque-silver.png') !important}  /* Member sign in = silver */
.shop-gate .shop-gate-btn--ghost{background-image:url('../logo-kit/buttons/plaque-wide.png') !important}        /* Apply via intake = gold */
.shop-gate .shop-gate-btn--primary:hover,.shop-gate .shop-gate-btn--ghost:hover{
  color:#2A1808 !important;transform:translateY(-2px);
  filter:drop-shadow(0 16px 30px rgba(196,148,58,.4)) brightness(1.04) !important;
}
@media(max-width:640px){.shop-gate .shop-gate-btn--primary,.shop-gate .shop-gate-btn--ghost{width:min(78vw,300px) !important}}

/* footer email was cyan (#2EB6E0) — brand bans blue/teal/cyan */
.site-footer .footer-email{color:var(--fx-gold3) !important}
.site-footer .footer-email:hover{color:var(--fx-gold2) !important}

/* ── checkout / stock-request modals: blue -> maison ── */
.shop-checkout-overlay{background:rgba(6,4,2,.66) !important;backdrop-filter:blur(8px) !important;-webkit-backdrop-filter:blur(8px) !important}
.shop-checkout-modal{background:linear-gradient(168deg,var(--fx-bg2),#0C0906) !important;border:1px solid var(--fx-line2) !important;color:var(--fx-text) !important}
.shop-checkout-head{border-bottom:1px solid var(--fx-line) !important}
.shop-checkout-title{font-family:var(--fx-play) !important;color:var(--fx-text) !important;font-weight:500}
.shop-checkout-summary{background:rgba(255,255,255,.03) !important;border:1px solid var(--fx-line) !important;color:var(--fx-text2) !important}
.shop-checkout-summary .row{color:var(--fx-text2) !important;border-bottom-color:var(--fx-line) !important}
.shop-checkout-summary .row:last-child{color:var(--fx-text) !important}
.shop-checkout-summary strong{color:var(--fx-gold3) !important}
.shop-checkout-note,.shop-toolbar-intro{color:var(--fx-muted2) !important}
.shop-detail-title{font-family:var(--fx-play) !important;color:var(--fx-text) !important}
.shop-detail-desc{color:var(--fx-text2) !important}
.shop-detail-close{color:var(--fx-text2) !important}
.shop-checkout-success ol li strong{color:var(--fx-gold3) !important}
.shop-btn-confirm{background:var(--fx-goldgrad) !important;color:#2A1808 !important;border:none !important;
  font-family:var(--fx-sans) !important;font-weight:700 !important;letter-spacing:.12em;text-transform:uppercase;
  box-shadow:inset 0 1px 0 rgba(255,248,228,.6),0 8px 22px -8px rgba(196,148,58,.5) !important;transition:filter .2s,transform .2s}
.shop-btn-confirm:hover{filter:brightness(1.05);transform:translateY(-1px)}

/* ── product detail modal (Protocol/Education): maison + dark vial ──
   #shopDetailOverlay prefix so these beat the white modal rule that was winning. */
#shopDetailOverlay{background:rgba(6,4,2,.82) !important;backdrop-filter:blur(12px) !important;-webkit-backdrop-filter:blur(12px) !important}
#shopDetailOverlay .shop-detail-modal{background:linear-gradient(168deg,var(--fx-bg2),#0C0906) !important;border:1px solid var(--fx-line2) !important;color:var(--fx-text) !important}
#shopDetailOverlay .shop-detail-media{background:radial-gradient(60% 60% at 50% 50%,rgba(196,148,58,.16),transparent 72%) !important;border-bottom:1px solid var(--fx-line) !important}
#shopDetailOverlay .shop-detail-media--supply{background:rgba(255,255,255,.03) !important}
/* shrink-wrap the detail vial so the label centers on the bottle, not the 70% frame */
#shopDetailOverlay .fx-vial-detail{position:relative;width:max-content !important;max-width:100% !important;margin:0 auto;line-height:0}
#shopDetailOverlay .fx-vial-detail .fx-vial-img{height:min(190px,30vh) !important;width:auto !important;display:block !important}
#shopDetailOverlay .shop-detail-body{color:var(--fx-text) !important;background:transparent !important}
#shopDetailOverlay .shop-detail-kicker{color:var(--fx-gold2) !important;letter-spacing:.2em;text-transform:uppercase}
#shopDetailOverlay .shop-detail-title{font-family:var(--fx-play) !important;color:var(--fx-text) !important;font-weight:500}
#shopDetailOverlay .shop-detail-dose,#shopDetailOverlay .shop-detail-desc{color:var(--fx-text2) !important}
#shopDetailOverlay .shop-detail-close{color:var(--fx-text2) !important;background:rgba(255,255,255,.05) !important;border:1px solid var(--fx-line) !important}
#shopDetailOverlay .shop-detail-close:hover{color:var(--fx-gold3) !important;background:rgba(196,148,58,.14) !important}
#shopDetailOverlay .shop-detail-stock-block{background:rgba(255,255,255,.03) !important;border:1px solid var(--fx-line) !important}
#shopDetailOverlay .shop-detail-stock-label{color:var(--fx-muted2) !important}
#shopDetailOverlay .shop-detail-stock-text{color:var(--fx-text) !important}
#shopDetailOverlay .shop-detail-ref{color:var(--fx-muted) !important}
#shopDetailOverlay .shop-detail-price,#shopDetailOverlay .shop-detail-price *{color:var(--fx-gold3) !important}
#shopDetailOverlay .shop-detail-purchase{border-top:1px solid var(--fx-line) !important}
#shopDetailOverlay .shop-kv-btn{background:rgba(255,255,255,.04) !important;border:1px solid var(--fx-line) !important;color:var(--fx-text2) !important}
#shopDetailOverlay .shop-kv-btn.active{background:var(--fx-goldgrad) !important;border-color:var(--fx-line2) !important;color:#2A1808 !important}
#shopDetailOverlay .shop-qty-btn{background:rgba(196,148,58,.08) !important;border:1px solid var(--fx-line2) !important;color:var(--fx-gold3) !important}
#shopDetailOverlay .shop-qty-btn:hover{background:var(--fx-goldgrad) !important;color:#2A1808 !important}
#shopDetailOverlay .shop-qty-val,#shopDetailOverlay .shop-qty-row span{color:var(--fx-text) !important}
#shopDetailOverlay .shop-btn-add{background:var(--fx-goldgrad) !important;color:#2A1808 !important;border:none !important;
  font-family:var(--fx-sans) !important;font-weight:700 !important;letter-spacing:.1em;text-transform:uppercase;
  box-shadow:inset 0 1px 0 rgba(255,248,228,.6),0 8px 22px -8px rgba(196,148,58,.5) !important}
#shopDetailOverlay .shop-btn-add:hover{filter:brightness(1.05)}
#shopDetailOverlay .shop-btn-add[disabled]{opacity:.45 !important;filter:grayscale(.3)}
#shopDetailOverlay .shop-btn-secondary{background:rgba(196,148,58,.08) !important;border:1px solid var(--fx-line2) !important;color:var(--fx-gold3) !important}
#shopDetailOverlay .shop-btn-secondary:hover{background:var(--fx-goldgrad) !important;color:#2A1808 !important}
#shopDetailOverlay .shop-detail-guest-note{color:var(--fx-text2) !important}
/* education / protocol panel: dark maison instead of cream */
#shopDetailOverlay #shopDetailEdu{background:linear-gradient(165deg,#13100B,#0C0906) !important;border:1px solid var(--fx-line2) !important;color:var(--fx-text2) !important}
#shopDetailOverlay #shopDetailEduContent{color:var(--fx-text2) !important;font-family:var(--fx-sans) !important}
#shopDetailOverlay #shopDetailEdu a{color:var(--fx-gold2) !important;border-bottom-color:var(--fx-line2) !important}
#shopDetailOverlay .shop-edu-tab{border-color:var(--fx-line) !important;background:rgba(255,255,255,.04) !important;color:var(--fx-text2) !important}
#shopDetailOverlay .shop-edu-tab.is-active,#shopDetailOverlay .shop-edu-tab.active{background:var(--fx-goldgrad) !important;color:#2A1808 !important;border-color:var(--fx-line2) !important}
