/* ══════════════════════════════════════════════════════
   Browse medications (drug carousel) — stacked card, 3-up
   Pale sage section bg, filter pills, 3 visible cards with arrows
   sitting outside the visible area, and a pale-cream helper banner.
   ══════════════════════════════════════════════════════ */
.drug-carousel { padding: 88px 0; background: #F1F5EC; }
.drug-carousel--compact { padding: 68px 0; }
.drug-carousel--compact .drug-carousel__head { margin-bottom: 22px; }
.drug-carousel__inner { max-width: 1520px; margin: 0 auto; padding: 0 60px; }

/* Header */
.drug-carousel__head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 24px; margin-bottom: 28px;
}
.drug-carousel__intro { max-width: 720px; }
.drug-carousel__heading {
  font-family: "Source Serif 4", serif;
  font-size: clamp(32px, 3.4vw, 44px);
  font-weight: 400; line-height: 1.1;
  letter-spacing: -0.02em; color: var(--ink); margin: 0 0 10px;
}
.drug-carousel__sub { font-size: 15px; line-height: 1.55; color: var(--text-muted); margin: 0; }

/* Filter chip row */
.drug-carousel__filters {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  margin-bottom: 32px;
}
.drug-carousel__filter {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 0 20px; height: 50px;
  border-radius: 999px;
  border: 1px solid rgba(31, 74, 44, 0.16);
  background: #fff;
  font-size: 14.5px; font-weight: 500; color: var(--ink);
  cursor: pointer;
  transition: background 150ms, border-color 150ms, color 150ms;
}
.drug-carousel__filter:hover { border-color: var(--fern); }
.drug-carousel__filter.is-active { background: var(--fern); color: #fff; border-color: var(--fern); }
.drug-carousel__filter-icon { display: inline-flex; color: var(--moss); }
.drug-carousel__filter.is-active .drug-carousel__filter-icon { color: #fff; }

/* "How potency works" + hover tooltip */
.drug-carousel__how-wrap { position: relative; margin-left: auto; }
.drug-carousel__how {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--text-muted); font-size: 13.5px; text-decoration: none;
  padding: 8px 4px;
}
.drug-carousel__how:hover { color: var(--fern); }
.drug-carousel__tooltip {
  position: absolute; top: calc(100% + 6px); right: 0;
  width: 340px; max-width: calc(100vw - 32px);
  background: #fff; border: 1px solid rgba(31, 74, 44, 0.12);
  border-radius: 14px; box-shadow: 0 12px 28px rgba(0, 0, 0, 0.10);
  padding: 16px 18px;
  font-size: 13px; line-height: 1.5; color: var(--text-muted);
  opacity: 0; visibility: hidden; transform: translateY(-4px);
  transition: opacity 160ms ease, transform 160ms ease, visibility 160ms;
  z-index: 100; pointer-events: none;
}
.drug-carousel__tooltip p { margin: 0 0 10px; }
.drug-carousel__tooltip p:last-child { margin-bottom: 0; }
.drug-carousel__tooltip strong { color: var(--ink); font-weight: 600; }
.drug-carousel__tooltip-note {
  margin-top: 10px !important;
  padding-top: 10px;
  border-top: 1px solid rgba(31, 74, 44, 0.08);
  color: var(--text-subtle); font-style: italic;
}
.drug-carousel__how-wrap:hover .drug-carousel__tooltip,
.drug-carousel__how-wrap:focus-within .drug-carousel__tooltip {
  opacity: 1; visibility: visible; transform: translateY(0);
}

/* Stage holds the arrows (outside) + track (with the 3 visible cards) */
.drug-carousel__stage { position: relative; }
.drug-carousel__arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  z-index: 3;
  width: 52px; height: 52px; border-radius: 50%;
  background: #fff;
  border: 1px solid rgba(31, 74, 44, 0.16);
  color: var(--fern);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(31, 74, 44, 0.08);
  transition: background 150ms, border-color 150ms, color 150ms;
}
.drug-carousel__arrow:hover { background: var(--fern); color: #fff; border-color: var(--fern); }
.drug-carousel__arrow--prev { left: -12px; }
.drug-carousel__arrow--next { right: -12px; }

/* Track: horizontal scroller, 3 cards visible at once on desktop */
/* Track: horizontal flex scroller. Fixed card widths so ~3.5 cards show
   at desktop widths (a half-visible fourth card signals scrollability). */
.drug-carousel__track {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 6px 4px 8px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.drug-carousel__track::-webkit-scrollbar { display: none; height: 0; width: 0; }

/* ── Stacked card ─────────────────────────────────────────
   Top half: warm off-white product-image area.
   Bottom half: pure white info panel. CTAs stay bottom-pinned. */
/* Card — fixed width (~360px), min-height so all card CTAs align across
   the row even when 'Best for:' wraps one line vs two. */
.drug-card {
  position: relative;
  flex: 0 0 clamp(340px, 24vw, 380px);
  background: #fff;
  padding: 0;
  border-radius: 24px;
  overflow: hidden;
  scroll-snap-align: start;
  display: flex; flex-direction: column;
  box-shadow: 0 2px 8px rgba(31, 74, 44, 0.05);
  border: 1px solid rgba(31, 74, 44, 0.04);
  min-height: 520px;
  cursor: pointer;
  transition: box-shadow 160ms ease, transform 160ms ease;
}
.drug-card:hover { box-shadow: 0 8px 22px rgba(31, 74, 44, 0.10); }
.drug-card:focus-within { box-shadow: 0 0 0 3px rgba(31, 74, 44, 0.18); }
.drug-card__product-link {
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: inherit;
}
/* Corner flag for the top-N most-prescribed medications. Pale sage bg +
   dark Fern text, small star icon. Sits over the image stage. */
.drug-card__flag {
  position: absolute; top: 14px; left: 14px;
  z-index: 2;
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 10px 5px 8px;
  border-radius: 999px;
  background: #D8EBD5;
  color: var(--fern);
  font-size: 11.5px; font-weight: 600;
  letter-spacing: 0.02em; text-transform: uppercase;
  box-shadow: 0 2px 6px rgba(31, 74, 44, 0.10);
  pointer-events: none;
}
.drug-card__flag svg { flex-shrink: 0; }
.drug-card__media {
  background: #FAF9F5;
  height: 230px;
  display: flex; align-items: center; justify-content: center;
  padding: 22px;
  overflow: hidden;
}
.drug-card__image {
  display: block;
  width: auto; height: auto;
  max-width: 88%;
  max-height: 84%;
  object-fit: contain;
  object-position: center;
}
.drug-card__body {
  background: #fff;
  padding: 20px 26px 22px;
  display: flex; flex-direction: column;
  flex: 1 1 auto;
}
.drug-card__badge {
  display: inline-flex; align-items: center; gap: 8px;
  align-self: flex-start;
  padding: 5px 12px;
  border-radius: 999px;
  background: #F4F1E8;
  color: var(--ink);
  font-size: 13px; font-weight: 600;
  margin-bottom: 12px;
}
.drug-card__badge-icon { display: inline-flex; color: var(--moss); }
.drug-card__name {
  font-family: "Source Serif 4", serif;
  font-size: clamp(24px, 1.9vw, 28px);
  font-weight: 500; line-height: 1.12;
  letter-spacing: -0.01em; color: var(--ink);
  margin: 0 0 6px;
}
.drug-card__form {
  font-size: 16px; color: var(--text-muted);
  margin-bottom: 12px;
  font-weight: 400;
}
.drug-card__best {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 15px; line-height: 1.4; color: var(--text-muted);
  margin-bottom: 18px;
  min-height: 42px;                 /* two-line room so CTAs align */
}
.drug-card__best svg { flex-shrink: 0; color: var(--moss); margin-top: 3px; }
.drug-card__best strong { color: var(--ink); font-weight: 600; }
.drug-card__cta {
  position: relative;
  z-index: 3;
  margin-top: auto;
  width: 100%; text-align: center;
  padding: 14px 18px;
  border-radius: 999px;
  background: var(--fern); color: #fff;
  font-size: 15.5px; font-weight: 600;
  text-decoration: none;
  transition: background 150ms;
}
.drug-card__cta:hover { background: var(--fern-hover); }
/* Pagination dots below the cards */
.drug-carousel__dots {
  display: flex; justify-content: center; gap: 8px;
  margin-top: 24px;
}
.drug-carousel__dot {
  width: 8px; height: 8px; border-radius: 50%;
  border: none; padding: 0;
  background: rgba(31, 74, 44, 0.20);
  cursor: pointer;
  transition: background 150ms, transform 150ms;
}
.drug-carousel__dot.is-active {
  background: var(--fern); transform: scale(1.15);
}

/* Bottom helper banner (white pill on the pale sage bg) */
.drug-carousel__footer {
  display: flex; align-items: center; gap: 16px;
  margin-top: 36px; padding: 20px 26px;
  background: #fff;
  border: 1px solid rgba(31, 74, 44, 0.08);
  border-radius: 16px;
  flex-wrap: wrap;
}
.drug-carousel__footer-icon {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--bg-mist); color: var(--fern);
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.drug-carousel__footer-text { font-size: 15px; color: var(--text-muted); flex: 1 1 auto; }
.drug-carousel__footer-text strong { color: var(--ink); font-weight: 600; }
.drug-carousel__footer-cta {
  color: var(--fern); font-weight: 600; font-size: 15px;
  text-decoration: none; white-space: nowrap;
}
.drug-carousel__footer-cta:hover { text-decoration: underline; }

/* Tablet: ~2.5 cards visible */
@media (max-width: 1200px) {
  .drug-carousel__inner { padding: 0 40px; }
  .drug-card { flex: 0 0 340px; }
  .drug-carousel__arrow--prev { left: -8px; }
  .drug-carousel__arrow--next { right: -8px; }
}
@media (max-width: 900px) {
  .drug-card { flex: 0 0 320px; }
}

/* Mobile: ~1.1 cards visible (peek of next card signals swipe) */
@media (max-width: 720px) {
  .drug-carousel { padding: 64px 0; }
  .drug-carousel__inner { padding: 0 20px; }
  .drug-carousel__head { flex-direction: column; }
  .drug-carousel__filters { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; }
  .drug-carousel__filter { flex-shrink: 0; }
  .drug-carousel__how-wrap { display: none; }
  .drug-card { flex: 0 0 86vw; min-height: 500px; }
  .drug-carousel__track { gap: 16px; }
  .drug-carousel__arrow { display: none; }
  .drug-card__media { height: 210px; padding: 20px; }
  .drug-card__body { padding: 20px 22px 22px; }
  .drug-card__name { font-size: 24px; }
  .drug-carousel__footer { flex-direction: column; text-align: center; }
}
