/* =========================================
   DESIGN TOKENS
   ========================================= */

:root {
  /* ---------- Base surfaces & text ---------- */
  --bg: #ffffff;
  --surface-muted: #f7f9fb;
  /* page background */
  --surface-card: #ffffff;
  /* card background */
  --surface-chip: #f5f7f8;
  /* neutral chip base */
  --surface-divider: #e7eaee;

  --ink: #0f172a;
  /* main text */
  --ink-soft: #1e293b;
  /* softer dark text */
  --ink-muted: #637381;
  /* labels */
  --ink-on-dark: #ffffff;
  /* text on colored headers */

  /* ---------- Brand / strain headers ---------- */
  --strain-indica-bg: #6366f1;
  --strain-indica-text: #ffffff;

  --strain-sativa-bg: #f97316;
  --strain-sativa-text: #1e293b;

  --strain-hybrid-bg: #10b981;
  --strain-hybrid-text: #ffffff;

  /* Generic “brand” if needed elsewhere */
  --brand: #2f948d;
  --brand-weak: #e6f4f2;

  /* ---------- Terpene bars ---------- */
  --terp-bar-fill: #1e7d77;
  --terp-bar-track: #d8ece9;

  /* ---------- Profile flavor chips ---------- */
  --profile-text: #0f172a;

  --profile-citrus-bg: #ffe3c2;
  --profile-sour-bg: #fff0b3;
  --profile-fruity-bg: #fad9dc;
  --profile-sweet-bg: #fbe5ef;
  --profile-berry-bg: #e8d5ff;
  --profile-grape-bg: #e2d4ff;
  --profile-tropical-bg: #ffe9c7;
  --profile-herbal-bg: #e4f3e6;
  --profile-pine-bg: #dff0ea;
  --profile-earthy-bg: #ede3d5;
  --profile-diesel-bg: #e7edf4;
  --profile-skunky-bg: #eaf7d6;
  --profile-spicy-bg: #ffe0c9;
  --profile-nutty-bg: #f1e6d6;
  --profile-vanilla-bg: #eeeded;

  /* Extra notes used in your HTML */
  --profile-dessert-bg: #ffe0d2;
  --profile-creamy-bg: #f3e8d9;
  --profile-gassy-bg: #e4edf0;
  --profile-floral-bg: #f4e4ff;

  /* ---------- Effects & relief chips ---------- */
  /* We keep these unified + calm, icons carry meaning */
  --effects-bg: #eaf5f4;
  --effects-text: #145b56;

  --relief-bg: #e9f2f7;
  --relief-text: #184a63;

  /* If you later want per-effect tokens, point them here */
  --effect-happy-bg: var(--effects-bg);
  --effect-happy-text: var(--effects-text);
  --effect-euphoric-bg: var(--effects-bg);
  --effect-euphoric-text: var(--effects-text);
  --effect-relaxed-bg: var(--effects-bg);
  --effect-relaxed-text: var(--effects-text);
  /* …etc, all map to effects for now */

  --relief-stress-bg: var(--relief-bg);
  --relief-stress-text: var(--relief-text);
  --relief-anxiety-bg: var(--relief-bg);
  --relief-anxiety-text: var(--relief-text);
  --relief-pain-bg: var(--relief-bg);
  --relief-pain-text: var(--relief-text);
  /* …etc, all map to relief for now */

  /* ---------- Radii ---------- */
  --radius-xl: 22px;
  /* card */
  --radius-chip: 999px;
  /* pill */
  --radius-pill: 10px;
  /* rectangular pill */
}

/* =========================================
   GLOBAL RESET
   ========================================= */

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

body {
  margin: 0;
  color: var(--ink);
  font: 16px/1.4 "Roboto", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
}

h1,
h2,
h3,
p {
  margin: 0;
}

/* =========================================
   LAYOUT: CARD STRIP
   ========================================= */

/* .page {
  padding: 40px 24px 80px;
  display: grid;
  gap: 26px;
} */

.page-header {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  align-items: end;
  padding: 20px 22px;
  border-radius: 22px;
  background: #0f172a;
  color: #e2e8f0;
}

.page-title {
  font-size: 34px;
  margin: 4px 0 8px;
  color: #fff;
  letter-spacing: -0.01em;
}

.lede {
  color: #cbd5e1;
  font-size: 16px;
  max-width: 640px;
}

.filters {
  margin: 20px 0 12px;
  padding: 14px 16px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--surface-divider);
}

.filter__row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  align-items: end;
}

.filter__group {
  display: grid;
  gap: 6px;
  font-weight: 600;
  color: var(--ink-soft);
}

.filter__label {
  font-size: 14px;
  color: var(--ink-muted);
}

.filters input,
.filters select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--surface-divider);
  background: #fff;
  font: inherit;
  color: var(--ink);
}

.filters input:focus,
.filters select:focus {
  outline: 2px solid #0ea5e9;
  border-color: #0ea5e9;
}

.filter__summary {
  margin: 10px 0 0;
  color: var(--ink-muted);
  font-size: 14px;
}

.ghost--small {
  justify-self: start;
  padding: 8px 12px;
  font-size: 14px;
}

.tag-row {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
  align-items: center;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
  padding: 8px 12px;
  border-radius: var(--radius-chip);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.ghost {
  background: transparent;
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 9px 14px;
  border-radius: var(--radius-chip);
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease,
    background-color 0.18s ease;
}

.page-header__meta {
  display: grid;
  gap: 10px;
  justify-items: start;
}

.stat-blip {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  padding: 12px 14px;
  min-width: 160px;
}

.stat-blip__label {
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #cbd5e1;
}

.stat-blip__value {
  font-size: 28px;
  font-weight: 800;
  color: #fff;
  margin-top: 4px;
}

.meta-note {
  color: #cbd5e1;
  font-size: 14px;
  line-height: 1.5;
  max-width: 320px;
}

.cards {
  display: flex;
  gap: 22px;
  align-items: stretch;
  overflow-x: auto;
  /* padding-bottom: 6px; */
  scroll-snap-type: x mandatory;
}

.cards .card {
    flex: 0 0 400px;
}

/* =========================================
   COMPONENT: CARD
   ========================================= */

.card {
  width: 100%;
  background: var(--surface-card);
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.06);
  scroll-snap-align: start;
  position: relative;
  isolation: isolate;
}

.card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(120deg, rgba(16, 185, 129, 0.08), transparent 50%),
    linear-gradient(240deg, rgba(99, 102, 241, 0.08), transparent 50%);
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
  z-index: 0;
}

/* ---------- Header ---------- */

.card__head {
  padding: 22px 24px 24px;
  position: relative;
  z-index: 1;
}

.card__head.is-indica {
  background-color: var(--strain-indica-bg);
}

.card__head.is-sativa {
  background-color: var(--strain-sativa-bg);
}

.card__head.is-hybrid {
  background-color: var(--strain-hybrid-bg);
}

.row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.title {
  font-weight: 800;
  font-size: 28px;
  letter-spacing: -0.02em;
  color: var(--ink-on-dark);
}

.subtitle {
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
}

/* .derived-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  margin-left: 8px;
  border-radius: 50%;
  background: #e0f2fe;
  color: #0ea5e9;
  font-size: 10px;
  font-weight: 800;
}

.derived-indicator::before {
  content: "•";
  line-height: 1;
}

.derived-indicator--pill {
  width: auto;
  height: auto;
  padding: 2px 8px;
  border-radius: var(--radius-chip);
  font-size: 11px;
  gap: 4px;
} */

.eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700; 
  font-size: 12px;
  color: rgba(255, 255, 255, 0.85);
}

.badge {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.18);
  color: var(--ink-on-dark);
  padding: 6px 12px;
  border-radius: var(--radius-chip);
  font-weight: 700;
  letter-spacing: 0.06em;
  font-size: 12px;
  position:absolute;
  top: 10px;
  right: 10px;
}

/* ---------- Body ---------- */

.card__body {
  padding: 22px 24px 24px;
  position: relative;
  z-index: 1;
}

.divider {
  height: 1px;
  background: var(--surface-divider);
  margin: 16px 0;
}

.description {
  margin-bottom: 16px;
  color: var(--ink-soft);
  line-height: 1.6;
}

/* =========================================
   COMPONENT: STATS
   ========================================= */

/* --- Horizontal Cannabinoid Stats --- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 12px;
}

.stat {
  text-align: center;
  background: rgba(255, 255, 255, 0.06);
  padding: 10px 0;
  border-radius: 8px;
}

.stat__label {
  font-size: 0.75rem;
  opacity: 0.8;
  margin-bottom: 4px;
}

.stat__value {
  font-size: 1.15rem;
  font-weight: 600;
}


/* =========================================
   TYPOGRAPHIC SECTION TITLES
   ========================================= */

.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: 0.02em;
  font-size: 14px;
}

/* =========================================
   COMPONENT: TERPENES
   ========================================= */

.terps {
  margin-top: 10px;
  display: grid;
  gap: 12px;
}

.terp {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
}

.terp__name {
  font-size: 18px;
}

.bar {
  height: 10px;
  border-radius: 8px;
  background: var(--terp-bar-track);
  overflow: hidden;
  position: relative;
}

.bar>span {
  position: absolute;
  inset: 0;
  width: var(--w, 0%);
  background: var(--terp-bar-fill);
  border-radius: 8px;
}

.terp__pct {
  text-align: right;
  font-weight: 700;
}

/* =========================================
   COMPONENT: CHIPS
   ========================================= */

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

.chip {
  padding: 8px 12px;
  border-radius: var(--radius-chip);
  font-weight: 700;
  font-size: 14px;
}

/* ---------- Profile chips (flavor/notes) ---------- */

.chip.profile {
  --chip-bg: #eef2f3;
  --chip-ink: var(--profile-text);
  background: var(--chip-bg);
  color: var(--chip-ink);
  padding: 6px 12px;
  border-radius: var(--radius-chip);
}

/* Map all data-profile values to tokens */
.chip.profile[data-profile="citrus"] {
  --chip-bg: var(--profile-citrus-bg);
}

.chip.profile[data-profile="sour"] {
  --chip-bg: var(--profile-sour-bg);
}

.chip.profile[data-profile="fruity"] {
  --chip-bg: var(--profile-fruity-bg);
}

.chip.profile[data-profile="sweet"] {
  --chip-bg: var(--profile-sweet-bg);
}

.chip.profile[data-profile="berry"] {
  --chip-bg: var(--profile-berry-bg);
}

.chip.profile[data-profile="grape"] {
  --chip-bg: var(--profile-grape-bg);
}

.chip.profile[data-profile="tropical"] {
  --chip-bg: var(--profile-tropical-bg);
}

.chip.profile[data-profile="herbal"] {
  --chip-bg: var(--profile-herbal-bg);
}

.chip.profile[data-profile="pine"] {
  --chip-bg: var(--profile-pine-bg);
}

.chip.profile[data-profile="earthy"] {
  --chip-bg: var(--profile-earthy-bg);
}

.chip.profile[data-profile="diesel"] {
  --chip-bg: var(--profile-diesel-bg);
}

.chip.profile[data-profile="skunky"] {
  --chip-bg: var(--profile-skunky-bg);
}

.chip.profile[data-profile="spicy"] {
  --chip-bg: var(--profile-spicy-bg);
}

.chip.profile[data-profile="nutty"] {
  --chip-bg: var(--profile-nutty-bg);
}

.chip.profile[data-profile="vanilla"] {
  --chip-bg: var(--profile-vanilla-bg);
}

/* Extra profile types used in markup */
.chip.profile[data-profile="dessert"] {
  --chip-bg: var(--profile-dessert-bg);
}

.chip.profile[data-profile="creamy"] {
  --chip-bg: var(--profile-creamy-bg);
}

.chip.profile[data-profile="gassy"] {
  --chip-bg: var(--profile-gassy-bg);
}

.chip.profile[data-profile="floral"] {
  --chip-bg: var(--profile-floral-bg);
}

/* =========================================
   COMPONENT: EFFECTS & RELIEF
   ========================================= */

.group h3,
.cannabinoids h3 {
  font-weight: 900;
  font-size: 14px;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
}

.section-meta {
  margin: 4px 0 10px;
}

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

.item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-chip);
  border-radius: var(--radius-pill);
  padding: 8px 10px;
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Effects chips */
.effects .item {
  background: var(--effects-bg);
  color: var(--effects-text);
}

/* Relief chips */
.relief .item {
  background: var(--relief-bg);
  color: var(--relief-text);
}

.icon {
  width: 18px;
  height: 18px;
  flex: none;
  opacity: 0.9;
}

.strain-card img.icon {
  width: 24px;
  height: 24px;
  display: inline-block;
  object-fit: contain;
}


/* =========================================
   RESPONSIVE
   ========================================= */

@media (max-width: 900px) {
  .page-header {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 420px) {
  .stat__value {
    font-size: 32px;
  }

  .terp {
    grid-template-columns: 100px 1fr 48px;
  }
}

/* =========================================
   UTILITIES
   ========================================= */

.error-message {
  padding: 24px;
  background: #fee2e2;
  color: #991b1b;
  border-radius: var(--radius-xl);
  text-align: center;
  margin: 24px;
  font-weight: 600;
}

.error-message button {
  margin-top: 16px;
  padding: 12px 24px;
  min-width: 120px;
  min-height: 48px;
  background: #991b1b;
  color: white;
  border: none;
  border-radius: var(--radius-pill);
  cursor: pointer;
  font-weight: 700;
  font-size: 16px;
}

.terp-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 10px;
}

.terp-card {
  background: #eef3f3;
  border-radius: 12px;
  padding: 2px 1px;
  text-align: center;
  font-weight: 600;
  font-size: 0.9rem;
  color: #0c2a2e;
  display: grid;
  gap: 4px;
  align-items: center;
  justify-items: center;
  white-space: nowrap;
}

.terp-label {
  font-weight: 700;
}

.terp-value {
  font-size: 0.85rem;
  color: var(--ink-muted);
}

.source-list {
  margin: 8px 0 0;
  padding-left: 18px;
  color: var(--ink-soft);
  display: grid;
  gap: 6px;
}

.source-list a {
  color: inherit;
  word-break: break-all;
}

.source-list ul {
  padding-left: 18px;
  margin: 6px 0 0;
  display: grid;
  gap: 4px;
}
