/* ================================================================
   BUYING GUIDE PAGE — page-specific overrides
   Shared reading-page overrides live in styles-reading.css
   ================================================================ */

/* ---- Typography: page-specific ---- */

.buying-guide-page .section-title {
  font-size: 1.35rem;
  line-height: 1.25;
  letter-spacing: 0;
  color: var(--text);
}

.buying-guide-page .hero h1 {
  font-family: 'Outfit', sans-serif;
  letter-spacing: 0;
  font-size: 2.2rem;
  line-height: 1.05;
  margin: 0 0 6px;
}

/* ---- Spacing: page-specific ---- */

.buying-guide-page .content-stack { gap: var(--space-6); }
.buying-guide-page .section-card,
.buying-guide-page .footer-card { padding: var(--space-6); }
.buying-guide-page .section-head { margin-bottom: var(--space-3); }
.buying-guide-page .callout-grid { gap: var(--space-5); }

.buying-guide-page .layout {
  gap: var(--space-6);
  margin-top: var(--space-4);
}

.buying-guide-page .layout,
.buying-guide-page .content-stack,
.buying-guide-page .section-card,
.buying-guide-page .fact-card,
.buying-guide-page .type-primer-card,
.buying-guide-page .type-card {
  min-width: 0;
}

/* Content block spacing inherited from styles-reading.css (.reading-page) */

/* ---- Card polish ---- */

.buying-guide-page .callout {
  border-radius: 12px;
}

.buying-guide-page .fact-card {
  border-radius: 10px;
  border: 1px solid var(--line);
}

/* ---- Section icon badges ---- */

.buying-guide-page .section-head .section-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 6px;
  border-radius: 6px;
  font-weight: 800;
}

.buying-guide-page .section-head .section-tag .material-symbols-outlined {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  font-size: 16px;
}

.buying-guide-page .section-head .section-tag .material-symbols-outlined {
  background: var(--surface-alt);
  color: var(--muted);
}

/* ---- Callout: page-specific (warning variant + callout icon badges) ---- */

.buying-guide-page .callout.warning {
  border-left: 1px solid var(--line);
  background: var(--surface);
  box-shadow: 0 4px 16px rgba(60, 64, 67, 0.05);
}

.buying-guide-page .callout.brand .section-tag { color: var(--accent); }
.buying-guide-page .callout.editorial .section-tag { color: var(--green); }
.buying-guide-page .callout.warning .section-tag { color: #d93025; }

.buying-guide-page .callout .section-tag .material-symbols-outlined {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  font-size: 14px;
}
.buying-guide-page .callout .section-tag .material-symbols-outlined {
  background: var(--surface-alt);
  color: var(--muted);
}

/* ---- Mattress type cards: single-column, unique accents ---- */

.buying-guide-page #types .callout-grid {
  grid-template-columns: 1fr;
}

.buying-guide-page .callout[class*="type-"] {
  border-left: 1px solid var(--line);
  background: var(--surface);
  box-shadow: 0 4px 16px rgba(60, 64, 67, 0.05);
}
.buying-guide-page .callout[class*="type-"] .section-tag { color: var(--type-color); }
.buying-guide-page .callout[class*="type-"] .section-tag .material-symbols-outlined {
  background: var(--type-icon-bg);
  color: var(--type-color);
}

.callout[class*="type-"] { --type-color: var(--muted); --type-icon-bg: var(--surface-alt); }

/* ---- Mattress type decision system ---- */

.buying-guide-page .type-primer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-4);
}

.buying-guide-page .type-primer-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--space-3);
  align-items: flex-start;
  padding: var(--space-4);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.buying-guide-page .type-primer-card > .material-symbols-outlined,
.buying-guide-page .type-card-head > .material-symbols-outlined {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--surface-alt);
  color: var(--muted);
  font-size: 18px;
  flex-shrink: 0;
}

.buying-guide-page .type-primer-card h3,
.buying-guide-page .type-card h3 {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.35;
  letter-spacing: 0;
}

.buying-guide-page .type-primer-card p,
.buying-guide-page .type-card-lede {
  margin: 4px 0 0;
  color: #3c4043;
  font-size: 0.88rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.buying-guide-page .type-decision-table {
  min-width: 980px;
}

.buying-guide-page .type-decision-table th:first-child,
.buying-guide-page .type-decision-table td:first-child {
  width: 130px;
}

.buying-guide-page .type-decision-table td,
.buying-guide-page .type-decision-table th {
  vertical-align: top;
}

.buying-guide-page .evidence-level {
  display: inline-flex;
  align-items: center;
  margin: 0 6px 2px 0;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.buying-guide-page .evidence-level--high { color: var(--green); background: var(--green-soft); }
.buying-guide-page .evidence-level--medium { color: var(--accent-strong); background: var(--accent-soft); }
.buying-guide-page .evidence-level--low { color: var(--amber); background: var(--amber-soft); }

.buying-guide-page .mattress-type-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-5);
}

.buying-guide-page .type-card {
  display: grid;
  align-content: start;
  gap: var(--space-4);
  padding: var(--space-5);
  border: 1px solid var(--line);
  border-top: 3px solid var(--type-color);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 4px 16px rgba(60, 64, 67, 0.05);
}

.buying-guide-page .type-card-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--space-3);
  align-items: start;
}

.buying-guide-page .type-card .section-tag {
  color: var(--type-color);
  margin-bottom: 4px;
}

.buying-guide-page .type-card-head > .material-symbols-outlined {
  background: var(--type-icon-bg);
  color: var(--type-color);
}

.buying-guide-page .type-spec-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  font-size: 0.84rem;
}

.buying-guide-page .type-spec-table th,
.buying-guide-page .type-spec-table td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  text-align: left;
  overflow-wrap: anywhere;
}

.buying-guide-page .type-spec-table tr:last-child th,
.buying-guide-page .type-spec-table tr:last-child td {
  border-bottom: 0;
}

.buying-guide-page .type-spec-table th {
  width: 118px;
  color: var(--muted);
  background: var(--surface-alt);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.buying-guide-page .type-card .fit-list li {
  font-size: 0.84rem;
  line-height: 1.55;
  margin-bottom: var(--space-2);
}

.buying-guide-page .organic-claim-table {
  min-width: 760px;
}

.buying-guide-page .type-memory-foam { --type-color: var(--accent); --type-icon-bg: var(--accent-soft); }
.buying-guide-page .type-innerspring { --type-color: #1a73e8; --type-icon-bg: #e8f0fe; }
.buying-guide-page .type-hybrid { --type-color: var(--green); --type-icon-bg: var(--green-soft); }
.buying-guide-page .type-latex { --type-color: #0e8c7c; --type-icon-bg: #e6f4f1; }
.buying-guide-page .type-airbed { --type-color: var(--amber); --type-icon-bg: var(--amber-soft); }

/* ---- List bullet variants ---- */

.buying-guide-page .fit-list.watch-list li::before { background: #d93025; }
.buying-guide-page .fit-list.good-list li::before { background: var(--green); }
.buying-guide-page .fit-list.neutral-list li::before { background: #9aa0a6; }

/* ---- Fact card headings ---- */

.buying-guide-page .fact-card h3 { font-size: 0.95rem; margin-bottom: 8px; }

/* ---- Key takeaway boxes ---- */

.buying-guide-page .key-takeaway {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  margin-top: var(--space-6);
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 4px 16px rgba(60, 64, 67, 0.05);
}
.buying-guide-page .key-takeaway .material-symbols-outlined {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--surface-alt);
  color: var(--muted);
  font-size: 18px;
  flex-shrink: 0;
}
.buying-guide-page .key-takeaway p { margin: 0; font-size: 0.9rem; line-height: 1.6; color: var(--text); font-weight: 600; }
.buying-guide-page .key-takeaway strong { color: var(--text); }

.buying-guide-page .key-takeaway.danger { background: var(--surface); border-color: var(--line); }
.buying-guide-page .key-takeaway.danger p { color: var(--text); }
.buying-guide-page .key-takeaway.danger strong { color: var(--text); }

.buying-guide-page .key-takeaway.success { background: var(--surface); border-color: var(--line); }
.buying-guide-page .key-takeaway.success p { color: var(--text); }
.buying-guide-page .key-takeaway.success strong { color: var(--text); }

/* ---- Checklist section ---- */

.buying-guide-page #checklist .fit-list li::before {
  content: "";
  width: 14px;
  height: 14px;
  border-radius: 4px;
  border: 2px solid var(--green);
  background: white;
  box-shadow: none;
  top: 0.45em;
}
.buying-guide-page #checklist .fit-list li { padding-left: 28px; }

/* ---- Hero highlights (buying guide specific) ---- */

.buying-guide-page .hero-highlights { padding: 0 28px var(--space-5); gap: var(--space-4); }
.buying-guide-page .highlight-card { padding: var(--space-4); border-radius: 12px; }
.buying-guide-page .highlight-head { width: 32px; height: 32px; border-radius: 8px; margin-bottom: 8px; }
.buying-guide-page .highlight-card h3 { font-size: 0.92rem; margin-bottom: 4px; }
.buying-guide-page .highlight-card p { font-size: 0.84rem; margin: 4px 0 0; line-height: 1.5; }

/* ---- Sticky bottom CTA ---- */

.buying-guide-page .sticky-cta-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 25;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-top: 1px solid rgba(224, 227, 231, 0.8);
  padding: var(--space-3) 0;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.buying-guide-page .sticky-cta-bar.visible { transform: translateY(0); }
.buying-guide-page .sticky-cta-inner { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); width: min(calc(100% - 32px), var(--shell)); margin: 0 auto; }
.buying-guide-page .sticky-cta-text { font-size: 0.84rem; font-weight: 600; color: var(--muted); }
.buying-guide-page .sticky-cta-text strong { color: var(--text); }
.buying-guide-page .sticky-cta-actions { display: flex; gap: 8px; flex-shrink: 0; }
.buying-guide-page .sticky-cta-actions .button { min-height: 36px; padding: 0 16px; font-size: 0.84rem; border-radius: 999px; gap: 6px; }
.buying-guide-page .sticky-cta-actions .button .material-symbols-outlined { font-size: 16px; }

/* ---- Source card polish ---- */

.buying-guide-page .source-card h3 { font-size: 0.88rem; line-height: 1.4; margin: 4px 0 4px; }
.buying-guide-page .source-pill { font-size: 0.6rem; }

/* ---- Responsive: page-specific ---- */

@media (max-width: 920px) {
  .buying-guide-page .hero-highlights { padding: 0 20px var(--space-4); }
  .buying-guide-page .type-primer-grid,
  .buying-guide-page .mattress-type-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .buying-guide-page .hero-highlights { grid-template-columns: 1fr; padding: 0 var(--space-4) var(--space-4); gap: var(--space-2); }
  .buying-guide-page .section-title { font-size: 1.18rem; }
  .buying-guide-page .content-stack { gap: var(--space-5); }
  .buying-guide-page .type-primer-card,
  .buying-guide-page .type-card { padding: var(--space-4); }
  .buying-guide-page .type-spec-table th {
    width: 98px;
    word-break: break-word;
  }
  .buying-guide-page .sticky-cta-text { display: none; }
  .buying-guide-page .sticky-cta-actions { width: 100%; justify-content: center; }
  .buying-guide-page .sticky-cta-actions .button { flex: 1; }
}
