/* ============================================================
   PearPep design system — modern DTC-science
   Type: Instrument Serif (display) + Instrument Sans (body)
   Ground: warm off-white. Ink: near-black. Accent: pear/olive.
   ============================================================ */

:root {
  --bg: #F7F5F0;
  --bg-raised: #FFFFFF;
  --bg-tint: #EDF0E2;          /* soft pear tint */
  --ink: #17150F;
  --ink-70: rgba(23, 21, 15, .70);
  --ink-50: rgba(23, 21, 15, .50);
  --ink-12: rgba(23, 21, 15, .12);
  --accent: #5F7040;           /* pear / olive */
  --accent-deep: #495630;
  --gold: #B08D4A;             /* metallic highlight */
  --danger: #A03B2E;
  --radius: 22px;
  --radius-sm: 12px;
  --shadow-1: 0 1px 2px rgba(23,21,15,.05);
  --shadow-2: 0 20px 48px rgba(23,21,15,.10);
  --font-display: "Instrument Serif", Georgia, serif;
  --font-body: "Instrument Sans", -apple-system, "Segoe UI", sans-serif;
  --maxw: 1180px;
  --gutter: 28px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 16.5px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- type ---------- */
.display {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.5rem, 5.5vw, 4.5rem);
  line-height: 1.04;
  letter-spacing: -0.015em;
}
.h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.9rem, 3.4vw, 2.9rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
}
.eyebrow {
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent);
}
.lede { font-size: 1.14rem; color: var(--ink-70); max-width: 56ch; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(247, 245, 240, .82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--ink-12);
}
.nav-inner {
  display: flex; align-items: center; gap: 26px;
  height: 66px;
}
.brand {
  font-family: var(--font-display);
  font-size: 1.62rem;
  letter-spacing: .01em;
  display: flex; align-items: baseline; gap: 8px;
}
.brand em { font-style: normal; color: var(--accent); }
.brand-sub {
  font-size: .64rem; letter-spacing: .22em; text-transform: uppercase;
  color: var(--ink-50); font-family: var(--font-body);
}
.nav-links { display: flex; gap: 22px; margin-left: auto; align-items: center; }
.nav-links a {
  font-size: .92rem; font-weight: 500; color: var(--ink-70);
  padding: 6px 2px; border-bottom: 2px solid transparent;
}
.nav-links a:hover { color: var(--ink); border-bottom-color: var(--accent); }
.nav-links a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.nav-cart {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--ink); color: var(--bg);
  border-radius: 999px; padding: 8px 16px;
  font-size: .9rem; font-weight: 600;
  transition: transform .18s ease, background .18s ease;
}
.nav-cart:hover { transform: translateY(-2px); background: var(--accent); }
.nav-cart .n {
  background: var(--gold); color: var(--ink);
  min-width: 19px; height: 19px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .72rem; font-weight: 700; padding: 0 5px;
}

@media (max-width: 760px) {
  .nav-links a:not(.nav-cart) { display: none; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  border-radius: 999px;
  padding: 15px 30px;
  font-size: 1rem; font-weight: 600;
  border: 1.5px solid transparent;
  transition: transform .18s cubic-bezier(.2,.7,.2,1), box-shadow .18s ease, background .18s ease;
}
.btn-primary { background: var(--accent); color: #fff; box-shadow: var(--shadow-1); }
.btn-primary:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); background: #546237; }
.btn-ghost { border-color: var(--ink-12); background: var(--bg-raised); color: var(--ink); }
.btn-ghost:hover { transform: translateY(-3px); border-color: var(--accent); }
.btn-dark { background: var(--ink); color: var(--bg); }
.btn-dark:hover { transform: translateY(-3px); background: #2b281f; }
.btn-sm { padding: 9px 18px; font-size: .9rem; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none !important; }
.btn:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---------- cards ---------- */
.card {
  background: var(--bg-raised);
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
  border: 1px solid rgba(23,21,15,.06);
  transition: transform .25s cubic-bezier(.2,.7,.2,1), box-shadow .25s ease;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-2); }

/* ---------- product grid ---------- */
.grid { display: grid; gap: 22px; }
.grid-products { grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); }

.p-card { display: flex; flex-direction: column; overflow: hidden; padding: 0; }
.p-card .p-media {
  background: linear-gradient(160deg, #F1EFE7 0%, #E6E9D8 100%);
  aspect-ratio: 1 / 1;
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.p-card .p-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.p-name { font-family: var(--font-display); font-size: 1.32rem; line-height: 1.15; }
.p-meta { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.p-mg { font-size: .84rem; font-weight: 600; color: var(--ink-50); }
.p-pmg { font-size: .84rem; color: var(--accent); font-weight: 600; }
.p-price { font-size: 1.28rem; font-weight: 700; }
.p-price small { font-size: .8rem; font-weight: 500; color: var(--ink-50); }
.p-card .btn { margin-top: auto; }

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .74rem; font-weight: 700; letter-spacing: .02em;
  border-radius: 999px; padding: 4px 11px;
}
.badge-best { background: var(--bg-tint); color: var(--accent-deep); }
/* Honest stock states. "Not yet in stock" is deliberately not styled as a warning:
   it is the normal state today, not an error the shopper caused. */
.badge-stock { background: #e8f2e8; color: #2f5d33; }
.badge-out { background: var(--bg-tint); color: var(--ink-70); }
.avail-note { font-size: .82rem; line-height: 1.5; color: var(--ink-70); margin: 6px 0 0; max-width: 46ch; }
.pd-avail { margin: 0 0 18px; }
/* eBay-style sold text: plain, dark-grey, bold count, no decorative chip */
.sold-line {
  font-size: .8rem; color: rgba(23,21,15,.62);
  display: inline-flex; align-items: center; gap: 4px;
}
.sold-line b { color: rgba(23,21,15,.85); font-weight: 700; }
.p-badges { display: flex; gap: 8px; flex-wrap: wrap; position: absolute; top: 12px; left: 12px; }

/* announcement bar (delivery threshold + dispatch cut-off, every page) */
.annbar {
  background: var(--ink); color: rgba(239,235,224,.85);
  text-align: center; font-size: .8rem; letter-spacing: .02em;
  padding: 8px 14px;
}
.annbar b { color: #C9CFA8; font-weight: 700; }
.annbar a { color: #fff; text-decoration: underline; text-underline-offset: 2px; }

/* vial illustration (CSS art — replaced by real photography when available) */
.vial {
  width: 54px; height: 118px;
  border-radius: 12px 12px 8px 8px;
  background: linear-gradient(180deg, rgba(255,255,255,.85) 0%, rgba(241,239,231,.9) 100%);
  border: 1.5px solid rgba(23,21,15,.14);
  position: relative;
  box-shadow: inset 0 -34px 0 rgba(95,112,64,.14), var(--shadow-1);
}
.vial::before { /* cap */
  content: ""; position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  width: 26px; height: 15px; border-radius: 5px 5px 2px 2px;
  background: linear-gradient(180deg, #B08D4A, #8f6f39);
}
.vial::after { /* label */
  content: attr(data-label);
  position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%);
  font-size: .34rem; font-weight: 700; letter-spacing: .04em;
  color: var(--ink); background: #fff;
  border: 1px solid rgba(23,21,15,.12);
  padding: 5px 4px; width: 44px; text-align: center; border-radius: 2px;
  white-space: nowrap; overflow: hidden;
}

/* ---------- reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- sections ---------- */
.section { padding: 92px 0; }
.section-tight { padding: 56px 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 26px; margin-bottom: 38px; flex-wrap: wrap; }

/* dark band */
.band-dark { background: var(--ink); color: #EFEBE0; }
.band-dark .eyebrow { color: #C9CFA8; }
.band-dark .lede { color: rgba(239,235,224,.72); }

/* trust strip */
.trust-strip { border-bottom: 1px solid var(--ink-12); background: var(--bg-raised); }
.trust-strip .wrap {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
  gap: 14px; padding-top: 15px; padding-bottom: 15px;
}
.trust-item { display: flex; gap: 11px; align-items: center; font-size: .88rem; font-weight: 500; color: var(--ink-70); }
.trust-item svg { flex: none; }

/* numbered editorial list */
.n-list { counter-reset: step; display: grid; gap: 30px; }
.n-item { display: grid; grid-template-columns: 54px 1fr; gap: 20px; align-items: start; }
.n-item::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  font-family: var(--font-display); font-size: 1.9rem; color: var(--gold);
  border-bottom: 2px solid var(--gold); line-height: 1.25;
}
.n-item h3 { font-family: var(--font-display); font-size: 1.4rem; margin-bottom: 6px; font-weight: 400; }
.n-item p { color: var(--ink-70); font-size: .98rem; }

/* compliance strip */
.compliance {
  font-size: .8rem; color: var(--ink-50);
  border-top: 1px solid var(--ink-12);
  padding: 18px 0; margin-top: 70px;
  text-align: center; letter-spacing: .01em;
}

/* ---------- footer ---------- */
.footer { background: #EFEDE6; border-top: 1px solid var(--ink-12); padding: 54px 0 40px; font-size: .92rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 36px; }
.footer h4 { font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-50); margin-bottom: 14px; font-weight: 600; }
.footer a { color: var(--ink-70); display: block; padding: 3px 0; }
.footer a:hover { color: var(--accent); }
.footer .fine { margin-top: 34px; font-size: .78rem; color: var(--ink-50); line-height: 1.55; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- forms / checkout ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label { font-size: .84rem; font-weight: 600; color: var(--ink-70); }
.field input, .field select, .field textarea {
  font: inherit; padding: 12px 14px;
  border: 1.5px solid var(--ink-12); border-radius: var(--radius-sm);
  background: var(--bg-raised); color: var(--ink);
  transition: border-color .15s ease, box-shadow .15s ease;
  width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(95,112,64,.14);
}
.field .err { color: var(--danger); font-size: .8rem; display: none; }
.field.invalid input { border-color: var(--danger); }
.field.invalid .err { display: block; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 620px) { .form-row { grid-template-columns: 1fr; } }

/* attestation */
.attest {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--bg-tint); border: 1px solid rgba(95,112,64,.25);
  border-radius: var(--radius-sm); padding: 18px;
}
.attest input[type="checkbox"] { width: 19px; height: 19px; margin-top: 2px; accent-color: var(--accent); flex: none; }
.attest p { font-size: .92rem; color: var(--ink-70); }
.attest p b { color: var(--ink); }

/* summary panel */
.summary { background: var(--bg-raised); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow-1); border: 1px solid rgba(23,21,15,.06); }
.summary .line { display: flex; justify-content: space-between; gap: 14px; padding: 7px 0; font-size: .95rem; }
.summary .line span:first-child { color: var(--ink-70); }
.summary .total { border-top: 1.5px solid var(--ink-12); margin-top: 10px; padding-top: 14px; font-size: 1.12rem; font-weight: 700; }
.summary .free-del { color: var(--accent); font-weight: 600; font-size: .88rem; }

/* pack selector */
.packs { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; }
.pack {
  position: relative; text-align: center;
  border: 1.5px solid var(--ink-12); border-radius: var(--radius-sm);
  background: var(--bg-raised); padding: 14px 8px 12px;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.pack:hover { transform: translateY(-2px); }
.pack input { position: absolute; opacity: 0; }
.pack .q { font-weight: 700; font-size: .95rem; }
.pack .pr { font-size: 1.06rem; font-weight: 700; margin-top: 2px; }
.pack .per { font-size: .74rem; color: var(--ink-50); }
.pack .save-tag {
  position: absolute; top: -9px; right: 8px;
  background: var(--gold); color: #fff; font-size: .66rem; font-weight: 800;
  padding: 2px 8px; border-radius: 999px; letter-spacing: .03em;
}
.pack.sel { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(95,112,64,.16); }
.pack:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }

/* payment method chooser */
.pay-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 620px) { .pay-opts { grid-template-columns: 1fr; } }
.pay-opt {
  display: flex; align-items: center; gap: 12px;
  border: 1.5px solid var(--ink-12); border-radius: var(--radius-sm);
  padding: 14px 16px; background: var(--bg-raised);
  font-weight: 600; font-size: .95rem; cursor: pointer;
  transition: border-color .15s ease;
}
.pay-opt:hover { border-color: var(--accent); }
.pay-opt input { accent-color: var(--accent); width: 17px; height: 17px; }
.pay-opt .cards { margin-left: auto; display: flex; gap: 5px; }
.pay-opt .cards i {
  font-style: normal; font-size: .62rem; font-weight: 800; color: #fff;
  border-radius: 4px; padding: 3px 5px; letter-spacing: .03em;
}
.c-visa { background: #1A1F71; } .c-mc { background: #EB001B; } .c-crypto { background: #F7931A; }

/* misc */
.muted { color: var(--ink-50); }
.small { font-size: .85rem; }
.spacer { height: 34px; }
.divider { border: none; border-top: 1px solid var(--ink-12); margin: 26px 0; }
.alert {
  border-radius: var(--radius-sm); padding: 13px 16px; font-size: .92rem; margin-bottom: 18px;
}
.alert-ok { background: var(--bg-tint); color: var(--accent-deep); }
.alert-err { background: rgba(160,59,46,.09); color: var(--danger); }
.skel { background: linear-gradient(90deg,#EFEDE6 25%,#E6E3D9 50%,#EFEDE6 75%); background-size: 200% 100%; animation: skel 1.2s infinite; border-radius: var(--radius-sm); }
@keyframes skel { to { background-position: -200% 0; } }

/* ---------- region picker (language + currency) ---------- */
.region-picker { position: relative; }
.region-details > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 7px;
  padding: 7px 11px; border: 1px solid rgba(95,112,64,.22); border-radius: 999px;
  background: #fff; font-size: 13.5px; font-weight: 600; color: var(--ink, #24291d);
  line-height: 1; user-select: none;
}
.region-details > summary::-webkit-details-marker { display: none; }
.region-details > summary:hover { border-color: rgba(95,112,64,.45); }
.region-flag { font-size: 15px; line-height: 1; }
.region-sep { color: rgba(36,41,29,.35); }
.region-cur { color: var(--accent, #5F7040); }
.region-panel {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; width: 268px;
  background: #fff; border: 1px solid rgba(95,112,64,.18); border-radius: 14px;
  box-shadow: 0 18px 44px rgba(28,34,20,.16); padding: 12px; max-height: 70vh; overflow: auto;
}
.region-group + .region-group { margin-top: 10px; border-top: 1px solid rgba(95,112,64,.12); padding-top: 10px; }
.region-h { margin: 2px 0 6px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: rgba(36,41,29,.5); font-weight: 700; }
.region-opt {
  display: flex; align-items: flex-start; gap: 9px; width: 100%; text-align: left;
  padding: 7px 8px; border: 0; background: none; border-radius: 9px; cursor: pointer;
  font: inherit; font-size: 13.5px; color: var(--ink, #24291d);
}
.region-opt:hover { background: rgba(95,112,64,.08); }
.region-opt.on { background: rgba(95,112,64,.13); font-weight: 600; }
.region-opt small { display: block; font-weight: 400; font-size: 11.5px; color: rgba(36,41,29,.55); margin-top: 1px; }
.region-note { margin: 10px 2px 2px; font-size: 11.5px; line-height: 1.45; color: rgba(36,41,29,.62); }
@media (max-width: 720px) {
  .region-picker { order: 3; }
  .region-panel { right: -8px; width: min(88vw, 280px); }
}
