/* ==========================================================================
   Crayson Pharmacy design system — Direction B "Warm Care", Orchard palette.
   Shared by the website and the staff system. No build step; plain CSS.
   ========================================================================== */

:root {
  /* Brand */
  --leaf: #5ba31c;  --leaf-dark: #4a8716;  --leaf-tint: #eaf5df;
  --lime: #58e60c;  --lime-ink: #1f3d0a;   --lime-tint: #eefde3;
  --olive: #3e5a12; --olive-dark: #2c400d; --olive-tint: #e7ecdb;
  /* Neutrals (hue-biased toward green) */
  --bg: #faf8f2; --surface: #ffffff; --surface-2: #f4f3ec;
  --text: #1b2415; --muted: #5b6656; --faint: #8a927f;
  --line: #e6e4d8; --line-strong: #cfd3c2;
  /* Semantic — separate from brand so status never reads as accent */
  --ok: #2f8f3a;  --ok-tint: #e6f4e8;
  --warn: #b7791f; --warn-tint: #fdf3df;
  --danger: #b3261e; --danger-tint: #fbe9e7;
  --info: #2b6cb0; --info-tint: #e6effa;
  /* Roles */
  --primary: var(--leaf); --primary-text: #ffffff;
  --secondary: var(--olive); --secondary-text: #ffffff;
  --accent: var(--lime); --accent-text: var(--lime-ink);
  --link: var(--olive); --link-hover: var(--leaf-dark);
  /* Shape & shadow */
  --r-sm: 8px; --r-md: 12px; --r-lg: 18px; --r-pill: 100px;
  --shadow-sm: 0 1px 2px rgba(27,36,21,.06);
  --shadow-md: 0 8px 24px rgba(62,90,18,.10);
  --shadow-lg: 0 20px 48px rgba(27,36,21,.16);
  /* Type */
  --font-display: 'Lora', Georgia, 'Times New Roman', serif;
  --font-body: 'Work Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* ── Base ─────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font-body); font-size: 15.5px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; margin: 0; line-height: 1.2; color: inherit; text-wrap: balance; }
h1 { font-size: clamp(30px, 4vw, 44px); } h2 { font-size: clamp(22px, 2.4vw, 27px); } h3 { font-size: 19px; } h4 { font-size: 16px; }
p { margin: 0; }
a { color: var(--link); text-decoration: none; } a:hover { color: var(--link-hover); }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; }
img, svg { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--leaf); outline-offset: 2px; border-radius: 4px; }
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 clamp(20px, 4vw, 64px); }
.muted { color: var(--muted); } .faint { color: var(--faint); } .small { font-size: 13px; } .tiny { font-size: 12px; }
.num { font-variant-numeric: tabular-nums; }
.eyebrow { font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--leaf-dark); }
.stack { display: flex; flex-direction: column; gap: var(--gap, 12px); }
.row { display: flex; align-items: center; gap: var(--gap, 12px); flex-wrap: wrap; }
.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── Buttons ──────────────────────────────────────────────────────────── */
.btn { border: 1.5px solid transparent; border-radius: var(--r-pill); font-weight: 700; font-size: 14px; padding: 0 22px; height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap; text-decoration: none; transition: filter .15s, transform .15s, background .15s, border-color .15s; }
.btn:hover { filter: brightness(.95); color: inherit; } .btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }
.btn-primary { background: var(--primary); color: var(--primary-text); } .btn-primary:hover { color: var(--primary-text); }
.btn-secondary { background: var(--secondary); color: var(--secondary-text); } .btn-secondary:hover { color: var(--secondary-text); }
.btn-accent { background: var(--accent); color: var(--accent-text); } .btn-accent:hover { color: var(--accent-text); }
.btn-outline { background: transparent; border-color: var(--line-strong); color: var(--text); } .btn-outline:hover { border-color: var(--olive); background: var(--surface); }
.btn-ghost { background: transparent; color: var(--olive); } .btn-ghost:hover { background: var(--olive-tint); }
.btn-danger { background: var(--danger); color: #fff; } .btn-danger:hover { color: #fff; }
.btn-sm { height: 36px; padding: 0 16px; font-size: 12.5px; } .btn-lg { height: 52px; padding: 0 28px; font-size: 15px; }
.btn-block { width: 100%; }
.btn-icon { width: 40px; height: 40px; padding: 0; border-radius: 50%; }

/* ── Forms ────────────────────────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 6px; }
.label { font-size: 13px; font-weight: 600; color: var(--text); }
.label .req { color: var(--danger); }
.input, .select, .textarea { width: 100%; background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r-md); padding: 0 14px; height: 44px; font-size: 14.5px; transition: border-color .15s, box-shadow .15s; }
.textarea { height: auto; min-height: 96px; padding: 10px 14px; resize: vertical; line-height: 1.5; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235b6656' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--leaf); box-shadow: 0 0 0 3px var(--leaf-tint); }
.input.is-invalid, .select.is-invalid, .textarea.is-invalid { border-color: var(--danger); }
.input[readonly] { background: var(--surface-2); }
.hint { font-size: 12.5px; color: var(--muted); } .error { font-size: 12.5px; color: var(--danger); font-weight: 600; }
.input-pill { border-radius: var(--r-pill); padding: 0 20px; }
.search { display: flex; align-items: center; background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r-pill); padding: 4px 4px 4px 18px; height: 52px; gap: 8px; }
.search svg { flex-shrink: 0; color: var(--muted); }
.search input { border: none; outline: none; background: transparent; flex: 1; min-width: 0; font-size: 14.5px; padding: 0 6px; }
.check { display: flex; align-items: center; gap: 10px; font-size: 14px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--leaf); margin: 0; }

/* ── Cards, badges, chips ─────────────────────────────────────────────── */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.card-body { padding: 20px; } .card-head { padding: 16px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-lift { transition: box-shadow .15s, transform .15s; } .card-lift:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.badge { display: inline-flex; align-items: center; gap: 5px; border-radius: var(--r-pill); font-size: 11px; font-weight: 700; padding: 3px 10px; line-height: 1.5; white-space: nowrap; }
.badge-lime { background: var(--lime); color: var(--lime-ink); } .badge-olive { background: var(--olive); color: #fff; } .badge-leaf { background: var(--leaf-tint); color: var(--leaf-dark); }
.badge-ok { background: var(--ok-tint); color: var(--ok); } .badge-warn { background: var(--warn-tint); color: var(--warn); } .badge-danger { background: var(--danger-tint); color: var(--danger); } .badge-info { background: var(--info-tint); color: var(--info); } .badge-muted { background: var(--surface-2); color: var(--muted); }
.badge-rx { background: var(--olive); color: #fff; letter-spacing: .04em; }
.chip { display: inline-flex; align-items: center; gap: 6px; border-radius: var(--r-pill); font-size: 12.5px; font-weight: 600; padding: 8px 16px; background: var(--surface); border: 1px solid var(--line); color: var(--muted); cursor: pointer; text-decoration: none; }
.chip:hover { border-color: var(--olive); color: var(--text); } .chip.is-active { background: var(--primary); border-color: var(--primary); color: #fff; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--faint); } .dot-ok { background: var(--ok); } .dot-warn { background: var(--warn); } .dot-danger { background: var(--danger); }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--olive-tint); color: var(--olive); font-weight: 700; font-size: 13px; display: inline-flex; align-items: center; justify-content: center; }
.icon-circle { width: 80px; height: 80px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.c1 { background: var(--leaf-tint); color: var(--leaf-dark); } .c2 { background: var(--lime-tint); color: var(--olive); } .c3 { background: var(--olive-tint); color: var(--olive); }

/* ── Tables ───────────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 700; padding: 11px 14px; border-bottom: 1px solid var(--line); background: var(--bg); white-space: nowrap; }
.table td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: none; } .table tbody tr:hover td { background: var(--surface-2); }
.table .num, .table td.right, .table th.right { text-align: right; font-variant-numeric: tabular-nums; }
.table-dense th, .table-dense td { padding: 7px 10px; font-size: 13px; }

/* ── Alerts, toasts, modal ────────────────────────────────────────────── */
.alert { border-radius: var(--r-md); padding: 12px 16px; font-size: 14px; display: flex; gap: 10px; align-items: flex-start; border: 1px solid transparent; }
.alert-ok { background: var(--ok-tint); color: var(--ok); border-color: #c8e6cd; } .alert-warn { background: var(--warn-tint); color: #7a5111; border-color: #f0dfb5; } .alert-danger { background: var(--danger-tint); color: var(--danger); border-color: #f3c7c3; } .alert-info { background: var(--info-tint); color: var(--info); border-color: #c5d8f0; }
.toasts { position: fixed; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 8px; z-index: 100; }
.toast { background: var(--text); color: #fff; padding: 12px 16px; border-radius: var(--r-md); font-size: 14px; box-shadow: var(--shadow-lg); display: flex; gap: 10px; align-items: center; min-width: 240px; max-width: 360px; animation: toast-in .2s ease-out; }
.toast-ok { background: var(--ok); } .toast-danger { background: var(--danger); } .toast-warn { background: var(--warn); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }
.modal-backdrop { position: fixed; inset: 0; background: rgba(27,36,21,.45); display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 90; }
.modal-backdrop[hidden] { display: none; }
.modal { background: var(--surface); border-radius: var(--r-lg); width: min(520px, 100%); box-shadow: var(--shadow-lg); max-height: 90vh; overflow: auto; }
.modal-head { padding: 18px 22px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; } .modal-body { padding: 22px; } .modal-foot { padding: 14px 22px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 10px; }
.divider { border: 0; border-top: 1px solid var(--line); margin: 0; }
.empty { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty h3 { color: var(--text); margin-bottom: 6px; }
kbd { font-family: var(--font-mono); font-size: 11px; background: var(--surface-2); border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 5px; padding: 1px 6px; }

/* ── Website layout ───────────────────────────────────────────────────── */
.util { background: var(--olive); color: #f3f7ea; font-size: 13px; font-weight: 500; text-align: center; padding: 10px 16px; }
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.nav { height: 80px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.logo { font-family: var(--font-display); font-weight: 700; font-size: 23px; color: var(--olive); display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo:hover { color: var(--olive); }
.logo-mark { width: 36px; height: 36px; border-radius: 50%; background: var(--lime); color: var(--lime-ink); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.nav-links { display: flex; gap: 32px; font-size: 14.5px; font-weight: 600; } .nav-links a { color: var(--muted); } .nav-links a.is-active, .nav-links a:hover { color: var(--text); }
.nav-icons { display: flex; align-items: center; gap: 18px; color: var(--text); }
.nav-icons a { color: var(--text); display: flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 600; }
.cart-link { position: relative; } .cart-link .count { position: absolute; top: -7px; right: -9px; background: var(--lime); color: var(--lime-ink); font-size: 10px; font-weight: 700; min-width: 17px; height: 17px; padding: 0 4px; border-radius: var(--r-pill); display: flex; align-items: center; justify-content: center; }
.nav-toggle { display: none; }
.hero { position: relative; overflow: hidden; background: linear-gradient(180deg, var(--leaf-tint) 0%, var(--bg) 100%); padding: clamp(52px, 7vw, 88px) 0 clamp(44px, 6vw, 72px); text-align: center; }
.hero .blob { position: absolute; inset: 0; pointer-events: none; opacity: .55; }
.hero .inner { position: relative; display: flex; flex-direction: column; align-items: center; }
.hero h1 { font-size: clamp(36px, 5vw, 54px); line-height: 1.12; margin-top: 20px; max-width: 680px; }
.hero .lead { font-size: clamp(15px, 1.4vw, 17px); color: var(--muted); max-width: 500px; margin-top: 16px; line-height: 1.65; }
.hero .search { width: min(580px, 100%); height: 60px; margin-top: 30px; box-shadow: var(--shadow-md); }
.hero-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 28px; margin-top: 20px; font-size: 13.5px; font-weight: 600; }
.hero-links a { display: flex; align-items: center; gap: 7px; color: var(--text); } .hero-links a:hover { color: var(--leaf-dark); } .hero-links svg { color: var(--leaf); }
.section { padding: clamp(40px, 5vw, 64px) 0 0; }
.sec-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 26px; flex-wrap: wrap; } .sec-head a { font-size: 14px; font-weight: 600; }
.cats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 24px 16px; justify-items: center; }
.cat { display: flex; flex-direction: column; align-items: center; gap: 12px; font-size: 13px; font-weight: 600; color: var(--text); text-align: center; }
.cat .icon-circle { transition: transform .15s; } .cat:hover .icon-circle { transform: translateY(-3px); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 22px; }
.product { overflow: hidden; display: flex; flex-direction: column; }
.product-media { height: 156px; display: flex; align-items: center; justify-content: center; position: relative; }
.product-media img { width: 100%; height: 100%; object-fit: cover; }
.product-media .badge-rx { position: absolute; top: 12px; left: 12px; }
.product-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 5px; flex: 1; }
.product-title { font-weight: 700; font-size: 14.5px; color: var(--text); } .product-sub { font-size: 12.5px; color: var(--muted); }
.product-row { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 10px; } .price { font-weight: 700; font-size: 16px; font-variant-numeric: tabular-nums; }
.band { margin-top: clamp(40px, 5vw, 64px); background: var(--secondary); color: #f3f7ea; border-radius: 24px; padding: clamp(28px, 4vw, 48px); display: grid; grid-template-columns: 1.3fr 1fr; gap: 32px; align-items: center; }
.band h2 { font-size: clamp(24px, 2.6vw, 32px); color: #fff; } .band p { margin-top: 12px; opacity: .85; line-height: 1.6; font-size: 15px; }
.steps { display: grid; gap: 12px; }
.step { display: flex; gap: 14px; align-items: flex-start; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.15); border-radius: 14px; padding: 14px 16px; font-size: 14px; }
.step b { width: 28px; height: 28px; flex-shrink: 0; border-radius: 50%; background: var(--lime); color: var(--lime-ink); display: flex; align-items: center; justify-content: center; font-size: 13px; }
.promise { margin-top: clamp(40px, 5vw, 64px); background: var(--lime-tint); padding: clamp(40px, 5vw, 64px) 0; }
.promise .cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 32px; }
.promise h3 { display: flex; align-items: center; gap: 10px; } .promise h3 svg { color: var(--olive); } .promise p { font-size: 14px; color: var(--muted); line-height: 1.6; margin-top: 8px; }
.site-footer { background: var(--surface); border-top: 1px solid var(--line); padding: clamp(40px, 5vw, 56px) 0 28px; margin-top: clamp(40px, 5vw, 64px); }
.promise + .site-footer { margin-top: 0; }
.fgrid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 32px; }
.fcol { display: flex; flex-direction: column; gap: 11px; font-size: 13.5px; } .fcol b { margin-bottom: 4px; } .fcol p { color: var(--muted); line-height: 1.6; max-width: 280px; }
.fbottom { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding-top: 22px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
.pay { display: flex; gap: 10px; } .pay span { border: 1px solid var(--line); padding: 5px 10px; border-radius: var(--r-pill); }
.auth-card { max-width: 440px; margin: clamp(40px, 8vw, 80px) auto; }
.page-title { padding: clamp(28px, 4vw, 44px) 0 8px; }

/* ── Shared page bits ─────────────────────────────────────────────────── */
.skip { position: absolute; left: -9999px; top: 8px; background: var(--olive); color: #fff; padding: 8px 14px; border-radius: var(--r-sm); z-index: 50; } .skip:focus { left: 12px; color: #fff; }
.util a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.h2 { font-size: clamp(22px, 2.4vw, 27px); } .h3 { font-size: 19px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 8px; } .crumbs a { color: var(--muted); display: inline-flex; align-items: center; gap: 4px; } .crumbs a:hover { color: var(--text); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 14px 0 22px; overflow-x: auto; }
.tabs a { padding: 10px 16px; font-weight: 600; font-size: 14px; color: var(--muted); border-bottom: 2.5px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a:hover { color: var(--text); } .tabs a.is-active { color: var(--text); border-bottom-color: var(--leaf); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; } .span-2 { grid-column: 1 / -1; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; } legend { padding: 0; }

/* ── Shop listing ─────────────────────────────────────────────────────── */
.shop { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 32px; align-items: start; margin-top: 8px; }
.shop-filters { position: sticky; top: 100px; }
.filter-box > summary { display: none; }
.filter-group { display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.filter-group > b, .filter-group > legend { font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.filter-group > a { display: flex; justify-content: space-between; gap: 8px; color: var(--text); padding: 5px 10px; margin: 0 -10px; border-radius: var(--r-sm); font-size: 14px; }
.filter-group > a span { color: var(--faint); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.filter-group > a:hover { background: var(--surface-2); } .filter-group > a.is-active { background: var(--leaf-tint); color: var(--leaf-dark); font-weight: 700; }
.filter-group .input { height: 40px; }
.shop-bar { display: flex; gap: 12px; align-items: center; margin-bottom: 22px; flex-wrap: wrap; }
.shop-bar .search { height: 48px; min-width: 240px; }
.shop-bar .sort .select { height: 48px; border-radius: var(--r-pill); width: auto; min-width: 190px; }
.pager { display: flex; justify-content: center; gap: 6px; margin-top: 32px; flex-wrap: wrap; }
.pager a, .pager span { min-width: 40px; height: 40px; padding: 0 12px; border-radius: var(--r-pill); display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-weight: 600; font-size: 14px; border: 1px solid var(--line); background: var(--surface); color: var(--text); }
.pager a:hover { border-color: var(--olive); } .pager .is-current { background: var(--primary); border-color: var(--primary); color: #fff; }
.pager .is-disabled { opacity: .45; } .pager .gap { border: 0; background: none; min-width: 20px; padding: 0; }

/* ── Product page ─────────────────────────────────────────────────────── */
.pdp { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); margin-top: 14px; align-items: start; }
.pdp-media { border-radius: 24px; min-height: clamp(280px, 38vw, 440px); display: flex; align-items: center; justify-content: center; position: relative; }
.pdp-media .badge-rx { position: absolute; top: 18px; left: 18px; font-size: 12px; padding: 5px 12px; }
.pdp-media { overflow: hidden; } .pdp-img { width: 100%; height: 100%; max-height: 520px; object-fit: contain; background: #fff; }
.cart-thumb { overflow: hidden; } .cart-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pdp-title { font-size: clamp(26px, 3vw, 38px); }
.pdp-price { font-size: 30px; }
.qty { display: inline-flex; align-items: center; border: 1.5px solid var(--line-strong); border-radius: var(--r-pill); background: var(--surface); height: 52px; padding: 0 4px; }
.qty input { width: 44px; border: 0; background: transparent; text-align: center; font-weight: 700; font-size: 16px; font-variant-numeric: tabular-nums; -moz-appearance: textfield; appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty input:focus { outline: none; }
.qty-btn { width: 40px; height: 40px; border-radius: 50%; border: 0; background: transparent; color: var(--olive); display: inline-flex; align-items: center; justify-content: center; }
.qty-btn:hover { background: var(--olive-tint); }
.qty-sm { height: 40px; } .qty-sm .qty-btn { width: 32px; height: 32px; } .qty-sm input { width: 36px; font-size: 14.5px; }
.perks { list-style: none; margin: 4px 0 0; padding: 16px 0 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; font-size: 14px; color: var(--muted); }
.perks li { display: flex; gap: 12px; align-items: flex-start; } .perks svg { color: var(--leaf-dark); flex-shrink: 0; margin-top: 1px; } .perks b { color: var(--text); }
.pdp-more { display: grid; grid-template-columns: 1.4fr 1fr; gap: 22px; margin-top: clamp(28px, 4vw, 44px); align-items: start; }
.specs { display: grid; grid-template-columns: max-content 1fr; gap: 10px 24px; margin: 16px 0 0; font-size: 14px; }
.specs dt { color: var(--muted); } .specs dd { margin: 0; font-weight: 600; }
.branch-stock { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; }
.branch-stock li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.branch-stock li:last-child { border-bottom: 0; } .branch-stock li > div { display: flex; flex-direction: column; gap: 2px; }

/* ── Basket & checkout ────────────────────────────────────────────────── */
.cart, .checkout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start; margin-top: 8px; }
.summary { position: sticky; top: 100px; }
.cart-line { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto 110px 44px; gap: 16px; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.cart-line:last-child { border-bottom: 0; }
.cart-thumb { width: 64px; height: 64px; border-radius: 14px; display: flex; align-items: center; justify-content: center; }
.cart-name { display: flex; flex-direction: column; gap: 3px; min-width: 0; } .cart-name a { font-weight: 700; color: var(--text); }
.cart-total { text-align: right; }
.sum-row { display: flex; justify-content: space-between; gap: 12px; font-size: 14.5px; align-items: baseline; }
.sum-total { font-weight: 700; font-size: 18px; }
.free-bar { height: 8px; border-radius: 8px; background: var(--surface-2); overflow: hidden; } .free-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--leaf), var(--lime)); border-radius: 8px; }
.co-step h2 { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.co-num { width: 28px; height: 28px; border-radius: 50%; background: var(--lime); color: var(--lime-ink); font-family: var(--font-body); font-size: 13px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.options { display: grid; gap: 10px; } .options.two-col { grid-template-columns: 1fr 1fr; }
.option { position: relative; display: flex; align-items: center; gap: 12px; border: 1.5px solid var(--line); border-radius: var(--r-md); padding: 14px 16px; cursor: pointer; background: var(--surface); transition: border-color .15s, background .15s; }
.option:hover { border-color: var(--line-strong); }
.option input { position: absolute; opacity: 0; pointer-events: none; }
.option > span:first-of-type { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; row-gap: 2px; align-items: center; flex: 1; min-width: 0; }
.option > span:first-of-type svg { grid-row: span 2; color: var(--olive); }
.option b { font-size: 14.5px; } .option small { grid-column: 2; color: var(--muted); font-size: 12.5px; }
.option-aside { font-weight: 700; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.option:has(input:checked) { border-color: var(--leaf); background: var(--leaf-tint); box-shadow: 0 0 0 1px var(--leaf); }
.option:has(input:focus-visible) { outline: 2px solid var(--leaf); outline-offset: 2px; }
.mini-lines { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.mini-lines li { display: flex; justify-content: space-between; gap: 12px; } .mini-lines li > span:first-child { min-width: 0; }
.mini-lines .sum-total { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 2px; }

/* ── Payment & confirmation ───────────────────────────────────────────── */
.pay-card { max-width: 560px; margin: clamp(28px, 6vw, 64px) auto 0; }
.phone-pulse { width: 88px; height: 88px; margin: 0 auto; border-radius: 50%; background: var(--leaf-tint); color: var(--leaf-dark); display: flex; align-items: center; justify-content: center; position: relative; }
.phone-pulse::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--leaf); animation: pulse 1.8s ease-out infinite; }
@keyframes pulse { from { transform: scale(1); opacity: .8; } to { transform: scale(1.5); opacity: 0; } }
.pop { animation: pop .35s cubic-bezier(.2,1.4,.4,1); } @keyframes pop { from { transform: scale(.6); opacity: 0; } }
.done-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.done-facts div { background: var(--surface); padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.done-facts span { font-size: 12px; color: var(--muted); } .done-facts b { font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── Account ──────────────────────────────────────────────────────────── */
.acct-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.order-list, .addr-list { list-style: none; margin: 0; padding: 0; }
.order-list li + li, .addr-list li + li { border-top: 1px solid var(--line); }
.order-list a { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 20px; color: var(--text); }
.order-list a:hover { background: var(--surface-2); } .order-list a > div:first-child { display: flex; flex-direction: column; gap: 2px; }
.order-list-end { display: flex; align-items: center; gap: 14px; }
.addr-list li { display: flex; gap: 12px; align-items: flex-start; padding: 16px 20px; flex-wrap: wrap; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: flex; gap: 14px; position: relative; padding-bottom: 22px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; left: 11px; top: 26px; bottom: 2px; width: 2px; background: var(--line); }
.timeline li:last-child::before { display: none; } .timeline li.is-done::before { background: var(--leaf); }
.timeline li.is-current::before { background: var(--line); }
.tl-dot { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line-strong); background: var(--surface); flex-shrink: 0; display: flex; align-items: center; justify-content: center; color: #fff; }
.timeline li.is-done .tl-dot { background: var(--leaf); border-color: var(--leaf); }
.timeline li.is-current .tl-dot { box-shadow: 0 0 0 5px var(--leaf-tint); }
.timeline li > div { display: flex; flex-direction: column; gap: 1px; padding-top: 2px; } .timeline li:not(.is-done) b { color: var(--muted); font-weight: 600; }

/* ── Prescriptions (customer) ─────────────────────────────────────────── */
.rx-hero { background: linear-gradient(180deg, var(--leaf-tint) 0%, var(--bg) 100%); padding: clamp(40px, 6vw, 72px) 0 clamp(28px, 4vw, 48px); }
.rx-hero-inner { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.rx-hero h1 { font-size: clamp(32px, 4.4vw, 50px); line-height: 1.12; margin-top: 18px; }
.rx-hero .lead { color: var(--muted); font-size: clamp(15px, 1.4vw, 17px); line-height: 1.65; margin-top: 16px; max-width: 540px; }
.rx-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.rx-steps li { display: flex; gap: 16px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px 20px; box-shadow: var(--shadow-sm); }
.rx-steps b { width: 34px; height: 34px; flex-shrink: 0; border-radius: 50%; background: var(--lime); color: var(--lime-ink); display: flex; align-items: center; justify-content: center; font-size: 15px; }
.rx-steps h3 { font-size: 17px; } .rx-steps p { font-size: 14px; color: var(--muted); margin-top: 4px; line-height: 1.55; }
.rx-info { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.rx-info h3 { display: flex; gap: 8px; align-items: center; font-size: 17px; } .rx-info h3 svg { color: var(--leaf-dark); }
.ticks { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 14px; color: var(--muted); }
.ticks li { padding-left: 20px; position: relative; line-height: 1.5; } .ticks li::before { content: ""; position: absolute; left: 2px; top: 7px; width: 8px; height: 8px; border-radius: 50%; background: var(--leaf); }
.dropzone { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 30px 20px; border: 2px dashed var(--line-strong); border-radius: var(--r-lg); background: var(--bg); cursor: pointer; transition: border-color .15s, background .15s; }
.dropzone:hover, .dropzone.is-over { border-color: var(--leaf); background: var(--leaf-tint); }
.dropzone.is-invalid { border-color: var(--danger); }
.dropzone.has-files { padding: 16px 20px; flex-direction: row; justify-content: center; } .dropzone.has-files .dz-icon { width: 36px; height: 36px; } .dropzone.has-files .small { display: none; }
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.dz-icon { width: 56px; height: 56px; border-radius: 50%; background: var(--lime-tint); color: var(--olive); display: flex; align-items: center; justify-content: center; }
.dz-previews { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; } .dz-previews:empty { display: none; }
.dz-previews li { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.dz-thumb { width: 48px; height: 48px; border-radius: 8px; overflow: hidden; background: var(--olive-tint); color: var(--olive); font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.dz-thumb img { width: 100%; height: 100%; object-fit: cover; }
.dz-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; } .dz-meta small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rx-state { display: flex; gap: 20px; align-items: center; } .rx-state .phone-pulse { margin: 0; flex-shrink: 0; width: 72px; height: 72px; }
.quote-lines { list-style: none; margin: 0; padding: 0; }
.quote-lines li { display: grid; grid-template-columns: minmax(0, 1fr) auto 100px; gap: 12px; align-items: baseline; padding: 12px 0; border-bottom: 1px solid var(--line); }
.quote-lines li:first-child { padding-top: 0; }
.quote-lines li > div { display: flex; flex-direction: column; gap: 2px; } .quote-lines .price { text-align: right; font-size: 15px; }
.quote-lines li.is-na b { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--line-strong); }
.pharm-note { display: flex; gap: 12px; background: var(--lime-tint); border-radius: var(--r-md); padding: 14px 16px; font-size: 14px; } .pharm-note svg { color: var(--olive); flex-shrink: 0; } .pharm-note p { margin-top: 4px; line-height: 1.55; }
.rx-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 10px; margin-top: 12px; }
.rx-thumb { aspect-ratio: 3 / 4; border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); display: flex; align-items: center; justify-content: center; color: var(--olive); }
.rx-thumb img { width: 100%; height: 100%; object-fit: cover; } .rx-thumb:hover { border-color: var(--leaf); }
.rx-thumb span { display: flex; flex-direction: column; align-items: center; gap: 6px; } .rx-thumb small { font-size: 11px; color: var(--muted); }
.change-delivery > summary { list-style: none; margin-top: 10px; } .change-delivery > summary::-webkit-details-marker { display: none; }
.change-delivery[open] > summary { display: none; }
.change-delivery .co-step { border: 0; padding: 0; } .change-delivery .options.two-col { grid-template-columns: 1fr 1fr; }

@media (max-width: 900px) {
  .nav-links { display: none; } .nav-toggle { display: inline-flex; }
  .nav-links.is-open { display: flex; flex-direction: column; position: absolute; left: 0; right: 0; top: 80px; background: var(--surface); border-bottom: 1px solid var(--line); padding: 16px clamp(20px, 4vw, 64px) 20px; gap: 16px; }
  .band { grid-template-columns: 1fr; } .fgrid { grid-template-columns: 1fr 1fr; }
  .shop { grid-template-columns: 1fr; gap: 0; } .shop-filters { position: static; margin-bottom: 16px; }
  .filter-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); }
  .filter-box > summary { display: flex; align-items: center; gap: 8px; padding: 12px 16px; font-weight: 700; cursor: pointer; list-style: none; }
  .filter-box > summary::-webkit-details-marker { display: none; }
  .filter-box > form { padding: 4px 16px 16px; }
  .filter-box:not([open]) > form { display: none; }
  .pdp, .pdp-more, .cart, .checkout, .acct-grid, .rx-hero-inner, .rx-info { grid-template-columns: 1fr; }
  .summary { position: static; }
}
@media (min-width: 901px) { .filter-box > form { display: flex !important; } }
@media (max-width: 640px) {
  .cart-line { grid-template-columns: 52px minmax(0, 1fr) 40px; row-gap: 10px; padding: 14px 16px; }
  .cart-thumb { width: 52px; height: 52px; }
  .cart-line .qty { grid-column: 2; justify-self: start; } .cart-line .cart-total { grid-column: 3 / 4; grid-row: 2; align-self: center; text-align: right; white-space: nowrap; justify-self: end; }
  .cart-line .cart-remove { grid-column: 3; grid-row: 1; }
  .form-grid, .options.two-col { grid-template-columns: 1fr; }
  .done-facts { grid-template-columns: 1fr; }
  .quote-lines li { grid-template-columns: minmax(0, 1fr) auto; } .quote-lines li > .small { grid-column: 1; grid-row: 2; }
  .shop-bar .sort, .shop-bar .sort .select { width: 100%; }
}
@media (max-width: 560px) { .fgrid { grid-template-columns: 1fr; } .hero .search { height: 54px; } .hero .search .btn { padding: 0 16px; } .nav { height: 68px; } .nav-links.is-open { top: 68px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } html { scroll-behavior: auto; } }
@media print { .util, .site-header, .site-footer, .toasts { display: none !important; } body { background: #fff; } }

/* Phase 5: promo codes, refills, business portal, wellness */
.promo-box { padding-top: 4px; } .promo-box .input { height: 38px; font-size: 13px; }
.sum-row .error { display: inline; margin: 0; }
.biz-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; } .biz-stats .h2 { font-size: 24px; }
.statement .table td { vertical-align: top; }
.articles { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; margin-top: 20px; }
.article-card { display: flex; flex-direction: column; overflow: hidden; text-decoration: none; color: inherit; }
.article-media { aspect-ratio: 16 / 9; display: flex; align-items: center; justify-content: center; color: var(--leaf-dark); overflow: hidden; } .article-media img { width: 100%; height: 100%; object-fit: cover; }
.article-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; } .article-body h3 { font-size: 18px; line-height: 1.3; } .article-body .eyebrow { font-size: 11px; }
.article { max-width: 760px; padding-top: 24px; } .article-head h1 { font-size: clamp(28px, 4vw, 40px); line-height: 1.15; } .article-head { margin-bottom: 18px; }
.article-cover { width: 100%; border-radius: var(--r-lg); margin: 0 0 22px; }
.article-text { font-size: 17px; line-height: 1.7; } .article-text h2 { font-size: 24px; margin: 28px 0 8px; } .article-text h3 { font-size: 19px; margin: 22px 0 6px; } .article-text h4 { font-size: 16px; margin: 18px 0 4px; }
.article-text p { margin: 0 0 16px; } .article-text ul, .article-text ol { margin: 0 0 16px; padding-left: 22px; } .article-text li { margin-bottom: 6px; }
.article-text blockquote { margin: 0 0 16px; padding: 12px 18px; border-left: 3px solid var(--lime); background: var(--leaf-tint); border-radius: 0 12px 12px 0; }
.wellness-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 900px) { .biz-stats, .wellness-strip { grid-template-columns: 1fr; } }
@media print { .no-print, .tabs, .page-title form { display: none !important; } .statement { border: 0; box-shadow: none; } }
