/* ==========================================================================
   EnQuéFarmacia.pe v2.0 — Clinical Light Mode Design System
   Palette: Calm Cyan (#0891B2 / #0E7490) + Health Emerald (#059669 / #10B981)
   Typography: Lexend (Headings/Prices) + Source Sans 3 (Body) + JetBrains Mono
   Mobile-First 375px Ergonomics + @media print for Pastillero PDF
   ========================================================================== */

:root {
  --bg-page: #F8FAFC;
  --bg-surface: #FFFFFF;
  --bg-cyan-soft: #ECFEFF;
  --bg-emerald-soft: #ECFDF5;
  --bg-amber-soft: #FFFBEB;
  --bg-red-soft: #FEF2F2;
  --bg-slate-soft: #F1F5F9;

  --primary-cyan: #0891B2;
  --primary-cyan-dark: #0E7490;
  --primary-cyan-deep: #164E63;

  --accent-emerald: #059669;
  --accent-emerald-bright: #10B981;
  --accent-emerald-dark: #047857;

  --alert-red: #DC2626;
  --alert-amber: #D97706;
  --trust-blue: #2563EB;

  --text-main: #0F172A;
  --text-secondary: #334155;
  --text-muted: #64748B;

  --border-light: #E2E8F0;
  --border-cyan: #A5F3FC;
  --border-emerald: #A7F3D0;

  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 8px 24px -4px rgba(8, 145, 178, 0.10), 0 2px 6px -1px rgba(15, 23, 42, 0.05);
  --shadow-lg: 0 16px 36px -6px rgba(15, 23, 42, 0.12);

  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 9999px;

  --font-heading: 'Lexend', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Source Sans 3', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-body);
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4, .brand-title, .shock-price-red, .shock-price-green, .savings-pct-big {
  font-family: var(--font-heading);
  letter-spacing: -0.02em;
}

code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--bg-slate-soft);
  padding: 2px 6px;
  border-radius: 5px;
  color: var(--primary-cyan-deep);
}

.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 16px;
}

.hidden {
  display: none !important;
}

/* --- Top Institutional Verification Ribbon --- */
.top-trust-bar {
  background: var(--primary-cyan-deep);
  color: #E0F2FE;
  font-size: 0.85rem;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.top-trust-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.trust-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.trust-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.1);
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
}

.live-kpi-mini {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: #BAE6FD;
}

/* --- Site Header --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 70px;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 8px;
  padding-bottom: 8px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-main);
}

.brand-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary-cyan), var(--accent-emerald));
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(8, 145, 178, 0.25);
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--primary-cyan-deep);
  line-height: 1.1;
}

.brand-tld {
  color: var(--accent-emerald);
}

.brand-subtitle {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.nav-link {
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.93rem;
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  transition: all 0.18s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.nav-link:hover, .nav-link.active {
  background: var(--bg-cyan-soft);
  color: var(--primary-cyan-dark);
}

.nav-link-highlight {
  background: var(--bg-emerald-soft);
  color: var(--accent-emerald-dark);
  border: 1px solid var(--border-emerald);
}

.nav-badge {
  background: var(--accent-emerald);
  color: #FFF;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
}

.btn-b2b-header {
  background: #FFF;
  border: 1.5px solid var(--border-light);
  color: var(--primary-cyan-deep);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.88rem;
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.18s ease;
}

.btn-b2b-header:hover {
  border-color: var(--primary-cyan);
  background: var(--bg-cyan-soft);
}

/* --- Hero & Search Terminal --- */
.hero-terminal-section {
  padding: 28px 0 44px;
  background: radial-gradient(circle at 50% 0%, #ECFEFF 0%, #F8FAFC 70%);
}

.hero-header {
  text-align: center;
  max-width: 900px;
  margin: 0 auto 24px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #FFFFFF;
  border: 1px solid var(--border-cyan);
  color: var(--primary-cyan-dark);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
}

.pulse-dot {
  width: 9px;
  height: 9px;
  background: var(--accent-emerald-bright);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.25);
}

.hero-title {
  font-size: clamp(1.65rem, 3.5vw, 2.55rem);
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.18;
  margin-bottom: 12px;
}

.text-gradient {
  color: var(--primary-cyan-dark);
  text-decoration: underline;
  text-decoration-color: rgba(8, 145, 178, 0.35);
  text-underline-offset: 4px;
}

.text-emerald {
  color: var(--accent-emerald);
}

.hero-lead {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 780px;
  margin: 0 auto;
}

/* --- Search Terminal Card --- */
.search-terminal-card {
  background: var(--bg-surface);
  border: 2px solid var(--border-cyan);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-md);
  margin-bottom: 24px;
}

.search-form-grid {
  display: grid;
  grid-template-columns: 1.8fr 1fr auto;
  gap: 14px;
  align-items: end;
}

.field-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary-cyan-deep);
  margin-bottom: 6px;
}

.search-input-wrapper {
  position: relative;
}

.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 14px;
  color: var(--primary-cyan);
  pointer-events: none;
}

#medicineSearchInput {
  width: 100%;
  min-height: 52px;
  padding: 12px 40px 12px 44px;
  font-family: var(--font-heading);
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--text-main);
  background: var(--bg-page);
  border: 2px solid var(--border-light);
  border-radius: var(--radius-md);
  transition: border-color 0.2s, box-shadow 0.2s;
}

#medicineSearchInput:focus {
  outline: none;
  background: #FFF;
  border-color: var(--primary-cyan);
  box-shadow: 0 0 0 4px rgba(8, 145, 178, 0.14);
}

.clear-input-btn {
  position: absolute;
  right: 12px;
  background: var(--border-light);
  border: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

#districtSelect {
  width: 100%;
  min-height: 52px;
  padding: 12px 14px;
  font-family: var(--font-body);
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--text-main);
  background: var(--bg-page);
  border: 2px solid var(--border-light);
  border-radius: var(--radius-md);
  cursor: pointer;
}

.btn-primary-search {
  min-height: 52px;
  padding: 0 24px;
  background: linear-gradient(135deg, var(--primary-cyan), var(--primary-cyan-dark));
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-heading);
  font-size: 0.98rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(8, 145, 178, 0.30);
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn-primary-search:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(8, 145, 178, 0.38);
}

/* Autocomplete Dropdown */
.autocomplete-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #FFFFFF;
  border: 1.5px solid var(--primary-cyan);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 120;
  max-height: 320px;
  overflow-y: auto;
}

.autocomplete-item {
  padding: 11px 16px;
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.autocomplete-item:hover {
  background: var(--bg-cyan-soft);
}

.ac-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--primary-cyan-deep);
}

.ac-sub {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.ac-price-pill {
  background: var(--bg-emerald-soft);
  color: var(--accent-emerald-dark);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.82rem;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}

/* Quick Chips */
.quick-chips-row {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed var(--border-light);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.quick-chips-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
}

.quick-chips-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.molecule-chip {
  background: var(--bg-slate-soft);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.16s ease;
}

.molecule-chip:hover, .molecule-chip.active {
  background: var(--bg-cyan-soft);
  border-color: var(--primary-cyan);
  color: var(--primary-cyan-deep);
  font-weight: 700;
}

/* Terminal Controls Bar: Pastilla vs Caja + 24h Filter + Sector */
.terminal-controls-bar {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-light);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}

.price-mode-switch-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.control-group-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.tactile-switch {
  display: inline-flex;
  background: var(--bg-slate-soft);
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
}

.switch-btn {
  border: none;
  background: transparent;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  font-family: var(--font-heading);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.18s ease;
}

.switch-btn.active {
  background: var(--primary-cyan);
  color: #FFFFFF;
  box-shadow: 0 2px 8px rgba(8, 145, 178, 0.28);
}

.filters-right-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-filter-24h {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  border: 2px solid #FECACA;
  background: var(--bg-red-soft);
  color: #B91C1C;
  font-family: var(--font-heading);
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
}

.btn-filter-24h.active {
  background: var(--alert-red);
  border-color: var(--alert-red);
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(220, 38, 38, 0.35);
}

.sector-pills {
  display: inline-flex;
  background: var(--bg-slate-soft);
  padding: 4px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-light);
}

.sector-pill {
  border: none;
  background: transparent;
  padding: 7px 13px;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
}

.sector-pill.active {
  background: #FFFFFF;
  color: var(--primary-cyan-deep);
  box-shadow: var(--shadow-sm);
}

/* --- Price Shock Summary Banner --- */
.price-shock-card {
  background: #FFFFFF;
  border: 1.5px solid var(--border-emerald);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-md);
  margin-bottom: 26px;
}

.price-shock-grid {
  display: grid;
  grid-template-columns: 1.1fr auto 1.1fr 1.2fr;
  gap: 16px;
  align-items: center;
}

.shock-col {
  padding: 14px 16px;
  border-radius: var(--radius-md);
}

.shock-col-brand {
  background: var(--bg-red-soft);
  border: 1px solid #FECACA;
}

.shock-col-generic {
  background: var(--bg-emerald-soft);
  border: 1.5px solid var(--border-emerald);
}

.shock-col-vs {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.vs-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary-cyan-deep);
  color: #FFF;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.same-ifa-arrow {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary-cyan-dark);
  background: var(--bg-cyan-soft);
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}

.shock-badge-red {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  color: #B91C1C;
  margin-bottom: 4px;
}

.shock-badge-green {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--accent-emerald-dark);
  margin-bottom: 4px;
}

.shock-prod-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-main);
}

.shock-sub {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.shock-price-red span {
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--alert-red);
  text-decoration: line-through;
}

.shock-price-green span {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--accent-emerald-dark);
}

.shock-price-red small, .shock-price-green small {
  display: block;
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-family: var(--font-body);
}

.savings-highlight-box {
  background: linear-gradient(135deg, #065F46, #047857);
  color: #FFFFFF;
  padding: 16px;
  border-radius: var(--radius-md);
  text-align: center;
}

.savings-eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #A7F3D0;
}

.savings-pct-big {
  font-size: 1.65rem;
  font-weight: 800;
  margin: 2px 0;
}

.savings-soles-sub {
  font-size: 0.86rem;
  color: #D1FAE5;
  margin-bottom: 10px;
}

.btn-viral-whatsapp {
  width: 100%;
  padding: 10px 12px;
  background: #FFFFFF;
  color: #065F46;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-heading);
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s;
}

.btn-viral-whatsapp:hover {
  transform: scale(1.02);
}

/* --- The 4 Anti-Generic-Myth Trust Seals --- */
.trust-seals-section {
  margin-bottom: 32px;
}

.section-sub-header {
  margin-bottom: 14px;
}

.section-sub-header h2 {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--primary-cyan-deep);
}

.section-sub-header p {
  font-size: 0.94rem;
  color: var(--text-secondary);
}

.trust-seals-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.seal-card {
  background: #FFFFFF;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
}

.seal-cyan { border-top: 4px solid var(--primary-cyan); }
.seal-emerald { border-top: 4px solid var(--accent-emerald); }
.seal-blue { border-top: 4px solid var(--trust-blue); }
.seal-amber { border-top: 4px solid var(--alert-amber); }

.seal-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.seal-icon {
  font-size: 1.45rem;
}

.seal-tag {
  font-family: var(--font-mono);
  font-size: 0.73rem;
  font-weight: 600;
  background: var(--bg-slate-soft);
  color: var(--primary-cyan-deep);
  padding: 3px 8px;
  border-radius: var(--radius-pill);
}

.seal-title {
  font-size: 0.96rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 8px;
}

.seal-body {
  font-size: 0.86rem;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.seal-footer-metric {
  background: var(--bg-cyan-soft);
  color: var(--primary-cyan-deep);
  font-size: 0.8rem;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-weight: 600;
}

.seal-labs-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.lab-chip {
  background: var(--bg-emerald-soft);
  color: var(--accent-emerald-dark);
  font-size: 0.76rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
}

.cima-alerts-mini p {
  font-size: 0.81rem;
  color: var(--text-secondary);
  margin-bottom: 5px;
}

.seal-external-link {
  display: inline-block;
  margin-top: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--trust-blue);
  text-decoration: none;
}

.seal-external-link:hover {
  text-decoration: underline;
}

/* --- Pharmacy Offer Cards --- */
.offers-results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.offers-results-header h2 {
  font-size: 1.35rem;
  color: var(--text-main);
}

.offers-sub {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.offers-count-badge {
  background: #FFFFFF;
  border: 1px solid var(--border-light);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.88rem;
}

.fallback-notice {
  background: var(--bg-amber-soft);
  border: 1px solid #FDE68A;
  color: #92400E;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  font-size: 0.88rem;
  font-weight: 600;
}

.pharmacy-offers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 16px;
}

.offer-card {
  background: #FFFFFF;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  transition: transform 0.16s, border-color 0.16s;
}

.offer-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary-cyan);
  box-shadow: var(--shadow-md);
}

.offer-card.offer-best-value {
  border: 2px solid var(--accent-emerald);
  background: linear-gradient(180deg, #ECFDF5 0%, #FFFFFF 28%);
}

.offer-top-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 10px;
}

.badge-type-generic {
  background: var(--bg-emerald-soft);
  color: var(--accent-emerald-dark);
  font-size: 0.74rem;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
}

.badge-type-brand {
  background: var(--bg-red-soft);
  color: #B91C1C;
  font-size: 0.74rem;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
}

.badge-24h {
  background: var(--alert-red);
  color: #FFFFFF;
  font-size: 0.73rem;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
}

.badge-sector-minsa {
  background: #DBEAFE;
  color: #1E40AF;
  font-size: 0.73rem;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
}

.offer-product-name {
  font-family: var(--font-heading);
  font-size: 1.08rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 2px;
}

.offer-lab-meta {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.offer-prices-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  background: var(--bg-page);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-bottom: 12px;
}

.price-cell {
  display: flex;
  flex-direction: column;
}

.price-cell.active-mode {
  background: #FFFFFF;
  border: 1.5px solid var(--primary-cyan);
  border-radius: 8px;
  padding: 6px 8px;
}

.price-cell-label {
  font-size: 0.73rem;
  font-weight: 700;
  color: var(--text-muted);
}

.price-cell-value {
  font-family: var(--font-heading);
  font-size: 1.28rem;
  font-weight: 800;
  color: var(--primary-cyan-deep);
}

.offer-pharmacy-info {
  font-size: 0.86rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.offer-pharmacy-name {
  font-weight: 800;
  color: var(--text-main);
  font-size: 0.95rem;
}

.semaphore-pill {
  display: inline-block;
  margin-top: 6px;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 6px;
}

.semaphore-green {
  background: var(--bg-emerald-soft);
  color: var(--accent-emerald-dark);
}

.semaphore-yellow {
  background: var(--bg-amber-soft);
  color: #92400E;
}

.indecopi-alert-bar {
  margin-top: 6px;
  background: var(--bg-red-soft);
  border: 1px solid #FECACA;
  color: #991B1B;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 5px 8px;
  border-radius: 6px;
}

.offer-actions-stack {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: auto;
}

.btn-whatsapp-order {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 11px 14px;
  background: #16A34A;
  color: #FFFFFF;
  text-decoration: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-heading);
  font-size: 0.88rem;
  font-weight: 700;
  transition: background 0.15s;
}

.btn-whatsapp-order:hover {
  background: #15803D;
}

.btn-claim-local-mini {
  background: transparent;
  border: 1px dashed var(--border-light);
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 600;
  padding: 6px;
  border-radius: 6px;
  cursor: pointer;
}

.btn-claim-local-mini:hover {
  color: var(--primary-cyan-dark);
  border-color: var(--primary-cyan);
  background: var(--bg-cyan-soft);
}

/* ==========================================================================
   SECTION 2: PRESCRIPTION SCANNER & BASKET OPTIMIZER IA
   ========================================================================== */
.prescription-optimizer-section {
  padding: 48px 0 60px;
  background: linear-gradient(180deg, #F1F5F9 0%, #ECFEFF 100%);
  border-top: 1px solid var(--border-light);
}

.rx-section-header {
  text-align: center;
  max-width: 840px;
  margin: 0 auto 28px;
}

.rx-eyebrow {
  display: inline-block;
  background: var(--primary-cyan-deep);
  color: #A5F3FC;
  font-size: 0.76rem;
  font-weight: 800;
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  margin-bottom: 10px;
}

.rx-section-header h2 {
  font-size: clamp(1.45rem, 3vw, 2.1rem);
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 8px;
}

.rx-workspace-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 22px;
  align-items: start;
}

.rx-builder-card, .rx-results-card {
  background: #FFFFFF;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-md);
}

.rx-card-step-badge {
  display: inline-block;
  background: var(--bg-cyan-soft);
  color: var(--primary-cyan-dark);
  font-family: var(--font-heading);
  font-size: 0.74rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  margin-bottom: 8px;
}

.badge-emerald {
  background: var(--bg-emerald-soft);
  color: var(--accent-emerald-dark);
}

.rx-upload-box {
  margin-top: 14px;
  border: 2px dashed var(--primary-cyan);
  background: var(--bg-cyan-soft);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.hidden-file-input {
  display: none;
}

.upload-icon-circle {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.upload-texts {
  flex: 1;
  min-width: 180px;
}

.upload-texts strong {
  display: block;
  font-size: 0.94rem;
  color: var(--primary-cyan-deep);
}

.upload-texts span {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.btn-upload-outline {
  background: var(--primary-cyan);
  color: #FFFFFF;
  border: none;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
}

.rx-ocr-banner {
  margin-top: 10px;
  background: var(--bg-emerald-soft);
  border: 1px solid var(--border-emerald);
  color: var(--accent-emerald-dark);
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  font-weight: 600;
}

.rx-presets-bar {
  margin: 16px 0;
}

.presets-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.presets-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.btn-preset {
  background: var(--bg-slate-soft);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  font-size: 0.79rem;
  font-weight: 700;
  padding: 7px 11px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.btn-preset.active, .btn-preset:hover {
  background: var(--primary-cyan-deep);
  color: #FFFFFF;
  border-color: var(--primary-cyan-deep);
}

.rx-items-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

.rx-item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-page);
  border: 1px solid var(--border-light);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
}

.rx-item-title {
  font-weight: 700;
  font-size: 0.92rem;
}

.rx-item-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.btn-remove-rx {
  background: transparent;
  border: none;
  color: var(--alert-red);
  font-weight: 700;
  cursor: pointer;
  padding: 4px 8px;
}

.rx-add-item-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr auto;
  gap: 8px;
  margin-bottom: 16px;
}

.rx-add-item-row input, .rx-add-item-row select {
  padding: 10px;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
}

.btn-add-med {
  background: var(--bg-cyan-soft);
  border: 1.5px solid var(--primary-cyan);
  color: var(--primary-cyan-deep);
  font-weight: 700;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.btn-run-optimizer {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--accent-emerald), var(--accent-emerald-dark));
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-heading);
  font-size: 0.96rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.30);
}

/* Right Column: Rx Results & Paywall / Courtesy Unlock */
.rx-comparison-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 14px 0 18px;
}

.rx-sum-box {
  padding: 12px;
  border-radius: var(--radius-sm);
  text-align: center;
}

.rx-sum-brand {
  background: var(--bg-red-soft);
  border: 1px solid #FECACA;
}

.rx-sum-opt {
  background: var(--bg-emerald-soft);
  border: 1px solid var(--border-emerald);
}

.rx-sum-savings {
  background: var(--primary-cyan-deep);
  color: #FFFFFF;
}

.rx-sum-label {
  display: block;
  font-size: 0.74rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.rx-sum-val-red {
  display: block;
  font-family: var(--font-heading);
  font-size: 1.35rem;
  color: var(--alert-red);
  text-decoration: line-through;
}

.rx-sum-val-green {
  display: block;
  font-family: var(--font-heading);
  font-size: 1.45rem;
  color: var(--accent-emerald-dark);
}

.rx-sum-val-highlight {
  display: block;
  font-family: var(--font-heading);
  font-size: 1.3rem;
  color: #6EE7B7;
}

.rx-cima-audit-box {
  background: var(--bg-page);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 18px;
}

.rx-cima-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-size: 0.88rem;
}

.cima-count-pill {
  background: var(--bg-amber-soft);
  color: #B45309;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
}

.rx-alert-item {
  background: #FFFFFF;
  border-left: 4px solid var(--alert-amber);
  padding: 9px 12px;
  border-radius: 6px;
  margin-bottom: 8px;
  font-size: 0.84rem;
}

.ethical-unlock-banner {
  background: var(--bg-emerald-soft);
  border: 2px solid var(--accent-emerald);
  color: var(--accent-emerald-dark);
  padding: 12px 14px;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  font-size: 0.88rem;
}

/* Paywall Callout & First-Time Courtesy Button */
.rx-paywall-callout {
  background: linear-gradient(180deg, #ECFEFF 0%, #FFFFFF 100%);
  border: 2px solid var(--primary-cyan);
  border-radius: var(--radius-md);
  padding: 18px;
}

.paywall-lock-header {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.lock-icon-badge {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--primary-cyan-deep);
  color: #FFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.paywall-lock-header h4 {
  font-size: 1.02rem;
  color: var(--primary-cyan-deep);
  margin-bottom: 4px;
}

.paywall-lock-header p {
  font-size: 0.86rem;
  color: var(--text-secondary);
}

.paywall-cta-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-unlock-primary {
  width: 100%;
  padding: 14px;
  background: var(--primary-cyan-deep);
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 800;
  cursor: pointer;
}

.btn-first-time-gift {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-emerald-soft);
  border: 2px solid var(--accent-emerald);
  color: var(--accent-emerald-dark);
  border-radius: var(--radius-sm);
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.16s ease;
}

.btn-first-time-gift:hover {
  background: var(--accent-emerald);
  color: #FFFFFF;
}

/* Unlocked Route & Printable Pastillero */
.unlocked-success-banner {
  background: var(--bg-emerald-soft);
  border: 1.5px solid var(--accent-emerald);
  color: var(--accent-emerald-dark);
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  margin-bottom: 14px;
}

.one-stop-hub-card {
  background: linear-gradient(135deg, #164E63, #0E7490);
  color: #FFFFFF;
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 16px;
}

.one-stop-hub-card h4 {
  font-size: 1.08rem;
  margin-bottom: 4px;
}

.one-stop-hub-card p {
  font-size: 0.85rem;
  color: #E0F2FE;
  margin-bottom: 10px;
}

.unlocked-item-card {
  background: var(--bg-page);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.pastillero-printable-card {
  margin-top: 18px;
  background: #FFFFFF;
  border: 2px solid var(--primary-cyan);
  border-radius: var(--radius-md);
  padding: 16px;
}

.pastillero-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.pastillero-badge {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--primary-cyan-dark);
}

.btn-print-pdf {
  background: var(--primary-cyan);
  color: #FFFFFF;
  border: none;
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.pastillero-slots-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.slot-col {
  background: var(--bg-page);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 12px;
}

.slot-col h5 {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  margin-bottom: 8px;
  color: var(--primary-cyan-deep);
}

.slot-med-entry {
  background: #FFFFFF;
  border: 1px solid var(--border-light);
  border-radius: 6px;
  padding: 8px;
  margin-bottom: 6px;
  font-size: 0.8rem;
}

/* ==========================================================================
   MODALS (PURCHASE, COURTESY PASS "🎁 ¿PRIMERA VEZ AQUÍ?", B2B CLAIM)
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow-y: auto;
}

.modal-card {
  position: relative;
  background: #FFFFFF;
  width: 100%;
  max-width: 560px;
  border-radius: var(--radius-lg);
  padding: 26px;
  box-shadow: var(--shadow-lg);
  max-height: 92vh;
  overflow-y: auto;
}

.modal-card-courtesy {
  border: 2.5px solid var(--accent-emerald);
}

.modal-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border-light);
  background: var(--bg-page);
  cursor: pointer;
  font-weight: 700;
}

.modal-badge {
  display: inline-block;
  background: var(--bg-cyan-soft);
  color: var(--primary-cyan-dark);
  font-size: 0.72rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  margin-bottom: 8px;
}

.modal-header h3, .courtesy-modal-header h3 {
  font-size: 1.28rem;
  color: var(--text-main);
  margin-bottom: 6px;
}

.courtesy-entry-banner {
  margin: 16px 0;
}

.btn-courtesy-switch {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  padding: 14px;
  background: var(--bg-emerald-soft);
  border: 2px solid var(--accent-emerald);
  border-radius: var(--radius-md);
  cursor: pointer;
}

.gift-emoji {
  font-size: 1.8rem;
}

.gift-btn-copy strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.96rem;
  color: var(--accent-emerald-dark);
}

.gift-btn-copy span {
  font-size: 0.84rem;
  color: var(--text-secondary);
}

.pricing-plans-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

.plan-option {
  position: relative;
  border: 2px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 14px;
  cursor: pointer;
  display: block;
}

.plan-option.selected {
  border-color: var(--primary-cyan);
  background: var(--bg-cyan-soft);
}

.plan-tag-popular {
  background: var(--accent-emerald);
  color: #FFF;
  font-size: 0.66rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  display: inline-block;
  margin-bottom: 4px;
}

.plan-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
}

.plan-price {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--primary-cyan-deep);
}

.plan-option p {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.yape-instructions {
  background: var(--bg-page);
  padding: 12px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  margin-bottom: 10px;
}

.form-row-inline {
  display: flex;
  gap: 8px;
}

.form-row-inline input {
  flex: 1;
  padding: 11px;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-sm);
}

.btn-confirm-pay {
  background: var(--primary-cyan-deep);
  color: #FFF;
  border: none;
  padding: 0 18px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  cursor: pointer;
}

/* Courtesy Modal Specific */
.courtesy-gift-circle {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--bg-emerald-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  margin-bottom: 10px;
}

.courtesy-lead {
  font-size: 0.92rem;
  color: var(--text-secondary);
  margin-bottom: 14px;
}

.courtesy-benefits-box {
  background: var(--bg-page);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 16px;
}

.courtesy-benefit-item {
  display: flex;
  gap: 8px;
  font-size: 0.84rem;
  margin-bottom: 8px;
}

.courtesy-phone-label {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--primary-cyan-deep);
  margin-bottom: 8px;
}

.phone-input-group {
  display: flex;
  align-items: center;
  border: 2px solid var(--primary-cyan);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 12px;
}

.phone-prefix {
  background: var(--bg-cyan-soft);
  padding: 12px 14px;
  font-weight: 700;
  color: var(--primary-cyan-deep);
  border-right: 1px solid var(--border-cyan);
}

#courtesyPhoneInput {
  flex: 1;
  border: none;
  padding: 12px 14px;
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
}

#courtesyPhoneInput:focus {
  outline: none;
}

.courtesy-privacy-note {
  background: var(--bg-emerald-soft);
  border: 1px solid var(--border-emerald);
  color: #065F46;
  padding: 11px 13px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  margin-bottom: 14px;
  line-height: 1.45;
}

.btn-activate-courtesy {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--accent-emerald), var(--accent-emerald-dark));
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-heading);
  font-size: 0.96rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.35);
}

/* B2B Modal Form */
.b2b-form .form-field {
  margin-bottom: 12px;
}

.b2b-form label {
  display: block;
  font-size: 0.84rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.b2b-form input, .b2b-form select {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
}

.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.btn-submit-b2b {
  width: 100%;
  padding: 13px;
  background: var(--primary-cyan-deep);
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-heading);
  font-weight: 700;
  cursor: pointer;
}

.form-error {
  background: var(--bg-red-soft);
  color: #B91C1C;
  padding: 9px 12px;
  border-radius: 6px;
  font-size: 0.84rem;
  margin-bottom: 10px;
}

.form-feedback {
  background: var(--bg-emerald-soft);
  color: var(--accent-emerald-dark);
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 0.85rem;
  margin-bottom: 10px;
}

/* --- Footer & 3 Mandatory Legal Micro-Seals --- */
.site-footer {
  background: #0F172A;
  color: #CBD5E1;
  padding: 44px 0 28px;
}

.legal-seals-footer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 28px;
}

.legal-seal-box {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 16px;
}

.legal-seal-box h4 {
  color: #38BDF8;
  font-size: 0.92rem;
  margin-bottom: 6px;
}

.legal-seal-box p {
  font-size: 0.8rem;
  color: #94A3B8;
  line-height: 1.5;
}

.footer-bottom-bar {
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.84rem;
}

.footer-links a {
  color: #38BDF8;
  text-decoration: none;
}

/* --- Mobile-First 375px Responsive Rules --- */
@media (max-width: 960px) {
  .search-form-grid {
    grid-template-columns: 1fr;
  }
  .price-shock-grid {
    grid-template-columns: 1fr;
  }
  .trust-seals-grid {
    grid-template-columns: 1fr 1fr;
  }
  .rx-workspace-grid {
    grid-template-columns: 1fr;
  }
  .legal-seals-footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .trust-seals-grid {
    grid-template-columns: 1fr;
  }
  .pharmacy-offers-grid {
    grid-template-columns: 1fr;
  }
  .rx-comparison-summary {
    grid-template-columns: 1fr;
  }
  .pastillero-slots-grid {
    grid-template-columns: 1fr;
  }
  .pricing-plans-grid {
    grid-template-columns: 1fr;
  }
  .form-grid-2 {
    grid-template-columns: 1fr;
  }
  .rx-add-item-row {
    grid-template-columns: 1fr;
  }
}

/* --- Print Styles for Printable Pastillero PDF --- */
@media print {
  .no-print {
    display: none !important;
  }
  body {
    background: #FFFFFF;
  }
}


/* ==========================================================================
   ETAPA B — 3-TIER RADICAL TRANSPARENCY BAR, 4-PILL CONFIGURATOR,
   SAME GMP PLANT SEAL, 6-SECTION CIMA ACCORDION & B2B CSV EXPORTER
   ========================================================================== */

.configurator-selects-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.pill-select-box {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-slate-soft);
  border: 1px solid var(--border-light);
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.pill-select-box select {
  border: none;
  background: transparent;
  font-family: var(--font-heading);
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--primary-cyan-deep);
  cursor: pointer;
}

.pill-select-box select:focus {
  outline: none;
}

/* Biologic / Narrow Therapeutic Index Guardrail */
.biologic-guardrail-banner {
  background: var(--bg-amber-soft);
  border: 2px solid var(--alert-amber);
  color: #92400E;
  border-radius: var(--radius-md);
  padding: 14px 18px;
  margin-bottom: 22px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  box-shadow: var(--shadow-sm);
}

.guardrail-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.biologic-guardrail-banner strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.96rem;
  color: #78350F;
  margin-bottom: 3px;
}

.biologic-guardrail-banner p {
  font-size: 0.86rem;
  line-height: 1.45;
}

/* 3-Tier Radical Price Transparency Bar */
.radical-transparency-card {
  background: #FFFFFF;
  border: 2px solid var(--border-cyan);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  margin-bottom: 22px;
  box-shadow: var(--shadow-md);
}

.rt-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.rt-eyebrow {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--primary-cyan-dark);
  background: var(--bg-cyan-soft);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  margin-bottom: 4px;
}

.rt-header h2 {
  font-size: 1.22rem;
  font-weight: 800;
  color: var(--text-main);
}

.rt-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.same-gmp-pill {
  background: var(--bg-emerald-soft);
  border: 1px solid var(--border-emerald);
  color: var(--accent-emerald-dark);
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 800;
  padding: 5px 11px;
  border-radius: var(--radius-pill);
}

.rt-seo-link {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--primary-cyan-dark);
  text-decoration: none;
}

.rt-seo-link:hover {
  text-decoration: underline;
}

.rt-tiers-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rt-tier-row {
  display: grid;
  grid-template-columns: 1.2fr 1.4fr auto;
  gap: 14px;
  align-items: center;
  background: var(--bg-page);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 12px 16px;
}

.rt-tier-featured {
  background: var(--bg-emerald-soft);
  border: 1.5px solid var(--accent-emerald);
}

.rt-tier-meta strong {
  display: block;
  font-size: 0.9rem;
  color: var(--text-main);
}

.rt-tier-meta small {
  display: block;
  font-size: 0.76rem;
  color: var(--text-muted);
}

.rt-tier-num {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  background: var(--bg-cyan-soft);
  color: var(--primary-cyan-deep);
  padding: 2px 7px;
  border-radius: 5px;
  margin-bottom: 2px;
}

.rt-num-emerald {
  background: var(--accent-emerald);
  color: #FFFFFF;
}

.rt-num-red {
  background: var(--bg-red-soft);
  color: var(--alert-red);
}

.rt-bar-track {
  width: 100%;
  height: 14px;
  background: #E2E8F0;
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.rt-bar-fill {
  height: 100%;
  border-radius: var(--radius-pill);
  transition: width 0.35s ease;
}

.rt-fill-cenares {
  background: var(--primary-cyan);
}

.rt-fill-fair {
  background: var(--accent-emerald);
}

.rt-fill-brand {
  background: linear-gradient(90deg, #F87171, #DC2626);
}

.rt-tier-price {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary-cyan-deep);
  white-space: nowrap;
  text-align: right;
}

.rt-tier-price small {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
}

.rt-price-emerald {
  color: var(--accent-emerald-dark);
}

.rt-price-red {
  color: var(--alert-red);
  text-decoration: line-through;
}

/* Same GMP Plant Highlight */
.gmp-highlight-banner {
  background: var(--bg-emerald-soft);
  border: 1px solid var(--border-emerald);
  color: var(--accent-emerald-dark);
  font-size: 0.79rem;
  font-weight: 800;
  padding: 6px 10px;
  border-radius: 8px;
  margin-bottom: 8px;
}

.badge-same-gmp {
  background: #FEF3C7;
  border: 1px solid #F59E0B;
  color: #92400E;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
}

/* 3-Column Offer Prices Box (Pastilla | Blíster x10 | Caja) */
.offer-prices-3cols {
  grid-template-columns: repeat(3, 1fr);
}

.offer-primary-cta-row {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 8px;
}

.btn-go-pharmacy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 10px;
  background: var(--bg-cyan-soft);
  border: 1.5px solid var(--primary-cyan);
  color: var(--primary-cyan-deep);
  text-decoration: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-heading);
  font-size: 0.84rem;
  font-weight: 700;
  text-align: center;
}

.btn-go-pharmacy:hover {
  background: var(--primary-cyan);
  color: #FFFFFF;
}

/* Compact Ley N° 32033 Badge & Discreet Info Trigger */
.compact-law-badge-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
  background: var(--bg-amber-soft);
  border: 1px solid #FDE68A;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
}

.compact-law-pill {
  font-size: 0.76rem;
  font-weight: 800;
  color: #92400E;
}

.btn-law-info-discreet {
  background: transparent;
  border: none;
  color: var(--primary-cyan-dark);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
}

.compact-law-inline {
  font-size: 0.74rem;
  font-weight: 700;
  color: #92400E;
  background: var(--bg-amber-soft);
  padding: 3px 8px;
  border-radius: 6px;
  cursor: pointer;
}

/* 6-Section CIMA Accordion Drawer */
.btn-open-cima-accordion {
  width: 100%;
  margin-top: 8px;
  padding: 8px 10px;
  background: var(--bg-cyan-soft);
  border: 1px solid var(--primary-cyan);
  color: var(--primary-cyan-deep);
  border-radius: var(--radius-sm);
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}

.cima-accordion-drawer {
  margin-top: 16px;
  background: #FFFFFF;
  border: 2px solid var(--trust-blue);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-md);
}

.cima-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}

.btn-close-drawer {
  background: var(--bg-slate-soft);
  border: 1px solid var(--border-light);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  cursor: pointer;
}

.cima-accordion-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cima-accordion-item {
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: var(--bg-page);
  overflow: hidden;
}

.cima-accordion-item summary {
  padding: 11px 14px;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--primary-cyan-deep);
  cursor: pointer;
  list-style: none;
}

.cima-accordion-body {
  padding: 0 14px 12px;
  font-size: 0.86rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Authenticated B2B CSV Exporter Box */
.b2b-csv-export-box {
  margin-top: 14px;
  background: var(--bg-emerald-soft);
  border: 2px solid var(--accent-emerald);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-download-digemid-csv {
  width: 100%;
  padding: 12px;
  background: var(--accent-emerald-dark);
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-heading);
  font-size: 0.88rem;
  font-weight: 800;
  cursor: pointer;
}

@media (max-width: 768px) {
  .rt-tier-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .rt-tier-price {
    text-align: left;
  }
  .offer-primary-cta-row {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   PHASE 1.5 MARKETING & UX OVERHAUL:
   - Official 3D Magnifier-Pin Logo & Wordmark
   - Switchable Workspace Tabs Bar
   - Compact 1-Line Executive Summary Strip + Fuzzy Match Notice
   - 2-Layer Pharmacy Cards (Clean 5-Item Front + Forensic Accordion)
   - Cross-Sell Prescription AI Callout Banner
   ========================================================================== */

/* 1. Official Institutional Logo & Wordmark (Section 4) */
.brand-logo-img {
  height: 46px;
  width: auto;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 4px rgba(15, 23, 42, 0.12));
}

.brand-wordmark {
  display: inline-flex;
  align-items: center;
  font-family: 'Plus Jakarta Sans', var(--font-heading);
  font-size: 1.42rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.1;
}

.wm-enque {
  color: #0F172A;
}

.wm-farmacia {
  color: #0D9488;
}

.wm-pe {
  background: #10B981;
  color: #FFFFFF;
  font-size: 0.76rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 6px;
  margin-left: 4px;
  letter-spacing: 0;
}

.brand-subtitle {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  color: #64748B;
  margin-top: 2px;
}

.pastillero-brand-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pastillero-logo-img {
  height: 44px;
  width: auto;
  object-fit: contain;
  flex-shrink: 0;
}

/* 2. Switchable Workspace Tabs Bar (Hallazgo #6) */
.workspace-tabs-bar {
  background: #F1F5F9;
  border-bottom: 1px solid var(--border-light);
  padding: 10px 0;
}

.workspace-tabs-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.workspace-tab-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  border-radius: var(--radius-md);
  border: 2px solid transparent;
  background: #FFFFFF;
  color: var(--text-secondary);
  cursor: pointer;
  text-align: left;
  transition: all 0.18s ease;
  box-shadow: var(--shadow-sm);
}

.workspace-tab-btn:hover {
  border-color: #CBD5E1;
}

.workspace-tab-btn.active {
  background: #FFFFFF;
  border-color: var(--accent-emerald);
  color: var(--text-main);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.14);
}

.workspace-tab-btn .tab-icon {
  font-size: 1.45rem;
  flex-shrink: 0;
}

.workspace-tab-btn .tab-copy strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.94rem;
  color: var(--text-main);
}

.workspace-tab-btn .tab-copy span {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.tab-pill-save {
  display: inline-block;
  background: var(--bg-emerald-soft);
  color: var(--accent-emerald-dark);
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  margin-left: 4px;
}

/* 3. Fuzzy Match Banner & Compact 1-Line Executive Summary Strip (Hallazgos #1 & #2) */
.fuzzy-match-banner {
  margin-top: 14px;
  background: #ECFDF5;
  border: 1.5px solid #10B981;
  color: #065F46;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.92rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.executive-summary-strip {
  margin-top: 14px;
  background: linear-gradient(90deg, #F0FDFA 0%, #FFFFFF 100%);
  border: 1.5px solid #99F6E4;
  border-left: 5px solid #0D9488;
  border-radius: var(--radius-md);
  padding: 11px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  box-shadow: var(--shadow-sm);
}

.exec-summary-main {
  font-size: 0.92rem;
  color: var(--text-main);
}

.exec-save-pill {
  display: inline-block;
  background: #D1FAE5;
  color: #065F46;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
}

.btn-toggle-clinical-backing {
  background: #0F172A;
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius-pill);
  padding: 7px 14px;
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease;
}

.btn-toggle-clinical-backing:hover {
  background: #0D9488;
}

/* 4. 2-Layer Pharmacy Cards (Hallazgo #4: Max 5 elements on front + Forensic Accordion) */
.offer-card-2layer {
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
}

.offer-layer1-front {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.offer-header-pharmacy {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.offer-pharmacy-name {
  font-family: var(--font-heading);
  font-size: 1.02rem;
  font-weight: 800;
  color: #0F172A;
  line-height: 1.25;
}

.offer-pharmacy-loc {
  font-size: 0.82rem;
  color: #475569;
  margin-top: 2px;
}

.offer-header-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  justify-content: flex-end;
  flex-shrink: 0;
}

.badge-sector-botica {
  background: #F0FDF4;
  color: #15803D;
  border: 1px solid #BBF7D0;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
}

.badge-sector-chain {
  background: #F8FAFC;
  color: #475569;
  border: 1px solid #E2E8F0;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
}

.offer-medicine-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 10px;
  background: #F8FAFC;
  border-radius: var(--radius-sm);
  border: 1px solid #E2E8F0;
}

.offer-med-title-group {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.offer-med-title-group .offer-product-name {
  font-size: 0.96rem;
  margin: 0;
}

.offer-conc-tag {
  font-weight: 600;
  color: #0D9488;
}

.offer-lab-concise {
  font-size: 0.76rem;
  color: #64748B;
}

.badge-type-bioequiv {
  background: #EFF6FF;
  color: #1D4ED8;
  border: 1px solid #BFDBFE;
  font-size: 0.74rem;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
}

.offer-protagonist-price-box {
  background: #F0FDF4;
  border: 1.5px solid #A7F3D0;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
}

.protagonist-price-main {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.protagonist-price-amount {
  font-family: var(--font-heading);
  font-size: 1.55rem;
  font-weight: 800;
  color: #047857;
}

.protagonist-price-unit {
  font-size: 0.84rem;
  font-weight: 700;
  color: #065F46;
}

.protagonist-price-secondary {
  font-size: 0.78rem;
  color: #475569;
  font-weight: 600;
}

.offer-semaphore-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 0.78rem;
  color: #475569;
}

.offer-hours-inline {
  font-weight: 600;
  color: #334155;
}

/* Layer 2: Expandable Forensic Accordion */
.offer-forensic-details {
  border-top: 1px dashed #CBD5E1;
  padding-top: 8px;
  margin-top: 2px;
}

.forensic-summary-btn {
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  font-weight: 700;
  color: #0F766E;
  cursor: pointer;
  padding: 4px 2px;
}

.forensic-summary-btn::-webkit-details-marker {
  display: none;
}

.forensic-details-body {
  margin-top: 8px;
  padding: 10px 12px;
  background: #F8FAFC;
  border-radius: var(--radius-sm);
  border: 1px solid #E2E8F0;
  font-size: 0.78rem;
  color: #334155;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.indecopi-clean-note {
  color: #047857;
  font-weight: 600;
  font-size: 0.75rem;
}

/* 5. Cross-Sell Callout Banner & Empty State */
.rx-cross-sell-callout {
  background: linear-gradient(135deg, #0F172A 0%, #134E4A 100%);
  color: #FFFFFF;
  border-radius: var(--radius-lg);
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  box-shadow: var(--shadow-md);
}

.rx-cross-sell-content {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 760px;
}

.rx-cross-sell-icon {
  font-size: 2rem;
  background: rgba(255, 255, 255, 0.12);
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.rx-cross-sell-content strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 1.05rem;
  color: #A7F3D0;
  margin-bottom: 3px;
}

.rx-cross-sell-content p {
  font-size: 0.86rem;
  color: #E2E8F0;
  margin: 0;
}

.btn-cross-sell-rx {
  background: #10B981;
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius-pill);
  padding: 11px 20px;
  font-family: var(--font-heading);
  font-size: 0.88rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
}

.btn-cross-sell-rx:hover {
  background: #059669;
}

.empty-search-state-card {
  background: #FFFFFF;
  border: 2px dashed #CBD5E1;
  border-radius: var(--radius-lg);
  padding: 32px 20px;
  text-align: center;
}

.empty-state-icon {
  font-size: 2.2rem;
  margin-bottom: 8px;
}

.empty-state-suggestions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
}

.suggestion-pill-btn {
  background: #F0FDF4;
  color: #065F46;
  border: 1px solid #A7F3D0;
  border-radius: var(--radius-pill);
  padding: 7px 14px;
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
}

.suggestion-pill-btn:hover {
  background: #D1FAE5;
}

.clinical-backing-section {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 2px solid #E2E8F0;
}

@media (max-width: 768px) {
  .workspace-tabs-inner {
    grid-template-columns: 1fr;
  }
  .executive-summary-strip {
    flex-direction: column;
    align-items: flex-start;
  }
  .offer-header-pharmacy {
    flex-direction: column;
  }
  .offer-header-pills {
    justify-content: flex-start;
  }
  .top-trust-bar .trust-pills {
    display: none;
  }
  .hero-header {
    margin-bottom: 12px;
  }
  .hero-title {
    font-size: 1.38rem;
  }
  .hero-lead {
    display: none;
  }
  .quick-chips-row {
    display: none;
  }
}

/* Compact Hero Header & Single-Row Header so Pharmacy Cards appear 100% in the First Fold */
button.nav-link {
  background: transparent;
  border: 1px solid transparent;
  font-family: var(--font-body);
  cursor: pointer;
}

button.nav-link.active {
  background: var(--bg-cyan-soft);
  color: var(--primary-cyan-dark);
  border-color: var(--border-cyan);
}

button.nav-link.nav-link-highlight {
  background: var(--bg-emerald-soft);
  color: var(--accent-emerald-dark);
  border: 1px solid var(--border-emerald);
}

button.nav-link.nav-link-highlight.active {
  background: #10B981;
  color: #FFFFFF;
  border-color: #059669;
}

.header-inner {
  min-height: 60px;
  padding-top: 6px;
  padding-bottom: 6px;
  flex-wrap: nowrap;
}

.main-nav {
  flex-wrap: nowrap;
  gap: 6px;
}

.nav-link {
  font-size: 0.84rem;
  padding: 7px 11px;
  white-space: nowrap;
}

.btn-b2b-header {
  font-size: 0.82rem;
  padding: 7px 11px;
  white-space: nowrap;
}

.workspace-tabs-bar {
  padding: 6px 0;
}

.workspace-tab-btn {
  padding: 7px 14px;
}

.hero-terminal-section {
  padding-top: 8px;
  padding-bottom: 24px;
}

.hero-header {
  margin-bottom: 6px;
}

.hero-eyebrow {
  display: none;
}

.hero-title {
  font-size: clamp(1.18rem, 1.65vw, 1.45rem);
  margin-bottom: 0;
}

.hero-lead {
  display: none;
}

.search-terminal-card {
  padding: 10px 14px;
  margin-bottom: 8px;
}

.quick-chips-row {
  margin-top: 6px;
  padding-top: 6px;
  gap: 5px;
}

.quick-chips-label {
  display: none;
}

.fuzzy-match-banner {
  margin-top: 6px;
  padding: 6px 12px;
  font-size: 0.84rem;
}

.executive-summary-strip {
  margin-top: 6px;
  padding: 7px 12px;
  flex-wrap: nowrap;
}

.exec-summary-main {
  font-size: 0.85rem;
}

.treatment-configurator-bar {
  margin-top: 8px !important;
  margin-bottom: 8px !important;
  padding: 8px 14px !important;
}

.offers-results-section {
  margin-top: 10px;
}

.offers-header {
  margin-bottom: 10px !important;
}

@media (max-width: 960px) {
  .header-inner {
    flex-wrap: wrap;
    gap: 6px;
  }
  .main-nav {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }
  .nav-link {
    justify-content: center;
    text-align: center;
    white-space: normal;
    line-height: 1.15;
    font-size: 0.73rem;
    padding: 6px 6px;
  }
  .nav-badge {
    display: none;
  }
  .btn-b2b-header {
    display: none;
  }
  .executive-summary-strip {
    flex-wrap: wrap;
  }
}

/* ==========================================================================
   EnQuéFarmacia.pe v2.2 — Marketing, Conversion & Local Flow Refinements
   ========================================================================== */

/* 1. Single-Line Top Institutional Ribbon (Section 2.1) */
.top-trust-bar {
  padding: 5px 0;
  font-size: 0.78rem;
}

.top-trust-single-line {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
}

.top-trust-single-line::-webkit-scrollbar {
  display: none;
}

.trust-inline-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #E0F2FE;
  font-weight: 500;
}

.trust-inline-item strong {
  color: #FFFFFF;
  font-weight: 700;
}

.trust-inline-sep {
  color: rgba(224, 242, 254, 0.45);
  font-size: 0.75rem;
}

.btn-inline-ley {
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #E0F2FE;
  font-size: 0.74rem;
  padding: 1px 8px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.btn-inline-ley:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* 2. Symmetrical Header Pill Buttons & Home Bridge Strip (Section 2.2) */
.nav-pill-comparator {
  border: 2px solid #0D9488 !important;
  background: #F0FDFA !important;
  color: #134E4A !important;
  font-weight: 700 !important;
  border-radius: 999px !important;
  padding: 7px 14px !important;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.18s ease;
}

.nav-pill-comparator:hover,
.nav-pill-comparator.active {
  background: #CCFBF1 !important;
  border-color: #0F766E !important;
  color: #0F766E !important;
  box-shadow: 0 2px 8px rgba(13, 148, 136, 0.18);
}

.nav-badge-free {
  background: #0D9488 !important;
  color: #FFFFFF !important;
  font-size: 0.68rem !important;
  font-weight: 800 !important;
  padding: 2px 7px !important;
  border-radius: 999px !important;
  letter-spacing: 0.03em;
}

.nav-pill-prescription {
  background: #059669 !important;
  border: 2px solid #059669 !important;
  color: #FFFFFF !important;
  font-weight: 700 !important;
  border-radius: 999px !important;
  padding: 7px 14px !important;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 8px rgba(5, 150, 105, 0.22);
}

.nav-pill-prescription:hover,
.nav-pill-prescription.active {
  background: #047857 !important;
  border-color: #047857 !important;
}

.nav-pill-prescription .nav-badge-savings {
  background: rgba(255, 255, 255, 0.22) !important;
  color: #FFFFFF !important;
  font-size: 0.68rem !important;
  font-weight: 800 !important;
  padding: 2px 7px !important;
  border-radius: 999px !important;
}

.single-med-bridge-strip {
  margin: 12px auto 4px;
  max-width: 820px;
  background: linear-gradient(90deg, #F0FDFA 0%, #ECFEFF 100%);
  border: 1.5px solid #5EEAD4;
  border-radius: 999px;
  padding: 8px 18px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: #134E4A;
  box-shadow: 0 2px 10px rgba(13, 148, 136, 0.08);
}

.btn-bridge-single-med {
  background: #0D9488;
  color: #FFFFFF;
  border: none;
  border-radius: 999px;
  padding: 5px 14px;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}

.btn-bridge-single-med:hover {
  background: #0F766E;
  transform: translateY(-1px);
}

/* 3. Cascading Location Filters & "📍 Usar mi ubicación" (Section 3.1) */
.location-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.btn-use-my-location {
  background: #ECFEFF;
  border: 1px solid #0891B2;
  color: #0E7490;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-use-my-location:hover {
  background: #0891B2;
  color: #FFFFFF;
}

.cascading-location-controls {
  display: flex;
  gap: 8px;
  align-items: center;
}

.cascading-location-controls .district-select {
  flex: 1;
  min-width: 145px;
}

.district-cascade-wrap {
  flex: 1;
  min-width: 155px;
}

/* 4. Top 6 Pharmacies Expandable Button (Section 3.2) */
.more-offers-toggle-wrap {
  margin-top: 14px;
  margin-bottom: 6px;
  text-align: center;
}

.btn-show-more-offers {
  width: 100%;
  max-width: 680px;
  background: #F0FDFA;
  border: 2px dashed #0D9488;
  color: #0F766E;
  font-family: var(--font-heading);
  font-size: 0.92rem;
  font-weight: 700;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.18s ease;
}

.btn-show-more-offers:hover {
  background: #CCFBF1;
  border-style: solid;
}

/* 5. Honest 0 District Results & Regional Rescue Card (Section 3.3) */
.regional-rescue-card {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, #FFFBEB 0%, #F0FDFA 100%);
  border: 2px solid #0D9488;
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  text-align: center;
  box-shadow: var(--shadow-md);
}

.rescue-zero-title {
  font-family: var(--font-heading);
  font-size: 1.18rem;
  font-weight: 800;
  color: #0F172A;
  margin-bottom: 6px;
}

.rescue-zero-sub {
  font-size: 0.94rem;
  color: #475569;
  margin-bottom: 14px;
}

.rescue-good-news {
  background: #FFFFFF;
  border: 1px solid #99F6E4;
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-size: 0.96rem;
  color: #134E4A;
  margin-bottom: 16px;
}

.rescue-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.btn-regional-rescue {
  background: #059669;
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius-pill);
  padding: 11px 22px;
  font-family: var(--font-heading);
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.25);
  transition: background 0.15s ease, transform 0.15s ease;
}

.btn-regional-rescue:hover {
  background: #047857;
  transform: translateY(-1px);
}

.btn-national-rescue {
  background: #0891B2;
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius-pill);
  padding: 11px 22px;
  font-family: var(--font-heading);
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
}

/* 6. Conditional Contact Buttons: WhatsApp vs Landline vs Counter-Only (Section 3.4) */
.btn-landline-call {
  flex: 1;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  background: #0284C7;
  color: #FFFFFF;
  font-family: var(--font-heading);
  font-size: 0.84rem;
  font-weight: 700;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: background 0.15s ease;
}

.btn-landline-call:hover {
  background: #0369A1;
}

.offer-counter-only-wrap {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.counter-attention-note {
  font-size: 0.77rem;
  color: #475569;
  background: #F1F5F9;
  border-radius: 6px;
  padding: 4px 10px;
  text-align: center;
  font-weight: 600;
}

.btn-go-pharmacy-full {
  width: 100%;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  background: #0E7490 !important;
  color: #FFFFFF !important;
  font-family: var(--font-heading);
  font-size: 0.84rem;
  font-weight: 700 !important;
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  text-decoration: none !important;
  transition: background 0.15s ease;
}

.btn-go-pharmacy-full:hover {
  background: #155E75 !important;
}

.rx-cross-sell-content p strong {
  display: inline !important;
  font-size: inherit !important;
  color: #6EE7B7 !important;
}

/* 7. Custom Animated JS Geo Combobox (Región & Distrito) */
.sr-only-select {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  pointer-events: none;
}

.custom-geo-combobox {
  position: relative;
  flex: 1;
  min-width: 165px;
}

.custom-geo-trigger {
  width: 100%;
  min-height: 52px;
  padding: 10px 14px;
  background: linear-gradient(180deg, #FFFFFF 0%, #F8FAFC 100%);
  border: 2px solid #CBD5E1;
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-family: var(--font-heading);
  font-size: 0.92rem;
  font-weight: 700;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: left;
}

.custom-geo-trigger:hover {
  border-color: var(--primary-cyan);
  background: #FFFFFF;
  box-shadow: 0 4px 12px rgba(8, 145, 178, 0.12);
}

.custom-geo-combobox.is-open .custom-geo-trigger {
  border-color: var(--primary-cyan);
  background: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.18), 0 6px 16px rgba(8, 145, 178, 0.14);
}

.geo-trigger-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.geo-trigger-chevron {
  flex-shrink: 0;
  color: var(--primary-cyan-dark);
  transition: transform 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

.custom-geo-combobox.is-open .geo-trigger-chevron {
  transform: rotate(180deg);
}

.custom-geo-popover {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 100%;
  min-width: 265px;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(12px);
  border: 1.5px solid #99F6E4;
  border-radius: 16px;
  box-shadow: 0 18px 40px -8px rgba(15, 23, 42, 0.18), 0 4px 12px rgba(8, 145, 178, 0.10);
  z-index: 120;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.22s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.22s;
  overflow: hidden;
}

.custom-geo-combobox.is-open .custom-geo-popover {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.geo-popover-search-wrap {
  padding: 10px 10px 8px;
  border-bottom: 1px solid var(--border-light);
  background: #F8FAFC;
}

.geo-popover-search {
  width: 100%;
  padding: 8px 12px;
  border: 1.5px solid #CBD5E1;
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 0.86rem;
  color: var(--text-main);
  background: #FFFFFF;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.geo-popover-search:focus {
  border-color: var(--primary-cyan);
  box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.14);
}

.geo-popover-options {
  max-height: 260px;
  overflow-y: auto;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.geo-popover-item {
  width: 100%;
  background: transparent;
  border: none;
  border-radius: 10px;
  padding: 9px 12px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  text-align: left;
  transition: background 0.14s ease, color 0.14s ease;
}

.geo-popover-item:hover {
  background: #F0FDFA;
  color: #0F766E;
}

.geo-popover-item.active {
  background: linear-gradient(90deg, #CCFBF1 0%, #ECFEFF 100%);
  color: #134E4A;
  font-weight: 700;
}

.geo-item-check {
  color: #0D9488;
  font-weight: 800;
  font-size: 0.95rem;
}

.geo-popover-empty {
  padding: 14px 12px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.district-cascade-wrap {
  animation: cascadeFadeIn 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes cascadeFadeIn {
  from {
    opacity: 0;
    transform: translateX(-8px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@media (max-width: 768px) {
  .cascading-location-controls {
    flex-direction: column;
    align-items: stretch;
  }
  .single-med-bridge-strip {
    border-radius: var(--radius-md);
    padding: 10px 12px;
    text-align: center;
  }
}
