/* =========================================================
   Natural Medicine Index — shared stylesheet
   Extracted from beauty-final.html with adaptations:
   - Removed .product-num (no product numbering)
   - Removed Vol. styling assumptions (masthead right is now plain category label)
   - Added .subnav (secondary nav row with category links + All)
   - Added homepage styles: .home-hero, .categories-grid, .category-card, .category-cover
   ========================================================= */

:root {
  --bg: #f6f6f5;
  --card: #ffffff;
  --card-hover: #ffffff;
  --ink: #0a0a0a;
  --ink-soft: #4a4a4a;
  --muted: #8a8a8a;
  --rule: #e4e4e3;
  --accent: #0a0a0a;
  --soft-accent: #e8e8e7;
  --highlight: #f0f0ef;
  --benefit-bg: #f4f4f3;
}

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

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Outfit', sans-serif;
  font-weight: 300;
  line-height: 1.6;
  font-size: 15.5px;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
.serif { font-family: 'Tenor Sans', serif; }

/* ---------- Masthead ---------- */
.masthead {
  padding: 1.5rem 2.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--rule);
}
.masthead .brand {
  font-family: 'Tenor Sans', serif;
  font-size: 18px;
  letter-spacing: 0.04em;
}
.masthead .masthead-left,
.masthead .masthead-right {
  flex: 1;
  color: var(--muted);
}
.masthead .masthead-right {
  text-align: right;
}
.masthead a { color: var(--muted); transition: color 0.2s; }
.masthead a:hover { color: var(--ink); }

/* ---------- Sub-nav (categories + All) ---------- */
.subnav {
  border-bottom: 1px solid var(--rule);
  padding: 0.85rem 2.5rem;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.75rem;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.subnav a {
  color: var(--muted);
  transition: color 0.2s;
  white-space: nowrap;
}
.subnav a:hover,
.subnav a.is-active {
  color: var(--ink);
}

/* ---------- Hero ---------- */
.hero {
  max-width: 900px;
  margin: 0 auto;
  padding: 5rem 2rem 3rem;
  text-align: center;
}
.hero h1 {
  font-family: 'Tenor Sans', serif;
  font-weight: 400;
  font-size: clamp(2.8rem, 6vw, 4.5rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin-bottom: 1.25rem;
  color: var(--ink);
}
.hero-subhead {
  font-family: 'Tenor Sans', serif;
  font-style: italic;
  font-size: clamp(1.2rem, 2.2vw, 1.5rem);
  line-height: 1.4;
  color: var(--ink);
  max-width: 700px;
  margin: 0 auto 1.75rem;
  font-weight: 400;
}
.hero-dek {
  font-size: 1.05rem;
  color: var(--ink-soft);
  max-width: 580px;
  margin: 0 auto;
  line-height: 1.65;
  font-weight: 300;
}

/* ---------- Intro paragraph (category pages) ---------- */
.intro {
  max-width: 620px;
  margin: 0 auto 4rem;
  padding: 0 2rem;
  text-align: center;
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--ink-soft);
}
.intro p { margin-bottom: 1.25rem; }
.intro p:first-child::first-letter {
  font-family: 'Tenor Sans', serif;
  font-size: 3.5rem;
  float: left;
  line-height: 0.85;
  margin: 0.4rem 0.5rem 0 -0.15rem;
  color: var(--ink);
}

/* ---------- Section divider ---------- */
.section-tag {
  text-align: center;
  margin: 2rem auto 3rem;
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  max-width: 600px;
  padding: 0 2rem;
}
.section-tag::before, .section-tag::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--rule);
}

/* ---------- Product grid ---------- */
.products {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem 4rem;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.product {
  background: #ffffff;
  border: 1px solid var(--rule);
  border-radius: 24px;
  padding: 2rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  display: flex;
  flex-direction: column;
}
.product:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.1);
}

.product-image {
  aspect-ratio: 4/3;
  background: var(--soft-accent);
  border-radius: 16px;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  text-align: center;
  padding: 1rem;
  font-size: 12px;
  color: var(--muted);
  font-style: italic;
}
.product-image img { width: 100%; height: 100%; object-fit: cover; }

.product-head {
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  margin-bottom: 1rem;
}
.product-cat {
  display: inline-block;
  padding: 4px 12px;
  background: var(--ink);
  color: var(--bg);
  border-radius: 100px;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 500;
}

.product-brand {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.5rem;
  font-weight: 500;
}
.product h2 {
  font-family: 'Tenor Sans', serif;
  font-weight: 400;
  font-size: 1.6rem;
  line-height: 1.15;
  margin-bottom: 1.25rem;
  color: var(--ink);
}
.product-desc {
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--ink-soft);
  margin-bottom: 1.5rem;
}

/* Pull-quote */
.product-quote {
  position: relative;
  padding: 1.25rem 1.5rem 1.25rem 2.5rem;
  margin-bottom: 1.75rem;
  font-family: 'Tenor Sans', serif;
  font-style: italic;
  font-size: 1.05rem;
  line-height: 1.5;
  color: var(--ink);
  background: var(--benefit-bg);
  border: 1px solid var(--rule);
  border-radius: 12px;
}
.product-quote::before {
  content: '"';
  font-family: 'Tenor Sans', serif;
  font-size: 1.75rem;
  color: var(--ink);
  position: absolute;
  top: 0.85rem;
  left: 1rem;
  line-height: 1;
  opacity: 0.4;
  font-style: normal;
}

/* Benefits */
.benefits-summary { margin-bottom: 1.5rem; }
.benefits-summary .benefits-label {
  font-family: 'Tenor Sans', serif;
  font-style: italic;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 0.75rem;
}
.benefits-list { list-style: none; padding: 0; margin: 0; }
.benefits-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 5px 0;
  font-size: 14px;
  color: var(--ink);
  line-height: 1.45;
}
.benefits-list li::before {
  content: '—';
  color: var(--muted);
  flex-shrink: 0;
  line-height: 1.45;
}
.benefits-list li strong { font-weight: 500; }

/* Meta chips */
.product-meta {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
  margin-bottom: 1.5rem;
}
.meta-chip {
  display: flex;
  flex-direction: column;
  padding: 10px 12px;
  background: var(--benefit-bg);
  border-radius: 10px;
  text-align: center;
}
.meta-chip .label {
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
  font-weight: 500;
}
.meta-chip .value {
  color: var(--ink);
  font-weight: 500;
  font-size: 12px;
  line-height: 1.3;
}

/* Card footer */
.product-footer {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.product-price-cue {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.04em;
}
.shop-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0.85rem 1.5rem;
  background: var(--ink);
  color: var(--bg);
  border-radius: 100px;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 500;
  transition: all 0.3s ease;
  font-family: inherit;
  cursor: pointer;
  border: none;
}
.shop-btn:hover { background: #333; gap: 12px; }
.shop-btn::after { content: '→'; transition: transform 0.3s ease; }
.shop-btn:hover::after { transform: translateX(2px); }

/* ---------- Closing ---------- */
.closing {
  max-width: 700px;
  margin: 4rem auto 0;
  padding: 5rem 2rem 4rem;
  text-align: center;
  border-top: 1px solid var(--rule);
}
.closing-text {
  font-family: 'Tenor Sans', serif;
  font-size: 1.5rem;
  line-height: 1.5;
  color: var(--ink);
  margin-bottom: 2rem;
}
.closing-sig {
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
}

.footer-cta {
  text-align: center;
  padding: 3rem 2rem 6rem;
}
.footer-cta a {
  display: inline-block;
  padding: 1rem 2.5rem;
  border: 1px solid var(--ink);
  color: var(--ink);
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 11px;
  transition: all 0.3s ease;
}
.footer-cta a:hover { background: var(--ink); color: var(--bg); }

/* =========================================================
   Homepage — category grid
   ========================================================= */

.home-hero {
  max-width: 760px;
  margin: 0 auto;
  padding: 2.5rem 2rem 1.5rem;
  text-align: center;
}
.home-hero h1 {
  font-family: 'Tenor Sans', serif;
  font-weight: 400;
  font-size: clamp(1.9rem, 3.4vw, 2.6rem);
  line-height: 1.1;
  letter-spacing: -0.005em;
  margin-bottom: 0.6rem;
  color: var(--ink);
}
.home-hero .hero-subhead {
  font-size: clamp(0.95rem, 1.4vw, 1.05rem);
  line-height: 1.5;
  margin-bottom: 0.4rem;
}
.home-hero .hero-dek {
  font-size: 0.85rem;
  max-width: 520px;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.categories-grid {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0.5rem 1.5rem 3rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.category-card {
  background: #ffffff;
  border: 1px solid var(--rule);
  border-radius: 18px;
  padding: 1rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  display: flex;
  flex-direction: column;
  color: var(--ink);
}
.category-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.09);
}

.category-cover {
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  overflow: hidden;
  background: var(--soft-accent);
  margin-bottom: 1rem;
}
.category-cover-grid {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 2px;
  background: var(--rule);
}
.category-cover-grid > .tile {
  background: var(--soft-accent);
  overflow: hidden;
}
.category-cover-grid > .tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.category-card-body {
  padding: 0 0.15rem 0.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.category-card .category-eyebrow {
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}
.category-card h2 {
  font-family: 'Tenor Sans', serif;
  font-weight: 400;
  font-size: 1.15rem;
  line-height: 1.2;
  color: var(--ink);
}
.category-card .category-dek {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--ink-soft);
}
.category-card-footer {
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}
.category-card-footer .arrow { color: var(--ink); }

/* =========================================================
   Responsive — homepage grid scales 4 → 3 → 2 → 1
   ========================================================= */
@media (max-width: 1100px) {
  .categories-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 860px) {
  .categories-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .masthead { padding: 1rem 1.25rem; font-size: 11px; }
  .masthead .brand { font-size: 16px; }
  .subnav { padding: 0.65rem 1.25rem; gap: 1rem; font-size: 10px; letter-spacing: 0.18em; }

  .products { grid-template-columns: 1fr; }
  .categories-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; padding: 0.5rem 1rem 2rem; }

  .hero { padding: 3rem 1.5rem 2rem; }
  .home-hero { padding: 2rem 1.25rem 1.25rem; }
  .home-hero h1 { font-size: 1.7rem; }

  .category-card { padding: 0.75rem; border-radius: 14px; }
  .category-card h2 { font-size: 1rem; }
  .category-card .category-dek { display: none; }
  .category-card-body { gap: 0.25rem; }

  .product { padding: 1.5rem; }
  .product-meta { grid-template-columns: 1fr 1fr 1fr; gap: 4px; }
  .meta-chip { padding: 8px 6px; }
  .meta-chip .value { font-size: 11px; }
}
