/* === RESET & BASE === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #000;
  --bg-surface: #0a0a0a;
  --bg-card: #111;
  --fg: #fff;
  --fg-muted: #666;
  --fg-dim: #333;
  --border: #2a2a2a;
  --border-bright: #444;
  --font: 'Geist Mono', 'Fira Code', monospace;
  --font-size: 14px;
  --line-height: 1.7;
}

html {
  scroll-behavior: smooth;
  font-size: var(--font-size);
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: var(--font-size);
  line-height: var(--line-height);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--fg); text-decoration: none; }
a:hover { text-decoration: underline; }

/* === NAVBAR === */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 48px;
  height: 56px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 100;
}

.nav-logo {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--fg);
  display: flex;
  align-items: center;
  gap: 0;
}

.nav-logo .logo-prefix {
  color: var(--fg-muted);
  font-weight: 400;
}

.nav-logo .logo-cursor {
  display: inline-block;
  width: 8px;
  height: 14px;
  background: var(--fg);
  margin-left: 2px;
  vertical-align: middle;
  animation: blink 1.2s step-end infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.nav-tagline {
  font-size: 11px;
  color: var(--fg-muted);
  letter-spacing: 0.5px;
  font-family: var(--font);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-link {
  font-size: 11px;
  color: var(--fg-muted);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.nav-link:hover { color: var(--fg); text-decoration: none; }

/* === HERO === */
.hero {
  padding: 80px 48px 64px;
  border-bottom: 1px solid var(--border);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  margin-bottom: 64px;
}

.hero-eyebrow {
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: 20px;
}

.hero-eyebrow::before {
  content: '// ';
}

.hero-headline {
  font-size: clamp(36px, 4.5vw, 56px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -1px;
  color: var(--fg);
  margin-bottom: 24px;
}

.hero-headline em {
  font-style: normal;
  color: var(--fg-muted);
}

.hero-sub {
  font-size: 13px;
  color: var(--fg-muted);
  max-width: 380px;
  line-height: 1.8;
}

/* Hero visual — terminal window */
.hero-visual {
  background: var(--bg-surface);
  border: 1px solid var(--border-bright);
  padding: 0;
  overflow: hidden;
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
}

.term-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--fg-dim);
}

.term-dot.active { background: var(--fg-muted); }

.term-title {
  font-size: 11px;
  color: var(--fg-muted);
  margin-left: 6px;
}

.terminal-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.term-line {
  display: flex;
  align-items: center;
  gap: 8px;
}

.term-prompt {
  color: var(--fg-muted);
  font-size: 12px;
  white-space: nowrap;
}

.term-cmd {
  font-size: 12px;
  color: var(--fg);
}

.term-cmd.muted { color: var(--fg-muted); }

.term-output {
  font-size: 11px;
  color: var(--fg-muted);
  padding-left: 0;
}

/* Hero stats */
.hero-stats {
  display: flex;
  align-items: center;
  gap: 0;
  border-top: 1px solid var(--border);
  padding-top: 40px;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-right: 48px;
}

.stat-num {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--fg);
}

.stat-label {
  font-size: 10px;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.stat-divider {
  width: 1px;
  height: 36px;
  background: var(--border);
  margin-right: 48px;
}

/* === CATEGORY STRIP === */
.category-strip {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 20px 48px;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  scrollbar-width: none;
}

.category-strip::-webkit-scrollbar { display: none; }

.strip-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--fg-muted);
  white-space: nowrap;
}

.strip-cats {
  display: flex;
  gap: 8px;
  align-items: center;
}

.cat-btn {
  font-family: var(--font);
  font-size: 11px;
  padding: 6px 16px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--fg-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.1s ease;
  letter-spacing: 0.5px;
}

.cat-btn:hover {
  border-color: var(--fg-muted);
  color: var(--fg);
}

.cat-btn.active {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
}

/* === PRODUCT GRID === */
.product-grid-section {
  padding: 72px 48px;
  border-bottom: 1px solid var(--border);
}

.section-header {
  margin-bottom: 40px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.section-title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}

.section-title::before {
  content: '# ';
  color: var(--fg-muted);
  font-weight: 400;
}

.section-sub {
  font-size: 11px;
  color: var(--fg-muted);
}

.section-count {
  font-size: 11px;
  color: var(--fg-muted);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}

.product-card {
  background: var(--bg);
  padding: 0;
  transition: background 0.1s ease;
}

.product-card:hover {
  background: var(--bg-card);
  text-decoration: none;
}

.product-img {
  width: 100%;
  aspect-ratio: 5/4;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--border);
}

.product-info {
  padding: 16px 18px 20px;
}

.product-cat {
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: 6px;
}

.product-name {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
  letter-spacing: -0.2px;
}

.product-desc {
  font-size: 11px;
  color: var(--fg-muted);
  margin-bottom: 10px;
  line-height: 1.5;
}

.product-price {
  font-size: 12px;
  font-weight: 600;
  color: var(--fg);
}

.product-score {
  display: inline-block;
  font-size: 10px;
  color: var(--fg-muted);
  margin-left: 8px;
}

/* === BEST OF SECTION (inline) === */
.best-of-section {
  padding: 80px 48px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
}

.best-of-inner {
  max-width: 700px;
  margin: 0 auto;
}

.best-of-label {
  font-size: 10px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: 16px;
}

.best-of-label::before {
  content: '> ';
}

.best-of-title {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -1px;
  line-height: 1.1;
  margin-bottom: 40px;
}

.best-of-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid var(--border);
}

.best-of-item {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}

.best-rank {
  font-size: 12px;
  color: var(--fg-dim);
  min-width: 32px;
  font-weight: 700;
}

.best-info { flex: 1; }

.best-name {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 2px;
}

.best-cat {
  font-size: 11px;
  color: var(--fg-muted);
}

.best-price {
  font-size: 12px;
  color: var(--fg-muted);
}

.best-of-note {
  margin-top: 24px;
  font-size: 11px;
  color: var(--fg-muted);
}

/* === PHILOSOPHY === */
.philosophy-section {
  padding: 72px 48px;
  border-bottom: 1px solid var(--border);
}

.philosophy-inner {
  max-width: 760px;
  margin: 0 auto;
}

.philosophy-mark {
  font-size: 32px;
  color: var(--fg-dim);
  line-height: 1;
  margin-bottom: 24px;
}

.philosophy-quote {
  font-size: 18px;
  font-weight: 500;
  line-height: 1.55;
  color: var(--fg);
  letter-spacing: -0.3px;
  margin-bottom: 40px;
  font-style: normal;
}

.philosophy-rule {
  width: 40px;
  height: 1px;
  background: var(--fg-muted);
  margin-bottom: 40px;
}

.philosophy-points {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

.point-title {
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.point-desc {
  font-size: 12px;
  color: var(--fg-muted);
  line-height: 1.7;
}

/* === CLOSING === */
.closing-section {
  padding: 96px 48px;
  border-bottom: 1px solid var(--border);
}

.closing-inner {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
}

.closing-headline {
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 1.2;
  margin-bottom: 16px;
}

.closing-sub {
  font-size: 13px;
  color: var(--fg-muted);
  margin-bottom: 40px;
  line-height: 1.7;
}

.cta-label {
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: 16px;
}

.cta-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.cta-tag {
  font-size: 12px;
  padding: 8px 18px;
  border: 1px solid var(--border);
  color: var(--fg-muted);
  transition: all 0.1s ease;
}

.cta-tag:hover {
  border-color: var(--fg-muted);
  color: var(--fg);
}

/* === FOOTER === */
.footer {
  padding: 56px 48px 40px;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--border);
}

.footer-logo {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.3px;
}

.footer-tagline {
  font-size: 11px;
  color: var(--fg-muted);
}

.footer-links {
  display: flex;
  gap: 60px;
}

.footer-col-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--fg-dim);
  margin-bottom: 16px;
}

.footer-link {
  display: block;
  font-size: 12px;
  color: var(--fg-muted);
  margin-bottom: 10px;
  transition: color 0.1s;
}

.footer-link:hover {
  color: var(--fg);
  text-decoration: none;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
}

.footer-disclaimer {
  font-size: 10px;
  color: var(--fg-dim);
  max-width: 480px;
}

.footer-copy {
  font-size: 11px;
  color: var(--fg-dim);
  white-space: nowrap;
}

/* === PRODUCT DETAIL === */
.product-detail {
  max-width: 1100px;
  margin: 0 auto;
  padding: 60px 48px 100px;
}

.detail-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
  margin-bottom: 80px;
}

.detail-image-wrap {
  position: sticky;
  top: 80px;
}

.detail-image {
  width: 100%;
  aspect-ratio: 4/3;
  border: 1px solid var(--border);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.detail-rank {
  margin-top: 12px;
}

.rank-badge {
  display: inline-block;
  font-size: 11px;
  padding: 4px 10px;
  border: 1px solid var(--border-bright);
  color: var(--fg-muted);
  letter-spacing: 0.5px;
}

.detail-cat {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: 10px;
}

.detail-name {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 1.1;
  margin-bottom: 14px;
}

.detail-price {
  font-size: 18px;
  color: var(--fg-muted);
  margin-bottom: 28px;
}

.detail-desc {
  font-size: 13px;
  line-height: 1.8;
  color: var(--fg-muted);
  margin-bottom: 32px;
}

.detail-features { margin-bottom: 36px; }

.features-label {
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: 12px;
  font-weight: 700;
}

.features-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.features-list li {
  font-size: 13px;
  color: var(--fg);
  padding-left: 16px;
  position: relative;
  line-height: 1.5;
}

.features-list li::before {
  content: '+';
  position: absolute;
  left: 0;
  color: var(--fg-muted);
}

.detail-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-start;
}

.btn-amazon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 700;
  padding: 12px 24px;
  background: var(--fg);
  color: var(--bg);
  text-decoration: none;
  letter-spacing: 0.5px;
  transition: opacity 0.1s ease;
}

.btn-amazon:hover {
  opacity: 0.85;
  text-decoration: none;
}

.btn-back {
  font-size: 12px;
  color: var(--fg-muted);
  text-decoration: none;
}

.btn-back:hover {
  color: var(--fg);
}

.related-section {
  border-top: 1px solid var(--border);
  padding-top: 56px;
}

.related-header {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 24px;
  letter-spacing: -0.3px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}

/* === BEST OF PAGE === */
.best-of-page {
  max-width: 860px;
  margin: 0 auto;
  padding: 80px 48px 100px;
}

.best-page-header {
  margin-bottom: 56px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--border);
}

.best-page-eyebrow {
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: 16px;
}

.best-page-eyebrow::before { content: '> '; }

.best-page-title {
  font-size: 44px;
  font-weight: 700;
  letter-spacing: -1px;
  line-height: 1.05;
  margin-bottom: 16px;
}

.best-page-sub {
  font-size: 13px;
  color: var(--fg-muted);
  line-height: 1.7;
  max-width: 440px;
}

.best-page-table {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid var(--border);
}

.rank-row {
  display: grid;
  grid-template-columns: 48px 56px 1fr 56px 100px 24px;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  color: var(--fg);
  transition: background 0.1s;
}

.rank-row:hover {
  background: var(--bg-surface);
  padding-left: 12px;
  padding-right: 12px;
  margin-left: -12px;
  margin-right: -12px;
}

.rank-num {
  font-size: 12px;
  font-weight: 700;
  color: var(--fg-dim);
}

.rank-thumb {
  width: 56px;
  height: 44px;
  border: 1px solid var(--border);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.rank-info { min-width: 0; }

.rank-name {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 2px;
}

.rank-cat {
  font-size: 11px;
  color: var(--fg-muted);
}

.rank-score {
  font-size: 12px;
  font-weight: 600;
  color: var(--fg-muted);
}

.rank-price {
  font-size: 12px;
  color: var(--fg-muted);
  text-align: right;
}

.rank-arrow {
  font-size: 14px;
  color: var(--fg-dim);
  text-align: right;
}

.best-page-footer {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

/* === 404 === */
.not-found-page {
  max-width: 480px;
  margin: 0 auto;
  padding: 120px 48px;
}

.not-found-code {
  font-size: 72px;
  font-weight: 700;
  letter-spacing: -4px;
  color: var(--fg-dim);
  margin-bottom: 16px;
}

.not-found-title {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 12px;
}

.not-found-sub {
  font-size: 13px;
  color: var(--fg-muted);
  margin-bottom: 36px;
}

/* === EMPTY STATE === */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 0;
  font-size: 13px;
  color: var(--fg-muted);
}

/* === RESPONSIVE === */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-visual { display: none; }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .philosophy-points { grid-template-columns: 1fr; gap: 24px; }
  .footer-inner { flex-direction: column; gap: 36px; }
  .footer-bottom { flex-direction: column; }
  .detail-container { grid-template-columns: 1fr; gap: 40px; }
  .detail-image-wrap { position: static; }
  .related-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .navbar, .hero, .product-grid-section, .best-of-section,
  .philosophy-section, .closing-section, .footer,
  .product-detail, .best-of-page {
    padding-left: 24px;
    padding-right: 24px;
  }
  .category-strip { padding-left: 24px; padding-right: 24px; }
  .product-grid { grid-template-columns: 1fr; }
  .stat-divider { display: none; }
  .hero-stats { flex-wrap: wrap; gap: 20px; }
  .footer-links { flex-direction: column; gap: 28px; }
  .rank-row { grid-template-columns: 36px 48px 1fr; }
  .rank-price, .rank-arrow { display: none; }
  .best-page-title { font-size: 32px; }
  .detail-name { font-size: 24px; }
  .related-grid { grid-template-columns: 1fr; }
  .nav-right { display: none; }
  .section-header { flex-direction: column; gap: 4px; }
}