/* ============================================================
   PinPoint Peptides — styles
   ============================================================ */
:root {
  --bg: #f6f8fa;
  --surface: #ffffff;
  --surface-2: #f1f5f9;
  --ink: #0f172a;
  --ink-2: #475569;
  --ink-3: #94a3b8;
  --line: #e2e8f0;
  --brand: #0f766e;
  --brand-2: #14b8a6;
  --brand-ink: #134e4a;
  --accent: #0ea5e9;
  --danger: #dc2626;
  --ok: #16a34a;
  --warn: #b45309;
  --shadow: 0 1px 2px rgba(15,23,42,.06), 0 8px 24px rgba(15,23,42,.06);
  --shadow-lg: 0 24px 60px rgba(15,23,42,.20);
  --radius: 14px;
  --radius-sm: 9px;
  --maxw: 1680px;
  --maxw-text: 860px;   /* comfortable centred measure for prose blocks */
  --cat-healing-recovery: #14b8a6;
  --cat-gh-secretagogues: #3b82f6;
  --cat-metabolic-weight: #8b5cf6;
  --cat-cognitive-nootropic: #6366f1;
  --cat-longevity-anti-aging: #10b981;
  --cat-cosmetic-wellness: #ec4899;
}

* { box-sizing: border-box; }
/* The [hidden] attribute must always win over component display rules
   (.gate and .cart-count set display, which would otherwise keep them visible). */
[hidden] { display: none !important; }

/* Form controls must follow the theme. Without this they fall back to the
   browser default (black text on white), which is unreadable in dark mode.
   Checkboxes and radios are excluded so they keep their native appearance. */
input:not([type="checkbox"]):not([type="radio"]),
textarea,
select {
  color: var(--ink);
  background-color: var(--surface);
}
input::placeholder,
textarea::placeholder { color: var(--ink-3); opacity: 1; }
/* Keep autofilled fields readable too (Chrome forces its own yellow/white). */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--ink);
  -webkit-box-shadow: 0 0 0 1000px var(--surface) inset;
  caret-color: var(--ink);
}
html { scroll-behavior: smooth; scroll-padding-top: 120px; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.02em; }
h2 { font-size: clamp(1.4rem, 2.4vw, 2rem); }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  font: inherit; font-weight: 600; cursor: pointer;
  border: 1px solid transparent; border-radius: var(--radius-sm);
  padding: .7em 1.2em; transition: .15s ease; white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-ink); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-block { width: 100%; }
.btn-sm { padding: .45em .8em; font-size: .85rem; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

/* ---------- top bar + header ---------- */
.topbar {
  background: var(--brand-ink); color: #d1faf3; text-align: center;
  font-size: .8rem; padding: 6px 12px; letter-spacing: .01em;
}
.header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255,255,255,.9); backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 18px; padding: 12px 20px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 9px; flex: none;
  background: linear-gradient(135deg, var(--brand-2), var(--brand));
  color: #fff; display: grid; place-items: center; font-weight: 800;
}
.brand-name { font-size: 1.15rem; }
.brand-name span { color: var(--brand); }

.search { position: relative; flex: 1; max-width: 520px; }
.search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--ink-3); }
#search {
  width: 100%; font: inherit; padding: 10px 38px 10px 38px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface-2);
  transition: .15s;
}
#search:focus { outline: none; border-color: var(--brand-2); background: #fff; box-shadow: 0 0 0 3px rgba(20,184,166,.15); }
.search-clear { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); border: none; background: var(--ink-3); color: #fff; width: 20px; height: 20px; border-radius: 50%; cursor: pointer; line-height: 1; }

.nav { display: flex; align-items: center; gap: 6px; }
.nav > a { padding: 8px 10px; border-radius: 8px; font-weight: 600; color: var(--ink-2); }
.nav > a:hover { background: var(--surface-2); color: var(--ink); }
.icon-btn {
  position: relative; border: 1px solid var(--line); background: var(--surface);
  width: 40px; height: 40px; border-radius: 10px; cursor: pointer; color: var(--ink);
  display: grid; place-items: center;
}
.icon-btn:hover { background: var(--surface-2); }
.icon-btn svg { width: 20px; height: 20px; }
.cart-count {
  position: absolute; top: -6px; right: -6px; background: var(--brand);
  color: #fff; font-size: .7rem; font-weight: 700; min-width: 18px; height: 18px;
  border-radius: 999px; display: grid; place-items: center; padding: 0 5px;
}

/* ---------- hero ---------- */
.hero { background: linear-gradient(180deg, #ecfeff 0%, var(--bg) 100%); border-bottom: 1px solid var(--line); }
.hero-inner { display: grid; grid-template-columns: 1.3fr .7fr; gap: 32px; align-items: center; padding: 56px 20px; }
.hero-eyebrow { color: var(--brand); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; margin: 0 0 10px; }
.hero h1 { font-size: clamp(2rem, 4vw, 3.1rem); }
.hero-sub { color: var(--ink-2); font-size: 1.1rem; max-width: 46ch; margin: .4em 0 0; }
.hero-actions { display: flex; gap: 12px; margin: 24px 0; flex-wrap: wrap; }
.hero-badges { display: flex; gap: 26px; flex-wrap: wrap; margin-top: 8px; }
.hbadge { display: flex; flex-direction: column; }
.hbadge strong { font-size: 1.3rem; color: var(--brand-ink); }
.hbadge span { font-size: .8rem; color: var(--ink-2); }
.hero-art { position: relative; display: grid; place-items: center; min-height: 240px; }
.hero-glow { position: absolute; width: 240px; height: 240px; border-radius: 50%; background: radial-gradient(circle, rgba(45,212,191,.45), transparent 70%); filter: blur(8px); }
.hero-vial { position: relative; width: 180px; filter: drop-shadow(0 18px 30px rgba(15,118,110,.3)); }

/* ---------- shop ---------- */
.main { padding: 40px 20px 64px; }
.shop-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }
.shop-controls { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-2);
  padding: 7px 14px; border-radius: 999px; cursor: pointer; font-size: .88rem; font-weight: 600; transition: .15s;
}
.chip:hover { border-color: var(--brand-2); color: var(--ink); }
.chip.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.select { font: inherit; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); cursor: pointer; }
.results-meta { color: var(--ink-2); font-size: .9rem; margin: 6px 0 18px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(360px, 100%), 1fr)); gap: 24px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column; cursor: pointer;
  transition: .18s ease; box-shadow: var(--shadow);
}
.card:hover { transform: translateY(-3px); border-color: var(--brand-2); box-shadow: 0 14px 34px rgba(15,23,42,.12); }
.card-media { position: relative; height: 190px; display: grid; place-items: center; background: linear-gradient(160deg, var(--surface-2), #fff); border-bottom: 1px solid var(--line); }
.card-media svg { height: 140px; }
.badge { position: absolute; top: 10px; left: 10px; background: var(--brand); color: #fff; font-size: .68rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; letter-spacing: .03em; text-transform: uppercase; }
.cat-tag { position: absolute; top: 10px; right: 10px; font-size: .68rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; color: #fff; }
.card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.card-title { font-size: 1.18rem; font-weight: 700; margin: 0; }
.card-sub { color: var(--brand); font-size: .82rem; font-weight: 600; margin: 3px 0 10px; }
.card-desc { color: var(--ink-2); font-size: .92rem; margin: 0 0 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.price { font-size: 1.05rem; }
.card-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.price { font-weight: 800; color: var(--ink); }
.price small { font-weight: 600; color: var(--ink-3); font-size: .72rem; }

/* ---------- info sections ---------- */
.section { padding: 56px 0; }
.section-alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; align-items: start; }
.info-cards { display: grid; gap: 16px; }
.info-card { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.info-card h3 { margin: 0 0 6px; }
.prose { color: var(--ink-2); }
.prose p { margin: 0 0 .8em; }
.faq { display: grid; gap: 10px; max-width: 820px; }
.faq-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 4px 18px; }
.faq-item summary { cursor: pointer; font-weight: 600; padding: 14px 0; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; color: var(--brand); font-size: 1.3rem; line-height: 1; }
.faq-item[open] summary::after { content: "–"; }
.faq-item p { margin: 0 0 14px; color: var(--ink-2); }

/* ---------- footer ---------- */
.footer { background: #0b1220; color: #cbd5e1; padding: 40px 0; margin-top: 20px; }
.footer-inner { display: grid; gap: 16px; }
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-brand strong { color: #fff; font-size: 1.1rem; }
.footer-brand p { margin: 0; font-size: .85rem; color: var(--ink-3); }
.footer-disclaimer { background: rgba(180,83,9,.18); border: 1px solid rgba(245,158,11,.35); color: #fde68a; padding: 12px 16px; border-radius: 10px; font-size: .85rem; }
.footer-legal { font-size: .78rem; color: var(--ink-3); margin: 0; }

/* ---------- modals ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 60; background: rgba(8,15,30,.55);
  display: flex; align-items: flex-start; justify-content: center; padding: 4vh 16px;
  overflow-y: auto; animation: fade .15s ease;
}
@keyframes fade { from { opacity: 0; } }
.modal {
  background: var(--surface); border-radius: 18px; width: 100%; max-width: 560px;
  box-shadow: var(--shadow-lg); animation: pop .18s ease; overflow: hidden;
}
.modal-lg { max-width: 760px; }
@keyframes pop { from { transform: translateY(12px) scale(.98); opacity: 0; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.modal-head h3 { margin: 0; }
.modal-body { padding: 22px; }
.modal-close { border: none; background: var(--surface-2); width: 34px; height: 34px; border-radius: 9px; font-size: 1.3rem; cursor: pointer; color: var(--ink-2); line-height: 1; }
.modal-close:hover { background: var(--line); }

/* cart drawer feel */
.cart-list { display: grid; gap: 12px; margin-bottom: 16px; }
.cart-row { display: grid; grid-template-columns: 54px 1fr auto; gap: 12px; align-items: center; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.cart-row .thumb { width: 54px; height: 54px; border-radius: 9px; background: var(--surface-2); display: grid; place-items: center; }
.cart-row .thumb svg { height: 42px; }
.cart-row .ci-name { font-weight: 600; font-size: .92rem; }
.cart-row .ci-meta { font-size: .8rem; color: var(--ink-2); }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.qty button { border: none; background: var(--surface-2); width: 28px; height: 28px; cursor: pointer; font-size: 1rem; color: var(--ink); }
.qty button:hover { background: var(--line); }
.qty span { min-width: 30px; text-align: center; font-weight: 600; font-size: .9rem; }
.link-danger { background: none; border: none; color: var(--danger); cursor: pointer; font-size: .8rem; padding: 4px 0; }
.cart-summary { display: flex; justify-content: space-between; align-items: center; font-size: 1.1rem; font-weight: 800; margin: 8px 0 16px; }
.empty-cart { text-align: center; color: var(--ink-2); padding: 30px 0; }

/* product detail */
.pd { display: grid; grid-template-columns: 200px 1fr; gap: 22px; }
.pd-media { background: linear-gradient(160deg, var(--surface-2), #fff); border: 1px solid var(--line); border-radius: 12px; display: grid; place-items: center; padding: 16px; align-self: start; }
.pd-media svg { height: 150px; }
.pd h3 { margin: 0; font-size: 1.4rem; }
.pd .card-sub { font-size: .9rem; }
.pd-desc { color: var(--ink-2); font-size: .92rem; margin: 10px 0 16px; }
.spec { width: 100%; border-collapse: collapse; font-size: .82rem; margin-bottom: 16px; }
.spec td { padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.spec td:first-child { color: var(--ink-2); width: 42%; font-weight: 600; }
.spec td:last-child { word-break: break-word; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .78rem; }
.variant-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 16px; }
.variant {
  border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 8px 12px;
  cursor: pointer; text-align: center; min-width: 84px;
}
.variant:hover { border-color: var(--brand-2); }
.variant.active { border-color: var(--brand); background: #ecfdf8; box-shadow: 0 0 0 2px rgba(20,184,166,.2); }
.variant .vsize { font-weight: 700; font-size: .9rem; }
.variant .vprice { font-size: .82rem; color: var(--ink-2); }
.tags { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 14px; }
.tag { background: var(--surface-2); color: var(--ink-2); font-size: .72rem; padding: 3px 9px; border-radius: 999px; font-weight: 600; }
.add-row { display: flex; gap: 10px; align-items: center; }
.note { font-size: .78rem; color: var(--warn); margin-top: 14px; }

/* forms */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 5px; color: var(--ink-2); }
.field input { width: 100%; font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); }
.field input:focus { outline: none; border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(20,184,166,.15); }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-error { background: #fef2f2; color: var(--danger); border: 1px solid #fecaca; border-radius: 9px; padding: 9px 12px; font-size: .85rem; margin-bottom: 12px; }
.form-switch { text-align: center; font-size: .88rem; color: var(--ink-2); margin-top: 14px; }
.form-switch button { background: none; border: none; color: var(--brand); font-weight: 700; cursor: pointer; }

/* orders / tables */
.order-card { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-bottom: 12px; }
.order-top { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-size: .85rem; color: var(--ink-2); margin-bottom: 8px; }
.order-items { font-size: .88rem; }
.order-items div { display: flex; justify-content: space-between; padding: 3px 0; }
.status { font-size: .72rem; font-weight: 700; padding: 2px 9px; border-radius: 999px; text-transform: capitalize; }
.status.paid { background: #dcfce7; color: var(--ok); }
.status.pending { background: #fef9c3; color: var(--warn); }
.status.failed { background: #fee2e2; color: var(--danger); }
.table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.table th, .table td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); }
.table th { color: var(--ink-2); font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; }
.success-check { width: 60px; height: 60px; border-radius: 50%; background: #dcfce7; color: var(--ok); display: grid; place-items: center; font-size: 2rem; margin: 0 auto 14px; }

/* admin panel tabs */
.admin-tabs { display: flex; align-items: center; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; }
.atab { border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); padding: 7px 14px; border-radius: 999px; cursor: pointer; font-weight: 600; font-size: .88rem; }
.atab:hover { border-color: var(--brand-2); color: var(--ink); }
.atab.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.admin-tabs .btn-sm { margin-left: auto; }
.staff-link { background: none; border: none; color: var(--ink-3); cursor: pointer; font-size: .78rem; text-decoration: underline; padding: 0; margin-left: 6px; }
.staff-link:hover { color: #cbd5e1; }

/* stock indicators (storefront) */
.stock-line { margin: 0 0 10px; }
.stock-pill { display: inline-block; font-size: .72rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.stock-pill.oos { background: #fee2e2; color: var(--danger); }
.stock-pill.low { background: #fef3c7; color: var(--warn); }
.stock-pill.instock { background: #dcfce7; color: var(--ok); }
/* Clickable stock pill — admin products table only (the storefront keeps
   plain, non-interactive spans). */
.stock-toggle {
  border: 1px solid transparent; cursor: pointer; font: inherit;
  font-size: .72rem; font-weight: 700; line-height: 1.5;
  transition: filter .15s, box-shadow .15s, transform .1s;
}
.stock-toggle:hover:not(:disabled) { filter: brightness(.94); box-shadow: 0 1px 4px rgba(15,23,42,.16); }
.stock-toggle:active:not(:disabled) { transform: translateY(1px); }
.stock-toggle:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.stock-toggle:disabled { opacity: .55; cursor: progress; }
[data-theme="dark"] .stock-toggle:hover:not(:disabled) { filter: brightness(1.14); }

.card-oos .card-media svg { opacity: .4; }
.card-oos .card-title, .card-oos .card-desc { opacity: .7; }
.oos-overlay { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); background: rgba(15,23,42,.82); color: #fff; font-size: .8rem; font-weight: 700; padding: 6px 14px; border-radius: 999px; z-index: 2; }

/* admin page */
.admin-body { background: var(--bg); }
.admin-header { background: #0b1220; color: #e2e8f0; position: sticky; top: 0; z-index: 30; }
.admin-header-inner { max-width: 1100px; margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.admin-header .brand { color: #fff; display: flex; align-items: center; gap: 10px; font-weight: 800; }
.admin-header .brand-name span { color: var(--brand-2); }
.admin-tag { background: var(--brand); color: #fff; font-size: .7rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; letter-spacing: .04em; text-transform: uppercase; }
.admin-actions { display: flex; gap: 8px; }
.admin-main { max-width: 1100px; margin: 0 auto; padding: 24px 20px 60px; }
.admin-gate { display: grid; place-items: center; padding: 6vh 0; }
.admin-gate .gate-card { box-shadow: var(--shadow); text-align: center; }
.admin-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.products-table td { vertical-align: middle; }
.products-table .row-actions { white-space: nowrap; text-align: right; }
.star { background: none; border: none; cursor: pointer; font-size: 1.25rem; line-height: 1; color: var(--ink-3); }
.star.on { color: #f59e0b; }
.checkbox-field label { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--ink); cursor: pointer; margin: 0; }
.checkbox-field input { width: auto; }
.field textarea { width: 100%; font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); resize: vertical; }
.field textarea:focus { outline: none; border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(20,184,166,.15); }
.vrow { display: grid; grid-template-columns: 1.2fr .8fr 1fr auto; gap: 8px; margin-bottom: 8px; }
.vrow input { width: 100%; font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; }
.adv { margin: 14px 0; border: 1px solid var(--line); border-radius: 9px; padding: 0 14px; }
.adv summary { cursor: pointer; font-weight: 600; padding: 12px 0; color: var(--ink-2); }
@media (max-width: 600px) { .vrow { grid-template-columns: 1fr 1fr; } .products-table th:nth-child(2), .products-table td:nth-child(2) { display: none; } }
.center { text-align: center; }
.muted { color: var(--ink-2); }

/* gate */
.gate { position: fixed; inset: 0; z-index: 80; background: rgba(8,15,30,.7); backdrop-filter: blur(4px); display: grid; place-items: center; padding: 20px; }
.gate-card { background: var(--surface); border-radius: 18px; max-width: 460px; padding: 32px; text-align: center; box-shadow: var(--shadow-lg); }
.gate-icon { font-size: 2.4rem; }
.gate-card h2 { margin: 8px 0; }
.gate-card p { color: var(--ink-2); font-size: .92rem; }
.gate-actions { display: flex; gap: 10px; justify-content: center; margin-top: 18px; }

/* toast */
.toast-root { position: fixed; z-index: 90; bottom: 20px; left: 50%; transform: translateX(-50%); display: grid; gap: 8px; width: max-content; max-width: 92vw; }
.toast { background: var(--ink); color: #fff; padding: 11px 16px; border-radius: 10px; font-size: .88rem; box-shadow: var(--shadow-lg); animation: pop .18s ease; }
.toast.ok { background: #064e3b; }
.toast.err { background: #7f1d1d; }

/* responsive */
@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-art { order: -1; min-height: 160px; }
  .hero-vial { width: 120px; }
  .info-grid { grid-template-columns: 1fr; }
  .pd { grid-template-columns: 1fr; }
  .pd-media { max-width: 200px; margin: 0 auto; }
}
@media (max-width: 680px) {
  .nav > a[data-nav="about"], .nav > a[data-nav="faq"] { display: none; }
  .header-inner { flex-wrap: wrap; }
  .search { order: 3; max-width: none; flex-basis: 100%; }
  .row-2 { grid-template-columns: 1fr; }
}

/* ============================================================
   Improvements: a11y, trust, merchandising, skeletons, dark mode
   ============================================================ */

/* accessibility */
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
.icon-btn:focus-visible, .chip.active:focus-visible, .badge:focus-visible { outline-color: var(--brand-2); }
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 200; background: var(--brand); color: #fff; padding: 10px 16px; font-weight: 700; border-radius: 0 0 10px 0; }
.skip-link:focus { left: 0; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* section eyebrow */
.section-eyebrow { color: var(--brand); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: .75rem; margin: 0 0 6px; }

/* trust bar */
.trustbar { background: var(--surface); border-bottom: 1px solid var(--line); }
.trustbar-inner { display: flex; flex-wrap: wrap; gap: 10px 30px; padding: 14px 20px; justify-content: center; }
.trust { display: flex; align-items: center; gap: 8px; font-size: .86rem; font-weight: 600; color: var(--ink-2); }
.trust-ic { font-size: 1.05rem; }
@media (max-width: 680px) { .trustbar-inner { justify-content: flex-start; gap: 8px 18px; } .trust { font-size: .8rem; } }

/* card extras */
.card-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 10px; }
.card-sizes { font-size: .78rem; color: var(--ink-2); font-weight: 600; }
.price-range { font-weight: 800; color: var(--ink); }

/* loading skeletons */
#grid.is-loading { min-height: 420px; }
.card-skeleton { pointer-events: none; }
.skeleton { position: relative; overflow: hidden; background: var(--surface-2); }
.skeleton::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255,255,255,.55), transparent); animation: shimmer 1.3s infinite; }
.skel-line { height: 12px; border-radius: 6px; margin: 0 0 9px; }
@keyframes shimmer { 100% { transform: translateX(100%); } }

/* related products (in detail modal) */
.related { margin-top: 20px; border-top: 1px solid var(--line); padding-top: 16px; }
.related h4 { margin: 0 0 12px; font-size: 1rem; }
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.related-card { border: 1px solid var(--line); border-radius: 10px; padding: 10px 8px; cursor: pointer; text-align: center; transition: .15s; background: var(--surface); }
.related-card:hover { border-color: var(--brand-2); transform: translateY(-2px); }
.related-card svg { height: 64px; margin: 0 auto 4px; }
.related-card .rc-name { font-size: .76rem; font-weight: 700; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.related-card .rc-price { font-size: .74rem; color: var(--ink-2); margin-top: 2px; }

/* checkout reassurance + summary */
.co-summary { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin-bottom: 14px; }
.co-summary .order-items div { display: flex; justify-content: space-between; padding: 3px 0; font-size: .88rem; }
.co-reassure { display: flex; align-items: flex-start; gap: 8px; font-size: .82rem; color: var(--ink-2); margin: 12px 0 0; }
.co-reassure svg { width: 16px; height: 16px; flex: none; margin-top: 1px; color: var(--brand); }

/* success: account nudge */
.acct-nudge { background: var(--surface-2); border: 1px dashed var(--line); border-radius: 10px; padding: 12px 14px; margin: 14px 0; font-size: .88rem; }

/* newsletter */
.footer-top { display: flex; justify-content: space-between; gap: 28px; flex-wrap: wrap; align-items: flex-start; }
.newsletter { max-width: 400px; flex: 1; min-width: 260px; }
.newsletter > label { display: block; font-size: .85rem; color: #cbd5e1; margin-bottom: 8px; font-weight: 600; }
.newsletter-row { display: flex; gap: 8px; }
.newsletter-row input { flex: 1; font: inherit; padding: 10px 12px; border: 1px solid rgba(255,255,255,.16); border-radius: 9px; background: rgba(255,255,255,.06); color: #fff; }
.newsletter-row input::placeholder { color: #64748b; }
.newsletter-msg { font-size: .82rem; color: #6ee7b7; margin: 8px 0 0; }

/* sticky mobile cart bar */
.mcart { display: none; }
@media (max-width: 680px) {
  .mcart { display: flex; position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 50; align-items: center; justify-content: space-between; gap: 12px; background: var(--brand); color: #fff; border: none; border-radius: 12px; padding: 14px 18px; font: inherit; font-weight: 700; cursor: pointer; box-shadow: var(--shadow-lg); }
}

/* ---------- customer account portal ---------- */
.account-main { padding: 34px 20px 70px; min-height: 60vh; }

.auth-wrap { display: grid; grid-template-columns: minmax(0, 460px) 1fr; gap: 40px; align-items: start; }
.auth-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.auth-title { margin: 0 0 4px; font-size: 1.7rem; }
.auth-sub { margin: 0 0 20px; font-size: .92rem; }
.atab-row { display: flex; gap: 8px; margin-bottom: 18px; }
.atab-row .atab { flex: 1; }
.auth-notice { background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; border-radius: 9px; padding: 9px 12px; font-size: .85rem; margin-bottom: 12px; }
.auth-notice.bad { background: #fef2f2; border-color: #fecaca; color: var(--danger); }

.auth-aside { padding-top: 8px; }
.auth-aside h2 { font-size: 1.1rem; margin-bottom: 14px; }
.perks { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.perks li { display: flex; gap: 12px; align-items: flex-start; font-size: .9rem; color: var(--ink-2); }
.perks li span { font-size: 1.3rem; line-height: 1; }
.perks strong { color: var(--ink); }

.dash-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.dash-head h1 { margin: 0 0 4px; font-size: 1.8rem; }
.dash-head-actions { display: flex; gap: 8px; }
.dash-grid { display: grid; grid-template-columns: 220px 1fr; gap: 28px; align-items: start; }
.dash-nav { display: grid; gap: 4px; position: sticky; top: 92px; }
.dnav { text-align: left; border: none; background: none; font: inherit; font-weight: 600; color: var(--ink-2); padding: 10px 14px; border-radius: 9px; cursor: pointer; }
.dnav:hover { background: var(--surface-2); color: var(--ink); }
.dnav.active { background: var(--brand); color: #fff; }
.dash-panes .pane { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.dash-panes h2 { font-size: 1.2rem; margin-bottom: 14px; }
.dash-panes .order-card { background: var(--bg); }

@media (max-width: 880px) {
  .auth-wrap { grid-template-columns: 1fr; gap: 28px; }
  .dash-grid { grid-template-columns: 1fr; gap: 16px; }
  .dash-nav { position: static; grid-auto-flow: column; grid-auto-columns: max-content; overflow-x: auto; gap: 6px; padding-bottom: 4px; }
  .dnav { white-space: nowrap; }
}

/* ============================================================
   Centred layout — symmetrical, calmer composition.
   The product grid stays full width; prose sits in a narrower
   centred column so long lines never sprawl across the screen.
   ============================================================ */

/* ---- hero: single centred column, art above the text ---- */
.hero-inner { grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 8px; padding: 48px 20px 56px; }
.hero-art { order: -1; min-height: 0; }
.hero-vial { width: 132px; }
.hero-glow { width: 190px; height: 190px; }
.hero-text { max-width: var(--maxw-text); }
.hero-sub { margin-left: auto; margin-right: auto; }
.hero-actions { justify-content: center; }
.hero-badges { justify-content: center; gap: 0; margin-top: 14px; }
.hbadge { align-items: center; padding: 0 26px; }
.hbadge + .hbadge { border-left: 1px solid var(--line); }

/* ---- section headers ---- */
.section > .container > .section-eyebrow,
.section > .container > h2 { text-align: center; }
.section > .container > h2 { margin-bottom: 22px; }

/* ---- shop header + controls ---- */
.shop-head { flex-direction: column; align-items: center; text-align: center; gap: 14px; margin-bottom: 4px; }
.shop-controls { justify-content: center; }
.chips { justify-content: center; }
.results-meta { text-align: center; margin-bottom: 24px; }
.empty { text-align: center; padding: 40px 0; display: grid; gap: 14px; justify-items: center; }

/* ---- product cards ---- */
/* text-align only — align-items:center would shrink-wrap the description
   instead of letting it wrap across the full card width */
.card-body { text-align: center; }
.card-meta { justify-content: center; }
.card-foot { flex-direction: column; align-items: stretch; gap: 10px; }

/* ---- about / info ---- */
.info-grid { grid-template-columns: 1fr; max-width: var(--maxw-text); margin: 0 auto; text-align: center; }
.info-cards { grid-template-columns: 1fr 1fr; }
.info-card { text-align: center; }

/* ---- faq: centred block, rows stay left-aligned to stay readable ---- */
.faq { margin-left: auto; margin-right: auto; }

/* ---- footer ---- */
.footer-inner { text-align: center; justify-items: center; }
.footer-top { flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 24px; }
.footer-brand { flex-direction: column; text-align: center; gap: 8px; }
.newsletter { margin: 0 auto; }
.footer-disclaimer { max-width: 900px; }

/* ---- account portal: centred sign-in ---- */
.auth-wrap { grid-template-columns: 1fr; max-width: 520px; margin: 0 auto; gap: 30px; }
.auth-card { text-align: center; }
.auth-card .field label { text-align: left; }   /* labels stay left for legibility */
.auth-aside { text-align: center; }
.perks li { text-align: left; }
.dash-head { justify-content: center; text-align: center; }
.dash-head-actions { justify-content: center; }

@media (max-width: 700px) {
  .info-cards { grid-template-columns: 1fr; }
  .hero-badges { flex-direction: column; gap: 14px; }
  .hbadge + .hbadge { border-left: none; }
}

/* ---------- offers, opt-in, verification ---------- */
.offer-strip {
  background: linear-gradient(135deg, #ecfdf5, #d1fae5); border: 1px solid #a7f3d0;
  color: #065f46; border-radius: 10px; padding: 10px 14px; font-size: .88rem;
  font-weight: 700; text-align: center; margin: 0 0 16px;
}
.check-line {
  display: flex; align-items: flex-start; gap: 10px; font-size: .86rem;
  color: var(--ink-2); margin: 4px 0 16px; cursor: pointer; text-align: left; line-height: 1.45;
}
.check-line input { width: auto; margin-top: 2px; flex: none; }

.verify-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  background: #fffbeb; border: 1px solid #fde68a; color: #92400e;
  border-radius: var(--radius); padding: 16px 20px; margin-bottom: 22px; text-align: left;
}
.verify-banner p { margin: 4px 0 0; font-size: .87rem; }

/* first-visit welcome offer */
.welcome-offer { text-align: center; }
.welcome-badge {
  display: inline-block; background: var(--brand); color: #fff; font-weight: 800;
  font-size: 1.05rem; letter-spacing: .04em; padding: 8px 18px; border-radius: 999px; margin-bottom: 14px;
}
.welcome-offer h3 { margin: 0 0 8px; font-size: 1.45rem; }
.welcome-perks { list-style: none; margin: 16px 0 20px; padding: 0; display: grid; gap: 8px; text-align: left; }
.welcome-perks li { font-size: .88rem; color: var(--ink-2); }

/* preset picker (admin > add product) */
.preset-head { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.preset-head input { flex: 1; min-width: 220px; font: inherit; padding: 10px 14px; border: 1px solid var(--line); border-radius: 999px; }
.preset-head input:focus { outline: none; border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(20,184,166,.15); }
.preset-count { margin: 0 0 14px; font-size: .85rem; }
.preset-group { margin-bottom: 20px; }
.preset-group h4 { margin: 0 0 10px; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--brand); }
.preset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.preset-card {
  display: flex; flex-direction: column; gap: 2px; text-align: left; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); border-radius: 10px;
  padding: 12px 14px; font: inherit; transition: .15s;
}
.preset-card:hover { border-color: var(--brand); background: rgba(20,184,166,.07); transform: translateY(-1px); }
.preset-card.added { opacity: .62; }
.pc-name { font-weight: 700; font-size: .92rem; color: var(--ink); }
.pc-name em { font-style: normal; font-size: .68rem; font-weight: 700; color: var(--ok); background: #dcfce7; padding: 1px 6px; border-radius: 999px; margin-left: 4px; }
.pc-sub { font-size: .78rem; color: var(--brand); }
.pc-meta { font-size: .75rem; color: var(--ink-2); margin-top: 4px; }
[data-theme="dark"] .pc-name em { background: rgba(16,185,129,.18); color: #6ee7b7; }
.preset-fail { padding: 22px 4px; }
.preset-fail p { margin: 0 0 10px; }
.preset-fail .btn { margin-right: 6px; }

/* AI product writer */
.ai-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: -4px 0 4px; }
.ai-note { font-size: .78rem; }
.btn-ai {
  background: linear-gradient(135deg, #6366f1, #14b8a6); color: #fff; border: none;
  font-weight: 700;
}
.btn-ai:hover:not(:disabled) { filter: brightness(1.08); }
.btn-ai:disabled { opacity: .6; cursor: progress; }

.preset-lab { border-top: 1px solid var(--line); margin-top: 18px; padding-top: 14px; }
.preset-lab summary { cursor: pointer; font-weight: 700; font-size: .85rem; color: var(--ink-2); padding: 6px 0; }
.preset-lab summary:hover { color: var(--ink); }

/* payment method chooser */
.paymethods { display: grid; gap: 8px; margin: 6px 0 16px; }
.paymethod { display: flex; align-items: flex-start; gap: 10px; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; cursor: pointer; text-align: left; transition: .15s; }
.paymethod:hover { border-color: var(--brand-2); }
.paymethod:has(input:checked) { border-color: var(--brand); background: rgba(20,184,166,.07); box-shadow: 0 0 0 2px rgba(20,184,166,.15); }
.paymethod input { width: auto; margin-top: 3px; flex: none; }
.paymethod small { color: var(--ink-2); font-size: .8rem; }

/* discount rows */
.disc-line { display: flex; justify-content: space-between; padding: 4px 0; color: var(--ok); font-weight: 700; font-size: .88rem; }
.disc-note { text-align: center; font-size: .82rem; color: var(--ok); font-weight: 600; margin: 8px 0 12px; }

/* email confirmation landing page */
.verify-card {
  max-width: 480px; margin: 8vh auto; background: var(--surface); border: 1px solid var(--line);
  border-radius: 18px; padding: 34px 30px; text-align: center; box-shadow: var(--shadow);
}
.verify-card h1 { font-size: 1.5rem; margin: 10px 0 8px; }
.verify-icon {
  width: 66px; height: 66px; border-radius: 50%; background: #dcfce7; color: var(--ok);
  display: grid; place-items: center; font-size: 2rem; margin: 0 auto;
}
.verify-card.bad .verify-icon { background: #fee2e2; color: var(--danger); }
.verify-card .gate-actions { margin-top: 20px; }

/* dark mode */
[data-theme="dark"] {
  --bg: #0b1220;
  --surface: #111a2e;
  --surface-2: #1a2540;
  --ink: #e7edf6;
  --ink-2: #9fb0c8;
  --ink-3: #64748b;
  --line: rgba(255,255,255,.10);
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.35);
  --shadow-lg: 0 24px 60px rgba(0,0,0,.55);
}
[data-theme="dark"] .header { background: rgba(17,26,46,.85); }
[data-theme="dark"] .hero { background: linear-gradient(180deg, #0e1c2c 0%, var(--bg) 100%); }
[data-theme="dark"] .card-media, [data-theme="dark"] .pd-media,
[data-theme="dark"] .related-card { background: linear-gradient(160deg, var(--surface-2), var(--surface)); }
[data-theme="dark"] .variant.active { background: rgba(20,184,166,.16); }
[data-theme="dark"] .form-error { background: rgba(220,38,38,.12); border-color: rgba(220,38,38,.4); color: #fca5a5; }
[data-theme="dark"] .skeleton::after { background: linear-gradient(90deg, transparent, rgba(255,255,255,.08), transparent); }
[data-theme="dark"] .badge, [data-theme="dark"] .cat-tag { box-shadow: 0 0 0 1px rgba(0,0,0,.2); }
[data-theme="dark"] .auth-notice { background: rgba(16,185,129,.12); border-color: rgba(16,185,129,.35); color: #6ee7b7; }
[data-theme="dark"] .offer-strip { background: rgba(16,185,129,.12); border-color: rgba(16,185,129,.35); color: #6ee7b7; }
[data-theme="dark"] .verify-banner { background: rgba(245,158,11,.12); border-color: rgba(245,158,11,.35); color: #fcd34d; }
[data-theme="dark"] .verify-icon { background: rgba(16,185,129,.15); }
[data-theme="dark"] .verify-card.bad .verify-icon { background: rgba(220,38,38,.15); }
[data-theme="dark"] .auth-notice.bad { background: rgba(220,38,38,.12); border-color: rgba(220,38,38,.4); color: #fca5a5; }
