:root {
  /* Palette taken from the Botiga theme on https://wecarehealth.shop/ */
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #eceeec;      /* Botiga content cards / footer */
  --ink: #222222;            /* body text */
  --heading: #214e3a;        /* headings, site title, menu */
  --muted: #666666;
  --line: #dddddd;           /* form dividers */
  --field-line: #757575;     /* form borders */
  --brand: #438061;          /* links, buttons */
  --brand-dark: #214e3a;     /* link / button hover */
  --brand-ink: #ffffff;
  --brand-soft: #e3eee8;
  --accent: #ff5858;         /* header cart count */
  --warn-bg: #fdf1e4;
  --warn-ink: #8a4a12;
  --ok: #438061;
  --bad: #b23b3b;
  --radius: 0;
  --shadow: none;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.68 var(--font);
}
a { color: var(--brand); }
a:hover { color: var(--brand-dark); }
img { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 0.5rem; font-weight: 400; color: var(--heading); }
h1 { font-size: clamp(2rem, 5vw, 4rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.25rem; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── Site bar (mirrors the WordPress header) ──────────── */
.sitebar {
  display: flex; flex-wrap: wrap; gap: 8px 32px; align-items: center; justify-content: space-between;
  padding: 18px clamp(16px, 4vw, 40px);
  background: #ffffff; border-bottom: 1px solid var(--field-line);
}
.site-title { font-size: 1.5rem; color: var(--heading); text-decoration: none; }
.site-title:hover { color: var(--heading); }
.sitebar-links { display: flex; flex-wrap: wrap; gap: 4px 28px; }
.sitebar-links a { color: var(--heading); text-decoration: none; }
.sitebar-links a:hover, .sitebar-links a[aria-current] { text-decoration: underline; text-underline-offset: 6px; }

/* ── Shop tool bar ─────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; gap: 16px; align-items: center;
  padding: 10px clamp(16px, 4vw, 40px);
  background: var(--surface-2);
}
.brand { font-weight: 600; color: var(--heading); text-decoration: none; white-space: nowrap; }
.brand:hover { color: var(--heading); }
.topsearch { flex: 1; display: flex; gap: 0; max-width: 640px; }
.topsearch input { flex: 1; min-width: 0; }
.topnav { display: flex; gap: 20px; align-items: center; white-space: nowrap; margin-left: auto; }
.topnav a, .linkish { color: var(--heading); text-decoration: none; font: inherit; background: none; border: 0; cursor: pointer; padding: 4px 0; }
.topnav a:hover, .linkish:hover { color: var(--brand); }
.pill-count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 700; }
body.home .topsearch { visibility: hidden; }

@media (max-width: 760px) {
  .topbar { flex-wrap: wrap; gap: 10px; }
  .topsearch { order: 3; flex-basis: 100%; max-width: none; }
  body.home .topsearch { display: none; }
  .topnav { gap: 14px; }
}

/* ── Controls ──────────────────────────────────────────── */
input, select, textarea {
  font: inherit; color: var(--ink);
  background: var(--surface); border: 1px solid var(--field-line); border-radius: 0;
  padding: 12px 14px; width: 100%;
}
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible {
  outline: 2px solid var(--brand); outline-offset: 2px;
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font: inherit; font-size: 14px; font-weight: 400; line-height: 1.2; text-transform: uppercase; letter-spacing: 0;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  padding: 13px 24px; border-radius: 0; border: 1px solid var(--brand);
  background: var(--surface); color: var(--brand);
}
.btn:hover { border-color: var(--brand-dark); color: var(--brand-dark); }
.btn-primary { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.btn-primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: var(--brand-ink); }
.btn-small { padding: 8px 14px; font-size: 12px; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 35px; border: 1px solid var(--line);
  background: var(--surface); color: var(--heading); font: inherit; font-size: 0.9rem; cursor: pointer; text-decoration: none;
}
.chip:hover { border-color: var(--brand); color: var(--brand); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }

/* ── Layout ────────────────────────────────────────────── */
main { padding: 24px clamp(16px, 4vw, 40px) 48px; max-width: 1240px; margin: 0 auto; outline: none; }
.section { margin: 32px 0; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }

/* ── Hero ──────────────────────────────────────────────── */
.hero {
  padding: clamp(28px, 6vw, 64px) clamp(20px, 5vw, 56px);
  background: var(--surface-2);
}
.hero p.lead { font-size: 1.15rem; color: var(--muted); max-width: 640px; margin: 0 0 24px; }
.ask { display: flex; gap: 10px; max-width: 760px; }
.ask { gap: 0; }
.ask input { font-size: 1.1rem; padding: 16px 18px; }
.ask .btn { padding: 0 28px; }
.hero .chips { margin-top: 16px; }
@media (max-width: 560px) { .ask { flex-direction: column; gap: 8px; } .ask .btn { padding: 14px; } }

.how { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.how > div { background: var(--surface-2); border: 0; border-radius: var(--radius); padding: 18px; }
.how .num { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); font-weight: 700; margin-bottom: 8px; }

.needs { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.need { padding: 14px; border: 1px solid var(--line); background: var(--surface); color: var(--heading); text-decoration: none; }
.need:hover { border-color: var(--brand); background: var(--brand-soft); color: var(--heading); }

/* ── Understood intent ─────────────────────────────────── */
.understood { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 14px 16px; border-radius: var(--radius); background: var(--surface-2); margin-bottom: 12px; }
.understood .label { font-weight: 700; margin-right: 4px; }
.tag { padding: 4px 10px; border-radius: 999px; font-size: 0.85rem; background: var(--surface); border: 1px solid var(--line); }
.tag.need-tag { background: var(--brand-soft); border-color: transparent; color: var(--brand); font-weight: 600; }
.tag.no { text-decoration: line-through; color: var(--muted); }
.tag.med { background: var(--warn-bg); color: var(--warn-ink); border-color: transparent; }
.retailers { font-size: 0.85rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 4px; background: var(--ok); }
.dot.down { background: var(--bad); }

/* ── Product cards ─────────────────────────────────────── */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.card { display: flex; flex-direction: column; background: var(--surface); border: 0; overflow: hidden; }
.card-media { aspect-ratio: 4 / 3; display: grid; place-items: center; background: var(--surface-2); font-size: 64px; text-decoration: none; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 14px 0; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-title { font-size: 1rem; color: var(--heading); text-decoration: none; }
.card-title:hover { color: var(--brand); }
.brandline { font-size: 0.85rem; color: var(--muted); }
.reasons { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; font-size: 0.85rem; }
.reasons li::before { content: "✓ "; color: var(--ok); font-weight: 700; }
.warning { font-size: 0.85rem; padding: 8px 10px; background: var(--warn-bg); color: var(--warn-ink); }
.warning::before { content: "⚠ "; }
.price-row { margin-top: auto; display: flex; justify-content: space-between; align-items: flex-end; gap: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.price { font-size: 1.25rem; font-weight: 400; color: var(--heading); }
.price-meta { font-size: 0.8rem; color: var(--muted); }
.badge { display: inline-block; font-size: 0.75rem; font-weight: 400; text-transform: uppercase; padding: 3px 10px; background: #212121; color: #ffffff; }
.badge.ai { background: var(--brand); color: #fff; }

/* ── Product page ──────────────────────────────────────── */
.pdp { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 32px; align-items: start; }
.pdp-media { overflow: hidden; background: var(--surface-2); aspect-ratio: 1; display: grid; place-items: center; font-size: 120px; }
.pdp-media img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 820px) { .pdp { grid-template-columns: 1fr; } }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
tr:last-child td { border-bottom: 0; }
tr.best td { background: var(--brand-soft); }
.cautions { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.cautions li { font-size: 0.9rem; padding: 8px 10px; background: var(--surface-2); }
.cautions li.applies { background: var(--warn-bg); color: var(--warn-ink); font-weight: 600; }

/* ── AI hand-off banner ────────────────────────────────── */
.handoff { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; justify-content: space-between; padding: 28px 32px; background: var(--brand-dark); color: #fff; }
.handoff h1 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); color: #fff; }
.handoff p { margin: 0; opacity: 0.9; }
.handoff-back { color: inherit; text-decoration: underline; }
.demo-banner { padding: 8px clamp(16px, 4vw, 40px); background: var(--warn-bg); color: var(--warn-ink); font-size: 0.9rem; text-align: center; }
.handoff .btn { background: #fff; color: var(--brand-dark); border-color: #fff; }
.handoff .btn:hover { background: var(--surface-2); color: var(--brand-dark); }

/* ── Cart & checkout ───────────────────────────────────── */
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; } }
.panel { background: var(--surface); border: 1px solid var(--line); padding: 20px; }
.panel + .panel { margin-top: 16px; }
.line { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.line:last-child { border-bottom: 0; }
.thumb { width: 56px; height: 56px; background: var(--surface-2); display: grid; place-items: center; font-size: 28px; overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.qty { display: inline-flex; align-items: center; gap: 6px; }
.qty button { width: 28px; height: 28px; border: 1px solid var(--field-line); background: var(--surface); color: var(--ink); cursor: pointer; }
.sum-row { display: flex; justify-content: space-between; padding: 4px 0; }
.sum-row.total { font-weight: 600; color: var(--heading); font-size: 1.15rem; border-top: 1px solid var(--line); margin-top: 8px; padding-top: 12px; }
.problem { color: var(--bad); font-size: 0.85rem; }
.form-grid { display: grid; gap: 12px; }
.form-grid label { display: grid; gap: 4px; font-weight: 600; font-size: 0.9rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 480px) { .form-row { grid-template-columns: 1fr; } }
.notice { padding: 12px 14px; background: var(--surface-2); font-size: 0.9rem; }
.error { color: var(--bad); font-weight: 600; }
.status { font-weight: 700; }
.status.placed { color: var(--ok); }
.status.failed { color: var(--bad); }

/* ── Consult ───────────────────────────────────────────── */
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.slot { padding: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; cursor: pointer; text-align: left; }
.slot[aria-pressed="true"] { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }

/* ── Misc ──────────────────────────────────────────────── */
dialog { border: 0; border-radius: 0; padding: 0; max-width: 520px; width: calc(100% - 32px); background: var(--surface); color: var(--ink); box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3); }
dialog::backdrop { background: rgba(10, 20, 15, 0.45); }
.dialog-body { padding: 24px; }
.dialog-actions { display: flex; justify-content: flex-end; margin-top: 16px; }
.check-grid { display: grid; gap: 8px; }
.check-grid label { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); cursor: pointer; }
.check-grid input { width: auto; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--brand-dark); color: #fff; padding: 12px 20px; box-shadow: var(--shadow); z-index: 20; max-width: calc(100% - 32px); }
.empty { text-align: center; padding: 48px 16px; color: var(--muted); }
.skeleton { height: 280px; border-radius: var(--radius); background: linear-gradient(90deg, var(--surface-2), var(--surface), var(--surface-2)); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .skeleton { animation: none; } }
.footer { padding: 32px max(clamp(16px, 4vw, 40px), calc((100% - 1240px) / 2)) 40px; background: var(--surface-2); }
