/* =================================================================
   CellyRx — Celly Health Brand Stylesheet
   Strictly conforms to CELLY-STYLE-GUIDE.md v1.0
   ================================================================= */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:opsz,wght@9..40,400;9..40,500;9..40,600;9..40,700&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
  --bg: #FAFAF8;
  --white: #FFFFFF;
  --orange: #E8713A;
  --orange-hover: #D4632F;
  --orange-light: #FDF0E9;
  --orange-pale: #FFF8F3;
  --navy: #0B1838;
  --navy-mid: #162850;
  --navy-light: #2D4170;
  --teal: #2A8B84;
  --teal-light: #E8F5F4;
  --green: #1D7C3F;
  --green-light: #E7F5EC;
  --purple: #6B3FA0;
  --purple-light: #F0EAF8;
  --g50: #F9FAFB;
  --g100: #F3F4F6;
  --g200: #E5E7EB;
  --g300: #D1D5DB;
  --g400: #9CA3AF;
  --g500: #6B7280;
  --g600: #4B5563;
  --g700: #374151;
  --g800: #1F2937;
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--g800);
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body { padding-top: 72px; }

h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', sans-serif;
  letter-spacing: -0.02em;
  color: var(--navy);
  margin: 0 0 12px;
  font-weight: 700;
}

h1 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; line-height: 1.1; }
h2 { font-size: clamp(1.5rem, 2.6vw, 1.875rem); line-height: 1.2; }
h3 { font-size: 1.125rem; line-height: 1.3; }
h4 { font-size: 1rem; line-height: 1.35; }

p { margin: 0 0 16px; }

a { color: var(--orange); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--orange-hover); }

img { max-width: 100%; height: auto; display: block; }

::selection { background: var(--orange); color: #fff; }

/* ===================== Layout ===================== */
.container { max-width: 1240px; margin: 0 auto; padding: 0 24px; }
.container-sm { max-width: 900px; margin: 0 auto; padding: 0 24px; }
.container-xs { max-width: 820px; margin: 0 auto; padding: 0 24px; }

.section { padding: 80px 0; }
.section-light { background: var(--white); }
.section-dark { background: var(--navy); color: #fff; }
.section-dark h1, .section-dark h2, .section-dark h3 { color: #fff; }
.section-tight { padding: 56px 0; }

@media (max-width: 768px) {
  .section { padding: 48px 0; }
  .section-tight { padding: 36px 0; }
}

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ===================== Section Tag ===================== */
.stag { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.stag::before { content: ''; width: 32px; height: 2px; background: var(--orange); border-radius: 2px; }
.stag span {
  font-family: 'Outfit', sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: var(--orange);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.stag.stag-light span { color: rgba(255,255,255,0.7); }
.stag.stag-light::before { background: var(--orange); }

/* ===================== Buttons ===================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 14px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  font-family: 'Outfit', sans-serif;
  transition: all 0.25s;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover { opacity: 0.92; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-sm  { padding: 10px 22px; font-size: 14px; }
.btn-md  { padding: 14px 32px; font-size: 15px; }
.btn-lg  { padding: 18px 40px; font-size: 16px; }

.btn-primary  { background: var(--orange); color: #fff; }
.btn-primary:hover { background: var(--orange-hover); color: #fff; }
.btn-dark     { background: var(--navy);   color: #fff; }
.btn-dark:hover { color: #fff; background: var(--navy-mid); }
.btn-outline  { background: transparent; color: var(--navy); border: 2px solid var(--g200); }
.btn-outline:hover { border-color: var(--navy); color: var(--navy); }
.btn-ghost    { background: transparent; color: #fff; border: 2px solid rgba(255,255,255,0.3); }
.btn-ghost:hover { border-color: #fff; color: #fff; background: rgba(255,255,255,0.08); }
.btn-block    { width: 100%; }

/* ===================== Cards ===================== */
.card {
  background: #fff;
  border-radius: 18px;
  border: 1px solid var(--g100);
  overflow: hidden;
  transition: all 0.3s;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 12px 24px rgba(0,0,0,0.06); }
.card-body { padding: 24px; }
.card-pad-sm .card-body { padding: 18px; }
.card-pad-lg .card-body { padding: 32px; }

/* ===================== Badges ===================== */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  font-family: 'Outfit', sans-serif;
  letter-spacing: -0.005em;
}
.badge-green   { background: var(--green-light); color: var(--green); }
.badge-orange  { background: var(--orange-light); color: var(--orange); }
.badge-gray    { background: var(--g100);  color: var(--g600); }
.badge-teal    { background: var(--teal-light); color: var(--teal); }
.badge-purple  { background: var(--purple-light); color: var(--purple); }
.badge-tier1   { background: var(--orange-light); color: var(--orange); }
.badge-tier2   { background: var(--g100);  color: var(--g600); }

/* ===================== Form ===================== */
.form-row { margin-bottom: 18px; }
.form-row label {
  display: block;
  font-family: 'Outfit', sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.form-input, .form-select {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid var(--g200);
  border-radius: 10px;
  font-size: 15px;
  font-family: 'DM Sans', sans-serif;
  outline: none;
  background: #fff;
  color: var(--g800);
  transition: border-color 0.2s;
}
.form-input:focus, .form-select:focus { border-color: var(--teal); }
.form-input::placeholder { color: var(--g400); }
textarea.form-input { resize: vertical; min-height: 120px; font-family: 'DM Sans', sans-serif; }

/* ===================== Callouts ===================== */
.callout {
  border-radius: 14px;
  padding: 18px 24px;
  margin: 16px 0;
}
.callout-success { background: var(--green-light); border: 1px solid rgba(29,124,63,0.2); }
.callout-warn    { background: var(--orange-light); border: 1px solid rgba(232,113,58,0.2); }
.callout-info    { background: var(--teal-light); border: 1px solid rgba(42,139,132,0.2); }
.callout-danger  { background: #FEE2E2; border: 1px solid #FECACA; padding: 18px 22px; border-radius: 12px; }

/* ===================== Navigation ===================== */
.nav-wrap {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 72px;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 1000;
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.nav-wrap.scrolled { border-bottom-color: var(--g100); box-shadow: 0 1px 0 rgba(0,0,0,0.02); }

.nav-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 20px;
  color: var(--navy);
  letter-spacing: -0.02em;
  text-decoration: none;
  flex-shrink: 0;
}
.nav-logo:hover { color: var(--navy); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links > li { position: relative; }
.nav-links a, .nav-links button.nav-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--g700);
  border-radius: 8px;
  text-decoration: none;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}
.nav-links a:hover, .nav-links button.nav-link-btn:hover,
.nav-links a.active { background: var(--orange-light); color: var(--orange); }

.nav-cta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* Dropdowns — pseudo-element bridge to prevent hover gap */
.has-dropdown::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 12px;
  pointer-events: none;
}
.has-dropdown:hover::after { pointer-events: auto; }

.dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 280px;
  padding-top: 12px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: opacity 0.2s, transform 0.2s, visibility 0s linear 0.08s;
  z-index: 1001;
}
.has-dropdown:hover .dropdown,
.has-dropdown:focus-within .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition: opacity 0.2s, transform 0.2s, visibility 0s;
}
.dropdown-inner {
  background: #fff;
  border: 1px solid var(--g100);
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(11,24,56,0.08);
  padding: 8px;
  overflow: hidden;
}
.dropdown a {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  text-decoration: none;
}
.dropdown a:hover { background: var(--orange-light); }
.dropdown-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--g100);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--navy);
}
.dropdown a:hover .dropdown-icon { background: #fff; color: var(--orange); }
.dropdown-text { display: flex; flex-direction: column; gap: 2px; }
.dropdown-title { font-family: 'Outfit', sans-serif; font-weight: 600; font-size: 14px; color: var(--navy); }
.dropdown-desc { font-size: 12px; color: var(--g500); line-height: 1.4; }

/* Mobile nav */
.nav-toggle { display: none; }
.nav-mobile { display: none; }

@media (max-width: 900px) {
  .nav-links, .nav-cta .btn:not(.btn-mobile-cta) { display: none; }
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: transparent;
    border: 1px solid var(--g200);
    cursor: pointer;
    color: var(--navy);
  }
  .nav-toggle:hover { background: var(--orange-light); border-color: var(--orange); color: var(--orange); }

  .nav-mobile {
    position: fixed;
    top: 72px;
    left: 0; right: 0;
    bottom: 0;
    background: #fff;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 999;
    padding: 24px;
  }
  body.nav-open .nav-mobile { display: block; transform: translateX(0); }
  body.nav-open { overflow: hidden; }
  .nav-mobile-section { border-bottom: 1px solid var(--g100); padding: 12px 0; }
  .nav-mobile-section:last-child { border-bottom: none; }
  .nav-mobile-section > a, .nav-mobile-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 4px;
    font-family: 'Outfit', sans-serif;
    font-size: 17px;
    font-weight: 600;
    color: var(--navy);
    text-decoration: none;
    width: 100%;
    background: transparent;
    border: none;
    cursor: pointer;
    text-align: left;
  }
  .nav-mobile-sublinks {
    display: none;
    padding: 4px 0 8px;
  }
  .nav-mobile-sublinks.open { display: block; }
  .nav-mobile-sublinks a {
    display: block;
    padding: 10px 16px;
    font-size: 15px;
    color: var(--g600);
    text-decoration: none;
    border-radius: 8px;
  }
  .nav-mobile-sublinks a:hover { background: var(--orange-light); color: var(--orange); }
  .nav-mobile-cta {
    margin-top: 18px;
    width: 100%;
    justify-content: center;
  }
  .nav-mobile-contact {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--g100);
    font-size: 14px;
    color: var(--g500);
  }
  .nav-mobile-contact a {
    color: var(--navy);
    font-weight: 600;
    display: block;
    padding: 6px 0;
  }
}

/* ===================== Hero ===================== */
.hero {
  position: relative;
  min-height: 580px;
  display: flex;
  align-items: center;
  overflow: hidden;
  color: #fff;
  padding: 120px 0 80px;
  margin-top: -72px;
  padding-top: 192px;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  z-index: 0;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(11,24,56,0.85) 0%, rgba(22,40,80,0.65) 60%, rgba(232,113,58,0.25) 100%);
  z-index: 1;
}
.hero-content { position: relative; z-index: 2; max-width: 760px; }
.hero h1 {
  color: #fff;
  font-size: clamp(2.6rem, 5.5vw, 4rem);
  font-weight: 800;
  line-height: 1.05;
  margin-bottom: 16px;
}
.hero h1 .accent { color: var(--orange); }
.hero p.lead {
  font-size: clamp(1rem, 1.6vw, 1.25rem);
  color: rgba(255,255,255,0.85);
  margin-bottom: 32px;
  max-width: 600px;
  line-height: 1.5;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

@media (max-width: 768px) {
  .hero { min-height: 60vh; padding-top: 140px; padding-bottom: 56px; }
}

/* Stats bar below hero */
.stats-bar {
  background: var(--white);
  border-bottom: 1px solid var(--g100);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding: 32px 0;
}
.stat { text-align: center; }
.stat-num {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  color: var(--orange);
  letter-spacing: -0.02em;
  line-height: 1;
}
.stat-label {
  font-size: 13px;
  color: var(--g500);
  margin-top: 6px;
  font-weight: 500;
}
@media (max-width: 768px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; padding: 24px 0; }
}

/* ===================== Page header (non-home) ===================== */
.page-head {
  padding: 56px 0 32px;
  background: var(--white);
  border-bottom: 1px solid var(--g100);
}
.page-head h1 { margin-bottom: 8px; }
.page-head p.lead { font-size: 17px; color: var(--g500); max-width: 700px; margin: 0; }

/* ===================== Search panel (homepage hero search) ===================== */
.search-panel {
  background: #fff;
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 20px 50px rgba(11,24,56,0.18);
  border: 1px solid var(--g100);
  max-width: 720px;
  margin-top: 32px;
  position: relative;
  z-index: 2;
}
.search-panel h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-family: 'Outfit', sans-serif;
}
.search-grid {
  display: grid;
  grid-template-columns: 2fr 1fr auto;
  gap: 12px;
  align-items: end;
}
@media (max-width: 768px) {
  .search-grid { grid-template-columns: 1fr; }
  .search-panel { padding: 18px; }
}

/* ===================== Drug card ===================== */
.drug-card {
  background: #fff;
  border-radius: 18px;
  border: 1px solid var(--g100);
  padding: 22px;
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  height: 100%;
}
.drug-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.06);
  border-color: var(--orange-light);
}
.drug-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.drug-name {
  font-family: 'Outfit', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--navy);
  margin: 0;
}
.drug-category {
  font-size: 12px;
  color: var(--g500);
  margin-top: 2px;
}
.drug-condition {
  font-size: 13px;
  color: var(--g600);
  line-height: 1.4;
  flex-grow: 1;
}
.drug-savings {
  font-family: 'Outfit', sans-serif;
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding-top: 10px;
  border-top: 1px solid var(--g100);
}
.drug-savings .pct {
  font-size: 22px;
  font-weight: 800;
  color: var(--orange);
  letter-spacing: -0.02em;
}
.drug-savings .lbl { font-size: 12px; color: var(--g500); font-weight: 500; }

/* ===================== Pharmacy result card ===================== */
.pharm-result {
  background: #fff;
  border-radius: 14px;
  border: 1px solid var(--g100);
  padding: 18px 20px;
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  transition: all 0.2s;
}
.pharm-result:hover { border-color: var(--g200); box-shadow: 0 4px 12px rgba(0,0,0,0.04); }
.pharm-result-info h4 {
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--navy);
  margin: 0 0 4px;
}
.pharm-result-info .addr {
  font-size: 13px;
  color: var(--g600);
  margin: 0;
  line-height: 1.5;
}
.pharm-result-info .addr .addr-street { display: inline; }
.pharm-result-info .addr .addr-city {
  display: inline;
  color: var(--g500);
}
.pharm-result-info .addr-meta {
  font-size: 12px;
  color: var(--g500);
  margin: 4px 0 0;
}
.pharm-result-price {
  text-align: right;
  flex-shrink: 0;
}
.pharm-result-price .price {
  font-family: 'Outfit', sans-serif;
  font-size: 22px;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.02em;
}
.pharm-result-price .save {
  font-size: 12px;
  color: var(--green);
  font-weight: 600;
}
.pharm-result-price .retail {
  font-size: 12px;
  color: var(--g400);
  text-decoration: line-through;
}
@media (max-width: 600px) {
  .pharm-result { flex-direction: column; align-items: flex-start; }
  .pharm-result-price { text-align: left; }
}

/* ===================== Celly Rx Card display ===================== */
.rx-card {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 50%, var(--navy-light) 100%);
  border-radius: 18px;
  padding: 28px;
  color: #fff;
  position: relative;
  overflow: hidden;
  max-width: 420px;
  box-shadow: 0 16px 40px rgba(11,24,56,0.25);
}
.rx-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, var(--orange) 0%, transparent 70%);
  opacity: 0.18;
  pointer-events: none;
}
.rx-card-brand {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}
.rx-card-brand .x { color: var(--orange); }
.rx-card-tag {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.6);
  margin-bottom: 24px;
}
.rx-card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 20px;
  margin-bottom: 18px;
}
.rx-card-field-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.55);
  margin-bottom: 4px;
  font-weight: 600;
  font-family: 'Outfit', sans-serif;
}
.rx-card-field-value {
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.rx-card-disclaimer {
  font-size: 10px;
  color: rgba(255,255,255,0.55);
  line-height: 1.4;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.12);
}

/* ===================== Footer ===================== */
.footer-cta {
  background: var(--navy-mid);
  padding: 56px 0;
  text-align: center;
}
.footer-cta h2 { color: #fff; font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 10px; }
.footer-cta p { color: rgba(255,255,255,0.7); max-width: 600px; margin: 0 auto 24px; font-size: 16px; }

footer.site-footer { background: var(--navy); color: rgba(255,255,255,0.6); padding: 64px 0 32px; }
footer.site-footer .grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}
@media (max-width: 768px) {
  footer.site-footer .grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 480px) {
  footer.site-footer .grid { grid-template-columns: 1fr; }
}
footer h4 {
  color: #fff;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
  font-weight: 700;
}
footer ul { list-style: none; padding: 0; margin: 0; }
footer ul li { margin-bottom: 10px; }
footer ul a, footer p a {
  color: rgba(255,255,255,0.5);
  font-size: 13px;
  text-decoration: none;
  transition: color 0.2s;
}
footer ul a:hover, footer p a:hover { color: var(--orange); }
footer .footer-brand {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 22px;
  color: #fff;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}
footer .footer-brand .x { color: var(--orange); }
footer .tagline { color: rgba(255,255,255,0.55); font-size: 13px; line-height: 1.5; max-width: 280px; }
footer .socials { display: flex; gap: 10px; margin-top: 16px; }
footer .socials a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.06);
  transition: background 0.2s;
}
footer .socials a:hover { background: var(--orange); }
footer .socials svg { fill: rgba(255,255,255,0.7); }
footer .socials a:hover svg { fill: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 12px;
  color: rgba(255,255,255,0.35);
}
.footer-bottom .legal-links { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-bottom .legal-links a { color: rgba(255,255,255,0.35); font-size: 12px; }
.footer-bottom .legal-links a:hover { color: var(--orange); }

/* ===================== Utilities ===================== */
.text-center { text-align: center; }
.text-orange { color: var(--orange); }
.text-navy   { color: var(--navy); }
.text-muted  { color: var(--g500); }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; } .gap-6 { gap: 24px; }
.mt-2 { margin-top: 8px; } .mt-4 { margin-top: 16px; } .mt-6 { margin-top: 24px; } .mt-8 { margin-top: 32px; }
.mb-2 { margin-bottom: 8px; } .mb-4 { margin-bottom: 16px; } .mb-6 { margin-bottom: 24px; } .mb-8 { margin-bottom: 32px; }
.hidden-mobile { }
@media (max-width: 768px) { .hidden-mobile { display: none !important; } }
.hidden-desktop { display: none; }
@media (max-width: 768px) { .hidden-desktop { display: block; } }

/* ===================== Animation ===================== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp 0.6s ease-out both; }
.fade-up-d1 { animation: fadeUp 0.6s ease-out 0.1s both; }
.fade-up-d2 { animation: fadeUp 0.6s ease-out 0.2s both; }
.fade-up-d3 { animation: fadeUp 0.6s ease-out 0.3s both; }

/* ===================== Print (Rx card) ===================== */
@media print {
  .nav-wrap, footer, .footer-cta, .no-print { display: none !important; }
  body { padding-top: 0; background: #fff; }
  .rx-card {
    box-shadow: none;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}

/* Numbered step pattern */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 768px) { .steps { grid-template-columns: 1fr; } }
.step {
  background: #fff;
  border: 1px solid var(--g100);
  border-radius: 18px;
  padding: 28px;
  position: relative;
}
.step-num {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--orange-light);
  color: var(--orange);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 16px;
  margin-bottom: 14px;
}
.step h3 { margin-bottom: 8px; font-size: 17px; }
.step p { color: var(--g600); font-size: 14px; margin: 0; line-height: 1.55; }

/* Checkmark list */
.check-list { list-style: none; padding: 0; margin: 0; }
.check-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
  font-size: 15px;
  color: var(--g700);
}
.check-list li::before {
  content: '';
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231D7C3F' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
}

/* =========================================================================
   ADDITIONAL COMPONENTS — pages added in v1
   ========================================================================= */

/* Section tags / titles / lede */
.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 14px;
}
.section-tag::before {
  content: '';
  width: 28px;
  height: 2px;
  background: var(--orange);
  border-radius: 2px;
}
.section-title { font-size: 36px; line-height: 1.15; color: var(--navy); margin: 0 0 20px; max-width: 820px; }
.section-title.center { text-align: center; margin-left: auto; margin-right: auto; }
.lede { font-size: 18px; line-height: 1.6; color: var(--g600); max-width: 760px; }
.lede.center { text-align: center; margin-left: auto; margin-right: auto; }
.muted { color: var(--g500); }
.muted.small { font-size: 13px; }
.small { font-size: 13px; }
.center { text-align: center; }
.fineprint { font-size: 12px; color: var(--g500); line-height: 1.55; }

/* Section padding helpers */
.section-pad { padding: 80px 0; }
.section-alt { padding: 80px 0; background: var(--g50, #F7F8FA); }
.section-fineprint { padding: 40px 0 80px; }
@media (max-width: 700px) {
  .section-pad, .section-alt { padding: 56px 0; }
}

/* Page head */
.page-head { padding: 88px 0 32px; background: linear-gradient(180deg, #FFF 0%, #FAFBFC 100%); border-bottom: 1px solid var(--g100); }
.page-head h1 { font-size: 44px; line-height: 1.1; margin: 0 0 16px; color: var(--navy); }
.page-head .center-cta { margin-top: 22px; }
.page-head-protocol { background: linear-gradient(180deg, #0B1838 0%, #142654 100%); color: #fff; }
.page-head-protocol h1, .page-head-protocol .lede { color: #fff; }
.page-head-protocol .section-tag { color: var(--orange); }
.page-head-protocol .section-tag::before { background: var(--orange); }
.page-head-protocol .lede { color: rgba(255,255,255,0.82); }
@media (max-width: 700px) {
  .page-head { padding: 64px 0 28px; }
  .page-head h1 { font-size: 32px; }
}

/* Split layout */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.split-text h2 { font-size: 30px; line-height: 1.18; color: var(--navy); margin: 0 0 16px; }
.split-text p { font-size: 16px; line-height: 1.65; color: var(--g600); margin: 0 0 14px; }
.split-visual { display: flex; align-items: center; justify-content: center; }
@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; gap: 40px; }
}

/* Three-step grid */
.three-step { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.three-step.three-step-lg { gap: 32px; }
.step {
  background: #fff;
  padding: 32px 28px;
  border-radius: 18px;
  border: 1px solid var(--g100);
  position: relative;
}
.step h3 { font-size: 19px; margin: 14px 0 10px; color: var(--navy); }
.step p { color: var(--g600); line-height: 1.6; margin: 0 0 14px; font-size: 15px; }
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--orange-light);
  color: var(--orange);
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 18px;
}
@media (max-width: 800px) {
  .three-step { grid-template-columns: 1fr; }
}

/* Center CTA group */
.center-cta { display: flex; gap: 14px; flex-wrap: wrap; justify-content: flex-start; align-items: center; margin-top: 24px; }
.cta-card .center-cta, .page-head .center-cta { justify-content: center; }

/* Buttons (link variant) */
.btn-link { background: transparent; color: var(--orange); padding: 10px 0; }
.btn-link:hover { color: var(--orange-hover); transform: none; opacity: 1; text-decoration: underline; }

/* Big link */
.big-link { font-family: 'Outfit', sans-serif; font-size: 22px; color: var(--navy); text-decoration: none; font-weight: 600; }
.big-link:hover { color: var(--orange); }

/* CTA card */
.cta-card {
  background: linear-gradient(135deg, #0B1838 0%, #142654 100%);
  color: #fff;
  padding: 56px 48px;
  border-radius: 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-card::after {
  content: '';
  position: absolute;
  top: -40%; right: -10%;
  width: 60%; height: 200%;
  background: radial-gradient(closest-side, rgba(232,113,58,0.25), transparent);
  pointer-events: none;
}
.cta-card h2 { color: #fff; font-size: 32px; margin: 0 0 14px; position: relative; z-index: 1; }
.cta-card p { color: rgba(255,255,255,0.82); font-size: 17px; margin: 0 0 24px; position: relative; z-index: 1; }
.cta-card .center-cta { position: relative; z-index: 1; }

/* Form fields used outside drug template */
.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.field > span { font-family: 'DM Sans', sans-serif; font-size: 13px; font-weight: 600; color: var(--navy); letter-spacing: 0.02em; }
.field input[type="text"], .field input[type="email"], .field input[type="tel"], .field input[type="search"], .field select, .field textarea {
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  padding: 14px 16px;
  border: 1.5px solid var(--g200);
  border-radius: 12px;
  background: #fff;
  color: var(--navy);
  transition: border 0.18s;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--teal); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field-zip { max-width: 140px; }
@media (max-width: 600px) {
  .field-row { grid-template-columns: 1fr; }
  .field-zip { max-width: none; }
}

/* Search panel */
.search-panel {
  background: #fff;
  padding: 32px;
  border-radius: 20px;
  border: 1px solid var(--g100);
  box-shadow: 0 4px 20px rgba(11,24,56,0.04);
}
.search-panel h2 { color: var(--navy); margin: 0 0 8px; font-size: 24px; }
.search-form {
  display: grid;
  grid-template-columns: 1fr 160px auto;
  gap: 14px;
  align-items: end;
  margin-top: 14px;
}
.search-form .field { margin-bottom: 0; }
.search-form button { white-space: nowrap; }
@media (max-width: 700px) {
  .search-form { grid-template-columns: 1fr; }
}

/* Filter bar (top50) */
.filter-bar {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 16px;
  background: #fff;
  padding: 20px;
  border-radius: 16px;
  border: 1px solid var(--g100);
  margin-bottom: 28px;
  align-items: end;
}
.filter-bar .field { margin-bottom: 0; }
@media (max-width: 800px) {
  .filter-bar { grid-template-columns: 1fr; }
}

/* Formulary table */
.table-wrap { overflow-x: auto; background: #fff; border-radius: 16px; border: 1px solid var(--g100); }
.formulary-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.formulary-table thead { background: var(--g50, #F7F8FA); }
.formulary-table th {
  text-align: left;
  padding: 16px 18px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--g600);
  border-bottom: 1px solid var(--g100);
}
.formulary-table th.num, .formulary-table td.num { text-align: right; }
.formulary-table td { padding: 16px 18px; border-bottom: 1px solid var(--g100); vertical-align: middle; }
.formulary-table tr:last-child td { border-bottom: none; }
.formulary-table tr:hover td { background: rgba(232,113,58,0.03); }
.formulary-table a { color: var(--navy); text-decoration: none; }
.formulary-table a:hover { color: var(--orange); }

.btn-sm { padding: 8px 14px; font-size: 13px; }

/* Pills */
.pill {
  display: inline-block;
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.pill-orange { background: var(--orange-light); color: var(--orange); }
.pill-teal   { background: var(--teal-light, #E6F4F3); color: var(--teal, #2A8B84); }
.pill-gray   { background: var(--g100); color: var(--g600); }

/* Card page */
.card-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; align-items: start; }
.card-stage { display: flex; flex-direction: column; gap: 20px; }
.card-disclosure { font-size: 12px; color: var(--g500); line-height: 1.5; padding: 16px 18px; background: var(--g50, #F7F8FA); border-radius: 12px; border: 1px solid var(--g100); }
.card-form { background: #fff; padding: 32px; border-radius: 20px; border: 1px solid var(--g100); position: sticky; top: 96px; }
.card-form h2 { font-size: 22px; margin: 0 0 8px; color: var(--navy); }
.card-actions { display: flex; flex-direction: column; gap: 10px; margin: 18px 0 24px; }
.card-cta { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--g100); }
@media (max-width: 900px) {
  .card-grid { grid-template-columns: 1fr; gap: 28px; }
  .card-form { position: static; }
}

/* RX card large variant */
.rx-card-lg { padding: 36px 32px; min-height: 280px; }
.rx-card-lg .rx-card-grid strong { font-size: 18px; }
.rx-card-name { margin: 12px 0 18px; }
.rx-card-name small { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; opacity: 0.7; margin-bottom: 4px; }
.rx-card-name strong { font-size: 22px; font-family: 'Outfit', sans-serif; letter-spacing: 0.02em; }
.rx-tag {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 4px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.18);
}
.rx-card-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.12);
  font-size: 11px;
  opacity: 0.75;
  flex-wrap: wrap;
  gap: 8px;
}
@media print {
  body * { visibility: hidden; }
  #rxCard, #rxCard * { visibility: visible; }
  #rxCard { position: absolute; top: 1cm; left: 1cm; width: 16cm; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
}

/* Partner / qual / protocol / loc / pharm / eco grids — shared base */
.partner-grid, .qual-grid, .protocol-grid, .loc-grid, .pharm-grid, .ecosystem-grid, .faq-grid {
  display: grid;
  gap: 20px;
}
.partner-grid { grid-template-columns: repeat(3, 1fr); }
.qual-grid    { grid-template-columns: repeat(3, 1fr); }
.protocol-grid{ grid-template-columns: repeat(2, 1fr); gap: 28px; }
.loc-grid     { grid-template-columns: repeat(3, 1fr); }
.pharm-grid   { grid-template-columns: repeat(4, 1fr); gap: 16px; }
.ecosystem-grid { grid-template-columns: repeat(3, 1fr); }
.faq-grid     { grid-template-columns: repeat(2, 1fr); gap: 28px; }

@media (max-width: 1000px) {
  .partner-grid, .qual-grid, .ecosystem-grid { grid-template-columns: repeat(2, 1fr); }
  .pharm-grid { grid-template-columns: repeat(3, 1fr); }
  .protocol-grid { grid-template-columns: 1fr; }
  .loc-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 700px) {
  .partner-grid, .qual-grid, .ecosystem-grid, .loc-grid, .pharm-grid, .faq-grid { grid-template-columns: 1fr; }
}

/* Common card body for those grids */
.partner-card, .qual-card, .loc-card, .pharm-card, .eco-card, .faq-item, .protocol-card {
  background: #fff;
  padding: 28px 26px;
  border-radius: 18px;
  border: 1px solid var(--g100);
  transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
}
.partner-card:hover, .qual-card:hover, .loc-card:hover, .eco-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(11,24,56,0.06);
  border-color: var(--g200);
}
.partner-card h3, .qual-card h3, .loc-card h3, .eco-card h3, .faq-item h3, .protocol-card h3 {
  margin: 0 0 12px;
  color: var(--navy);
  font-size: 19px;
}
.partner-card p, .qual-card p, .loc-card p, .eco-card p, .faq-item p, .protocol-card p {
  color: var(--g600);
  line-height: 1.6;
  margin: 0 0 12px;
  font-size: 15px;
}
.faq-item h3 { font-size: 17px; }
.faq-item p:last-child { margin-bottom: 0; }
.faq-item p a { color: var(--orange); text-decoration: none; }
.faq-item p a:hover { text-decoration: underline; }

/* Pharm card compact */
.pharm-card { padding: 22px 20px; text-align: center; }
.pharm-card h3 { font-size: 16px; margin-bottom: 4px; }
.pharm-count { font-size: 12px; color: var(--g500); margin: 0; }

/* Locations */
.loc-card-soon { background: var(--g50, #F7F8FA); border-style: dashed; }
.loc-status { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--g600); margin-bottom: 12px; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot-green { background: #1D7C3F; }
.dot-orange { background: var(--orange); }
.loc-meta { font-size: 13px; color: var(--g500); margin: 0; }

/* Protocol cards */
.protocol-card { padding: 36px 32px; }
.protocol-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--orange);
  color: #fff;
  margin-bottom: 14px;
}
.protocol-badge-teal { background: var(--teal, #2A8B84); }

/* Ecosystem */
.eco-card { position: relative; }
.eco-card-rx { background: linear-gradient(135deg, #FFF8F2 0%, #FFE9D7 100%); border-color: #FBD8B8; }
.eco-card-protocol { background: linear-gradient(135deg, #F2F8FA 0%, #DEF0EE 100%); border-color: #B8DCD8; }
.eco-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(11,24,56,0.06);
  color: var(--navy);
  margin-bottom: 12px;
}

/* Timeline */
.timeline { position: relative; padding-left: 0; }
.timeline-item {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 20px;
  padding: 24px 0;
  border-bottom: 1px solid var(--g100);
}
.timeline-item:last-child { border-bottom: none; }
.timeline-step {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--orange);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 18px;
}
.timeline-item h3 { margin: 6px 0 8px; font-size: 19px; color: var(--navy); }
.timeline-item p { margin: 0; color: var(--g600); line-height: 1.6; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 56px; align-items: start; }
.contact-info h2 { font-size: 24px; margin: 0 0 18px; color: var(--navy); }
.contact-list { list-style: none; padding: 0; margin: 0 0 32px; display: flex; flex-direction: column; gap: 18px; }
.contact-list li { display: flex; flex-direction: column; gap: 4px; }
.contact-cta {
  background: var(--g50, #F7F8FA);
  padding: 22px 24px;
  border-radius: 14px;
  border: 1px solid var(--g100);
}
.contact-cta h3 { font-size: 17px; margin: 0 0 8px; color: var(--navy); }
.contact-cta p { font-size: 14px; line-height: 1.55; margin: 0 0 12px; }
.contact-form { background: #fff; padding: 36px; border-radius: 20px; border: 1px solid var(--g100); }
.contact-form .fineprint { margin-top: 14px; }
.contact-form .fineprint a { color: var(--orange); }
@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr; gap: 32px; }
  .contact-form { padding: 24px; }
}

/* Alerts */
.alert { padding: 18px 22px; border-radius: 12px; margin-bottom: 20px; }
.alert h3 { margin: 0 0 6px; font-size: 18px; }
.alert p { margin: 0; line-height: 1.55; }
.alert ul { margin: 8px 0 0 18px; padding: 0; }
.alert-success { background: #ECFDF5; border: 1px solid #A7F3D0; color: #065F46; }
.alert-success h3 { color: #065F46; }
.alert-error { background: #FEF2F2; border: 1px solid #FECACA; color: #991B1B; }

/* Legal pages */
.legal { max-width: 820px; }
.legal h2 { font-size: 22px; color: var(--navy); margin: 32px 0 14px; }
.legal p, .legal li { color: var(--g700, #374151); font-size: 15px; line-height: 1.7; }
.legal ul, .legal ol { padding-left: 22px; margin: 0 0 16px; }
.legal li { margin-bottom: 6px; }
.legal a { color: var(--orange); }
.legal .fineprint { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--g100); }

/* Check-list (in case original .check-list selectors don't match this naming) */
ul.check-list, ol.check-list { list-style: none; padding: 0; margin: 14px 0 18px; display: flex; flex-direction: column; gap: 10px; }
ul.check-list li, ol.check-list li {
  position: relative;
  padding-left: 30px;
  color: var(--g600);
  font-size: 15px;
  line-height: 1.55;
}
ul.check-list li::before, ol.check-list li::before {
  content: '';
  position: absolute;
  left: 0; top: 4px;
  width: 18px; height: 18px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23E8713A' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
}

/* Spacing helpers used inline */
.section-tag[style*="margin-top"] { display: inline-flex; }

/* Color tokens fallback (in case --g50 / --g700 not defined upstream) */
:root {
  --g50: #F7F8FA;
  --g700: #374151;
  --teal-light: #E6F4F3;
  --teal: #2A8B84;
  --orange-hover: #D6602A;
}

/* =========================================================================
   Logo images (replaces text logo marks in nav + footer)
   ========================================================================= */

/* Nav logo image */
.nav-logo-img {
  display: block;
  height: 40px;
  width: auto;
  max-width: 180px;
}
@media (max-width: 540px) {
  .nav-logo-img { height: 28px; max-width: 150px; }
}

/* Footer logo image */
.footer-logo-img {
  display: block;
  height: 36px;
  width: auto;
  max-width: 200px;
  margin-bottom: 4px;
}

/* When using the image logo, override the prior text-mark flexbox/gap so the
   image isn't pushed off-baseline by leftover gap from sibling spans. */
.nav-logo { gap: 0; }
footer .footer-brand { gap: 0; margin-bottom: 16px; }

/* =========================================================================
   Rx Card — additional subcomponents for the new card pattern
   (used by /index.php, /card.php, /how-it-works.php)
   ========================================================================= */

.rx-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 14px;
}

/* Brand block in the new card pattern */
.rx-card-brand .rx-mark {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(255,255,255,0.1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -0.04em;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.18);
}
.rx-card-brand .rx-mark em {
  font-style: normal;
  color: var(--orange);
  margin-left: 1px;
}
.rx-card-brand .rx-brand-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  line-height: 1.1;
}
.rx-card-brand .rx-brand-text strong {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.01em;
  color: #fff;
}
.rx-card-brand .rx-brand-text small {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.65);
  font-weight: 500;
}

/* Glow accent (decorative) */
.rx-card-glow {
  position: absolute;
  top: -30%; right: -15%;
  width: 60%; height: 130%;
  background: radial-gradient(closest-side, rgba(232,113,58,0.35), transparent 70%);
  pointer-events: none;
  z-index: 0;
}
.rx-card > * { position: relative; z-index: 1; }

/* When using <small>/<strong> directly inside rx-card-grid (newer pattern) */
.rx-card-grid > div { display: flex; flex-direction: column; gap: 4px; }
.rx-card-grid > div > small {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.55);
  font-weight: 600;
  font-family: 'Outfit', sans-serif;
}
.rx-card-grid > div > strong {
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #fff;
}

/* =========================================================================
 * Autocomplete drug search widget
 * ========================================================================= */

.cr-autocomplete {
  position: relative;
  width: 100%;
}

.cr-autocomplete input[type="text"] {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid var(--g200);
  border-radius: 10px;
  font-size: 16px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
  background: #fff;
}

.cr-autocomplete input[type="text"]:focus {
  border-color: var(--teal);
}

.cr-ac-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid var(--g200);
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
  max-height: 360px;
  overflow-y: auto;
  z-index: 100;
}

.cr-ac-item {
  padding: 12px 16px;
  cursor: pointer;
  border-bottom: 1px solid var(--g100);
  transition: background 0.12s;
}

.cr-ac-item:last-child {
  border-bottom: none;
}

.cr-ac-item:hover,
.cr-ac-item.active {
  background: var(--orange-light);
}

.cr-ac-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--navy);
  font-family: 'Outfit', sans-serif;
  letter-spacing: -0.01em;
}

.cr-ac-sub {
  font-size: 13px;
  color: var(--g500);
  margin-top: 2px;
}

.cr-ac-empty {
  padding: 16px;
  font-size: 14px;
  color: var(--g500);
  text-align: center;
}

.cr-ac-strength-prompt {
  padding: 10px 16px 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--orange);
  background: var(--g50);
  border-bottom: 1px solid var(--g100);
}

.cr-ac-strength {
  padding-left: 24px;
}

/* Results panel */
.cr-loading,
.cr-empty,
.cr-error {
  padding: 24px;
  border: 1px solid var(--g100);
  border-radius: 14px;
  background: #fff;
  text-align: center;
  font-size: 15px;
  color: var(--g600);
}

.cr-error {
  background: var(--orange-light);
  border-color: rgba(232, 113, 58, 0.2);
  color: var(--navy);
}

.cr-results-header {
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--g200);
}

.cr-results-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--navy);
  font-family: 'Outfit', sans-serif;
  letter-spacing: -0.01em;
}

.cr-results-meta {
  font-size: 13px;
  color: var(--g500);
  margin-top: 2px;
}

.cr-pharmacy-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cr-pharmacy-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  background: #fff;
  border: 1px solid var(--g100);
  border-radius: 14px;
  transition: border-color 0.15s, transform 0.15s;
}

.cr-pharmacy-card:hover {
  border-color: var(--orange);
  transform: translateY(-1px);
}

.cr-pharm-info {
  flex: 1;
  min-width: 0;
}

.cr-pharm-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
  font-family: 'Outfit', sans-serif;
  letter-spacing: -0.01em;
}

.cr-pharm-addr {
  font-size: 13px;
  color: var(--g500);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cr-pharm-price {
  font-size: 22px;
  font-weight: 800;
  color: var(--orange);
  font-family: 'Outfit', sans-serif;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

@media (max-width: 480px) {
  .cr-pharmacy-card { padding: 12px 14px; }
  .cr-pharm-price { font-size: 18px; }
}
