:root {
  --ink: #0f172a;
  --ink-soft: #475569;
  --ink-faint: #94a3b8;
  --bg: #f8fafc;
  --surface: #ffffff;
  --border: #e2e8f0;
  --accent: #2563eb;
  --accent-dark: #1d4ed8;
  --accent-soft: #eff6ff;
  --success-bg: #ecfdf5;
  --success-text: #047857;
  --danger-bg: #fef2f2;
  --danger-text: #b91c1c;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 1px 6px rgba(15, 23, 42, 0.04);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ---------- Header ---------- */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 40;
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 64px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 18px;
  flex-shrink: 0;
}
.main-nav {
  display: flex;
  gap: 24px;
  flex: 1;
}
.main-nav a {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-soft);
  padding: 8px 0;
  border-bottom: 2px solid transparent;
}
.main-nav a:hover, .main-nav a.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.header-search {
  display: flex;
  align-items: center;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 8px;
  width: 260px;
}
.header-search input {
  border: none;
  background: transparent;
  padding: 8px 4px;
  font-size: 14px;
  width: 100%;
  outline: none;
}
.header-search button {
  border: none;
  background: none;
  cursor: pointer;
  color: var(--ink-faint);
  display: flex;
  align-items: center;
}
.header-search-mobile { display: none; width: 100%; margin-top: 4px; }
.nav-toggle {
  display: none;
  border: none;
  background: none;
  cursor: pointer;
  color: var(--ink);
  padding: 8px;
  margin-left: auto;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn-primary { background: var(--accent); color: white; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-secondary { background: var(--surface); border-color: var(--border); color: var(--ink); }
.btn-secondary:hover { background: var(--bg); }
.btn-block { width: 100%; }
.btn-sm { padding: 6px 12px; font-size: 13px; }

/* ---------- Hero ---------- */
.hero {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 56px 0;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 48px;
  align-items: center;
}
.eyebrow {
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.hero h1 {
  font-size: 40px;
  line-height: 1.15;
  margin: 12px 0 16px;
}
.hero p.lead {
  color: var(--ink-soft);
  font-size: 16px;
  max-width: 480px;
}
.hero-actions { display: flex; gap: 12px; margin-top: 24px; }
.trust-stats {
  display: flex;
  gap: 32px;
  margin-top: 32px;
}
.trust-stats div { font-size: 22px; font-weight: 700; }
.trust-stats span { display: block; font-size: 12px; color: var(--ink-faint); font-weight: 500; margin-top: 2px; }

.hero-media {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg);
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-faint);
  border: 1px solid var(--border);
}
.hero-badge {
  position: absolute;
  bottom: 12px;
  left: 12px;
  background: white;
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  box-shadow: var(--shadow);
  font-size: 12px;
  font-weight: 700;
}

.trust-strip {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
}
.trust-strip .container {
  display: flex;
  gap: 32px;
  justify-content: center;
  flex-wrap: wrap;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-soft);
}

/* ---------- Sections ---------- */
section.section { padding: 48px 0; }
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 20px;
}
.section-header h2 { font-size: 22px; margin: 0; }
.section-header a { font-size: 14px; font-weight: 600; color: var(--accent); }

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
}
.category-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 12px;
  text-align: center;
}
.category-card .icon { font-size: 24px; margin-bottom: 8px; }
.category-card .name { font-weight: 600; font-size: 14px; }
.category-card .count { font-size: 12px; color: var(--ink-faint); }

/* ---------- Product cards ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.product-card .thumb {
  aspect-ratio: 4/3;
  background: var(--bg);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-faint);
}
.product-card .badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
}
.product-card .body { padding: 16px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.product-card .category-tag { font-size: 11px; text-transform: uppercase; letter-spacing: 0.03em; color: var(--ink-faint); font-weight: 700; }
.product-card .name { font-weight: 700; font-size: 15px; }
.stars { color: #f59e0b; letter-spacing: 1px; }
.score-text { font-size: 13px; color: var(--ink-soft); font-weight: 600; }
.product-card .desc { font-size: 13px; color: var(--ink-soft); }
.product-card .actions { margin-top: auto; padding-top: 12px; }

/* ---------- Comparison card ---------- */
.comparison-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.comparison-vs { display: flex; align-items: center; justify-content: center; gap: 16px; margin-bottom: 16px; }
.comparison-vs .mini { text-align: center; flex: 1; }
.comparison-vs .mini .thumb-sm { width: 56px; height: 56px; margin: 0 auto 6px; background: var(--bg); border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; }
.comparison-vs .vs-badge { width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: white; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; flex-shrink: 0; }

/* ---------- Deals ---------- */
.deal-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.deal-row:last-child { border-bottom: none; }
.deal-row .thumb-sm { width: 48px; height: 48px; background: var(--bg); border-radius: var(--radius-sm); flex-shrink: 0; }
.deal-row .info { flex: 1; min-width: 0; }
.deal-row .name { font-weight: 600; font-size: 14px; }
.price-old { text-decoration: line-through; color: var(--ink-faint); font-size: 12px; }
.price-new { font-weight: 700; }
.discount-badge { background: var(--success-bg); color: var(--success-text); font-size: 11px; font-weight: 700; padding: 2px 6px; border-radius: 4px; }

/* ---------- Cards / panels ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.panel-dark {
  background: var(--ink);
  color: white;
  border-radius: var(--radius);
  padding: 24px;
}
.panel-dark p { color: #cbd5e1; }

/* ---------- Newsletter ---------- */
.newsletter-banner {
  background: #111827;
  color: white;
  border-radius: var(--radius);
  padding: 40px;
  text-align: center;
}
.newsletter-form { display: flex; gap: 8px; max-width: 420px; margin: 20px auto 0; }
.newsletter-form input { flex: 1; padding: 10px 14px; border-radius: var(--radius-sm); border: 1px solid #374151; background: #1f2937; color: white; }
.newsletter-status { font-size: 13px; margin-top: 8px; color: #a7f3d0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--surface); border-top: 1px solid var(--border); margin-top: 48px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; padding: 40px 24px; }
.footer-brand p { color: var(--ink-soft); font-size: 13px; max-width: 260px; }
.footer-col h4 { font-size: 13px; margin-bottom: 12px; }
.footer-col a { display: block; font-size: 13px; color: var(--ink-soft); margin-bottom: 8px; }
.footer-bottom { border-top: 1px solid var(--border); padding: 16px 24px; text-align: center; font-size: 12px; color: var(--ink-faint); }

/* ---------- Product detail page ---------- */
.breadcrumb { font-size: 13px; color: var(--ink-faint); margin-bottom: 16px; }
.product-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.gallery-main { aspect-ratio: 1; background: var(--bg); border-radius: var(--radius); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; color: var(--ink-faint); }
.score-badge-lg { display: flex; align-items: center; gap: 12px; }
.score-circle { width: 64px; height: 64px; border-radius: 50%; background: var(--ink); color: white; display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 700; flex-shrink: 0; }
.score-bars { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.score-bar-row { font-size: 13px; }
.score-bar-track { height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; margin-top: 4px; }
.score-bar-fill { height: 100%; background: var(--accent); }
.pros-cons-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 20px; }
.pros-box, .cons-box { border-radius: var(--radius); padding: 16px; }
.pros-box { background: var(--success-bg); }
.cons-box { background: var(--danger-bg); }
.pros-box h4 { color: var(--success-text); margin: 0 0 8px; }
.cons-box h4 { color: var(--danger-text); margin: 0 0 8px; }
.pros-box ul, .cons-box ul { margin: 0; padding-left: 18px; font-size: 14px; }

.spec-table { width: 100%; border-collapse: collapse; }
.spec-table td { padding: 12px; border-bottom: 1px solid var(--border); font-size: 14px; }
.spec-table td:first-child { color: var(--ink-soft); width: 40%; }

.offer-row { display: flex; align-items: center; justify-content: space-between; padding: 16px; border-bottom: 1px solid var(--border); }
.offer-row:last-child { border-bottom: none; }
.price-tag { font-weight: 700; margin-right: 4px; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 24px; }
.tab-btn { padding: 10px 16px; font-size: 14px; font-weight: 600; color: var(--ink-soft); border-bottom: 2px solid transparent; cursor: pointer; background: none; border-top: none; border-left: none; border-right: none; }
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

.review-content { font-size: 15px; line-height: 1.75; }
.review-content h2 { font-size: 20px; margin-top: 28px; }
.review-content blockquote { border-left: 3px solid var(--accent); padding-left: 16px; color: var(--ink-soft); font-style: italic; margin: 20px 0; }

/* ---------- Comparison page ---------- */
.compare-header { text-align: center; max-width: 600px; margin: 0 auto 32px; }
.compare-products { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.compare-product-card { text-align: center; padding: 24px; }
.compare-product-card .thumb-lg { width: 140px; height: 140px; margin: 0 auto 12px; background: var(--bg); border-radius: var(--radius); }

.bench-row { margin-bottom: 20px; }
.bench-labels { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 4px; }
.bench-track { height: 8px; background: var(--border); border-radius: 4px; display: flex; overflow: hidden; }
.bench-a { background: var(--accent); }
.bench-b { background: var(--ink-faint); }

.faq-item { border-bottom: 1px solid var(--border); }
.faq-question { padding: 16px 0; font-weight: 600; cursor: pointer; display: flex; justify-content: space-between; }
.faq-answer { padding-bottom: 16px; color: var(--ink-soft); font-size: 14px; display: none; }
.faq-item.open .faq-answer { display: block; }

/* ---------- Utility ---------- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.text-center { text-align: center; }
.mt-2 { margin-top: 32px; }
.mb-2 { margin-bottom: 32px; }
.muted { color: var(--ink-soft); }
.prose { max-width: 720px; margin: 0 auto; font-size: 15px; line-height: 1.75; }
.prose h1 { font-size: 28px; }
.prose h2 { font-size: 20px; margin-top: 28px; }

@media (max-width: 860px) {
  .header-inner { flex-wrap: wrap; height: auto; padding: 10px 0; gap: 12px; }
  .nav-toggle { display: flex; }
  .header-search-desktop { display: none; }
  .main-nav {
    display: none;
    flex-direction: column;
    width: 100%;
    gap: 4px;
    order: 3;
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 10px 4px; border-bottom: 1px solid var(--border); }
  .header-search-mobile { display: flex; }

  .hero-grid, .product-detail-grid, .compare-products, .grid-2 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; padding: 32px 20px; }
  .trust-stats { gap: 20px; }
  .hero h1 { font-size: 28px; }
  .container { padding: 0 16px; }
  .spec-table { display: block; overflow-x: auto; white-space: nowrap; }
  .offer-row { flex-wrap: wrap; gap: 10px; }
  .tabs { overflow-x: auto; white-space: nowrap; }
}

@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .product-grid { grid-template-columns: 1fr; }
  .trust-strip .container { gap: 14px; font-size: 12px; justify-content: flex-start; }
  .compare-header h1 { font-size: 22px; }
  .score-bars { grid-template-columns: 1fr; }
  .pros-cons-grid { grid-template-columns: 1fr; }
}
