:root {
  --bg: #f4f7fa;
  --bg-soft: #eef3f8;
  --surface: #ffffff;
  --surface-2: #e8eef4;
  --text: #0f172a;
  --text-muted: #64748b;
  --accent: #0ea5e9;
  --accent-2: #10b981;
  --accent-dark: #0369a1;
  --danger: #ef4444;
  --warning: #f59e0b;
  --success: #10b981;
  --radius: 16px;
  --font: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  --shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 12px 40px rgba(15, 23, 42, 0.12);
  /* GuiaFarma / CIMA-inspired */
  --gf-blue: #0056a4;
  --gf-blue-dark: #003d75;
  --gf-navy: #002b5c;
  --gf-red: #c8102e;
  --gf-red-hover: #a00d25;
  --gf-green: #2e7d32;
  --gf-line: #d9e0e8;
  --gf-soft: #f3f6f9;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  background-attachment: fixed;
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
}

a {
  color: var(--accent-dark);
  text-decoration: none;
}

.container {
  width: min(92%, 1200px);
  margin: 0 auto;
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--surface-2);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.04);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 0;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}

.brand:hover {
  text-decoration: none;
  color: var(--text);
}

.brand-mark {
  width: 48px;
  height: 48px;
  display: block;
  flex-shrink: 0;
  object-fit: contain;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  line-height: 1.1;
}

.brand-name {
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--gf-red);
  letter-spacing: -0.03em;
  text-transform: lowercase;
}

.brand-name em {
  font-style: normal;
  font-weight: 700;
}

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

.main-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.15rem 1rem;
}

.main-nav a {
  padding: 0.35rem 0;
  border-radius: 0;
  color: var(--gf-blue);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

.main-nav a:hover {
  color: var(--gf-blue-dark);
  background: transparent;
  border-bottom-color: var(--gf-blue);
  text-decoration: none;
}

.lang-selector {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  background: var(--bg-soft);
  padding: 0.25rem;
  border-radius: 999px;
}

.lang-link {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: all 0.2s;
}

.lang-link:hover,
.lang-link.active {
  background: var(--surface);
  color: var(--accent-dark);
  box-shadow: var(--shadow);
}

.lang-flag {
  font-size: 1rem;
}

.lang-code {
  display: none;
}

@media (min-width: 640px) {
  .lang-code {
    display: inline;
  }
}

/* Hero */
.hero {
  padding: 4rem 0 2.5rem;
  text-align: center;
  background: linear-gradient(180deg, #e0f2fe 0%, var(--bg) 100%);
}

.hero-cima {
  position: relative;
  padding: 3rem 0 0;
  text-align: center;
  border-bottom: 1px solid var(--gf-line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82) 0%, rgba(243, 246, 249, 0.88) 100%),
    radial-gradient(ellipse at 50% 0%, rgba(0, 86, 164, 0.08), transparent 60%);
}

.hero-center {
  max-width: 780px;
  margin: 0 auto;
  text-align: center;
  padding-bottom: 1.75rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.1);
  color: var(--accent-2);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.hero-title {
  font-size: clamp(1.7rem, 4.2vw, 2.35rem);
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 0.65rem;
  color: var(--gf-blue);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero-sub,
.hero-subtitle {
  margin: 0 auto 1.25rem;
  max-width: 46ch;
  color: var(--gf-blue-dark);
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.4;
}

.hero-ai-points {
  margin: 0 auto 1.35rem;
  max-width: 52ch;
  padding: 0;
  list-style: none;
  font-size: 0.9rem;
  color: #334;
  text-align: left;
}

.hero-ai-points li {
  position: relative;
  padding-left: 1.1rem;
  margin: 0.35rem 0;
}

.hero-ai-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gf-blue);
}

.search-form {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

/* CIMA-style search shell */
.search-shell {
  background: #fff;
  border: 1px solid #c8d3df;
  box-shadow: 0 10px 32px rgba(0, 43, 92, 0.12);
  border-radius: 2px;
  overflow: hidden;
  text-align: left;
  margin-bottom: 1rem;
}

.search-row {
  display: flex;
  align-items: stretch;
}

.search-input-wrap {
  flex: 1;
  position: relative;
  min-width: 0;
}

.search-shell .search-input {
  width: 100%;
  border: 0;
  outline: none;
  border-radius: 0;
  box-shadow: none;
  font-size: 1.02rem;
  padding: 1.05rem 1.15rem;
  background: transparent;
}

.search-shell .search-input:focus {
  border: 0;
  box-shadow: none;
}

.search-shell .search-input::placeholder {
  color: transparent;
}

.typewriter {
  position: absolute;
  left: 1.15rem;
  top: 50%;
  transform: translateY(-50%);
  color: #8a97a5;
  font-size: 1.02rem;
  pointer-events: none;
  white-space: nowrap;
  overflow: hidden;
  max-width: calc(100% - 1.5rem);
  text-align: left;
}

.typewriter .cursor {
  display: inline-block;
  width: 1px;
  height: 1.05em;
  background: var(--gf-blue);
  margin-left: 1px;
  vertical-align: -0.12em;
  animation: gf-blink 0.9s step-end infinite;
}

@keyframes gf-blink {
  50% { opacity: 0; }
}

.search-btn {
  border: 0;
  background: var(--gf-red);
  color: #fff;
  padding: 0 1.25rem;
  cursor: pointer;
  display: grid;
  place-items: center;
  min-width: 58px;
}

.search-btn:hover {
  background: var(--gf-red-hover);
}

.search-btn svg {
  width: 22px;
  height: 22px;
  stroke: #fff;
  fill: none;
  stroke-width: 2.2;
}

.search-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  padding: 0.5rem 0.95rem;
  background: #f8fafc;
  border-top: 1px solid var(--gf-line);
  font-size: 0.76rem;
  color: var(--text-muted);
}

.provider-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.provider-pill {
  border: 1px solid #c5d0dc;
  background: #fff;
  color: var(--gf-blue-dark);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  cursor: pointer;
}

.provider-pill.active {
  border-color: var(--gf-blue);
  background: rgba(0, 86, 164, 0.08);
  color: var(--gf-blue);
}

.hero-examples {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
}

.hero-examples button {
  border: 0;
  background: none;
  color: var(--gf-blue);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.hero-examples button:hover {
  color: var(--gf-red);
}

/* Hero actions (legacy quick links — kept for other pages) */
.hero-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1.75rem;
}

.hero-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--surface-2);
  color: var(--text);
  font-size: 0.88rem;
  min-width: 140px;
  transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: var(--shadow);
  text-decoration: none;
}

.hero-action-btn:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: var(--shadow-lg);
}

.hero-action-icon {
  font-size: 1.5rem;
}

.hero-action-label {
  font-weight: 700;
  font-size: 0.85rem;
}

.hero-action-desc {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-align: center;
}

/* Stats strip (CIMA-like) */
.hero-cima .stats {
  background: rgba(255, 255, 255, 0.92);
  border-top: 1px solid var(--gf-line);
  backdrop-filter: blur(4px);
}

.stats-inner {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  text-align: center;
}

.stat {
  padding: 1.05rem 0.6rem 0.9rem;
  border-right: 1px solid var(--gf-line);
}

.stat:last-child {
  border-right: 0;
}

.stat strong {
  display: block;
  font-size: 1.45rem;
  color: var(--gf-blue);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.stat span {
  display: block;
  margin-top: 0.1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* Feature cards: Doctor IA + Pastillero */
.features {
  padding: 2rem 0 0.5rem;
  background: #fff;
}

.features-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.feature {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 1.15rem;
  align-items: start;
  padding: 1.35rem;
  border: 1px solid var(--gf-line);
  background: #fff;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.feature:hover {
  border-color: #a8bdd4;
  box-shadow: 0 6px 20px rgba(0, 43, 92, 0.06);
  text-decoration: none;
  color: inherit;
}

.feature-icon {
  width: 88px;
  height: 88px;
  border: 2px solid var(--gf-blue);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--gf-blue);
  background: #f7fafc;
  flex-shrink: 0;
  overflow: hidden;
}

.feature-icon svg {
  width: 40px;
  height: 40px;
  max-width: 40px;
  max-height: 40px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
}

.feature.pillbox .feature-icon {
  border-color: var(--gf-green);
  color: var(--gf-green);
}

.feature h2 {
  margin: 0 0 0.4rem;
  font-size: 1.15rem;
  color: var(--gf-blue);
  font-weight: 700;
}

.feature.pillbox h2 {
  color: var(--gf-green);
}

.feature p {
  margin: 0 0 0.65rem;
  font-size: 0.92rem;
  color: #333;
  line-height: 1.45;
}

.feature-warn {
  margin: 0;
  padding: 0.55rem 0.7rem;
  font-size: 0.78rem;
  line-height: 1.4;
  color: #6b3a00;
  background: #fff7e8;
  border-left: 3px solid #e0a100;
}

.feature-warn strong {
  color: #5a3000;
}

.pill-schedule {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.55rem 0 0.75rem;
}

.pill-schedule span {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.22rem 0.5rem;
  border: 1px solid var(--gf-line);
  background: var(--gf-soft);
  color: var(--gf-blue-dark);
}

.pill-schedule .night {
  background: #eef0f8;
  color: #3d4a7a;
}

.pill-schedule .day {
  background: #fff8e6;
  color: #8a6500;
}

.pill-schedule .meal {
  background: #eef8f1;
  color: #1e6b3a;
}

.feature-cta {
  display: inline-block;
  margin-top: 0.35rem;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--gf-blue);
}

.feature.pillbox .feature-cta {
  color: var(--gf-green);
}

.ai-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--gf-blue);
  background: rgba(0, 86, 164, 0.08);
  border: 1px solid #c5d8ef;
  padding: 0.2rem 0.5rem;
}

@media (max-width: 960px) {
  .features-grid {
    grid-template-columns: 1fr;
  }

  .stats-inner {
    grid-template-columns: repeat(3, 1fr);
  }

  .stat:nth-child(3) {
    border-right: 0;
  }

  .stat:nth-child(n + 4) {
    border-top: 1px solid var(--gf-line);
  }
}

@media (max-width: 700px) {
  .feature {
    grid-template-columns: 64px 1fr;
  }

  .feature-icon {
    width: 64px;
    height: 64px;
  }

  .feature-icon svg {
    width: 28px;
    height: 28px;
  }

  .stats-inner {
    grid-template-columns: 1fr 1fr;
  }
}

/* Button styles */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.6rem 1.1rem;
  border-radius: 10px;
  border: 1px solid var(--surface-2);
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.btn:hover {
  border-color: var(--accent);
  color: var(--accent-dark);
  transform: translateY(-1px);
}

.btn-sm {
  padding: 0.4rem 0.8rem;
  font-size: 0.8rem;
}

.btn-ai {
  background: rgba(14, 165, 233, 0.08);
  border-color: rgba(14, 165, 233, 0.25);
  color: var(--accent-dark);
}

.btn-ai:hover {
  background: rgba(14, 165, 233, 0.15);
  border-color: var(--accent);
}

.nav-link-new {
  position: relative;
}

.nav-link-new::after {
  content: 'NUEVO';
  position: absolute;
  top: -4px;
  right: -4px;
  font-size: 0.55rem;
  font-weight: 800;
  background: var(--accent-2);
  color: #fff;
  padding: 1px 4px;
  border-radius: 4px;
  line-height: 1.2;
}

.nav-new {
  position: relative;
}

.nav-new::after {
  content: 'NUEVO';
  position: absolute;
  top: 0;
  right: -4px;
  font-size: 0.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  padding: 1px 4px;
  border-radius: 4px;
  line-height: 1.2;
  transform: translateY(-50%);
}

.text-warning {
  color: var(--warning);
}

.search-input {
  width: min(100%, 560px);
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--surface-2);
  background: var(--surface);
  color: var(--text);
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.12);
}

.search-button {
  padding: 1rem 1.75rem;
  border-radius: var(--radius);
  border: none;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}

.search-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(14, 165, 233, 0.25);
}

.filters {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.filter-pill {
  padding: 0.5rem 1rem;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--surface-2);
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: all 0.2s;
}

.filter-pill:hover {
  border-color: var(--accent);
  color: var(--accent-dark);
}

.filter-pill.active {
  border-color: var(--accent);
  color: var(--accent-dark);
  background: rgba(14, 165, 233, 0.08);
}

/* Stats dashboard */
.stats-dashboard {
  padding: 1.5rem 0 3rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
}

.stats-card {
  background: var(--surface);
  border: 1px solid var(--surface-2);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}

.stats-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.stats-icon {
  font-size: 1.75rem;
  display: block;
  margin-bottom: 0.5rem;
}

.stats-value {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent-dark);
  line-height: 1;
}

.stats-label {
  display: block;
  margin-top: 0.35rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
}

/* Results */
.results-section {
  padding-bottom: 4rem;
}

.results-meta {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.results-meta em {
  color: var(--accent-dark);
  font-style: normal;
  font-weight: 600;
}

.drug-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}

.drug-card {
  background: var(--surface);
  border: 1px solid var(--surface-2);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.2s, box-shadow 0.25s;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}

.drug-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent);
  box-shadow: var(--shadow-lg);
}

.card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: inherit;
}

/* Visual header with gradient avatar */
.card-visual {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.25rem 0.75rem;
  gap: 0.75rem;
}

.card-avatar {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  transition: transform 0.25s ease;
}

.drug-card:hover .card-avatar {
  transform: scale(1.08);
}

.card-avatar-letter {
  color: #fff;
  font-size: 1.5rem;
  font-weight: 700;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
  line-height: 1;
}

.card-avatar-us {
  background: linear-gradient(135deg, #0ea5e9, #38bdf8) !important;
}

.card-avatar-es {
  background: linear-gradient(135deg, #10b981, #34d399) !important;
}

.country-badge {
  flex-shrink: 0;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.3rem 0.6rem;
  border-radius: 8px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.country-es {
  background: rgba(16, 185, 129, 0.12);
  color: #047857;
}

.country-us {
  background: rgba(14, 165, 233, 0.12);
  color: #0369a1;
}

.country-both {
  background: rgba(245, 158, 11, 0.12);
  color: #b45309;
}

/* Card body */
.card-body {
  padding: 0 1.25rem;
  flex: 1;
}

.card-title {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-ingredient {
  color: var(--text-muted);
  margin: 0;
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.ingredient-icon {
  font-size: 0.85rem;
  flex-shrink: 0;
}

.text-muted {
  color: var(--text-muted);
}

/* Card footer */
.card-footer {
  padding: 0.75rem 1.25rem 1.25rem;
  margin-top: auto;
}

.card-meta-row {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 0.6rem;
  flex-wrap: wrap;
}

.card-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  background: var(--bg-soft);
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
}

.card-meta-icon {
  font-size: 0.7rem;
}

.card-meta-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
}

.card-badges {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  letter-spacing: 0.02em;
}

.badge-recall {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
  animation: pulse 2s infinite;
}

.badge-signal {
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning);
}

.badge-cima {
  background: rgba(16, 185, 129, 0.1);
  color: #047857;
}

.badge-openfda {
  background: rgba(14, 165, 233, 0.1);
  color: #0369a1;
}

.badge-generic {
  background: rgba(139, 92, 246, 0.1);
  color: #6d28d9;
}

.badge-prescription {
  background: rgba(245, 158, 11, 0.1);
  color: #b45309;
}

.badge-commercialized {
  background: rgba(16, 185, 129, 0.1);
  color: #047857;
}

.badge-not-commercialized {
  background: rgba(239, 68, 68, 0.08);
  color: #991b1b;
}

.badge-prospecto {
  background: rgba(14, 165, 233, 0.1);
  color: #0369a1;
}

.badge-ft {
  background: rgba(59, 130, 246, 0.1);
  color: #1d4ed8;
}

.badge-generic-sm {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  background: rgba(139, 92, 246, 0.1);
  color: #6d28d9;
  margin-left: 0.3rem;
}

/* Detail badges row */
.detail-badges {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.detail-dosage {
  color: var(--accent-dark);
  font-weight: 600;
}

/* Route pills */
.route-pill {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: var(--bg-soft);
  color: var(--text-muted);
  margin: 0.1rem 0;
  white-space: nowrap;
}

/* Wide meta item (spans full width) */
.detail-meta-wide {
  grid-column: 1 / -1;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--text-muted);
  padding: 4rem 0;
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.empty-hint {
  color: var(--accent-dark);
}

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--surface-2);
}

.page-link {
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--surface-2);
  transition: all 0.2s;
  font-weight: 500;
}

.page-link:hover {
  border-color: var(--accent);
  color: var(--accent-dark);
}

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

/* Detail */
.detail-hero {
  padding: 3rem 0 2rem;
  border-bottom: 1px solid var(--surface-2);
  background: linear-gradient(180deg, #e0f2fe 0%, var(--bg) 100%);
}

.detail-layout {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}

.detail-avatar-col {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.drug-avatar-xl {
  width: 120px;
  height: 120px;
  border-radius: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease;
}

.drug-avatar-xl:hover {
  transform: scale(1.05);
}

.drug-avatar-small {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.drug-avatar-xl-letter {
  color: #fff;
  font-size: 3.2rem;
  font-weight: 700;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  line-height: 1;
}

.avatar-labels {
  display: flex;
  gap: 0.5rem;
}

.detail-header {
  flex: 1;
  min-width: 0;
}

.detail-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  margin: 0 0 0.3rem;
  color: var(--text);
  line-height: 1.15;
}

.detail-ingredient {
  color: var(--accent-dark);
  font-size: 1.1rem;
  margin: 0 0 1rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.detail-status {
  color: var(--text-muted);
}

.detail-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.6rem;
  margin-bottom: 0.75rem;
}

.detail-meta-item {
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--surface-2);
  border-radius: 10px;
  padding: 0.5rem 0.75rem;
}

.detail-meta-label {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 0.15rem;
}

.detail-meta-value {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

.detail-meta-value code {
  font-size: 0.8rem;
  background: var(--bg-soft);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}

.detail-compare {
  margin-top: 0.75rem;
}

.compare-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.55rem 0.85rem;
  border-radius: 10px;
  background: rgba(14, 165, 233, 0.1);
  border: 1px solid rgba(14, 165, 233, 0.25);
  color: var(--accent-dark);
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.2s;
}

.compare-link:hover {
  background: rgba(14, 165, 233, 0.2);
  border-color: var(--accent);
  transform: translateY(-1px);
}

.drug-alerts {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.drug-alert {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.drug-alert-spike {
  background: rgba(245, 158, 11, 0.08);
  border-color: rgba(245, 158, 11, 0.2);
}

.drug-alert-message {
  font-size: 0.9rem;
  color: var(--text);
}

.tabs {
  display: flex;
  gap: 0.5rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.tab {
  padding: 0.65rem 1.2rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--surface-2);
  color: var(--text-muted);
  font-weight: 500;
  transition: all 0.2s;
  font-size: 0.9rem;
}

.tab:hover,
.tab.active {
  border-color: var(--accent);
  color: var(--accent-dark);
}

.tab.active {
  background: rgba(14, 165, 233, 0.08);
}

.tab-new {
  position: relative;
}

.tab-new::after {
  content: 'NUEVO';
  position: absolute;
  top: -6px;
  right: -6px;
  font-size: 0.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  padding: 1px 5px;
  border-radius: 4px;
  line-height: 1.3;
}

.tab-panel {
  margin-top: 1.5rem;
  padding: 1.5rem;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--surface-2);
  box-shadow: var(--shadow);
}

.panel-title {
  margin-top: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1rem;
}

/* Summary panel with two-column layout */
.summary-layout {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: start;
}

.summary-layout .detail-dl {
  display: grid;
  grid-template-columns: minmax(130px, auto) 1fr;
  gap: 0.5rem 1rem;
}

.summary-layout .detail-dl dt {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.88rem;
}

.summary-layout .detail-dl dd {
  margin: 0;
  font-size: 0.88rem;
}

.summary-layout .detail-dl code {
  font-size: 0.78rem;
  background: var(--bg-soft);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}

.summary-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.drug-avatar-large {
  width: 96px;
  height: 96px;
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.drug-avatar-letter {
  color: #fff;
  font-size: 2.5rem;
  font-weight: 700;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.detail-dl {
  display: grid;
  grid-template-columns: minmax(120px, auto) 1fr;
  gap: 0.5rem 1rem;
}

.detail-dl dt {
  color: var(--text-muted);
  font-weight: 500;
}

.detail-dl dd {
  margin: 0;
}

.quick-stats {
  display: flex;
  gap: 0.75rem;
}

.stat {
  background: var(--bg-soft);
  border-radius: var(--radius);
  padding: 0.75rem 1.25rem;
  min-width: 90px;
  text-align: center;
  transition: transform 0.2s;
}

.stat:hover {
  transform: translateY(-2px);
}

.stat-icon {
  display: block;
  font-size: 1.2rem;
  margin-bottom: 0.25rem;
}

.stat-value {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-dark);
}

.stat-label {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.source-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  letter-spacing: 0.04em;
}

.source-openfda {
  background: rgba(14, 165, 233, 0.12);
  color: #0369a1;
}

.source-cima {
  background: rgba(16, 185, 129, 0.12);
  color: #047857;
}

.source-demo {
  background: rgba(245, 158, 11, 0.12);
  color: #b45309;
}

/* ── Leaflet / Prospecto with AI ── */

.leaflet-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 768px) {
  .leaflet-layout {
    grid-template-columns: 1fr;
  }
}

.leaflet-card {
  background: var(--surface);
  border: 1px solid var(--surface-2);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.leaflet-card-ai {
  border-top: 3px solid var(--accent);
}

.leaflet-card-raw {
  border-top: 3px solid var(--text-muted);
}

.leaflet-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.25rem;
  border-bottom: 1px solid var(--surface-2);
}

.leaflet-card-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.leaflet-card-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
}

.leaflet-card-subtitle {
  margin: 0.15rem 0 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.leaflet-card-body {
  padding: 1.25rem;
}

.leaflet-card-footer {
  padding: 0.75rem 1.25rem;
  border-top: 1px solid var(--surface-2);
  display: flex;
  gap: 0.5rem;
}

.leaflet-summary {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.leaflet-summary-header {
  text-align: center;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--accent-dark);
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--surface-2);
}

.leaflet-section {
  display: flex;
  gap: 0.75rem;
  padding: 0.75rem;
  background: var(--bg-soft);
  border-radius: 10px;
}

.leaflet-section-danger {
  background: rgba(239, 68, 68, 0.06);
  border: 1px solid rgba(239, 68, 68, 0.15);
}

.leaflet-section-warning {
  background: rgba(245, 158, 11, 0.06);
  border: 1px solid rgba(245, 158, 11, 0.15);
}

.leaflet-section-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
  margin-top: 0.15rem;
}

.leaflet-section-body {
  flex: 1;
  min-width: 0;
}

.leaflet-section-title {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent-dark);
}

.leaflet-section-body p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
}

.leaflet-list {
  margin: 0;
  padding-left: 1.25rem;
  font-size: 0.9rem;
}

.leaflet-list li {
  margin-bottom: 0.2rem;
}

.leaflet-tip {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 12px;
  font-size: 0.9rem;
}

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

.leaflet-text-display {
  max-height: 600px;
  overflow-y: auto;
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.leaflet-text-display p {
  margin: 0.5rem 0;
}

/* ── AI Compare ── */

.compare-ai-section {
  padding-bottom: 4rem;
}

.compare-ai-selector {
  margin-bottom: 2rem;
}

.compare-ai-selector-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text);
}

.compare-ai-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.75rem;
}

.compare-ai-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  background: var(--surface);
  border: 1px solid var(--surface-2);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
  font-family: inherit;
  font-size: inherit;
  width: 100%;
  color: inherit;
  box-shadow: var(--shadow);
}

.compare-ai-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: var(--shadow-lg);
}

.compare-ai-card-avatar {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.compare-ai-card-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.compare-ai-card-name {
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.compare-ai-card-ingredient {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.compare-ai-result {
  background: var(--surface);
  border: 1px solid var(--surface-2);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.compare-ai-result-header {
  padding: 1.25rem;
  border-bottom: 1px solid var(--surface-2);
  background: linear-gradient(135deg, #e0f2fe, #f0fdf4);
}

.compare-ai-result-drugs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.compare-ai-result-drug {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  text-align: center;
}

.compare-ai-result-vs {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--accent);
}

.compare-ai-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.compare-ai-block {
  padding: 1rem;
  border-radius: 10px;
}

.compare-ai-similitudes {
  background: rgba(16, 185, 129, 0.06);
  border: 1px solid rgba(16, 185, 129, 0.15);
}

.compare-ai-diferencias {
  background: var(--bg-soft);
}

.compare-ai-recomendacion {
  background: rgba(14, 165, 233, 0.06);
  border: 1px solid rgba(14, 165, 233, 0.15);
}

.compare-ai-block-title {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent-dark);
}

.compare-ai-list {
  margin: 0;
  padding-left: 1.25rem;
  font-size: 0.9rem;
}

.compare-ai-list li {
  margin-bottom: 0.35rem;
}

.compare-ai-table-wrapper {
  overflow-x: auto;
}

.compare-ai-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.compare-ai-table th,
.compare-ai-table td {
  padding: 0.6rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--surface-2);
}

.compare-ai-table th {
  font-weight: 700;
  color: var(--text-muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.compare-ai-table-aspect {
  font-weight: 600;
  white-space: nowrap;
}

.compare-ai-table-val {
  color: var(--text);
}

.compare-ai-nota {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: 10px;
  font-size: 0.85rem;
}

.compare-ai-nota-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
}

/* ── Shortages / Desabastecimientos ── */

.shortages-grid {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.shortage-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--surface-2);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
}

.shortage-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: var(--shadow-lg);
}

.shortage-card-status {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  min-width: 60px;
  flex-shrink: 0;
}

.shortage-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot-active {
  background: var(--danger);
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.5);
  animation: pulse 2s infinite;
}

.dot-resolved {
  background: var(--accent-2);
}

.shortage-status-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.shortage-active .shortage-status-label {
  color: var(--danger);
}

.shortage-resolved .shortage-status-label {
  color: var(--accent-2);
}

.shortage-card-body {
  flex: 1;
  min-width: 0;
}

.shortage-card-title {
  margin: 0 0 0.25rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.shortage-card-ingredient {
  margin: 0 0 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.shortage-card-meta {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.shortage-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
}

.shortage-card-reason {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.shortage-card-arrow {
  font-size: 1.2rem;
  color: var(--text-muted);
  flex-shrink: 0;
  align-self: center;
  transition: transform 0.2s;
}

.shortage-card:hover .shortage-card-arrow {
  transform: translateX(3px);
}

.shortage-detail-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: start;
  padding-bottom: 4rem;
}

@media (max-width: 768px) {
  .shortage-detail-layout {
    grid-template-columns: 1fr;
  }
}

.shortage-detail-block {
  margin-bottom: 1.5rem;
}

.shortage-detail-block h3 {
  margin-bottom: 0.5rem;
}

.shortage-detail-block ul {
  margin: 0;
  padding-left: 1.25rem;
}

.shortage-detail-block li {
  margin-bottom: 0.25rem;
  font-size: 0.9rem;
}

.shortage-timeline {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.shortage-timeline-item {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  padding: 0.5rem 0.75rem;
  background: var(--bg-soft);
  border-radius: 8px;
  font-size: 0.88rem;
}

.shortage-timeline-date {
  font-weight: 700;
  color: var(--accent-dark);
  white-space: nowrap;
}

.shortage-timeline-text {
  color: var(--text);
}

.shortage-ai-col {
  /* Same as tab-panel */
}

.shortage-ai-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.shortage-ai-severity {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: var(--bg-soft);
  border-radius: 10px;
  font-size: 0.9rem;
}

.shortage-severity-badge {
  display: inline-block;
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.shortage-severity-baja { background: rgba(16, 185, 129, 0.15); color: #047857; }
.shortage-severity-media { background: rgba(245, 158, 11, 0.15); color: #b45309; }
.shortage-severity-alta { background: rgba(239, 68, 68, 0.15); color: var(--danger); }
.shortage-severity-crítica { background: rgba(239, 68, 68, 0.25); color: #991b1b; animation: pulse 2s infinite; }

.shortage-ai-recomendacion {
  padding: 0.75rem;
  background: rgba(14, 165, 233, 0.06);
  border: 1px solid rgba(14, 165, 233, 0.15);
  border-radius: 10px;
  font-size: 0.9rem;
}/* ── Pharmacies on Duty ── */

.pharmacy-hero {
  padding: 4rem 0 2.5rem;
  text-align: center;
  background: linear-gradient(180deg, #dcfce7 0%, var(--bg) 100%);
}

.pharmacy-hero .hero-badge {
  background: rgba(16, 185, 129, 0.12);
  color: #047857;
}

.pharmacy-quick-cities {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.quick-cities-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

.quick-city-link {
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--surface-2);
  font-size: 0.82rem;
  color: var(--text-muted);
  transition: all 0.2s;
  text-decoration: none;
}

.quick-city-link:hover {
  border-color: var(--accent-2);
  color: #047857;
  background: rgba(16, 185, 129, 0.06);
}

.pharmacy-results-section {
  padding-bottom: 4rem;
}

.pharmacy-results-header {
  margin: 1.5rem 0;
}

.pharmacy-city-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.pharmacy-city-title em {
  color: var(--accent-2);
  font-style: normal;
}

.pharmacy-count {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg-soft);
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
}

.pharmacy-grid {
  display: grid;
  gap: 1rem;
}

.pharmacy-card {
  background: var(--surface);
  border: 1px solid var(--surface-2);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.2s, box-shadow 0.25s;
  overflow: hidden;
}

.pharmacy-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent-2);
  box-shadow: var(--shadow-lg);
}

.pharmacy-card-status {
  display: flex;
  align-items: center;
  padding: 0.6rem 1.25rem;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.06), rgba(16, 185, 129, 0.02));
  border-bottom: 1px solid var(--surface-2);
}

.pharmacy-duty-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #047857;
}

.duty-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
  animation: pulse 2s infinite;
}

.duty-label {
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.72rem;
}

.pharmacy-card-body {
  padding: 1.25rem;
}

.pharmacy-card-header {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.pharmacy-avatar {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #10b981, #34d399);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.pharmacy-avatar-icon {
  font-size: 1.3rem;
}

.pharmacy-card-info {
  flex: 1;
  min-width: 0;
}

.pharmacy-name {
  margin: 0 0 0.25rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}

.pharmacy-address {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.3rem;
  flex-wrap: wrap;
}

.pharmacy-city-badge {
  background: var(--bg-soft);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  font-size: 0.78rem;
  color: var(--accent-dark);
}

.pharmacy-card-details {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
  padding: 0.75rem;
  background: var(--bg-soft);
  border-radius: 10px;
}

.pharmacy-phone {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--accent-dark);
  text-decoration: none;
  padding: 0.35rem 0.7rem;
  background: var(--surface);
  border-radius: 8px;
  transition: all 0.2s;
}

.pharmacy-phone:hover {
  background: rgba(14, 165, 233, 0.08);
}

.pharmacy-schedule-today {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.88rem;
  color: var(--text);
  font-weight: 500;
}

.schedule-today-icon {
  font-size: 1rem;
}

.schedule-today-text {
  color: #047857;
  font-weight: 600;
}

.pharmacy-week-schedule {
  margin-bottom: 1rem;
  border: 1px solid var(--surface-2);
  border-radius: 10px;
  overflow: hidden;
}

.pharmacy-week-summary {
  padding: 0.6rem 0.75rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  background: var(--bg-soft);
  transition: background 0.2s;
  user-select: none;
}

.pharmacy-week-summary:hover {
  background: var(--surface-2);
}

.pharmacy-week-days {
  padding: 0.5rem 0.75rem;
}

.pharmacy-day-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--bg-soft);
  font-size: 0.82rem;
}

.pharmacy-day-row:last-child {
  border-bottom: none;
}

.pharmacy-day-row.today {
  background: rgba(16, 185, 129, 0.06);
  margin: 0 -0.75rem;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  border-bottom-color: transparent;
}

.day-name {
  font-weight: 600;
  color: var(--text);
  text-transform: capitalize;
}

.pharmacy-day-row.today .day-name {
  color: #047857;
}

.day-hours {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.pharmacy-card-footer {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* Popular cities grid */
.pharmacy-default-state {
  padding: 2rem 0;
}

.pharmacy-popular-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.75rem;
  margin-top: 2rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.popular-city-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  padding: 1.25rem 0.75rem;
  background: var(--surface);
  border: 1px solid var(--surface-2);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  text-decoration: none;
  color: inherit;
}

.popular-city-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-2);
  box-shadow: var(--shadow-lg);
}

.popular-city-icon {
  font-size: 2rem;
}

.popular-city-name {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
}

.popular-city-province {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Suggestions */
.pharmacy-suggestions {
  margin-top: 1.5rem;
}

.pharmacy-suggestions p {
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.suggestion-chips {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.suggestion-chip {
  padding: 0.5rem 1rem;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--surface-2);
  color: var(--accent-dark);
  font-weight: 500;
  transition: all 0.2s;
  text-decoration: none;
}

.suggestion-chip:hover {
  border-color: var(--accent-2);
  background: rgba(16, 185, 129, 0.06);
}

/* Pharmacy detail */
.pharmacy-phone-large {
  margin-bottom: 1rem;
}

.pharmacy-phone-large .compare-link {
  font-size: 1.1rem;
  padding: 0.65rem 1rem;
}

.pharmacy-detail-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

@media (max-width: 768px) {
  .pharmacy-detail-layout {
    grid-template-columns: 1fr;
  }
}

.pharmacy-schedule-highlight {
  padding: 1.25rem;
  background: rgba(16, 185, 129, 0.06);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: var(--radius);
  text-align: center;
}

.schedule-big {
  font-size: 1.4rem;
  font-weight: 700;
  color: #047857;
}

.pharmacy-week-detail {
  border: 1px solid var(--surface-2);
  border-radius: 10px;
  overflow: hidden;
  margin-top: 1rem;
}

.pharmacy-week-detail .pharmacy-day-row {
  padding: 0.5rem 0.75rem;
}

.pharmacy-week-detail .pharmacy-day-row.today {
  background: rgba(16, 185, 129, 0.08);
}

/* Map placeholder */
.pharmacy-map-container {
  margin-bottom: 1.5rem;
}

.pharmacy-map-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 2rem;
  background: var(--bg-soft);
  border: 2px dashed var(--surface-2);
  border-radius: var(--radius);
  text-align: center;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s;
}

.pharmacy-map-placeholder:hover {
  border-color: var(--accent-2);
  background: rgba(16, 185, 129, 0.04);
  transform: translateY(-2px);
}

.map-placeholder-icon {
  font-size: 3rem;
}

.map-placeholder-text {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.map-placeholder-text strong {
  color: var(--accent-dark);
  font-size: 1rem;
}

.map-placeholder-text span {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Nearby pharmacies list */
.pharmacy-nearby-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.nearby-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--bg-soft);
  border: 1px solid var(--surface-2);
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s;
}

.nearby-item:hover {
  border-color: var(--accent-2);
  transform: translateX(3px);
}

.nearby-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
}

.nearby-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.nearby-name {
  font-weight: 600;
  color: var(--text);
  font-size: 0.9rem;
}

.nearby-address {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nearby-arrow {
  font-size: 1rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

/* Stats card for pharmacies */
.stats-card .stats-icon {
  line-height: 1;
}

/* ── Alternatives Search ── */

.alt-drug-card {
  background: var(--surface);
  border: 1px solid var(--surface-2);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
  transition: border-color 0.2s;
}

.alt-drug-card:hover {
  border-color: var(--accent);
}

.alt-drug-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.alt-drug-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.alt-drug-name {
  font-weight: 700;
  font-size: 1rem;
  color: var(--accent-dark);
  text-decoration: none;
}

.alt-drug-name:hover {
  text-decoration: underline;
}

.alt-drug-ingredient {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.alt-drug-alternatives {
  margin-bottom: 0.75rem;
}

.alt-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.alt-chips {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.alt-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.7rem;
  background: var(--bg-soft);
  border: 1px solid var(--surface-2);
  border-radius: 8px;
  font-size: 0.82rem;
  color: var(--text);
  text-decoration: none;
  transition: all 0.2s;
}

.alt-chip:hover {
  border-color: var(--accent);
  color: var(--accent-dark);
  transform: translateY(-1px);
}

.alt-chip-type {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--surface);
  padding: 1px 5px;
  border-radius: 4px;
}

.alt-chip-generic {
  border-color: rgba(16, 185, 129, 0.3);
}

.alt-chip-generic .alt-chip-type {
  color: #047857;
  background: rgba(16, 185, 129, 0.08);
}

.alt-drug-ai {
  margin-top: 0.75rem;
}

.alt-ai-results {
  margin-top: 0.75rem;
  padding: 1rem;
  background: var(--bg-soft);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.alt-ai-block-title {
  margin: 0 0 0.5rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent-dark);
}

.alt-ai-list {
  margin: 0;
  padding-left: 1.25rem;
  font-size: 0.88rem;
}

.alt-ai-list li {
  margin-bottom: 0.2rem;
}

.alt-ai-cards {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.alt-ai-card {
  padding: 0.75rem;
  background: var(--surface);
  border: 1px solid var(--surface-2);
  border-radius: 8px;
}

.alt-ai-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.25rem;
}

.alt-ai-card-type {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--bg-soft);
  color: var(--text-muted);
  text-transform: uppercase;
}

.alt-ai-card-ingredient {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0 0 0.35rem;
}

.alt-ai-card-explain {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.4;
}

.alt-ai-tip {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.75rem;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 8px;
  font-size: 0.85rem;
}

.alt-ai-tip-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
}

.alt-ai-nota {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.75rem;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: 8px;
  font-size: 0.85rem;
}

.alt-ai-nota-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
}

.alt-ai-error {
  padding: 0.75rem;
  background: rgba(239, 68, 68, 0.06);
  border: 1px solid rgba(239, 68, 68, 0.15);
  border-radius: 8px;
  font-size: 0.85rem;
  color: var(--danger);
}

.alternatives-examples {
  margin-top: 1.5rem;
}

.alternatives-example-chips {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.loading-spinner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 2rem;
  font-size: 1rem;
  color: var(--text-muted);
}

.loading-icon {
  font-size: 1.5rem;
  animation: bounce 1s infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

.label-section {
  margin-bottom: 1.5rem;
}

.label-section h3 {
  color: var(--accent-dark);
  margin-bottom: 0.5rem;
}

.signal-list,
.recall-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.signal-item,
.recall-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--surface-2);
}

.signal-count {
  background: var(--bg-soft);
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-weight: 700;
  color: var(--accent-dark);
}

/* Signals chart */
.signals-chart {
  margin-bottom: 2rem;
}

.chart-header {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  padding: 0 0 0.5rem;
  border-bottom: 1px solid var(--surface-2);
  margin-bottom: 0.75rem;
}

.chart-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.chart-label.text-right {
  text-align: right;
}

.chart-bars {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.chart-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) 2fr;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0;
}

.chart-reaction {
  font-size: 0.9rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.chart-bar-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  height: 28px;
}

.chart-bar {
  height: 100%;
  min-width: 2px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.chart-value {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  min-width: 2rem;
}

@media (max-width: 640px) {
  .chart-row {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }

  .chart-reaction {
    white-space: normal;
  }

  .chart-bar-wrapper {
    height: 22px;
  }
}

.recall-item {
  display: block;
}

.recall-date {
  font-weight: 700;
  color: var(--accent-dark);
}

.recall-class {
  color: var(--warning);
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}

.recall-reason {
  margin: 0.25rem 0;
}

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

/* Footer */
.site-footer {
  border-top: 1px solid var(--surface-2);
  padding: 2.5rem 0;
  margin-top: 4rem;
  background: var(--surface);
}

.footer-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.footer-mark {
  width: 40px;
  height: 40px;
  display: block;
  object-fit: contain;
  flex-shrink: 0;
}

.footer-tagline {
  margin: 0.25rem 0 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 0.75rem;
}

.footer-stat {
  background: var(--bg-soft);
  border-radius: var(--radius);
  padding: 0.75rem;
  text-align: center;
}

.footer-stat-value {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-dark);
}

.footer-stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer-visit {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.5rem;
  font-size: 0.9rem;
}

.footer-visit-row {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.35rem 0;
  border-bottom: 1px dashed var(--surface-2);
}

.footer-visit-label {
  color: var(--text-muted);
}

.disclaimer {
  color: var(--text-muted);
  font-weight: 500;
  margin: 0;
  text-align: center;
  font-size: 0.9rem;
}

.copy {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin: 0;
  text-align: center;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr 2fr;
  }

  .footer-stats {
    grid-column: 2;
  }

  .footer-visit {
    grid-column: 2;
  }

  .disclaimer,
  .copy {
    grid-column: 1 / -1;
  }
}

/* Skeleton */
.htmx-request .drug-grid {
  opacity: 0.6;
  transition: opacity 0.2s;
}

/* Alerts */
.alert-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.alert-item {
  background: var(--surface);
  border: 1px solid var(--surface-2);
  border-radius: var(--radius);
  padding: 1.25rem;
  transition: border-color 0.2s;
  box-shadow: var(--shadow);
}

.alert-item:hover {
  border-color: var(--accent);
}

.alert-recall {
  border-left: 4px solid var(--danger);
}

.alert-spike {
  border-left: 4px solid var(--warning);
}

.alert-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.alert-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  text-transform: uppercase;
}

.alert-recall .alert-badge {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
}

.alert-spike .alert-badge {
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning);
}

.alert-date {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.alert-message {
  margin: 0 0 0.5rem;
  font-size: 1rem;
}

.alert-drug {
  font-size: 0.9rem;
  font-weight: 500;
}

.alert-counter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  margin-left: 0.35rem;
}

/* Compare */
.compare-section {
  padding: 2rem 0 4rem;
}

.compare-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

.compare-card {
  background: var(--surface);
  border: 1px solid var(--surface-2);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.compare-us {
  border-top: 4px solid var(--accent);
}

.compare-es {
  border-top: 4px solid var(--accent-2);
}

.compare-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.25rem;
  border-bottom: 1px solid var(--surface-2);
}

.compare-title {
  margin: 0;
  font-size: 1.25rem;
}

.compare-body {
  padding: 1.25rem;
}

.compare-block {
  margin-top: 1.5rem;
}

.compare-block-title {
  font-size: 1rem;
  margin: 0 0 0.75rem;
  color: var(--accent-dark);
}

/* Mini chart (used in compare view) */
.mini-chart {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.mini-chart-row {
  display: grid;
  grid-template-columns: minmax(100px, 1fr) 2fr;
  align-items: center;
  gap: 0.5rem;
}

.mini-chart-label {
  font-size: 0.85rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini-chart-bar-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  height: 22px;
}

.mini-chart-bar {
  height: 100%;
  min-width: 2px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.mini-chart-value {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
}

@media (max-width: 640px) {
  .mini-chart-row {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }

  .mini-chart-bar-wrapper {
    height: 18px;
  }
}

/* Responsive */
@media (max-width: 768px) {
  .detail-layout {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .detail-meta-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .summary-layout {
    grid-template-columns: 1fr;
  }

  .summary-visual {
    order: -1;
    align-items: center;
  }
}

@media (max-width: 640px) {
  .hero {
    padding: 2.5rem 0 2rem;
  }

  .search-form {
    flex-direction: column;
    align-items: stretch;
  }

  .search-button {
    width: 100%;
  }

  .detail-dl {
    grid-template-columns: 1fr;
  }

  .detail-meta-grid {
    grid-template-columns: 1fr 1fr;
  }

  .drug-avatar-xl {
    width: 80px;
    height: 80px;
  }

  .drug-avatar-xl-letter {
    font-size: 2.2rem;
  }

  .tabs {
    gap: 0.5rem;
  }

  .tab {
    flex: 1 1 auto;
    text-align: center;
  }

  .header-inner {
    flex-wrap: wrap;
  }

  .main-nav {
    order: 3;
    width: 100%;
    justify-content: center;
    margin-top: 0.5rem;
  }

  .lang-selector {
    order: 2;
  }

  .summary-layout {
    grid-template-columns: 1fr;
  }

  .summary-visual {
    order: -1;
    align-items: center;
  }

  .quick-stats {
    justify-content: center;
  }
}
