/* ===========================================================
   Pradeep Medical Shop — Design Tokens
   Palette: deep pharmacy teal + warm coral action color
   Type: Fraunces (display, used sparingly) / Inter (body/UI) / IBM Plex Mono (prices, stock numbers)
   Signature: the "strip" motif — a row of blister-pack capsules used
   as a section divider, echoing a medicine strip instead of a plain hairline.
   =========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,600;9..144,700&family=Inter:wght@400;500;600;700;800&family=IBM+Plex+Mono:wght@500;600&display=swap');

:root{
  --bg: #F4F7F5;
  --surface: #FFFFFF;
  --surface-sunk: #EAF1EE;
  --ink: #142420;
  --ink-soft: #4B5C56;
  --muted: #7C8B85;
  --line: #DCE6E1;

  --primary: #146C5B;
  --primary-dark: #0C4B3F;
  --primary-tint: #E3F1EC;

  --accent: #FF6A4D;      /* coral — WhatsApp / Call / primary CTAs */
  --accent-dark: #E4502F;
  --accent-tint: #FFEAE4;

  --warn: #C2790C;
  --warn-tint: #FBF0DC;
  --danger: #C6402F;
  --danger-tint: #FBE7E3;
  --ok: #1F8A5F;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --shadow-card: 0 1px 2px rgba(20,36,32,.04), 0 8px 24px -12px rgba(20,36,32,.18);
  --shadow-pop: 0 12px 32px -8px rgba(12,75,63,.35);

  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;
}

*,*::before,*::after{ box-sizing:border-box; }
html{ -webkit-text-size-adjust:100%; }
body{
  margin:0;
  background:var(--bg);
  color:var(--ink);
  font-family:var(--font-body);
  line-height:1.5;
  -webkit-font-smoothing:antialiased;
  padding-bottom:76px; /* space for bottom nav on mobile */
}
h1,h2,h3{
  font-family:var(--font-display);
  color:var(--primary-dark);
  margin:0 0 .4em;
  line-height:1.1;
  letter-spacing:-.01em;
}
h1{ font-weight:600; font-size:clamp(28px,6vw,44px); }
h2{ font-weight:600; font-size:clamp(22px,4.5vw,30px); }
h3{ font-weight:600; font-size:19px; }
p{ margin:0 0 1em; color:var(--ink-soft); }
a{ color:inherit; text-decoration:none; }
button{ font-family:inherit; }
img{ max-width:100%; display:block; }

:focus-visible{ outline:3px solid var(--accent); outline-offset:2px; }

.container{ max-width:1080px; margin:0 auto; padding:0 20px; }

/* ---------- Top bar ---------- */
.topbar{
  position:sticky; top:0; z-index:40;
  background:rgba(244,247,245,.9);
  backdrop-filter:blur(10px);
  border-bottom:1px solid var(--line);
}
.topbar-inner{
  max-width:1080px; margin:0 auto; padding:14px 20px;
  display:flex; align-items:center; justify-content:space-between; gap:12px;
}
.brand{ display:flex; align-items:center; gap:10px; }
.brand-mark{
  width:38px; height:38px; border-radius:10px;
  background:var(--primary);
  display:flex; align-items:center; justify-content:center;
  flex-shrink:0;
}
.brand-mark svg{ width:20px; height:20px; }
.brand-name{ font-family:var(--font-display); font-weight:600; font-size:18px; color:var(--primary-dark); }
.brand-tag{ font-size:11px; color:var(--muted); margin-top:-2px; }

.topbar-actions{ display:flex; gap:8px; }
.icon-btn{
  width:40px; height:40px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  background:var(--surface); border:1px solid var(--line);
  color:var(--primary-dark);
}
.icon-btn svg{ width:18px; height:18px; }

/* ---------- Buttons ---------- */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  padding:13px 22px; border-radius:999px; border:none;
  font-weight:700; font-size:15px; cursor:pointer;
  transition:transform .15s ease, box-shadow .15s ease;
}
.btn svg{ width:18px; height:18px; flex-shrink:0; }
.btn:active{ transform:scale(.97); }
.btn-accent{ background:var(--accent); color:#fff; box-shadow:0 10px 24px -10px rgba(228,80,47,.55); }
.btn-primary{ background:var(--primary); color:#fff; }
.btn-outline{ background:transparent; color:var(--primary-dark); border:1.5px solid var(--line); }
.btn-ghost{ background:var(--surface-sunk); color:var(--primary-dark); }
.btn-block{ width:100%; }
.btn-sm{ padding:9px 16px; font-size:13.5px; }

/* ---------- Strip divider (signature motif) ---------- */
.strip-divider{
  display:flex; align-items:center; gap:6px;
  padding:28px 0 10px;
  overflow:hidden;
}
.strip-divider .cap{
  width:22px; height:11px; border-radius:6px;
  background:var(--line);
  flex-shrink:0;
}
.strip-divider .cap.on{ background:var(--primary); }
.strip-divider .label{
  font-family:var(--font-mono); font-size:11px; letter-spacing:.08em;
  text-transform:uppercase; color:var(--muted); white-space:nowrap; padding:0 10px;
}

/* ---------- Hero ---------- */
.hero{ padding:36px 0 8px; }
.hero-eyebrow{
  display:inline-flex; align-items:center; gap:8px;
  font-family:var(--font-mono); font-size:12px; letter-spacing:.06em;
  color:var(--primary); background:var(--primary-tint);
  padding:6px 12px; border-radius:999px; margin-bottom:16px;
}
.hero-eyebrow .dot{ width:6px; height:6px; border-radius:50%; background:var(--ok); }
.hero h1{ max-width:11ch; }
.hero .lead{ font-size:16.5px; max-width:44ch; }
.hero-actions{ display:flex; flex-wrap:wrap; gap:10px; margin-top:22px; }

.hero-stats{
  display:grid; grid-template-columns:repeat(3,1fr); gap:1px;
  background:var(--line); border-radius:var(--radius-md); overflow:hidden;
  margin-top:28px; border:1px solid var(--line);
}
.hero-stats div{ background:var(--surface); padding:16px 14px; }
.hero-stats .num{ font-family:var(--font-mono); font-weight:600; font-size:20px; color:var(--primary-dark); }
.hero-stats .cap{ font-size:12px; color:var(--muted); margin-top:2px; }

/* ---------- Section ---------- */
.section{ padding:34px 0; }
.section-head{ display:flex; align-items:flex-end; justify-content:space-between; gap:12px; margin-bottom:18px; }
.section-head p{ margin:0; }

/* ---------- Quick actions grid (home) ---------- */
.quick-grid{ display:grid; grid-template-columns:repeat(4,1fr); gap:10px; }
.quick-item{
  background:var(--surface); border:1px solid var(--line); border-radius:var(--radius-md);
  padding:16px 8px; text-align:center; display:flex; flex-direction:column; align-items:center; gap:8px;
  box-shadow:var(--shadow-card);
}
.quick-item .ic{
  width:42px; height:42px; border-radius:12px; background:var(--primary-tint);
  display:flex; align-items:center; justify-content:center; color:var(--primary);
}
.quick-item .ic svg{ width:20px; height:20px; }
.quick-item span{ font-size:12px; font-weight:600; color:var(--ink); }

/* ---------- Medicine search & cards ---------- */
.search-bar{
  display:flex; align-items:center; gap:10px;
  background:var(--surface); border:1.5px solid var(--line); border-radius:999px;
  padding:12px 18px; box-shadow:var(--shadow-card);
}
.search-bar svg{ width:19px; height:19px; color:var(--muted); flex-shrink:0; }
.search-bar input{
  border:none; outline:none; background:transparent; flex:1;
  font-size:15px; font-family:var(--font-body); color:var(--ink);
}
.chip-row{ display:flex; gap:8px; flex-wrap:wrap; margin-top:14px; }
.chip{
  padding:8px 14px; border-radius:999px; background:var(--surface); border:1px solid var(--line);
  font-size:13px; font-weight:600; color:var(--ink-soft); cursor:pointer;
}
.chip.active{ background:var(--primary); color:#fff; border-color:var(--primary); }

.med-grid{ display:grid; grid-template-columns:1fr; gap:12px; margin-top:18px; }
.med-card{
  display:flex; gap:14px; align-items:center;
  background:var(--surface); border:1px solid var(--line); border-radius:var(--radius-md);
  padding:14px; box-shadow:var(--shadow-card);
}
.med-thumb{
  width:52px; height:52px; border-radius:12px; background:var(--primary-tint);
  display:flex; align-items:center; justify-content:center; color:var(--primary); flex-shrink:0;
}
.med-thumb svg{ width:24px; height:24px; }
.med-info{ flex:1; min-width:0; }
.med-info .name{ font-weight:700; font-size:15px; }
.med-info .meta{ font-size:12.5px; color:var(--muted); margin-top:2px; }
.med-tags{ display:flex; gap:6px; margin-top:6px; flex-wrap:wrap; }
.tag{ font-family:var(--font-mono); font-size:10.5px; padding:3px 8px; border-radius:6px; font-weight:600; letter-spacing:.02em; }
.tag.otc{ background:var(--primary-tint); color:var(--primary-dark); }
.tag.rx{ background:var(--danger-tint); color:var(--danger); }
.tag.instock{ background:#E4F5EC; color:var(--ok); }
.tag.low{ background:var(--warn-tint); color:var(--warn); }
.tag.out{ background:var(--danger-tint); color:var(--danger); }
.med-price{ text-align:right; flex-shrink:0; }
.med-price .amt{ font-family:var(--font-mono); font-weight:600; font-size:16px; color:var(--primary-dark); }
.med-price a{ display:inline-flex; margin-top:6px; }

.empty-state{
  text-align:center; padding:48px 20px; color:var(--muted);
}
.empty-state svg{ width:40px; height:40px; margin:0 auto 12px; opacity:.5; }

/* ---------- Shop info cards ---------- */
.info-grid{ display:grid; grid-template-columns:1fr; gap:12px; }
.info-card{
  background:var(--surface); border:1px solid var(--line); border-radius:var(--radius-md);
  padding:18px; box-shadow:var(--shadow-card); display:flex; gap:14px; align-items:flex-start;
}
.info-card .ic{
  width:40px; height:40px; border-radius:11px; background:var(--primary-tint);
  display:flex; align-items:center; justify-content:center; color:var(--primary); flex-shrink:0;
}
.info-card .ic svg{ width:19px; height:19px; }
.info-card h3{ margin-bottom:4px; }
.info-card p{ margin:0; font-size:13.5px; }
.hours-row{ display:flex; justify-content:space-between; font-size:13.5px; padding:5px 0; border-bottom:1px dashed var(--line); }
.hours-row:last-child{ border-bottom:none; }
.hours-row span:first-child{ color:var(--ink-soft); }
.hours-row span:last-child{ font-family:var(--font-mono); font-weight:600; color:var(--primary-dark); }
.hours-row.today span:first-child{ color:var(--ink); font-weight:700; }

.map-embed{
  border-radius:var(--radius-md); overflow:hidden; border:1px solid var(--line);
  height:220px; background:var(--surface-sunk);
}
.map-embed iframe{ width:100%; height:100%; border:0; }

/* ---------- Delivery banner ---------- */
.banner{
  background:linear-gradient(135deg,var(--primary) 0%,var(--primary-dark) 100%);
  border-radius:var(--radius-lg); padding:26px 22px; color:#fff; position:relative; overflow:hidden;
}
.banner h2{ color:#fff; }
.banner p{ color:rgba(255,255,255,.82); }
.banner .btn-accent{ margin-top:10px; }

/* ---------- Footer ---------- */
.site-footer{
  padding:34px 0 20px; border-top:1px solid var(--line); margin-top:20px;
  font-size:13px; color:var(--muted);
}
.site-footer .foot-top{ display:flex; justify-content:space-between; flex-wrap:wrap; gap:12px; margin-bottom:14px; }
.site-footer a.admin-link{ color:var(--muted); text-decoration:underline; }

/* ---------- Bottom nav (mobile) ---------- */
.bottom-nav{
  position:fixed; left:0; right:0; bottom:0; z-index:50;
  background:var(--surface); border-top:1px solid var(--line);
  display:flex; box-shadow:0 -6px 20px rgba(20,36,32,.06);
  padding-bottom:env(safe-area-inset-bottom);
}
.bottom-nav a{
  flex:1; display:flex; flex-direction:column; align-items:center; gap:4px;
  padding:10px 4px 8px; color:var(--muted); font-size:11px; font-weight:600;
}
.bottom-nav a svg{ width:21px; height:21px; }
.bottom-nav a.active{ color:var(--primary); }
.bottom-nav a.cta{ color:var(--accent); }

@media (min-width:760px){
  body{ padding-bottom:0; }
  .bottom-nav{ display:none; }
  .quick-grid{ grid-template-columns:repeat(4,1fr); }
  .med-grid{ grid-template-columns:1fr 1fr; }
  .info-grid{ grid-template-columns:1fr 1fr; }
  .hero{ padding:56px 0 20px; }
}

/* ---------- Dark theme overrides ---------- */
html[data-theme="dark"]{
  --bg: #0F1614;
  --surface: #17211E;
  --surface-sunk: #1C2723;
  --ink: #EDF3F0;
  --ink-soft: #B9C7C1;
  --muted: #82938C;
  --line: #2A3733;

  --primary: #2FB08F;
  --primary-dark: #175A49;
  --primary-tint: #17332C;

  --accent: #FF7C5F;
  --accent-dark: #E4502F;
  --accent-tint: #3A241D;

  --warn: #E3A63C;
  --warn-tint: #33280F;
  --danger: #F0766A;
  --danger-tint: #3A1E1A;
  --ok: #37C48C;
}
html[data-theme="dark"] .topbar{ background:rgba(15,22,20,.88); }
html[data-theme="dark"] .install-toast{ background:#EDF3F0; color:#0F1614; }
html[data-theme="dark"] .install-toast .close{ color:rgba(15,22,20,.55); }
html[data-theme="dark"] .hero-eyebrow .dot{ box-shadow:none; }
html[data-theme="dark"] .banner{ background:linear-gradient(135deg,var(--primary-dark) 0%,#0F3A2F 100%); }

.theme-toggle{
  width:40px; height:40px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  background:var(--surface); border:1px solid var(--line);
  color:var(--primary-dark); cursor:pointer; flex-shrink:0;
}
.theme-toggle svg{ width:18px; height:18px; }
.theme-toggle .ic-moon{ display:none; }
html[data-theme="dark"] .theme-toggle .ic-sun{ display:none; }
html[data-theme="dark"] .theme-toggle .ic-moon{ display:block; }
html[data-theme="dark"] .theme-toggle{ color:var(--primary); }

.install-toast{
  position:fixed; left:16px; right:16px; bottom:86px; z-index:60;
  background:var(--ink); color:#fff; border-radius:var(--radius-md);
  padding:14px 16px; display:flex; align-items:center; gap:12px;
  box-shadow:var(--shadow-pop); transform:translateY(120%); transition:transform .3s ease;
}
.install-toast.show{ transform:translateY(0); }
.install-toast .txt{ flex:1; font-size:13px; }
.install-toast .txt b{ display:block; font-size:14px; margin-bottom:2px; }
.install-toast button{ border:none; background:var(--accent); color:#fff; padding:9px 14px; border-radius:999px; font-weight:700; font-size:13px; }
.install-toast .close{ background:transparent; color:rgba(255,255,255,.6); padding:6px; font-size:18px; }
@media (min-width:760px){ .install-toast{ bottom:20px; left:auto; right:20px; width:320px; } }
