/* ============================================================
   AI Affiliator — Base Stylesheet
   CSS Variables are injected by create_website.py at build time.
   Placeholders (VAR_*) are replaced with design token values.
   ============================================================ */

/* --- CSS Variables (Light Mode) --- */
:root {
  --color-primary: #2f7a3e;
  --color-secondary: #8fbf87;
  --color-accent: #f2a83b;
  --color-bg: #f6fbf2;
  --color-bg-alt: #f6fbf2_ALT;
  --color-text: #102a16;
  --color-text-light: #102a16_LIGHT;
  --color-border: #d7e8d6;
  --font-heading: 'Merriweather', sans-serif;
  --font-body: 'Open Sans', sans-serif;

  --max-width: 1200px;
  --content-width: 800px;
  --radius: 8px;
  --radius-sm: 4px;
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-lg: 0 4px 20px rgba(0,0,0,0.12);
  --transition: 0.2s ease;
  --star-color: #f59e0b;
  --star-empty: #d1d5db;
}

/* --- Dark Mode --- */
[data-theme="dark"] {
  --color-bg: #0b1a11;
  --color-bg-alt: #0b1a11_ALT;
  --color-text: #e6f6e9;
  --color-text-light: #e6f6e9_LIGHT;
  --color-border: #20321f;
  --shadow: 0 2px 8px rgba(0,0,0,0.3);
  --shadow-lg: 0 4px 20px rgba(0,0,0,0.4);
  --star-empty: #4b5563;
}

/* --- Accessibility --- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--color-accent); }
ul, ol { list-style: none; }
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--color-text);
  line-height: 1.3;
  margin-bottom: 0.5em;
}
h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); font-weight: 700; }
h2 { font-size: clamp(1.35rem, 3vw, 1.85rem); font-weight: 600; }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.4rem); font-weight: 600; }
h4 { font-size: 1.1rem; font-weight: 600; }
p { margin-bottom: 1em; }

/* --- Container --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0.75rem 0;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.logo-link { display: flex; align-items: center; text-decoration: none; flex-shrink: 0; }
.logo-text { font-family: var(--font-heading); font-size: clamp(1.1rem, 2.5vw, 1.5rem); font-weight: 700; color: var(--color-primary); white-space: nowrap; }
.logo-link:hover .logo-text { color: var(--color-accent); }
.nav-list {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}
.nav-list a {
  color: var(--color-text);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
  transition: border-color var(--transition), color var(--transition);
}
.nav-list a:hover { color: var(--color-primary); border-bottom-color: var(--color-primary); }
.header-actions { display: flex; align-items: center; gap: 0.75rem; }

/* Search */
.search-container { position: relative; }
.search-input {
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: var(--color-bg);
  color: var(--color-text);
  font-size: 0.875rem;
  width: 160px;
  transition: width 0.3s, border-color 0.2s;
}
.search-input::placeholder { color: var(--color-text-light); opacity: 0.8; }
.search-input:focus { width: 220px; border-color: var(--color-primary); outline: 2px solid var(--color-primary); outline-offset: 1px; }
/* Focus-visible for all interactive elements (keyboard accessibility) */
.btn:focus-visible,
.theme-toggle:focus-visible,
.mobile-menu-toggle:focus-visible,
.back-to-top:focus-visible,
.compare-modal-close:focus-visible,
.compare-clear-btn:focus-visible,
.compare-btn:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}
.search-results {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  width: 320px;
  max-height: 400px;
  overflow-y: auto;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  z-index: 1000;
  margin-top: 0.25rem;
}
.search-result-item {
  display: block;
  padding: 0.75rem 1rem;
  text-decoration: none;
  color: var(--color-text);
  border-bottom: 1px solid var(--color-border);
  transition: background 0.15s;
}
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: var(--color-bg-alt); }
.search-result-title { font-weight: 600; display: block; }
.search-result-excerpt { font-size: 0.8rem; color: var(--color-text-light); display: block; margin-top: 0.25rem; }
.search-no-results { padding: 1rem; text-align: center; color: var(--color-text-light); }
@media (max-width: 768px) {
  .search-input { width: 120px; }
  .search-input:focus { width: 160px; }
  .search-results { width: 280px; }
}

/* Theme Toggle */
.theme-toggle {
  background: none;
  border: 2px solid var(--color-border);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--color-text);
  transition: border-color var(--transition);
}
.theme-toggle:hover { border-color: var(--color-primary); }
[data-theme="light"] .theme-icon-dark { display: none; }
[data-theme="dark"] .theme-icon-light { display: none; }

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}
.hamburger {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  position: relative;
  transition: background var(--transition);
}
.hamburger::before, .hamburger::after {
  content: '';
  position: absolute;
  left: 0;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  transition: transform var(--transition);
}
.hamburger::before { top: -7px; }
.hamburger::after { top: 7px; }
/* Active hamburger */
.mobile-menu-toggle[aria-expanded="true"] .hamburger { background: transparent; }
.mobile-menu-toggle[aria-expanded="true"] .hamburger::before { top: 0; transform: rotate(45deg); }
.mobile-menu-toggle[aria-expanded="true"] .hamburger::after { top: 0; transform: rotate(-45deg); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  background: var(--color-bg-alt);
  padding: 4rem 0 3rem;
  text-align: center;
}
.hero-title {
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: 1rem;
  color: var(--color-primary);
}
.hero-subtitle {
  font-size: 1.25rem;
  color: var(--color-text-light);
  margin-bottom: 1.5rem;
  font-weight: 400;
}
.hero-intro { max-width: 700px; margin: 0 auto; font-size: 1.1rem; color: var(--color-text-light); }
.hero-cta {
  display: inline-block;
  margin-top: 1.5rem;
  padding: 0.75rem 2rem;
  font-size: 1.1rem;
  font-weight: 600;
}

/* ============================================================
   SECTIONS
   ============================================================ */
.section { padding: 3rem 0; }
.section-title {
  text-align: center;
  margin-bottom: 0.5rem;
}
.section-subtitle {
  text-align: center;
  color: var(--color-text-light);
  margin-bottom: 2rem;
}

/* Trust Grid */
.trust-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}
.trust-card {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  text-align: center;
}
.trust-icon { margin-bottom: 0.75rem; color: var(--color-primary); }
.trust-icon svg { width: 36px; height: 36px; }
.trust-card h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.trust-card p { color: var(--color-text-light); font-size: 0.95rem; margin-bottom: 0; }

/* Disclosure Banner */
.disclosure-banner {
  background: var(--color-bg-alt);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  padding: 1.5rem 0;
}
.disclosure-banner p { margin: 0; font-size: 0.9rem; color: var(--color-text-light); text-align: center; }

/* Content Grid (cards) */
.content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}
.content-card {
  display: flex;
  flex-direction: column;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
  color: var(--color-text);
}
.content-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
  color: var(--color-text);
}
.card-image { aspect-ratio: 16/9; overflow: hidden; }
.card-image img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 1.25rem; flex: 1; display: flex; flex-direction: column; }
.card-title { font-size: 1.15rem; margin-bottom: 0.5rem; }
.card-excerpt { color: var(--color-text-light); font-size: 0.9rem; flex: 1; }
.card-cta { color: var(--color-primary); font-weight: 600; font-size: 0.9rem; margin-top: 0.75rem; }

/* Empty state */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--color-text-light);
  border: 2px dashed var(--color-border);
  border-radius: var(--radius);
  grid-column: 1 / -1;
}

/* ============================================================
   BREADCRUMB
   ============================================================ */
.breadcrumb { margin: 1.5rem 0 1rem; font-size: 0.85rem; }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 0.25rem; }
.breadcrumb li { display: flex; align-items: center; }
.breadcrumb li:not(:last-child)::after { content: '/'; margin: 0 0.5rem; color: var(--color-text-light); }
.breadcrumb a { color: var(--color-text-light); }
.breadcrumb a:hover { color: var(--color-primary); }
.breadcrumb span[aria-current] { color: var(--color-text); font-weight: 500; }

/* ============================================================
   STATIC PAGES (About, Privacy, Terms, etc.)
   ============================================================ */
.page-container { max-width: var(--content-width); padding-top: 1rem; padding-bottom: 3rem; }
.static-page h1 { margin-bottom: 1.5rem; }
.page-body h2, .page-body h3 { margin-top: 1.5rem; }
.page-body ul, .page-body ol { margin: 0.5rem 0 1rem 1.5rem; list-style: disc; }
.page-body ol { list-style: decimal; }
.page-body li { margin-bottom: 0.35rem; }

/* ============================================================
   CONTENT PAGE (Product Reviews)
   ============================================================ */
.content-page-container { max-width: var(--max-width); padding: 1rem 1.5rem 3rem; overflow-wrap: break-word; word-wrap: break-word; }
.content-layout { display: grid; grid-template-columns: 1fr; gap: 2rem; }

/* Inline Disclosure */
.inline-disclosure { font-size: 0.85rem; color: var(--color-text-light); margin-bottom: 1rem; border-left: 3px solid var(--color-accent); padding-left: 0.75rem; }

/* Article Header */
.article-header { margin-bottom: 2rem; }
.article-intro { font-size: 1.05rem; color: var(--color-text-light); }
.article-meta { font-size: 0.85rem; color: var(--color-text-light); margin-top: 0.5rem; }

/* ============================================================
   STAR RATINGS (Fix #1)
   ============================================================ */
.stars, .stars-compact {
  display: inline-flex;
  gap: 1px;
  vertical-align: middle;
}
.star {
  color: var(--star-empty);
  font-size: 1rem;
  line-height: 1;
}
.star.filled { color: var(--star-color); }
.star.half {
  color: var(--star-color);
  opacity: 0.6;
}
.stars-compact .star { font-size: 0.8rem; }
.rating-value {
  font-weight: 600;
  font-size: 0.95rem;
  margin-left: 0.25rem;
}
.rating-text {
  font-weight: 600;
  font-size: 0.85rem;
  margin-left: 0.25rem;
}
.rating-num {
  font-weight: 600;
  font-size: 0.8rem;
  margin-left: 0.25rem;
}
.review-count {
  font-size: 0.8rem;
  color: var(--color-text-light);
  margin-left: 0.25rem;
}
.review-count-sm {
  font-size: 0.7rem;
  color: var(--color-text-light);
  margin-left: 0.15rem;
}
.rating-cell {
  white-space: nowrap;
  min-width: 120px;
}

/* Product Rating (in product block image column) */
.product-rating {
  margin-top: 0.75rem;
  text-align: center;
}
.product-rating .stars { justify-content: center; }
.product-rating .review-count { display: block; margin-top: 0.15rem; margin-left: 0; }

/* ============================================================
   QUICK ANSWER (Featured Snippet Optimization — Fix #5)
   ============================================================ */
.quick-answer {
  background: var(--color-bg-alt);
  border-left: 4px solid var(--color-accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
}
.quick-answer h2 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: var(--color-accent);
}
.quick-answer p {
  margin-bottom: 0;
  font-size: 1rem;
  line-height: 1.6;
}

/* ============================================================
   QUICK WINNERS (Enhanced — Fix #7)
   ============================================================ */
.quick-winners {
  background: var(--color-bg-alt);
  border: 2px solid var(--color-primary);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 2rem;
}
.quick-winners h2 { font-size: 1.2rem; margin-bottom: 0.75rem; color: var(--color-primary); }
.winners-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}
.winner-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-bg);
  color: var(--color-text);
  transition: box-shadow var(--transition), transform var(--transition);
}
.winner-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-1px);
  color: var(--color-text);
}
.winner-img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}
.winner-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}
.winner-label {
  background: var(--color-primary);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  align-self: flex-start;
}
.winner-title {
  font-weight: 500;
  font-size: 0.85rem;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.winner-rating { display: flex; align-items: center; flex-wrap: wrap; gap: 0.15rem; }
.winner-rating .stars { gap: 0; }
.winner-rating .star { font-size: 0.75rem; }

/* ============================================================
   COMPARISON TABLE (with Rating — Fix #6, scroll hint — Fix #12)
   ============================================================ */
.comparison-table-wrap { margin-bottom: 2rem; }
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  position: relative;
}
.scroll-hint {
  display: none;
  font-size: 0.75rem;
  color: var(--color-text-light);
  text-align: right;
  padding: 0.25rem 0.5rem;
  animation: scroll-hint-fade 2s ease-in-out infinite;
}
@keyframes scroll-hint-fade {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.comparison-table th, .comparison-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
  vertical-align: middle;
}
.comparison-table thead th { background: var(--color-bg-alt); font-weight: 600; white-space: nowrap; }
.comparison-table tbody tr:hover { background: var(--color-bg-alt); }
.product-name-cell { display: flex; align-items: center; gap: 0.75rem; min-width: 200px; }
.table-product-img { width: 60px; height: 60px; object-fit: contain; border-radius: var(--radius-sm); flex-shrink: 0; }
.price-tier {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-sm);
}
.tier-budget { background: #d4edda; color: #155724; }
.tier-mid, .tier-midrange { background: #fff3cd; color: #856404; }
.tier-premium { background: #f8d7da; color: #721c24; }
[data-theme="dark"] .tier-budget { background: #1a3d1a; color: #a8f0a8; }
[data-theme="dark"] .tier-mid, [data-theme="dark"] .tier-midrange { background: #3d3510; color: #ffe08a; }
[data-theme="dark"] .tier-premium { background: #3d1a1a; color: #ffb8b8; }

/* Compare Hint */
.compare-hint {
  font-size: 0.85rem;
  color: var(--color-text-light);
  margin-bottom: 0.5rem;
}

/* Compare Column */
.compare-col { width: 50px; text-align: center; }
.compare-col-label { font-size: 0.75rem; }
.compare-checkbox-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.compare-checkbox-label input {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.compare-checkbox-label input:focus-visible + .compare-checkbox-custom {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}
.compare-checkbox-custom {
  width: 20px;
  height: 20px;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-sm);
  transition: border-color var(--transition), background var(--transition);
  position: relative;
}
.compare-checkbox-label input:checked + .compare-checkbox-custom {
  background: var(--color-primary);
  border-color: var(--color-primary);
}
.compare-checkbox-label input:checked + .compare-checkbox-custom::after {
  content: '\2713';
  color: #fff;
  font-size: 0.8rem;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
.compare-checkbox-label:hover .compare-checkbox-custom { border-color: var(--color-primary); }
.comparison-table tr.compare-selected { background: var(--color-bg-alt); background: color-mix(in srgb, var(--color-primary) 8%, var(--color-bg)); }

/* Floating Compare Bar */
.compare-bar {
  position: fixed;
  bottom: -80px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-bg);
  border: 2px solid var(--color-primary);
  border-radius: var(--radius);
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: var(--shadow-lg);
  z-index: 90;
  transition: bottom 0.3s ease;
  font-size: 0.9rem;
  white-space: nowrap;
}
.compare-bar.visible { bottom: 5rem; }
.compare-clear-btn {
  background: transparent;
  color: var(--color-text-light);
  border: 1px solid var(--color-border);
}
.compare-clear-btn:hover { color: var(--color-text); border-color: var(--color-text-light); }

/* Compare Modal */
.compare-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  padding: 1rem;
}
.compare-modal-overlay.open { opacity: 1; visibility: visible; }
.compare-modal {
  background: var(--color-bg);
  border-radius: var(--radius);
  max-width: 960px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}
.compare-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  background: var(--color-bg);
  z-index: 1;
}
.compare-modal-header h2 { margin-bottom: 0; font-size: 1.2rem; }
.compare-modal-close {
  background: none;
  border: none;
  font-size: 1.75rem;
  cursor: pointer;
  color: var(--color-text-light);
  line-height: 1;
  padding: 0 0.25rem;
}
.compare-modal-close:hover { color: var(--color-text); }
.compare-modal-body { padding: 1.5rem; }

/* Compare Grid (inside modal) */
.compare-grid {
  display: grid;
  gap: 1.5rem;
}
.compare-cols-2 { grid-template-columns: 1fr 1fr; }
.compare-cols-3 { grid-template-columns: 1fr 1fr 1fr; }
.compare-product {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.compare-product-img {
  width: 120px;
  height: 120px;
  object-fit: contain;
  margin: 0 auto;
}
.compare-product-title {
  font-size: 0.95rem;
  text-align: center;
  margin-bottom: 0;
}
.compare-rating { text-align: center; }
.compare-tier { text-align: center; }
.compare-field { font-size: 0.85rem; }
.compare-field strong { display: block; margin-bottom: 0.25rem; font-size: 0.8rem; color: var(--color-text-light); text-transform: uppercase; letter-spacing: 0.5px; }
.compare-field p { margin-bottom: 0; }
.compare-specs, .compare-pros, .compare-cons { list-style: disc; padding-left: 1.25rem; margin: 0; }
.compare-specs li, .compare-pros li, .compare-cons li { margin-bottom: 0.2rem; font-size: 0.83rem; }
.text-pros { color: #28a745 !important; }
.text-cons { color: #dc3545 !important; }
[data-theme="dark"] .text-pros { color: #5cd87c !important; }
[data-theme="dark"] .text-cons { color: #f07080 !important; }
.compare-cta { width: 100%; margin-top: auto; text-align: center; }

/* Product Blocks */
.product-block {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 2rem;
}
.product-block h2 { margin-bottom: 1rem; }
.product-block-inner { display: grid; grid-template-columns: 200px 1fr; gap: 1.5rem; }
.content-article { max-width: var(--content-width); margin: 0 auto; }
.product-image-col { text-align: center; }
.product-info-col { min-width: 0; }
.product-img {
  width: 100%;
  max-width: 200px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  aspect-ratio: 1 / 1;
}
.product-summary { margin-bottom: 1rem; }
.product-specs ul { list-style: disc; padding-left: 1.25rem; margin-bottom: 1rem; }
.product-specs li { margin-bottom: 0.25rem; font-size: 0.9rem; }
.pros-cons { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem; }
.pros h4 { color: #28a745; }
.cons h4 { color: #dc3545; }
[data-theme="dark"] .pros h4 { color: #5cd87c; }
[data-theme="dark"] .cons h4 { color: #f07080; }
.pros ul, .cons ul { list-style: disc; padding-left: 1.25rem; }
.pros li, .cons li { font-size: 0.9rem; margin-bottom: 0.25rem; }
.product-best-for { margin-bottom: 1rem; font-size: 0.95rem; }

/* Buying Guide */
.buying-guide { margin-bottom: 2rem; }
.buying-guide h2, .buying-guide h3 { margin-top: 1.25rem; }
.buying-guide ul, .buying-guide ol { list-style: disc; padding-left: 1.25rem; margin: 0.5rem 0 1rem; }
.buying-guide ol { list-style: decimal; }
.buying-guide li { margin-bottom: 0.35rem; }

/* Decision Section */
.decision-section { margin-bottom: 2rem; }
.decision-section h3 { margin-top: 1.25rem; }
.decision-section p { margin-bottom: 0.75rem; }

/* Use Cases */
.use-cases-section { margin-bottom: 2rem; }
.use-cases-section h3 { margin-top: 1.25rem; }
.use-cases-section ul { list-style: none; padding: 0; }
.use-cases-section li { padding: 0.75rem 1rem; margin-bottom: 0.5rem; border-left: 3px solid var(--color-primary, #2563eb); background: var(--color-bg-alt, #f8f9fa); border-radius: 0 0.5rem 0.5rem 0; }

/* List styles for AI-generated content areas */
.article-intro ul, .article-intro ol,
.decision-section ul, .decision-section ol {
    list-style: disc;
    padding-left: 1.5rem;
    margin: 0.75rem 0;
}
.article-intro ol, .decision-section ol {
    list-style: decimal;
}

/* FAQ */
.faq-section { margin-bottom: 2rem; }
.faq-list { display: flex; flex-direction: column; gap: 0.5rem; }
.faq-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
}
.faq-item summary {
  padding: 1rem 1.25rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq-item summary::after { content: '+'; font-size: 1.2rem; color: var(--color-text-light); }
.faq-item[open] summary::after { content: '\2212'; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item p { padding: 0 1.25rem 1rem; color: var(--color-text-light); }

/* Related Content (injected by internal linking) */
.related-content {
  border-top: 1px solid var(--color-border);
  padding: 2rem 0;
  margin-top: 2rem;
}
.related-content h2 { font-size: 1.3rem; margin-bottom: 1rem; }
.related-links { display: flex; flex-direction: column; gap: 0.5rem; }
.related-links li { list-style: disc; margin-left: 1.25rem; }
.related-links a { font-weight: 500; }

/* ============================================================
   E-E-A-T SECTION (Fix #2)
   ============================================================ */
.eeat-section {
  background: var(--color-bg-alt);
  border-radius: var(--radius);
  padding: 1.5rem;
  font-size: 0.9rem;
  margin-top: 2rem;
  border-left: 4px solid var(--color-primary);
}
.eeat-methodology { margin-bottom: 1rem; }
.eeat-methodology h3 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
  color: var(--color-primary);
}
.eeat-methodology p { margin-bottom: 0; }
.eeat-author {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  margin: 0.75rem 0;
}
.eeat-author-name {
  font-weight: 600;
  margin-bottom: 0.15rem;
}
.eeat-author-bio {
  color: var(--color-text-light);
  font-size: 0.85rem;
  margin-bottom: 0;
}
.eeat-updated { margin-bottom: 0.25rem; }
.eeat-disclosure { color: var(--color-text-light); margin-bottom: 0.25rem; }
.eeat-data-note { color: var(--color-text-light); font-size: 0.8rem; margin-bottom: 0; }

/* ============================================================
   CATEGORY PAGE
   ============================================================ */
.category-header { margin-bottom: 2rem; }
.category-subtitle { color: var(--color-text-light); font-size: 1.1rem; font-weight: 400; margin-bottom: 0.5rem; }
.category-desc { color: var(--color-text-light); font-size: 1.05rem; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-block;
  padding: 0.65rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  text-align: center;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
  border: none;
  text-decoration: none;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--color-primary); color: #fff; }
.btn-primary:hover { background: var(--color-secondary); color: #fff; }
.btn-accent { background: var(--color-accent); color: #fff; }
.btn-sm { padding: 0.4rem 0.9rem; font-size: 0.8rem; }
.product-cta { margin-top: 0.5rem; }

/* ============================================================
   TOC SIDEBAR
   ============================================================ */
.toc-sidebar { display: none; }
.toc { position: sticky; top: 80px; }
.toc-title { font-size: 0.9rem; font-weight: 600; margin-bottom: 0.5rem; color: var(--color-text-light); }
.toc-list { display: flex; flex-direction: column; gap: 0.25rem; }
.toc-list li { font-size: 0.85rem; }
.toc-list a {
  color: var(--color-text-light);
  padding: 0.2rem 0;
  display: block;
  border-left: 2px solid transparent;
  padding-left: 0.75rem;
  transition: color var(--transition), border-color var(--transition);
}
.toc-list a:hover, .toc-list a.active {
  color: var(--color-primary);
  border-left-color: var(--color-primary);
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--color-bg-alt);
  border-top: 1px solid var(--color-border);
  padding: 3rem 0 1.5rem;
  margin-top: 3rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}
.footer-brand { font-family: var(--font-heading); font-weight: 700; font-size: 1.2rem; margin-bottom: 0.25rem; }
.footer-tagline { color: var(--color-text-light); font-size: 0.9rem; }
.footer-links h4 { font-size: 0.9rem; margin-bottom: 0.75rem; color: var(--color-text-light); }
.footer-links ul { display: flex; flex-direction: column; gap: 0.35rem; }
.footer-links a { color: var(--color-text-light); font-size: 0.9rem; }
.footer-links a:hover { color: var(--color-primary); }
.footer-bottom {
  border-top: 1px solid var(--color-border);
  padding-top: 1.5rem;
  text-align: center;
}
.footer-disclosure { font-size: 0.8rem; color: var(--color-text-light); margin-bottom: 0.5rem; }
.footer-copyright { font-size: 0.8rem; color: var(--color-text-light); }

/* ============================================================
   BACK TO TOP
   ============================================================ */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 1.3rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition), visibility var(--transition), transform var(--transition);
  z-index: 50;
  box-shadow: var(--shadow);
}
.back-to-top.visible { opacity: 1; visibility: visible; }
.back-to-top:hover { transform: translateY(-2px); background: var(--color-secondary); }

/* ============================================================
   404 ERROR PAGE
   ============================================================ */
.error-page {
  text-align: center;
  padding: 4rem 1rem;
}
.error-page h1 { font-size: 5rem; color: var(--color-primary); margin-bottom: 0.25rem; }
.error-page h2 { margin-bottom: 1rem; }
.error-page p { color: var(--color-text-light); margin-bottom: 2rem; }

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

/* Desktop: Show TOC sidebar */
@media (min-width: 1024px) {
  .content-layout { grid-template-columns: 220px 1fr; }
  .toc-sidebar { display: block; }
}

/* Tablet */
@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .product-block-inner { grid-template-columns: 1fr; }
  .product-img { max-width: 100%; }
  .pros-cons { grid-template-columns: 1fr; }
  .hero { padding: 3rem 0 2rem; }
  .winners-grid { grid-template-columns: 1fr; }
}

/* Mobile */
@media (max-width: 640px) {
  /* Mobile nav */
  .main-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    height: 100dvh;
    background: var(--color-bg);
    border-left: 1px solid var(--color-border);
    padding: 5rem 1.5rem 2rem;
    transition: right 0.3s ease;
    z-index: 99;
    box-shadow: var(--shadow-lg);
  }
  .main-nav.open { right: 0; }
  .nav-list { flex-direction: column; gap: 0.75rem; }
  .nav-list a { font-size: 1.1rem; padding: 0.5rem 0; }
  .mobile-menu-toggle { display: block; z-index: 101; }

  /* Smaller hero on mobile */
  .hero-title { font-size: 1.75rem; }

  /* Table scroll hint (Fix #12) */
  .comparison-table { min-width: 700px; }
  .scroll-hint { display: block; }

  /* Quick winners stack */
  .winner-img { width: 60px; height: 60px; }

  /* Compare modal: single column on mobile */
  .compare-cols-2, .compare-cols-3 { grid-template-columns: 1fr; }
  .compare-bar { left: 1rem; right: 1rem; transform: none; justify-content: center; }
  .compare-hint { display: none; }
}

/* ============================================================
   PRINT STYLESHEET (Fix #11)
   ============================================================ */
@media print {
  /* Hide non-essential elements */
  .site-header,
  .site-footer,
  .back-to-top,
  .toc-sidebar,
  .theme-toggle,
  .mobile-menu-toggle,
  .scroll-hint,
  .inline-disclosure,
  .hero-cta,
  .compare-bar,
  .compare-modal-overlay,
  .compare-col,
  .compare-hint { display: none !important; }

  /* Reset layout */
  body { color: #000; background: #fff; font-size: 12pt; line-height: 1.5; }
  .content-layout { display: block; }
  .container { max-width: 100%; padding: 0; }

  /* Ensure links show URLs */
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.8em; color: #666; }
  a.btn::after { content: none; } /* Don't show URL for CTA buttons */

  /* Product blocks print cleanly */
  .product-block { border: 1px solid #ccc; page-break-inside: avoid; }
  .product-block-inner { display: block; }
  .product-img { max-width: 120px; float: left; margin-right: 1rem; margin-bottom: 0.5rem; }
  .quick-winners, .quick-answer { border: 1px solid #ccc; }
  .comparison-table { font-size: 9pt; }
  .comparison-table th, .comparison-table td { padding: 0.3rem 0.5rem; }

  /* Show affiliate disclosure for print */
  .eeat-section { border: 1px solid #ccc; }
}
