/* ── Reset & base ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Default theme variables (Emerald Health) ───────────────── */
:root {
  --brand:            #1a6b4a;
  --brand-light:      #e8f5ee;
  --brand-dark:       #134d36;
  --accent:           #f4a020;
  --accent-bg:        #fff8ec;
  --text:             #1e2530;
  --muted:            #6b7685;
  --border:           #dde3ec;
  --bg:               #f7f9fc;
  --card-bg:          #ffffff;
  --input-bg:         #ffffff;
  --row-hover-bg:     #f4f8f6;
  --table-head-bg:    #e8f5ee;
  --header-text:      #ffffff;
  --nav-btn-bg:       rgba(255,255,255,.15);
  --nav-btn-color:    rgba(255,255,255,.85);
  --nav-active-bg:    #f7f9fc;
  --nav-active-color: #134d36;
  --shadow:           0 2px 8px rgba(0,0,0,.08);
  --shadow-lg:        0 4px 20px rgba(0,0,0,.12);
  --radius:           8px;
  --radius-pill:      20px;
  --font-body:        -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-display:     -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --header-bg:        #1a6b4a;
}

/* ── Base styles ────────────────────────────────────────────── */
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  transition: background .25s, color .25s;
}

/* ── Site header ────────────────────────────────────────────── */
.site-header {
  background: var(--header-bg);
  color: var(--header-text);
  padding: 0 24px;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 0 0;
}

.logo-block { flex: 1; }

.logo {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--header-text);
  text-decoration: none;
}

.tagline {
  font-size: .8rem;
  color: rgba(255,255,255,.72);
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-top: 2px;
}

/* ── Module nav tabs ────────────────────────────────────────── */
.module-nav {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  gap: 2px;
  padding-top: 14px;
  overflow-x: auto;
}

.module-nav button {
  background: var(--nav-btn-bg);
  border: none;
  color: var(--nav-btn-color);
  padding: 12px 24px;
  border-radius: var(--radius) var(--radius) 0 0;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: .015em;
  white-space: nowrap;
  transition: background .18s, color .15s, transform .1s;
}

.module-nav button:hover {
  background: rgba(255,255,255,.22);
  color: #ffffff;
  transform: translateY(-1px);
}

.module-nav button.active {
  background: var(--nav-active-bg);
  color: var(--nav-active-color);
  font-weight: 700;
  transform: none;
}

/* ── Main layout ────────────────────────────────────────────── */
.main {
  max-width: 1200px;
  margin: 28px auto;
  padding: 0 24px;
}

/* ── Module panel ───────────────────────────────────────────── */
.module-panel { display: none; }
.module-panel.active { display: block; }

/* ── Coming soon ────────────────────────────────────────────── */
.coming-soon {
  text-align: center;
  padding: 80px 20px;
  background: var(--card-bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.coming-soon h2 { font-size: 1.6rem; color: var(--brand); margin-bottom: 10px; }
.coming-soon p  { color: var(--muted); font-size: 1rem; }

/* ── Module intro (generic, used by secondary modules) ──────── */
.module-intro {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 26px;
  margin-bottom: 22px;
  box-shadow: var(--shadow);
}

.module-intro h1 {
  font-family: var(--font-display);
  font-size: 1.45rem;
  color: var(--brand);
  margin-bottom: 6px;
}

.module-intro p { color: var(--muted); font-size: .94rem; line-height: 1.6; }

/* ── Module hero — "harder sell" intro for price-comparison modules ── */
.module-hero {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-left: 4px solid var(--mod-hero-accent, var(--brand));
  border-radius: var(--radius);
  padding: 28px 32px;
  margin-bottom: 22px;
  box-shadow: var(--shadow);
}

/* Accent color wired per module */
.module-hero[data-module="peptides"]    { --mod-hero-accent: var(--mod-peptides); }
.module-hero[data-module="supplements"] { --mod-hero-accent: var(--mod-supplements); }
.module-hero[data-module="beauty"]      { --mod-hero-accent: var(--mod-beauty); }

.module-hero-label {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--mod-hero-accent, var(--muted));
  margin-bottom: 8px;
}

.module-hero-title {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.2;
  margin-bottom: 14px;
}

.module-hero-signals {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.module-hero-signals .signal {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: .73rem;
  font-weight: 600;
  letter-spacing: .03em;
  background: var(--brand-light);
  color: var(--brand-dark);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 4px 11px;
  white-space: nowrap;
}

.module-hero-body {
  color: var(--muted);
  font-size: .93rem;
  line-height: 1.68;
  max-width: 760px;
}

.module-hero-body strong {
  color: var(--text);
  font-weight: 600;
}

/* ── Section label ──────────────────────────────────────────── */
.section-label {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

/* ── Peptide selector ───────────────────────────────────────── */
.peptide-selector-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.peptide-selector-row label {
  font-weight: 600;
  font-size: .92rem;
  color: var(--text);
  white-space: nowrap;
}

.peptide-selector-row select {
  padding: 9px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: .95rem;
  background: var(--input-bg);
  color: var(--text);
  cursor: pointer;
  min-width: 220px;
}

.peptide-selector-row select:focus {
  outline: none;
  border-color: var(--brand);
}

/* ── Size tabs ──────────────────────────────────────────────── */
.size-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.size-tabs button {
  background: var(--input-bg);
  border: 1.5px solid var(--border);
  color: var(--muted);
  padding: 7px 18px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: .88rem;
  font-weight: 500;
  transition: all .18s;
}

.size-tabs button:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.size-tabs button.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #ffffff;
  font-weight: 700;
}

/* ── Price table card ───────────────────────────────────────── */
.table-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.supp-size-block + .supp-size-block { margin-top: 24px; }

.table-card-header {
  padding: 14px 20px;
  background: var(--table-head-bg);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.table-card-header h3 {
  font-size: 1rem;
  color: var(--brand-dark);
}

.table-card-header .sort-hint {
  font-size: .78rem;
  color: var(--muted);
}

.price-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
}

.price-table th {
  background: var(--table-head-bg);
  color: var(--brand-dark);
  font-weight: 700;
  padding: 11px 16px;
  text-align: left;
  border-bottom: 2px solid var(--border);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  font-family: var(--font-body);
}

.price-table th:hover { filter: brightness(.95); }

.price-table th .sort-arrow {
  display: inline-block;
  margin-left: 5px;
  opacity: .45;
  font-size: .78rem;
}

.price-table th.sorted-asc  .sort-arrow::after { content: "▲"; opacity: 1; }
.price-table th.sorted-desc .sort-arrow::after { content: "▼"; opacity: 1; }
.price-table th:not(.sorted-asc):not(.sorted-desc) .sort-arrow::after { content: "⇅"; }

.price-table td {
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  color: var(--text);
}

.price-table tr:last-child td { border-bottom: none; }
.price-table tbody tr:hover td { background: var(--row-hover-bg); }

/* ── Option A: Sponsored row ─────────────────────────────────── */
.price-table tr.sponsored td {
  background: #fffbea;
  border-top: 2px solid #f5c842;
  border-bottom: 2px solid #f5c842;
}
.price-table tr.sponsored td:first-child {
  border-left: 4px solid #f5c842;
}
.price-table tr.sponsored:hover td { background: #fff8d6; }

.sponsored-badge {
  display: inline-block;
  background: #f5c842;
  color: #7a5c00;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 3px;
  margin-left: 8px;
  vertical-align: middle;
}

/* ── Option B: Sponsored feature card above table ────────────── */
.sponsored-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: linear-gradient(135deg, #fffbe6 0%, #fff8d0 100%);
  border: 2px solid #f5c842;
  border-radius: var(--radius);
  padding: 18px 22px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.sponsored-card-label {
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #9a7200;
  margin-bottom: 4px;
}
.sponsored-card-name {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}
.sponsored-card-name:hover { text-decoration: underline; }
.sponsored-card-tagline {
  font-size: .88rem;
  color: var(--muted);
  margin-top: 4px;
}
.sponsored-card-btn {
  display: inline-block;
  background: #f5c842;
  color: #7a5c00;
  font-weight: 700;
  font-size: .88rem;
  padding: 10px 22px;
  border-radius: var(--radius-pill);
  text-decoration: none;
  white-space: nowrap;
  transition: background .15s;
}
.sponsored-card-btn:hover { background: #e8b800; }

/* ── Supplier link ──────────────────────────────────────────── */
.supplier-link {
  color: var(--brand);
  text-decoration: none;
  font-weight: 600;
}

.supplier-link:hover { text-decoration: underline; }

/* ── Price cell ─────────────────────────────────────────────── */
.price-cell { font-weight: 700; color: var(--text); }

.price-per-mg {
  font-size: .78rem;
  color: var(--muted);
  font-weight: 400;
  display: block;
  margin-top: 2px;
}

/* ── Stock badge ────────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: .76rem;
  font-weight: 600;
}

.badge-in  { background: #e0f4ea; color: #1a6b4a; }
.badge-low { background: #fff0d6; color: #b86a00; }
.badge-out { background: #fce8e8; color: #b91c1c; }

/* ── Location tag ───────────────────────────────────────────── */
.location-tag { color: var(--muted); font-size: .82rem; }

/* ── No-data message ────────────────────────────────────────── */
.no-data {
  text-align: center;
  padding: 40px;
  color: var(--muted);
  font-size: .95rem;
}

/* ── Disclaimer ─────────────────────────────────────────────── */
.disclaimer {
  margin-top: 28px;
  padding: 14px 18px;
  background: #fff8ec;
  border: 1px solid #f4d080;
  border-radius: var(--radius);
  font-size: .8rem;
  color: #7a5800;
  line-height: 1.6;
}

.disclaimer strong { font-weight: 700; }

/* ── Data freshness bar ─────────────────────────────────────── */
.freshness-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  font-size: .8rem;
  color: var(--muted);
}

.freshness-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #34c759;
  flex-shrink: 0;
}

/* ── Theme switcher ─────────────────────────────────────────── */
.theme-switcher {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.theme-toggle-btn {
  background: var(--brand);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-pill);
  padding: 10px 18px;
  font-size: .84rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.theme-toggle-btn:hover { filter: brightness(1.1); }

.theme-panel {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow-lg);
  display: none;
  width: 260px;
}

.theme-panel.open { display: block; }

.theme-panel h4 {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}

.theme-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.theme-swatch {
  border: 2px solid transparent;
  border-radius: var(--radius);
  padding: 8px 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .8rem;
  font-weight: 600;
  transition: border-color .15s, transform .1s;
  background: var(--bg);
  color: var(--text);
}

.theme-swatch:hover { transform: scale(1.03); }
.theme-swatch.selected { border-color: var(--brand); }

.swatch-dot {
  width: 14px; height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 2px solid rgba(0,0,0,.1);
}

/* ── Footer ─────────────────────────────────────────────────── */
footer {
  text-align: center;
  padding: 32px 24px;
  color: var(--muted);
  font-size: .82rem;
  border-top: 1px solid var(--border);
  margin-top: 48px;
}

/* ── Price alert sign-up ─────────────────────────────────────── */
.alert-signup {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
  border-radius: var(--radius);
  padding: 28px 32px;
  margin: 32px 0 24px;
  color: #fff;
}

.alert-signup-inner {
  display: flex;
  align-items: flex-start;
  gap: 32px;
  flex-wrap: wrap;
}

.alert-signup-text { flex: 1; min-width: 200px; }

.alert-signup-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.alert-signup-sub {
  font-size: .9rem;
  opacity: .85;
  line-height: 1.5;
}

.alert-signup-form { flex: 2; min-width: 260px; }

/* ── Selects row: peptide / size / target price ── */
.alert-selects-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
  align-items: center;
}

.alert-select {
  flex: 1;
  min-width: 120px;
  padding: 9px 10px;
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,.35);
  background: rgba(255,255,255,.15);
  color: #fff;
  font-size: .88rem;
  cursor: pointer;
  outline: none;
  appearance: auto;
}
.alert-select option { background: #1e3d2a; color: #fff; }
.alert-select:disabled { opacity: .45; cursor: not-allowed; }
.alert-select:focus { box-shadow: 0 0 0 2px rgba(255,255,255,.4); }

.alert-price-wrap {
  display: flex;
  align-items: center;
  gap: 3px;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.35);
  border-radius: var(--radius);
  padding: 0 10px;
  flex-shrink: 0;
}
.alert-dollar { font-weight: 700; font-size: 1rem; color: #fff; }
.alert-price-input {
  width: 68px;
  background: transparent;
  border: none;
  color: #fff;
  font-size: .88rem;
  padding: 9px 0;
  outline: none;
}
.alert-price-input::placeholder { color: rgba(255,255,255,.55); }
.alert-price-input::-webkit-inner-spin-button,
.alert-price-input::-webkit-outer-spin-button { opacity: .5; }

/* ── Article guide link shown below price tables ── */
.article-guide-link {
  margin-top: 18px;
  padding: 13px 18px;
  background: #f0f7f3;
  border: 1px solid #b8dfc9;
  border-radius: var(--radius);
  font-size: .9rem;
  color: var(--text);
}
.article-guide-link a {
  color: var(--brand);
  font-weight: 700;
  text-decoration: none;
}
.article-guide-link a:hover { text-decoration: underline; }

.alert-input-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.alert-email-input {
  flex: 1;
  min-width: 200px;
  padding: 10px 14px;
  border-radius: var(--radius);
  border: none;
  font-size: .95rem;
  background: rgba(255,255,255,.95);
  color: var(--text);
  outline: none;
}

.alert-email-input:focus { box-shadow: 0 0 0 3px rgba(255,255,255,.4); }

.alert-submit-btn {
  padding: 10px 22px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: .95rem;
  cursor: pointer;
  transition: opacity .15s;
  white-space: nowrap;
}

.alert-submit-btn:hover { opacity: .88; }

.alert-msg {
  margin-top: 10px;
  font-size: .88rem;
  padding: 8px 12px;
  border-radius: var(--radius);
  background: rgba(255,255,255,.2);
}

.alert-msg.error { background: rgba(200,50,50,.3); }

/* ── Peptide Supply cards ────────────────────────────────────── */
.supply-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  padding: 16px 0 8px;
}
.supply-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  border: 1px solid var(--border-color, #e0dcd6);
  border-radius: 10px;
  padding: 16px 12px;
  text-decoration: none;
  color: var(--text, #333);
  transition: border-color .15s, box-shadow .15s;
}
.supply-card:hover {
  border-color: var(--brand, #1a7a4a);
  box-shadow: 0 2px 8px rgba(26,122,74,.12);
}
.supply-card-size {
  font-size: .82rem;
  color: #666;
  margin-bottom: 6px;
  line-height: 1.4;
}
.supply-card-price {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--brand, #1a7a4a);
  margin-bottom: 10px;
}
.supply-card-btn {
  font-size: .78rem;
  font-weight: 700;
  background: #ff9900;
  color: #111;
  padding: 5px 12px;
  border-radius: 20px;
  white-space: nowrap;
}

/* ── Service cards (Yoga / Exercise / Technology) ───────────── */
.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.service-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

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

.service-name {
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--text);
}

.service-price {
  background: var(--brand-light);
  color: var(--brand-dark);
  border-radius: var(--radius-pill);
  padding: 3px 12px;
  font-size: .8rem;
  font-weight: 700;
  white-space: nowrap;
}

.service-best-for {
  font-size: .78rem;
  font-weight: 700;
  color: var(--brand);
  text-transform: uppercase;
  letter-spacing: .04em;
}

.service-tagline {
  font-size: .88rem;
  color: var(--muted);
  line-height: 1.55;
}

.service-features {
  margin: 4px 0 4px 18px;
  font-size: .85rem;
  color: var(--text);
  line-height: 1.85;
}

.service-btn {
  display: block;
  margin-top: auto;
  padding: 10px 18px;
  background: var(--brand);
  color: #fff;
  border-radius: var(--radius);
  text-decoration: none;
  font-size: .875rem;
  font-weight: 600;
  text-align: center;
  transition: filter .15s;
}

.service-btn:hover { filter: brightness(1.1); }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 680px) {
  .price-table th:nth-child(4),
  .price-table td:nth-child(4),
  .price-table th:nth-child(5),
  .price-table td:nth-child(5) { display: none; }

  .logo { font-size: 1.35rem; }
  .theme-switcher { bottom: 12px; right: 12px; }
}
