/* ============================================================
   medicine-site.css — Omeds Medicine Pages
   Mobile-first. Min supported width: 360px.
   Palette: Green primary #2e7d32, accent #43a047
   Fonts: Poppins (headings) + Inter (body) — loaded in EJS head
   ============================================================ */

/* ── Reset & Base ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --green-dark:   #1b5e20;
  --green-main:   #2e7d32;
  --green-mid:    #43a047;
  --green-light:  #e8f5e9;
  --green-pale:   #f1f8f1;
  --wa-green:     #25D366;
  --orange-warn:  #e65100;
  --orange-bg:    #fff3e0;
  --orange-border:#ff9800;
  --red-serious:  #c62828;
  --red-bg:       #ffebee;
  --text-main:    #1a2e1a;
  --text-body:    #2d3d2d;
  --text-muted:   #5a6e5a;
  --text-faint:   #8a9e8a;
  --bg-page:      #f5f8f5;
  --bg-card:      #ffffff;
  --border:       #e2ede2;
  --radius:       12px;
  --radius-sm:    8px;
  --shadow:       0 1px 6px rgba(0,0,0,.07);
  --shadow-md:    0 3px 14px rgba(0,0,0,.10);
  --header-h:     56px;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-page);
  color: var(--text-body);
  line-height: 1.65;
  padding-bottom: 80px; /* clearance for sticky CTA on mobile */
}

a { color: var(--green-main); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

/* ── Typography ─────────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: 'Poppins', 'Segoe UI', sans-serif;
  color: var(--text-main);
  line-height: 1.3;
}
h1 { font-size: clamp(1.35rem, 4vw, 1.75rem); font-weight: 700; }
h2 { font-size: 1.05rem; font-weight: 600; }
h3 { font-size: .9rem;  font-weight: 600; }
p  { font-size: .95rem; }

/* ── Layout ─────────────────────────────────────────────────── */
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 16px;
}
.page-body {
  padding-top: 20px;
  padding-bottom: 32px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ── Header ─────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--green-main);
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
  height: var(--header-h);
}
.header-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 16px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
}
.logo { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.logo-icon { width: 32px; height: 32px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
.logo-o    { font-family: 'Poppins', sans-serif; font-size: 1.4rem; font-weight: 700; color: #fff; }
.logo-meds { font-family: 'Poppins', sans-serif; font-size: 1.2rem; font-weight: 400; color: rgba(255,255,255,.85); }
.header-search {
  flex: 1;
  display: flex;
  align-items: center;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 999px;
  overflow: hidden;
  min-width: 0;
}
.header-search input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  padding: 7px 12px;
  font-size: .88rem;
  color: #fff;
  min-width: 0;
}
.header-search input::placeholder { color: rgba(255,255,255,.65); }
.header-search button {
  background: rgba(255,255,255,.2);
  border: none;
  cursor: pointer;
  padding: 7px 12px;
  color: #fff;
  display: flex;
  align-items: center;
}
.header-call {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: .82rem;
  color: #fff;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}
.header-call:hover { background: rgba(255,255,255,.28); text-decoration: none; }
.header-call span { display: none; }
@media (min-width: 480px) { .header-call span { display: inline; } }

/* ── Breadcrumb ─────────────────────────────────────────────── */
.breadcrumb-bar {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
}
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  padding: 10px 0;
  font-size: .78rem;
  color: var(--text-muted);
}
.breadcrumb a { color: var(--green-main); }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb .sep { color: var(--text-faint); }
.breadcrumb .current { color: var(--text-muted); font-weight: 500; }

/* ── Media Banner ───────────────────────────────────────────── */
.media-banner {
  border-radius: var(--radius);
  overflow: hidden;
  max-height: 160px;
}
.media-banner img {
  width: 100%;
  height: 160px;
  object-fit: cover;
}

/* ── Card (base) ────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 18px 16px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}
.card--subtle {
  background: var(--green-pale);
  box-shadow: none;
  border-color: var(--green-light);
}
.card-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--green-dark);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 7px;
}
.card-title .icon { font-size: 1.1rem; line-height: 1; }

/* ── Hero Section ───────────────────────────────────────────── */
.hero-section {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 20px 16px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}
.medicine-name {
  margin-bottom: 6px;
  color: var(--text-main);
}
.generic-name, .salt-name {
  font-size: .85rem;
  color: var(--text-muted);
  margin-bottom: 3px;
}
.generic-name em, .salt-name em { font-style: normal; color: var(--text-body); }

/* ── Badges ─────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: .73rem;
  font-weight: 600;
  letter-spacing: .03em;
}
.badge-rx  { background: #fce4ec; color: #b71c1c; }
.badge-otc { background: #e8f5e9; color: var(--green-dark); }
.badge-mfr { background: var(--green-light); color: var(--green-dark); }

/* ── CTA Buttons ────────────────────────────────────────────── */
.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-radius: var(--radius-sm);
  padding: 11px 20px;
  font-size: .93rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: opacity .15s, transform .1s;
}
.btn:hover { opacity: .88; text-decoration: none; transform: translateY(-1px); }
.btn-whatsapp { background: var(--wa-green); color: #fff; }
.btn-call     { background: var(--green-main); color: #fff; }

/* ── Medicine image ─────────────────────────────────────────── */
.med-img-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}
.med-img {
  width: 120px;
  height: 120px;
  object-fit: contain;
  border-radius: 16px;
  background: #f0fdf4;
  padding: 8px;
  border: 1.5px solid #bbf7d0;
}
.med-img-placeholder {
  width: 120px;
  height: 120px;
  border-radius: 16px;
  background: #f0fdf4;
  border: 1.5px solid #bbf7d0;
  align-items: center;
  justify-content: center;
}

/* ── Prescription Warning ───────────────────────────────────── */
.warning-banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--orange-bg);
  border-left: 4px solid var(--orange-border);
  border-radius: var(--radius-sm);
  padding: 13px 14px;
  font-size: .88rem;
  color: var(--orange-warn);
  line-height: 1.5;
}
.warning-banner svg { flex-shrink: 0; margin-top: 2px; }

/* ── Summary ────────────────────────────────────────────────── */
.summary-text { line-height: 1.75; color: var(--text-body); }

/* ── Uses List ──────────────────────────────────────────────── */
.uses-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.uses-item {
  background: var(--green-pale);
  border-radius: var(--radius-sm);
  padding: 10px 13px;
  font-size: .9rem;
  border-left: 3px solid var(--green-mid);
  line-height: 1.5;
}
.uses-label { display: block; color: var(--green-dark); font-weight: 600; margin-bottom: 2px; }
.uses-detail { color: var(--text-body); }

/* ── Department Tags ────────────────────────────────────────── */
.dept-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.dept-tag {
  display: inline-block;
  background: var(--green-light);
  color: var(--green-dark);
  border-radius: 999px;
  padding: 5px 14px;
  font-size: .8rem;
  font-weight: 600;
  border: 1px solid #c8e6c9;
  transition: background .15s;
}
.dept-tag:hover { background: #c8e6c9; text-decoration: none; }

/* ── Dosage Grid ────────────────────────────────────────────── */
.dosage-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.dosage-item {
  background: var(--green-pale);
  border-radius: var(--radius-sm);
  padding: 11px 13px;
}
.dosage-item--full { grid-column: 1 / -1; }
.dosage-label {
  display: block;
  font-size: .73rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.dosage-val { font-size: .88rem; color: var(--text-main); line-height: 1.5; }

/* ── Warnings List ──────────────────────────────────────────── */
.warnings-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.warnings-list li {
  padding-left: 20px;
  position: relative;
  font-size: .88rem;
  line-height: 1.55;
}
.warnings-list li::before {
  content: '⚠';
  position: absolute;
  left: 0;
  font-size: .75rem;
  top: 2px;
}

/* ── Side Effects ───────────────────────────────────────────── */
.side-effects-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 10px;
}
@media (max-width: 480px) { .side-effects-grid { grid-template-columns: 1fr; } }
.se-col { }
.se-heading {
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 8px;
  padding: 4px 9px;
  border-radius: 999px;
  display: inline-block;
}
.se-heading--common  { background: #fff9c4; color: #f57f17; }
.se-heading--serious { background: var(--red-bg); color: var(--red-serious); }
.se-list { list-style: none; display: flex; flex-direction: column; gap: 5px; }
.se-list li {
  font-size: .88rem;
  padding-left: 14px;
  position: relative;
  line-height: 1.5;
}
.se-list li::before { content: '•'; position: absolute; left: 0; color: var(--green-mid); }
.se-col:last-child .se-list li::before { color: var(--red-serious); }
.se-rare {
  font-size: .82rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  padding-top: 10px;
  margin-top: 4px;
  line-height: 1.6;
}
.se-rare-label { font-weight: 600; }

/* ── FAQ Accordion ──────────────────────────────────────────── */
.faq-list { display: flex; flex-direction: column; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item:last-child { border-bottom: none; }
.faq-q {
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 0;
  text-align: left;
  font-size: .93rem;
  font-weight: 600;
  color: var(--text-main);
  font-family: 'Inter', sans-serif;
}
.faq-q:hover { color: var(--green-main); }
.faq-chevron {
  flex-shrink: 0;
  color: var(--text-muted);
  transition: transform .2s;
}
.faq-item.open .faq-chevron { transform: rotate(180deg); }
.faq-a {
  padding-bottom: 13px;
}
.faq-a p {
  font-size: .88rem;
  color: var(--text-body);
  line-height: 1.7;
}

/* ── Substitutes ────────────────────────────────────────────── */
.sub-note {
  font-size: .82rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.substitutes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
  gap: 9px;
}
.substitute-card {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 11px 12px;
  background: var(--green-pale);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: box-shadow .15s, transform .1s;
  position: relative;
}
.substitute-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  text-decoration: none;
  border-color: var(--green-mid);
}
.sub-name { font-size: .88rem; font-weight: 600; color: var(--text-main); line-height: 1.3; }
.sub-mfr  { font-size: .73rem; color: var(--text-muted); }
.sub-arrow { position: absolute; top: 10px; right: 10px; color: var(--green-mid); }

/* ── Storage ────────────────────────────────────────────────── */
.storage-text {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: .85rem;
  color: var(--text-muted);
}

/* ── Footer ─────────────────────────────────────────────────── */
.site-footer {
  background: var(--green-dark);
  color: rgba(255,255,255,.8);
  padding: 32px 0 24px;
  margin-top: 24px;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.footer-brand .logo-o    { font-family: 'Poppins', sans-serif; font-size: 1.3rem; font-weight: 700; color: #fff; }
.footer-brand .logo-meds { font-family: 'Poppins', sans-serif; font-size: 1.1rem; font-weight: 400; color: rgba(255,255,255,.8); }
.footer-brand p { font-size: .82rem; color: rgba(255,255,255,.6); margin-top: 4px; }
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-links a { font-size: .85rem; color: rgba(255,255,255,.75); }
.footer-links a:hover { color: #fff; text-decoration: none; }
.footer-disclaimer {
  font-size: .75rem;
  color: rgba(255,255,255,.45);
  line-height: 1.6;
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 14px;
}

/* ── Sticky CTA Bar (mobile only) ───────────────────────────── */
.sticky-cta {
  display: flex;
  gap: 10px;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  border-top: 1px solid var(--border);
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
  z-index: 300;
  box-shadow: 0 -3px 12px rgba(0,0,0,.10);
  transition: transform .25s ease;
}
.sticky-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: var(--radius-sm);
  padding: 12px 8px;
  font-size: .9rem;
  font-weight: 700;
  font-family: 'Poppins', sans-serif;
}
.sticky-btn--wa    { background: var(--wa-green);   color: #fff; flex: 2; }
.sticky-btn--call  { background: var(--green-main); color: #fff; flex: 1; }
.sticky-btn:hover  { opacity: .9; text-decoration: none; }

/* Hide sticky bar on tablet/desktop */
@media (min-width: 640px) {
  .sticky-cta { display: none; }
  body { padding-bottom: 0; }
}

/* ── Responsive tweaks ──────────────────────────────────────── */
@media (min-width: 600px) {
  .page-body { padding-top: 28px; gap: 18px; }
  .card { padding: 22px 20px; }
  .hero-section { padding: 26px 22px; }
  .footer-inner { flex-direction: row; justify-content: space-between; align-items: flex-start; }
}
@media (max-width: 400px) {
  .dosage-grid { grid-template-columns: 1fr; }
  .btn { padding: 10px 14px; font-size: .87rem; }
}

/* ── Medicine Grid (dept page & doctor page cross-links) ──── */
.med-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}
.med-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
  background: var(--green-pale);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: box-shadow .15s, transform .1s;
}
.med-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  text-decoration: none;
  border-color: var(--green-mid);
}
.med-name { font-size: .88rem; font-weight: 600; color: var(--text-main); line-height: 1.3; }
.med-mfr  { font-size: .73rem; color: var(--text-muted); }
.med-order-btn {
  margin-top: 6px;
  font-size: .78rem;
  font-weight: 700;
  color: var(--green-main);
  letter-spacing: .02em;
}

/* ── Why Omeds List ─────────────────────────────────────────── */
.why-list { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.why-list li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: .9rem;
  line-height: 1.55;
}
.why-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--green-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .95rem;
}

/* ── Doctor Mini Row (dept page) ────────────────────────────── */
.doctor-row {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.doctor-row::-webkit-scrollbar { display: none; }
.doctor-mini-card {
  flex-shrink: 0;
  width: 130px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 8px;
  background: var(--green-pale);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
  transition: box-shadow .15s;
}
.doctor-mini-card:hover {
  box-shadow: var(--shadow-md);
  text-decoration: none;
  border-color: var(--green-mid);
}
.doctor-mini-photo {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--green-light);
}
.doctor-mini-photo--placeholder {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--green-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
}
.doctor-mini-name { font-size: .8rem; font-weight: 600; color: var(--text-main); line-height: 1.3; }
.doctor-mini-spec { font-size: .72rem; color: var(--text-muted); }

/* ── Doctors Listing Grid ───────────────────────────────────── */
.doctors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}
.doctor-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow .15s, transform .1s;
  box-shadow: var(--shadow);
}
.doctor-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  text-decoration: none;
}
.doctor-card-photo-wrap {
  background: var(--green-pale);
  width: 100%;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.doctor-card-photo {
  width: 100%;
  height: 140px;
  object-fit: contain;
  object-position: center top;
}
.doctor-card-photo--placeholder {
  width: 100%;
  height: 120px;
  background: var(--green-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
}
.doctor-card-info { padding: 10px 11px; display: flex; flex-direction: column; gap: 3px; }
.doctor-card-name { font-size: .88rem; font-weight: 700; color: var(--text-main); line-height: 1.3; }
.doctor-card-spec { font-size: .78rem; color: var(--text-muted); }
.doctor-card-exp  { font-size: .76rem; color: var(--green-main); }
.doctor-card-badge {
  display: inline-block;
  margin-top: 4px;
  font-size: .7rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: #e8f5e9;
  color: var(--green-dark);
  width: fit-content;
}

/* ── Filter Tabs ────────────────────────────────────────────── */
.filter-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.filter-tab {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 16px;
  font-size: .82rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.filter-tab:hover { border-color: var(--green-mid); color: var(--green-main); }
.filter-tab.active {
  background: var(--green-main);
  border-color: var(--green-main);
  color: #fff;
}

/* ── Doctor Profile Page ────────────────────────────────────── */
.doctor-profile-card { padding: 0; overflow: hidden; }
.doctor-hero {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px 16px 16px;
}
.doctor-photo-wrap { flex-shrink: 0; }
.doctor-photo {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--green-light);
}
.doctor-photo--placeholder {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: var(--green-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.8rem;
}
.doctor-info { flex: 1; min-width: 0; }
.doctor-name  { font-size: clamp(1.1rem, 3.5vw, 1.35rem); font-weight: 700; margin-bottom: 2px; }
.doctor-desig { font-size: .83rem; color: var(--text-muted); margin-bottom: 2px; }
.doctor-hospital {
  font-size: .83rem;
  color: var(--green-dark);
  font-weight: 500;
  margin-bottom: 8px;
}
.doctor-meta-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.meta-pill {
  display: inline-block;
  background: var(--green-light);
  color: var(--green-dark);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: .76rem;
  font-weight: 600;
  border: 1px solid #c8e6c9;
}
.doctor-quals { font-size: .8rem; color: var(--text-muted); line-height: 1.5; margin-bottom: 4px; }
.doctor-langs { font-size: .78rem; color: var(--text-faint); }
.wa-cta-full {
  display: flex;
  width: 100%;
  justify-content: center;
  align-items: center;
  gap: 9px;
  padding: 14px 20px;
  font-size: .95rem;
  font-weight: 700;
  background: var(--wa-green);
  color: #fff;
  border-radius: 0;
  transition: opacity .15s;
}
.wa-cta-full:hover { opacity: .88; text-decoration: none; }

/* ── YouTube Embed ──────────────────────────────────────────── */
.yt-wrapper {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 */
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.yt-wrapper iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* ── Services Tags (dept conditions) ────────────────────────── */
.services-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.service-tag {
  background: #e3f2fd;
  color: #1565c0;
  border-radius: 999px;
  padding: 5px 13px;
  font-size: .8rem;
  font-weight: 500;
  border: 1px solid #bbdefb;
}

/* ═══════════════════════════════════════════════════════════════
   MEDICINES BROWSE / SEARCH / DEPT pages
   ═══════════════════════════════════════════════════════════════ */

/* ── Browse hero ────────────────────────────────────────────── */
.browse-hero {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 20px 16px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}
.browse-title {
  font-size: clamp(1.15rem, 3.5vw, 1.5rem);
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
}
.browse-sub {
  font-size: .85rem;
  color: var(--text-muted);
  margin-bottom: 14px;
}

/* ── Browse search bar ──────────────────────────────────────── */
.browse-search-form { margin-top: 4px; }
.browse-search-wrap {
  display: flex;
  align-items: center;
  background: var(--bg-page);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  gap: 0;
}
.browse-search-wrap:focus-within {
  border-color: var(--green-mid);
  box-shadow: 0 0 0 3px rgba(46,125,50,.1);
}
.browse-search-icon {
  flex-shrink: 0;
  color: var(--text-muted);
  margin-left: 12px;
}
.browse-search-wrap input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  padding: 10px 10px 10px 8px;
  font-size: .93rem;
  color: var(--text-main);
  min-width: 0;
}
.browse-search-wrap input::placeholder { color: var(--text-faint); }
.browse-search-btn {
  flex-shrink: 0;
  background: var(--green-main);
  color: #fff;
  border: none;
  padding: 10px 18px;
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Poppins', sans-serif;
  transition: background .15s;
}
.browse-search-btn:hover { background: var(--green-dark); }

/* ── Department scroll tabs ─────────────────────────────────── */
.dept-scroll-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.dept-scroll-tabs::-webkit-scrollbar { display: none; }
.dept-scroll-tab {
  flex-shrink: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s;
}
.dept-scroll-tab:hover { border-color: var(--green-mid); color: var(--green-main); text-decoration: none; }
.dept-scroll-tab.active {
  background: var(--green-main);
  border-color: var(--green-main);
  color: #fff;
}

/* ── Browse medicine grid ───────────────────────────────────── */
.browse-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 11px;
}
.browse-card {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow .15s, transform .1s;
  box-shadow: var(--shadow);
}
.browse-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  text-decoration: none;
  border-color: var(--green-mid);
}
.browse-card-inner {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  height: 100%;
}
.browse-badge {
  display: inline-block;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: .67rem;
  font-weight: 700;
  letter-spacing: .03em;
  width: fit-content;
  margin-bottom: 2px;
}
.browse-badge--rx  { background: #fce4ec; color: #b71c1c; }
.browse-badge--otc { background: #e8f5e9; color: var(--green-dark); }
.browse-med-name {
  font-size: .88rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.3;
}
.browse-med-salt {
  font-size: .73rem;
  color: var(--text-muted);
  line-height: 1.4;
}
.browse-med-mfr {
  font-size: .72rem;
  color: var(--text-faint);
}
.browse-card-depts {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 2px;
}
.browse-dept-pill {
  background: var(--green-light);
  color: var(--green-dark);
  border-radius: 999px;
  padding: 2px 7px;
  font-size: .65rem;
  font-weight: 600;
  border: 1px solid #c8e6c9;
}
.browse-order-link {
  margin-top: auto;
  padding-top: 8px;
  font-size: .78rem;
  font-weight: 700;
  color: var(--green-main);
}

/* ── Pagination ─────────────────────────────────────────────── */
.browse-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 12px 0;
}
.page-btn {
  display: inline-flex;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 18px;
  font-size: .88rem;
  font-weight: 600;
  color: var(--green-main);
  transition: background .15s, border-color .15s;
}
.page-btn:hover { background: var(--green-pale); border-color: var(--green-mid); text-decoration: none; }
.page-info { font-size: .82rem; color: var(--text-muted); }

/* ── Empty state ────────────────────────────────────────────── */
.browse-empty {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px 20px;
  text-align: center;
  box-shadow: var(--shadow);
}
.browse-empty-icon { font-size: 2.5rem; margin-bottom: 12px; }
.browse-empty-msg { font-size: .92rem; color: var(--text-muted); line-height: 1.7; }

/* ── Department browse grid (bottom of main page) ───────────── */
.dept-browse-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 10px;
}
.dept-browse-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 8px 12px;
  background: var(--green-pale);
  border: 1px solid var(--green-light);
  border-radius: var(--radius);
  text-align: center;
  transition: box-shadow .15s, transform .1s;
}
.dept-browse-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  text-decoration: none;
  border-color: var(--green-mid);
}
.dept-browse-icon { font-size: 1.6rem; line-height: 1; }
.dept-browse-name {
  font-size: .75rem;
  font-weight: 600;
  color: var(--green-dark);
  line-height: 1.3;
}

/* ── Responsive browse tweaks ───────────────────────────────── */
@media (max-width: 400px) {
  .browse-grid { grid-template-columns: repeat(2, 1fr); }
  .dept-browse-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 600px) {
  .browse-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
  .browse-hero { padding: 26px 22px; }
}

/* ═══════════════════════════════════════════════════════════════
   MEDICINE DETAIL PAGE — redesigned layout
   ═══════════════════════════════════════════════════════════════ */

/* ── Product Card ───────────────────────────────────────────── */
.product-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.genuine-strip {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #dcfce7;
  color: #15803d;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .03em;
  padding: 7px 16px;
  border-bottom: 1px solid #bbf7d0;
}

/* Image box */
.product-img-box {
  background: #f0fdf4;
  border-bottom: 1px solid #e9f7ea;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  padding: 20px;
}
.product-img-box img {
  max-height: 180px;
  max-width: 100%;
  object-fit: contain;
  border-radius: 12px;
}
.product-img-placeholder {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text-faint);
  font-size: .78rem;
  min-height: 160px;
  display: flex;
}

/* Info */
.product-info { padding: 16px 16px 0; }
.rx-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #fff3cd;
  color: #92400e;
  border: 1px solid #fde68a;
  border-radius: 999px;
  font-size: .71rem;
  font-weight: 700;
  padding: 3px 10px;
  margin-bottom: 8px;
}
.otc-pill {
  display: inline-block;
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
  border-radius: 999px;
  font-size: .71rem;
  font-weight: 700;
  padding: 3px 10px;
  margin-bottom: 8px;
}
.product-name {
  font-size: clamp(1.15rem, 4vw, 1.5rem);
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 5px;
  line-height: 1.3;
}
.product-salt {
  font-size: .82rem;
  color: var(--text-muted);
  margin-bottom: 10px;
  line-height: 1.5;
}
.product-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 4px;
}
.meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--green-pale);
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: .73rem;
  font-weight: 500;
  padding: 3px 10px;
}
.meta-chip--dept { background: #e0f2fe; color: #0369a1; border-color: #bae6fd; }

/* Price block */
.price-block {
  margin: 14px 16px 0;
  padding: 14px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: var(--radius-sm);
}
.price-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 3px;
}
.price-value {
  font-family: 'Poppins', sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--green-dark);
}
.price-per {
  font-size: .78rem;
  color: var(--text-muted);
}
.price-note {
  font-size: .72rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.stock-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .78rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}
.in-stock-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #16a34a;
  flex-shrink: 0;
}
.in-stock-text { color: #15803d; font-weight: 600; }
.stock-sep { color: var(--text-faint); }
.price-block--ask {
  background: #f8fafc;
  border-color: var(--border);
}
.ask-price-text {
  font-size: .88rem;
  color: var(--text-muted);
  text-align: center;
  padding: 4px 0;
}

/* CTA Buttons */
.product-ctas {
  display: flex;
  gap: 10px;
  padding: 14px 16px;
}
.btn-wa {
  flex: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #16a34a;
  color: #fff;
  border-radius: var(--radius-sm);
  padding: 13px 16px;
  font-size: .92rem;
  font-weight: 700;
  font-family: 'Poppins', sans-serif;
  transition: background .15s;
}
.btn-wa:hover { background: #15803d; text-decoration: none; }
.btn-call-sm {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: var(--bg-page);
  color: var(--green-main);
  border: 2px solid var(--green-main);
  border-radius: var(--radius-sm);
  padding: 13px 12px;
  font-size: .88rem;
  font-weight: 700;
  font-family: 'Poppins', sans-serif;
  transition: background .15s;
}
.btn-call-sm:hover { background: var(--green-light); text-decoration: none; }

/* Trust row */
.trust-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--border);
}
.trust-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 12px 6px;
  font-size: .65rem;
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.3;
  border-right: 1px solid var(--border);
}
.trust-item:last-child { border-right: none; }

/* ── Compare / Substitutes Card ─────────────────────────────── */
.compare-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 14px 16px;
}
.compare-header {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: .88rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
}
.compare-note {
  font-size: .76rem;
  color: var(--text-muted);
  margin-bottom: 12px;
  line-height: 1.5;
}
.compare-scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  overflow-y: visible;
  padding-top: 14px;
  padding-bottom: 6px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.compare-scroll::-webkit-scrollbar { display: none; }
.compare-item {
  flex-shrink: 0;
  width: 160px;
  min-height: 260px;
  background: var(--green-pale);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 18px 12px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  text-decoration: none;
  transition: border-color .15s, box-shadow .15s;
}
.compare-item:hover { border-color: var(--green-mid); box-shadow: var(--shadow-md); text-decoration: none; }
.compare-item--current {
  border-color: #16a34a;
  background: #f0fdf4;
  position: relative;
}
.compare-badge {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: #16a34a;
  color: #fff;
  font-size: .62rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.compare-img {
  width: 96px;
  height: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: 12px;
  border: 1px solid var(--border);
  overflow: hidden;
  flex-shrink: 0;
  padding: 8px;
  box-sizing: border-box;
}
.compare-img img { width: 100%; height: 100%; object-fit: contain; }
.compare-img svg { width: 60px; height: 60px; }
.compare-name {
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.35;
  word-break: break-word;
  width: 100%;
}
.compare-mfr  {
  font-size: .7rem;
  color: var(--text-muted);
  word-break: break-word;
  width: 100%;
}
.compare-price { font-size: .86rem; font-weight: 700; color: var(--green-dark); }
.compare-view  { font-size: .72rem; font-weight: 600; color: var(--green-main); }
.compare-footnote {
  margin-top: 10px;
  font-size: .72rem;
  color: var(--text-faint);
  text-align: center;
}

/* ── Tab Bar ────────────────────────────────────────────────── */
.tab-bar-wrap {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow: hidden;
  position: sticky;
  top: var(--header-h);
  z-index: 100;
}
.tab-bar {
  display: flex;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  border-bottom: 2px solid var(--border);
}
.tab-bar::-webkit-scrollbar { display: none; }
.tab-btn {
  flex-shrink: 0;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  padding: 12px 16px;
  font-size: .82rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  font-family: 'Poppins', sans-serif;
  transition: color .15s, border-color .15s;
}
.tab-btn:hover { color: var(--green-main); }
.tab-btn.active { color: var(--green-main); border-bottom-color: var(--green-main); }

/* Tab pane is just the tab-bar-wrap background */
.tab-pane { display: block; }
.tab-pane[hidden] { display: none; }

/* ── Info Cards (tab content) ───────────────────────────────── */
.info-card {
  background: var(--bg-card);
  padding: 16px;
  border-bottom: 1px solid var(--border);
}
.info-card:last-child { border-bottom: none; }
.info-card--warn { background: #fffbeb; }
.info-card-title {
  font-size: .95rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Key Info Grid */
.key-info-grid { display: flex; flex-direction: column; gap: 0; }
.key-info-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid #f1f5f1;
  font-size: .85rem;
}
.key-info-item:last-child { border-bottom: none; }
.key-info-item svg { flex-shrink: 0; margin-top: 2px; }
.key-info-item > div { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.ki-label { font-size: .7rem; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); font-weight: 600; }
.ki-val   { font-size: .87rem; color: var(--text-main); line-height: 1.45; }

/* Warnings in overview */
.warn-list { list-style: none; display: flex; flex-direction: column; gap: 7px; }
.warn-list li {
  font-size: .85rem;
  line-height: 1.55;
  padding: 8px 10px 8px 32px;
  position: relative;
  background: #fffbeb;
  border-radius: 6px;
  border-left: 3px solid #f59e0b;
  color: #78350f;
}
.warn-list li::before { content: '⚠'; position: absolute; left: 10px; top: 8px; font-size: .8rem; }

/* Uses grid */
.uses-grid { display: flex; flex-direction: column; gap: 8px; }
.use-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  background: var(--green-pale);
  border-radius: var(--radius-sm);
  border-left: 3px solid #16a34a;
}
.use-dot {
  flex-shrink: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #16a34a;
  margin-top: 6px;
}
.use-label { display: block; font-size: .88rem; font-weight: 600; color: var(--green-dark); margin-bottom: 2px; }
.use-detail { font-size: .82rem; color: var(--text-body); line-height: 1.5; }

/* Dosage */
.dosage-list { display: flex; flex-direction: column; gap: 0; }
.dosage-row {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #f1f5f1;
  font-size: .87rem;
}
.dosage-row:last-child { border-bottom: none; }
.dosage-who {
  flex-shrink: 0;
  width: 80px;
  font-weight: 600;
  color: var(--text-muted);
  font-size: .78rem;
  padding-top: 1px;
}
.dosage-info { color: var(--text-main); line-height: 1.5; }

/* Side effects tags */
.se-section { margin-bottom: 14px; }
.se-section:last-child { margin-bottom: 0; }
.se-heading {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: 3px 10px;
  border-radius: 999px;
  display: inline-block;
  margin-bottom: 8px;
}
.se-heading--common  { background: #fef9c3; color: #a16207; }
.se-heading--rare    { background: #e0e7ff; color: #3730a3; }
.se-heading--serious { background: #fee2e2; color: #b91c1c; }
.se-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.se-tag {
  font-size: .78rem;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 500;
}
.se-tag--common  { background: #fef9c3; color: #78350f; border: 1px solid #fde68a; }
.se-tag--rare    { background: #ede9fe; color: #4c1d95; border: 1px solid #c4b5fd; }
.se-tag--serious { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }

/* Summary text */
.summary-text { font-size: .9rem; line-height: 1.75; color: var(--text-body); }

/* ── Responsive: tablet+ ────────────────────────────────────── */
@media (min-width: 600px) {
  .product-img-box { min-height: 240px; }
  .product-img-box img { max-height: 220px; }
  .trust-item { font-size: .72rem; padding: 14px 8px; }
  .compare-item { width: 180px; }
  .key-info-grid { display: grid; grid-template-columns: 1fr 1fr; }
}

