/* ============================================================
   Pharmacy Template — SOUTH AFRICA — Bergkruid Apteek
   Clinical but warm: pharmacy green, trust blue, warm off-white.
   Fonts: Figtree (headings) + Noto Sans (body), Google Fonts

   RE-SKIN NOTE: to rebrand for a client, edit the VALUES in
   :root below and nothing else. Keep every variable NAME.

   BILINGUAL: this template ships Afrikaans and English side by
   side (the creche template is the only other one that does).
   See the ".lang" block below and TEMPLATE-README section 2
   before touching any markup.
   ============================================================ */

:root {
  /* Healthcare palette: a deep dispensary green as the primary, a trust blue
     for anything clinical, on a warm off-white. Every value was darkened until
     it clears WCAG AA against the surface it actually sits on; the measured
     ratio is noted per token. Re-check them if you change a value.

     Deliberately absent: any bright red. In a pharmacy context red reads as
     alarm, and there is nothing on this site that should alarm anyone. */

  /* --- surfaces --- */
  --bg: #F5F8F4;
  --surface: #FFFFFF;
  --surface-2: #E7EEE6;
  --line: rgba(22, 40, 30, 0.10);
  --line-strong: rgba(22, 40, 30, 0.20);

  /* --- text --- */
  --text: #16281E;   /* 14.5:1 on --bg, 15.5:1 on --surface */
  --muted: #52645A;  /* 5.9:1 on --bg, 5.3:1 on --surface-2 */

  /* --- accents --- */
  --accent: #1A6B45;       /* dispensary green — 6.1:1 on --bg, 5.5:1 on --surface-2 */
  --accent-dark: #125336;  /* hover — 9.1:1 against --on-accent */
  --accent-2: #0B5C8A;     /* trust blue — clinic, eyebrows, section labels.
                              6.7:1 on --bg, 6.1:1 on --surface-2 */
  --accent-soft: rgba(26, 107, 69, 0.09);
  --accent-line: rgba(26, 107, 69, 0.34);
  --blue-soft: rgba(11, 92, 138, 0.09);
  /* amber — big display numerals, the underline stroke, the after-hours strip.
     5.8:1 on --bg and 5.2:1 on --surface-2, so unlike most accent-3 tokens in
     this template set it is safe for small text too. */
  --gold: #7A5D10;
  /* text colour that sits ON --accent — 6.5:1 */
  --on-accent: #FFFFFF;

  --font-head: 'Figtree', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Noto Sans', system-ui, sans-serif;
  --wrap: 1180px;
  --radius: 18px;
  --shadow: 0 2px 6px rgba(22, 40, 30, 0.05), 0 18px 40px rgba(22, 40, 30, 0.10);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
html:focus-within { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  /* 1.22 rather than a tighter display setting: Afrikaans headings wrap more
     often than their English twins, and the underline stroke on h1/h2 lives
     inside the line box */
  line-height: 1.22;
  letter-spacing: -0.015em;
  font-weight: 700;
  text-wrap: balance;
}
h1 em, h2 em, h3 em { font-style: normal; font-weight: 800; color: var(--accent); }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

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

::selection { background: var(--accent); color: var(--on-accent); }

/* ---------- bilingual ----------
   Every string ships twice, as sibling elements carrying class="lang" and a
   real lang attribute. The <html data-lang> value decides which one renders;
   an inline script in each <head> sets it before first paint, so there is no
   flash and no layout shift. With JavaScript off, the markup default (en) is
   what you get — a complete English site, with Afrikaans one tap away.

   Switching the default is a markup change, not a CSS one: flip <html lang>
   and data-lang, flip which half of each data-*-af / data-*-en pair the plain
   attribute mirrors, and flip aria-pressed on the toggle buttons.

   HARD RULE: never put .reveal and .lang on the SAME element. A hidden-language
   element is display:none, so it never intersects the viewport, never gets .in,
   and would sit at opacity 0 forever once the visitor switched language. Reveals
   go on the structural wrapper; the lang pair lives inside it. */
html[data-lang="af"] .lang[lang="en"] { display: none !important; }
html[data-lang="en"] .lang[lang="af"] { display: none !important; }

.lang-switch {
  display: inline-flex; align-items: center; flex-shrink: 0;
  border: 1px solid var(--line-strong); border-radius: 999px; padding: 3px;
  background: var(--surface);
}
.lang-switch button {
  font-family: var(--font-body); font-weight: 700; font-size: 0.78rem; letter-spacing: 0.06em;
  min-width: 42px; min-height: 34px; padding: 6px 12px;
  border: 0; border-radius: 999px; background: transparent; color: var(--muted);
  cursor: pointer; transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.lang-switch button:hover { color: var(--text); }
.lang-switch button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }
/* the switch is a 34px control inside a 44px-tall strip — the strip is the tap target */
.header .lang-switch { min-height: 44px; padding: 4px; }

/* ---------- skip link ---------- */
.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 200;
  background: var(--accent); color: var(--on-accent); padding: 10px 18px; border-radius: 0 0 12px 0;
  font-weight: 700;
}
.skip-link:focus { left: 0; }

/* ---------- reveal animations ---------- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.65s var(--ease), transform 0.65s var(--ease);
  transition-delay: var(--d, 0ms);
  will-change: opacity, transform;
}
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero__bg img { animation: none !important; transform: none !important; }
  .underline path { stroke-dashoffset: 0 !important; transition: none !important; }
  .pulse { animation: none !important; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* ---------- heading underline ----------
   A drawn stroke under the emphasised phrase, in the amber. Decorative and
   aria-hidden in the markup; it animates stroke-dashoffset only, so no layout
   is involved and nothing shifts. */
.pen { position: relative; display: inline-block; }
/* .pen is inline-block, so a heading can break between it and the full stop that
   follows — which lands the full stop alone on its own line looking like a stray
   bullet. Wrap the pen AND its punctuation in .nb to glue them together. Keep the
   emphasised phrase short (a word or two) so the nowrap can never overflow. */
.nb { white-space: nowrap; }
.underline {
  position: absolute; left: -1.5%; right: -1.5%; bottom: -0.06em; width: 103%; height: 0.2em;
  overflow: visible; pointer-events: none;
}
.underline path {
  fill: none; stroke: var(--gold); stroke-width: 6; stroke-linecap: round;
  stroke-dasharray: 320; stroke-dashoffset: 320;
  transition: stroke-dashoffset 0.6s var(--ease) 0.3s;
}
.reveal.in .underline path, .in .underline path { stroke-dashoffset: 0; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--font-body); font-weight: 700; font-size: 0.97rem;
  letter-spacing: 0.005em;
  padding: 15px 28px; border-radius: 12px; border: 1px solid transparent;
  cursor: pointer; transition: transform 0.2s var(--ease), background 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s;
  min-height: 48px;
}
.btn:active { transform: scale(0.98); }
.btn--primary { background: var(--accent); color: var(--on-accent); box-shadow: 0 2px 5px rgba(22, 40, 30, 0.10); }
.btn--primary:hover { background: var(--accent-dark); transform: translateY(-2px); box-shadow: 0 10px 24px rgba(26, 107, 69, 0.28); }
.btn--ghost { border-color: var(--line-strong); color: var(--text); background: transparent; }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.btn--lg { padding: 18px 34px; font-size: 1.01rem; }
.btn svg { flex-shrink: 0; }
.btn:focus-visible, a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--accent-2); outline-offset: 3px; border-radius: 8px;
}

/* ---------- after-hours / 7-day strip ----------
   Sits directly under the header on every page. It is the single loudest fact
   about this business, so it is the first thing on the page, not a footnote. */
.alert-strip {
  background: var(--accent-dark); color: var(--on-accent);
  font-size: 0.88rem; padding: 10px 24px;
}
.alert-strip__inner {
  max-width: 1320px; margin: 0 auto;
  display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap;
  text-align: center;
}
.alert-strip svg { width: 17px; height: 17px; flex-shrink: 0; }
.alert-strip strong { font-weight: 700; }
.alert-strip a { text-decoration: underline; text-underline-offset: 3px; font-weight: 700; }
@media (max-width: 560px) { .alert-strip { font-size: 0.82rem; padding: 9px 16px; } }

/* ---------- header ---------- */
.header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(245, 248, 244, 0.92);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.35s, box-shadow 0.35s;
}
.header.scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 8px 28px rgba(22, 40, 30, 0.07);
}
.header__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px; padding: 12px 24px; max-width: 1320px; margin: 0 auto;
}

/* ---------- brand ---------- */
.brand { display: inline-flex; align-items: center; gap: 12px; flex-shrink: 0; min-height: 44px; }
/* This template ships no logo file — the mark IS the logo. If a client has real
   artwork, add an <img class="brand__logo"> and drop .brand__mark; use one or
   the other, never both. */
.brand__mark {
  width: 44px; height: 44px; border-radius: 13px; flex-shrink: 0;
  display: grid; place-items: center;
  background: var(--accent); color: var(--on-accent);
  box-shadow: 0 2px 5px rgba(22, 40, 30, 0.14);
}
.brand__mark svg { width: 25px; height: 25px; }
.brand__logo { height: 44px; width: auto; flex-shrink: 0; display: block; }
.brand__text { display: flex; flex-direction: column; line-height: 1.2; }
.brand__name { font-family: var(--font-head); font-weight: 800; font-size: 1.2rem; letter-spacing: -0.02em; }
.brand__tag {
  font-size: 0.6rem; letter-spacing: 0.17em; text-transform: uppercase;
  color: var(--muted); font-weight: 700;
}

.nav { display: flex; align-items: center; gap: 2px; }
.nav a {
  font-family: var(--font-body); font-weight: 600; font-size: 0.94rem;
  padding: 10px 12px; border-radius: 9px; color: var(--text);
  position: relative; transition: color 0.2s;
}
.nav a::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 4px; height: 2px; border-radius: 2px;
  background: var(--accent);
  transform: scaleX(0); transform-origin: left; transition: transform 0.2s var(--ease);
}
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }
.nav a[aria-current="page"] { color: var(--accent); }
.header__cta { display: flex; align-items: center; gap: 13px; }
.header__phone {
  font-family: var(--font-body); font-weight: 600; font-size: 0.93rem; white-space: nowrap;
  color: var(--text); transition: color 0.2s;
}
.header__phone:hover { color: var(--accent); }
.header__cta .btn { padding: 11px 20px; min-height: 44px; }
/* the switch inside the collapsed nav panel — hidden until the panel exists */
.nav__lang { display: none; }

.nav-toggle {
  display: none; background: none; border: 1px solid var(--line-strong); border-radius: 11px;
  width: 46px; height: 44px; cursor: pointer; align-items: center; justify-content: center; flex-direction: column; gap: 5px;
}
.nav-toggle span { display: block; width: 20px; height: 2px; border-radius: 2px; background: var(--text); transition: transform 0.3s var(--ease), opacity 0.2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 1060px) {
  .nav {
    position: absolute; top: calc(100% + 8px); left: 16px; right: 16px; z-index: 99;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
    padding: 12px; box-shadow: var(--shadow);
    opacity: 0; transform: translateY(-12px); pointer-events: none;
    transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
  }
  .nav.open { opacity: 1; transform: none; pointer-events: auto; }
  .nav a { padding: 13px 16px; }
  .nav a::after { display: none; }
  .nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); }
  /* the header switch goes away with the desktop layout; this one takes over,
     so the language control is never more than one tap from any page */
  .nav__lang {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    margin-top: 8px; padding: 12px 16px 4px; border-top: 1px solid var(--line);
    font-size: 0.85rem; color: var(--muted); font-weight: 600;
  }
  .nav-toggle { display: inline-flex; }
  .header__phone { display: none; }
  .header .lang-switch { display: none; }
}
@media (max-width: 620px) {
  .header__cta .btn { display: none; }
  .brand__mark { width: 40px; height: 40px; }
  .brand__name { font-size: 1.08rem; }
}
@media (max-width: 370px) {
  .brand__tag { display: none; }
}

/* ---------- hero ----------
   Light theme: legibility comes from a scrim laid over the photo, not from
   darkening the image. Text always sits on the page's own off-white, so the
   crop can shift at any breakpoint without contrast ever failing. */
.hero {
  position: relative; display: flex; align-items: center;
  min-height: min(84dvh, 780px); padding: 96px 0 84px; overflow: hidden; isolation: isolate;
}
.hero--page { min-height: min(52dvh, 520px); padding: 74px 0 64px; }
.hero__bg { position: absolute; inset: 0; z-index: -2; }
.hero__bg img { width: 100%; height: 100%; object-fit: cover; animation: heroZoom 10s var(--ease) forwards; }
@keyframes heroZoom { from { transform: scale(1.06); } to { transform: scale(1); } }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  /* .hero__content is 690px wide inside an 1180px wrap, so on a 1280px viewport
     the copy runs to roughly 76% of the frame. Hold the scrim near-opaque to
     just past that, then fall away. */
  background:
    linear-gradient(100deg,
      rgba(245, 248, 244, 0.98) 0%,
      rgba(245, 248, 244, 0.96) 46%,
      rgba(245, 248, 244, 0.88) 68%,
      rgba(245, 248, 244, 0.32) 88%,
      rgba(245, 248, 244, 0.08) 100%),
    linear-gradient(180deg, rgba(245, 248, 244, 0.36) 0%, rgba(245, 248, 244, 0) 45%);
}
.hero__content { max-width: 690px; position: relative; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--font-body); font-weight: 700; font-size: 0.73rem;
  letter-spacing: 0.17em; text-transform: uppercase; color: var(--accent-2);
  margin-bottom: 22px;
}
.eyebrow::before { content: ""; width: 26px; height: 3px; border-radius: 3px; background: var(--gold); flex-shrink: 0; }
.hero h1 { font-size: clamp(2.3rem, 5.2vw, 3.9rem); margin-bottom: 20px; }
.hero__lede { font-size: clamp(1.03rem, 1.5vw, 1.18rem); color: var(--muted); max-width: 560px; margin-bottom: 32px; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 13px; margin-bottom: 38px; }
.hero__trust { display: flex; flex-wrap: wrap; gap: 12px 30px; padding-top: 24px; border-top: 1px solid var(--line-strong); }
.hero__trust li { display: flex; align-items: center; gap: 10px; font-size: 0.92rem; color: var(--muted); }
.hero__trust svg { width: 17px; height: 17px; color: var(--accent); flex-shrink: 0; }

@media (max-width: 760px) {
  /* content goes full-width on mobile, so the scrim has to cover more of the frame */
  .hero::after {
    background:
      linear-gradient(180deg,
        rgba(245, 248, 244, 0.90) 0%,
        rgba(245, 248, 244, 0.95) 45%,
        rgba(245, 248, 244, 0.98) 100%);
  }
  .hero { min-height: 0; padding: 64px 0 60px; }
  .hero--page { padding: 52px 0 48px; }
}

/* ---------- sections ---------- */
.section { padding: clamp(66px, 8vw, 104px) 0; position: relative; }
.section--tint { background: var(--surface-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section__head { max-width: 700px; margin-bottom: clamp(40px, 5vw, 62px); }
.section__head h2 { font-size: clamp(1.85rem, 3.3vw, 2.6rem); margin-bottom: 15px; }
.section__head p { color: var(--muted); font-size: 1.04rem; }
.section__head--row {
  max-width: none; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap;
}
.section__head--row > div { max-width: 640px; }
.section__head--mid { margin-left: auto; margin-right: auto; text-align: center; }
.section__head--mid .eyebrow { justify-content: center; }

/* ---------- branch cards ----------
   The signature component of this template. A four-branch group is the whole
   reason this demo exists: each card is a self-contained answer to "which one
   is nearest me, is it open, and what is its number". */
.branches { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
@media (max-width: 860px) { .branches { grid-template-columns: 1fr; } }
.branch {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; scroll-margin-top: 120px;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), border-color 0.2s;
}
.branch:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--accent-line); }
.branch__media { position: relative; }
/* height:auto is load-bearing. The width/height attributes on <img> are
   presentational hints, so without it the attribute height (900) stays definite,
   aspect-ratio is ignored, and the card grows to a 900px-tall image. */
.branch__media img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.branch__body { padding: 24px 24px 26px; display: flex; flex-direction: column; flex-grow: 1; }
.branch__title { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 4px; }
.branch h3 { font-size: 1.28rem; }
.branch__where { display: flex; gap: 9px; align-items: flex-start; color: var(--muted); font-size: 0.93rem; margin-bottom: 16px; }
.branch__where svg { width: 16px; height: 16px; color: var(--accent); flex-shrink: 0; margin-top: 5px; }

/* Open-now badge. The state is computed in script.js from the data-hours
   attribute on the card, so the badge can never disagree with the table under
   it. With JS off the badge is not rendered at all — an absent badge is honest,
   a stale "Open now" is not. */
.badge-open {
  display: inline-flex; align-items: center; gap: 7px; flex-shrink: 0;
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.02em;
  border-radius: 999px; padding: 5px 12px; white-space: nowrap;
  background: var(--accent-soft); color: var(--accent);
}
.badge-open::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex-shrink: 0;
}
.badge-open.is-open::before { animation: pulse 2.4s ease-in-out infinite; }
.badge-open.is-closed { background: var(--surface-2); color: var(--muted); }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
@media (prefers-reduced-motion: reduce) { .badge-open.is-open::before { animation: none; } }

/* per-branch hours — a definition list, not a table: it is two columns of
   plain facts and it has to stay readable at 320px */
.hours { margin-bottom: 18px; border-top: 1px solid var(--line); }
.hours div {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 0.92rem;
}
.hours dt { color: var(--muted); }
.hours dd { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hours .is-today dt, .hours .is-today dd { color: var(--accent); font-weight: 700; }

.branch__meta { display: grid; gap: 11px; margin-bottom: 20px; padding-top: 4px; }
.branch__meta li { display: flex; gap: 11px; align-items: flex-start; font-size: 0.92rem; }
.branch__meta svg { width: 16px; height: 16px; color: var(--accent-2); flex-shrink: 0; margin-top: 5px; }
.branch__meta a { color: var(--text); font-weight: 600; }
.branch__meta a:hover { color: var(--accent); }
.branch__meta span { color: var(--muted); }
.branch__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; }
.branch__actions .btn { padding: 12px 20px; min-height: 46px; font-size: 0.9rem; flex: 1 1 auto; }

/* responsible pharmacist — the sector's trust signal, so it gets its own
   treatment rather than being one more line of small print */
.rp {
  display: flex; gap: 11px; align-items: flex-start;
  background: var(--blue-soft); border-radius: 12px; padding: 12px 14px; margin-bottom: 18px;
  font-size: 0.86rem; color: var(--muted);
}
.rp svg { width: 16px; height: 16px; color: var(--accent-2); flex-shrink: 0; margin-top: 3px; }
.rp strong { display: block; color: var(--text); font-weight: 700; }

/* ---------- branch strip (home page teaser) ---------- */
.branch-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 1020px) { .branch-strip { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .branch-strip { grid-template-columns: 1fr; } }
.branch-mini {
  display: flex; flex-direction: column; gap: 6px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 20px 24px;
  transition: transform 0.2s var(--ease), border-color 0.2s, box-shadow 0.2s var(--ease);
}
.branch-mini:hover { transform: translateY(-3px); border-color: var(--accent-line); box-shadow: var(--shadow); }
.branch-mini h3 { font-size: 1.06rem; }
.branch-mini__where { color: var(--muted); font-size: 0.87rem; }
.branch-mini__hours { font-size: 0.87rem; font-weight: 600; color: var(--accent); font-variant-numeric: tabular-nums; margin-top: 4px; }
.branch-mini__phone { margin-top: 12px; font-size: 0.92rem; font-weight: 700; display: inline-flex; align-items: center; gap: 8px; }
.branch-mini__phone svg { width: 15px; height: 15px; color: var(--accent); }

/* ---------- service cards ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 940px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .cards { grid-template-columns: 1fr; } }
.cards--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1020px) { .cards--4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .cards--4 { grid-template-columns: 1fr; } }
.card-x {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 24px 30px;
  transition: transform 0.2s var(--ease), border-color 0.2s, box-shadow 0.2s var(--ease);
}
.card-x:hover { transform: translateY(-4px); border-color: var(--accent-line); box-shadow: var(--shadow); }
.card-x__icon {
  width: 50px; height: 50px; border-radius: 15px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); margin-bottom: 18px; flex-shrink: 0;
}
.card-x__icon svg { width: 24px; height: 24px; }
.card-x__icon--blue { background: var(--blue-soft); color: var(--accent-2); }
.card-x h3 { font-size: 1.13rem; margin-bottom: 9px; }
.card-x p { color: var(--muted); font-size: 0.94rem; }
.card-x ul { margin-top: 14px; display: grid; gap: 8px; }
.card-x ul li { display: flex; gap: 9px; align-items: flex-start; font-size: 0.9rem; color: var(--muted); }
.card-x ul svg { width: 15px; height: 15px; color: var(--accent); flex-shrink: 0; margin-top: 4px; }
/* The card's own CTA. It is a standalone control, not a link inside prose, so
   it has to clear the 44px tap target on its own — the padding, not the text,
   is what gets there. The negative margin keeps the visual gap unchanged. */
.card-x__link {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 8px; margin-bottom: -10px; padding: 10px 0;
  min-height: 44px;
  font-size: 0.89rem; font-weight: 700; color: var(--accent);
}
.card-x__link svg { width: 15px; height: 15px; transition: transform 0.25s var(--ease); }
.card-x:hover .card-x__link svg { transform: translateX(4px); }

/* media on a card — used by the clinic and shop grids */
.card-x--media { padding: 0; overflow: hidden; }
.card-x--media img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.card-x--media .card-x__body { padding: 24px 24px 26px; display: flex; flex-direction: column; flex-grow: 1; }

/* ---------- script steps ----------
   The three-step WhatsApp repeat flow. Numbered, because the whole point is
   that it is shorter than the alternative. */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: step; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }
.step {
  position: relative; counter-increment: step;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 24px 30px;
}
.step::before {
  content: counter(step);
  display: grid; place-items: center;
  width: 44px; height: 44px; border-radius: 13px; margin-bottom: 16px;
  background: var(--accent); color: var(--on-accent);
  font-family: var(--font-head); font-weight: 800; font-size: 1.2rem;
}
.step h3 { font-size: 1.1rem; margin-bottom: 9px; }
.step p { color: var(--muted); font-size: 0.94rem; }
/* the connector between steps — desktop only, decorative */
@media (min-width: 861px) {
  .step:not(:last-child)::after {
    content: ""; position: absolute; top: 50px; right: -14px; width: 8px; height: 8px;
    border-top: 2px solid var(--accent-line); border-right: 2px solid var(--accent-line);
    transform: rotate(45deg);
  }
}

/* ---------- medical-aid strip ---------- */
.aid-strip {
  background: var(--surface); border: 1px solid var(--accent-line); border-radius: 22px;
  padding: clamp(30px, 4vw, 46px);
  display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(26px, 4vw, 52px); align-items: center;
}
@media (max-width: 860px) { .aid-strip { grid-template-columns: 1fr; } }
.aid-strip h2 { font-size: clamp(1.6rem, 2.8vw, 2.1rem); margin-bottom: 13px; }
.aid-strip > div > p { color: var(--muted); font-size: 1rem; }
.aid-list { display: flex; flex-wrap: wrap; gap: 10px; }
.aid-list li {
  border: 1px solid var(--line-strong); border-radius: 10px; padding: 11px 16px;
  font-size: 0.9rem; font-weight: 600; background: var(--bg);
}
.aid-note { margin-top: 16px; font-size: 0.85rem; color: var(--muted); }

/* ---------- split ---------- */
.split { display: grid; grid-template-columns: 1.02fr 1fr; gap: clamp(34px, 5vw, 70px); align-items: center; }
.split--flip .split__media { order: 2; }
@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; }
  .split--flip .split__media { order: 0; }
}
.split__media { position: relative; }
.split__media img { border-radius: var(--radius); border: 1px solid var(--line); width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.split__badge {
  position: absolute; left: -16px; bottom: 24px;
  background: var(--accent); color: var(--on-accent); border-radius: 16px; padding: 17px 21px;
  font-family: var(--font-head); box-shadow: var(--shadow);
}
.split__badge strong { display: block; font-size: 1.8rem; font-weight: 800; line-height: 1; }
.split__badge small { font-family: var(--font-body); font-size: 0.77rem; font-weight: 600; opacity: 0.92; }
@media (max-width: 560px) { .split__badge { left: 10px; } }
.split__content h2 { font-size: clamp(1.85rem, 3.1vw, 2.4rem); margin-bottom: 18px; }
.split__content > p { color: var(--muted); margin-bottom: 15px; font-size: 1.02rem; }
.ticklist { margin-top: 24px; display: grid; gap: 14px; }
.ticklist li { display: flex; gap: 12px; align-items: flex-start; }
.ticklist svg { width: 20px; height: 20px; color: var(--accent); flex-shrink: 0; margin-top: 5px; }
.ticklist strong { font-family: var(--font-head); font-weight: 700; }
.ticklist span { color: var(--muted); }

/* ---------- stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
@media (max-width: 700px) { .stats { grid-template-columns: 1fr 1fr; } }
.stat {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px 20px; text-align: center;
}
.stat strong {
  display: block; font-family: var(--font-head); font-weight: 800; font-size: 2rem;
  color: var(--gold); line-height: 1.1; font-variant-numeric: tabular-nums;
}
.stat span { font-size: 0.86rem; color: var(--muted); }

/* ---------- chips / pills ---------- */
.pills { display: flex; flex-wrap: wrap; gap: 10px; }
.pills li {
  border: 1px solid var(--line-strong); border-radius: 999px; padding: 9px 17px;
  font-size: 0.88rem; font-weight: 600; color: var(--text);
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}
.pills li:hover { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }

.chip {
  display: inline-flex; align-items: center; gap: 7px;
  border-radius: 999px; padding: 6px 14px; font-size: 0.81rem; font-weight: 700;
  background: var(--accent-soft); color: var(--accent);
}
.chip--blue { background: var(--blue-soft); color: var(--accent-2); }
.chip svg { width: 14px; height: 14px; }

/* ---------- clinic price list ---------- */
/* wrapper scrolls rather than the page — a money table cannot be made to fit a
   320px screen without shrinking the figures past readability */
.table-wrap {
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
}
.pricing { width: 100%; border-collapse: collapse; min-width: 460px; }
.pricing caption { text-align: left; padding: 22px 24px 0; color: var(--muted); font-size: 0.91rem; }
.pricing th, .pricing td { padding: 15px 20px; text-align: left; border-bottom: 1px solid var(--line); }
.pricing thead th {
  font-family: var(--font-body); font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.11em; text-transform: uppercase; color: var(--accent-2);
  border-bottom: 1px solid var(--line-strong); white-space: nowrap;
}
.pricing tbody th { font-family: var(--font-head); font-weight: 700; font-size: 1rem; }
.pricing tbody th small { display: block; font-family: var(--font-body); font-weight: 400; font-size: 0.84rem; color: var(--muted); }
.pricing td {
  font-family: var(--font-head); font-weight: 700; font-size: 1.04rem;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.pricing tbody tr:last-child th, .pricing tbody tr:last-child td { border-bottom: 0; }
.pricing tbody tr { transition: background 0.2s var(--ease); }
.pricing tbody tr:hover { background: var(--accent-soft); }

.notes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 28px; }
@media (max-width: 900px) { .notes { grid-template-columns: 1fr; } }
.note-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 24px;
}
.note-card h3 { font-size: 1.06rem; margin-bottom: 9px; }
.note-card p { color: var(--muted); font-size: 0.93rem; }
.note-card strong { color: var(--text); }

/* ---------- health shop categories ---------- */
.shop-cats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 940px) { .shop-cats { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .shop-cats { grid-template-columns: 1fr; } }
.shop-cat {
  position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line);
  background: var(--surface);
}
.shop-cat img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; transition: transform 0.6s var(--ease); }
.shop-cat:hover img { transform: scale(1.04); }
.shop-cat__body { padding: 22px 22px 24px; }
.shop-cat h3 { font-size: 1.1rem; margin-bottom: 8px; }
.shop-cat p { color: var(--muted); font-size: 0.92rem; }

/* ---------- clinic day strip ---------- */
.day-strip { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
@media (max-width: 900px) { .day-strip { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 480px) { .day-strip { grid-template-columns: repeat(2, 1fr); } }
.day {
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  padding: 16px 14px; text-align: center;
}
.day strong { display: block; font-family: var(--font-head); font-size: 0.95rem; margin-bottom: 3px; }
.day span { font-size: 0.83rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.day--closed { background: var(--surface-2); }
.day--closed strong { color: var(--muted); }

/* ---------- CTA band ---------- */
.cta-band {
  position: relative; overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--accent-line);
  border-radius: 24px; padding: clamp(44px, 6vw, 70px); text-align: center;
}
.cta-band::before {
  content: ""; position: absolute; inset: -50%;
  background:
    radial-gradient(circle at 78% 16%, rgba(26, 107, 69, 0.10), transparent 44%),
    radial-gradient(circle at 16% 84%, rgba(11, 92, 138, 0.09), transparent 46%);
}
.cta-band > * { position: relative; }
.cta-band h2 { font-size: clamp(1.75rem, 3.3vw, 2.4rem); margin-bottom: 13px; }
.cta-band p { color: var(--muted); max-width: 580px; margin: 0 auto 28px; font-size: 1.03rem; }
.cta-band__actions { display: flex; gap: 13px; justify-content: center; flex-wrap: wrap; }

/* ---------- contact ---------- */
.contact-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: clamp(30px, 5vw, 58px); align-items: start; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px 28px; }
.contact-card h3 { font-size: 1.3rem; margin-bottom: 18px; }
.contact-card ul { display: grid; gap: 18px; }
.contact-card li { display: flex; gap: 14px; align-items: flex-start; }
.contact-card li svg { width: 20px; height: 20px; color: var(--accent); flex-shrink: 0; margin-top: 4px; }
.contact-card li > div { min-width: 0; }
.contact-card li strong { display: block; font-family: var(--font-head); font-weight: 700; font-size: 0.97rem; margin-bottom: 2px; }
.contact-card li a, .contact-card li span { color: var(--muted); font-size: 0.95rem; }
.contact-card li a:hover { color: var(--accent); }

.form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px 28px; }
.form h3 { font-size: 1.3rem; margin-bottom: 8px; }
.form > p { color: var(--muted); font-size: 0.95rem; margin-bottom: 22px; }
.form-row { margin-bottom: 18px; }
.form-row label { display: block; font-family: var(--font-body); font-weight: 700; font-size: 0.88rem; margin-bottom: 7px; }
.form-row .req { color: var(--accent); }
.form-row input, .form-row select, .form-row textarea {
  width: 100%; padding: 14px 16px; min-height: 48px;
  background: var(--bg); color: var(--text);
  border: 1px solid var(--line-strong); border-radius: 11px;
  font-family: var(--font-body); font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-row textarea { min-height: 118px; resize: vertical; }
.form-row input:focus, .form-row select:focus, .form-row textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}
.form-row small { display: block; margin-top: 7px; font-size: 0.85rem; color: var(--muted); }
.form-row--pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 620px) { .form-row--pair { grid-template-columns: 1fr; } }
.form-note { margin-top: 16px; font-size: 0.94rem; color: var(--accent-2); font-weight: 600; min-height: 1.4em; }
.form__legal { margin-top: 14px; font-size: 0.83rem; color: var(--muted); }

/* ---------- page hero breadcrumbs ---------- */
.crumbs { display: flex; gap: 10px; align-items: center; font-size: 0.87rem; color: var(--muted); margin-bottom: 4px; }
/* padded so the breadcrumb link still clears a 44px tap target on mobile */
.crumbs a { display: inline-block; padding: 11px 0; }
.crumbs a:hover { color: var(--accent); }
/* separator stays --muted, not --gold: at 14px it needs the full 4.5:1 */
.crumbs span { color: var(--muted); }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); background: var(--surface-2); padding: 62px 0 30px; }
.footer__grid { display: grid; grid-template-columns: 1.35fr 1fr 1fr 1.2fr; gap: 32px; margin-bottom: 42px; }
@media (max-width: 900px) { .footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer__grid { grid-template-columns: 1fr; } }
.footer__brand .brand { margin-bottom: 16px; }
.footer__brand p { color: var(--muted); font-size: 0.94rem; max-width: 300px; }
.footer h4 {
  font-family: var(--font-body); font-size: 0.71rem; font-weight: 700;
  letter-spacing: 0.15em; text-transform: uppercase; color: var(--accent-2); margin-bottom: 16px;
}
.footer ul { display: grid; gap: 10px; }
.footer ul a, .footer ul span { color: var(--muted); font-size: 0.94rem; transition: color 0.2s; }
.footer ul a:hover { color: var(--accent); }
/* the responsible-pharmacist line is a legal-ish disclosure, so it sits in the
   footer of every page, not only on the branch page */
.footer__rp {
  border-top: 1px solid var(--line); padding-top: 20px; margin-bottom: 20px;
  font-size: 0.85rem; color: var(--muted);
}
.footer__rp strong { color: var(--text); }
.footer__bottom {
  border-top: 1px solid var(--line); padding-top: 22px;
  display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  color: var(--muted); font-size: 0.85rem;
}

/* ---------- floating call button (mobile) ---------- */
.call-fab {
  position: fixed; right: 18px; bottom: 18px; z-index: 90;
  width: 58px; height: 58px; border-radius: 50%;
  background: var(--accent); color: var(--on-accent); display: none; place-items: center;
  box-shadow: 0 12px 30px rgba(26, 107, 69, 0.38);
  transition: transform 0.2s var(--ease);
}
.call-fab:hover { transform: scale(1.06); }
.call-fab svg { width: 23px; height: 23px; }
@media (max-width: 700px) {
  .call-fab { display: grid; }
  /* comfortable tap targets so the FAB never lands on a link */
  .footer ul { gap: 2px; }
  .footer ul a, .footer ul span { display: inline-block; padding: 10px 0; }
  .contact-card li a { display: inline-block; padding: 10px 0; }
}

/* ---------- demo ribbon (remove when handing a real site over) ---------- */
.demo-note {
  background: var(--surface); border-top: 1px solid var(--line);
  padding: 15px 24px; text-align: center; font-size: 0.83rem; color: var(--muted);
}
.demo-note strong { color: var(--accent-2); font-weight: 700; }

/* ---------- WhatsApp ---------- */
/* WhatsApp is how most South Africans actually send a repeat script, so this
   float shows on every breakpoint, not just mobile. The green is WhatsApp's own
   brand colour and is deliberately NOT driven from the :root tokens — leave it
   alone when re-skinning. */
.wa-fab {
  position: fixed; right: 18px; bottom: 18px; z-index: 91;
  width: 58px; height: 58px; border-radius: 50%;
  background: #25d366; color: #04240f; display: grid; place-items: center;
  box-shadow: 0 12px 30px rgba(37, 211, 102, 0.42);
  transition: transform 0.2s var(--ease);
}
.wa-fab:hover { transform: scale(1.06); }
.wa-fab svg { width: 28px; height: 28px; }

.btn--whatsapp { background: #25d366; color: #04240f; border-color: #25d366; }
.btn--whatsapp:hover { background: #1fbe5b; border-color: #1fbe5b; color: #04240f; }
.btn--whatsapp svg { width: 20px; height: 20px; }

@media (max-width: 700px) {
  /* stack the call button above the WhatsApp float so they never overlap */
  .call-fab { bottom: 86px; }
  /* Two stacked floats reach 144px up the viewport. Reserve room below the
     footer's last line so neither ever lands on it. This MUST hang off .footer,
     not .demo-note, for two reasons: the demo note is deleted at go-live and the
     clearance has to survive that, and .demo-note's base rule appears LATER in
     this file with a `padding` shorthand that would silently reset any
     padding-bottom set here. */
  .footer { padding-bottom: 172px; }
}
