:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --text: #0f172a;
  --muted: #475569;
  --border: #e2e8f0;
  --primary: #d9232e;
  --primary-dark: #b91c1c;
  --green: #15803d;
  --green-bg: #dcfce7;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}
.container { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 20;
}
.topbar-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
}
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--text); }
.brand-badge { font-size: 22px; }
.brand-name { font-weight: 800; font-size: 20px; letter-spacing: -0.02em; }
.brand-tag {
  font-size: 11px;
  font-weight: 700;
  background: #fee2e2;
  color: var(--primary-dark);
  padding: 2px 8px;
  border-radius: 999px;
}
.trust-pill {
  font-size: 13px;
  color: var(--green);
  background: var(--green-bg);
  padding: 6px 12px;
  border-radius: 999px;
}
.hero { padding: 32px 0 20px; }
.hero h1 { margin: 0 0 8px; font-size: 28px; }
.subtitle { margin: 0 0 18px; color: var(--muted); }
.search-row { display: flex; gap: 12px; flex-wrap: wrap; }
.search-row input {
  flex: 1;
  min-width: 240px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 15px;
}
.search-row select {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  font-size: 14px;
}
.category-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.tab-btn {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
}
.tab-btn.active {
  background: var(--text);
  color: #fff;
  border-color: var(--text);
}
.soon-badge {
  font-size: 11px;
  background: #fef3c7;
  color: #92400e;
  padding: 2px 6px;
  border-radius: 6px;
  margin-left: 6px;
}
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
  padding-bottom: 48px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
}
.card-brand { font-size: 12px; font-weight: 700; text-transform: uppercase; color: var(--muted); }
.card-title { margin: 4px 0; font-size: 17px; font-weight: 700; }
.card-meta { font-size: 13px; color: var(--muted); }
.price-box {
  background: #f1f5f9;
  border-radius: 10px;
  padding: 12px;
}
.best-price { font-size: 22px; font-weight: 800; color: var(--green); }
.best-store { font-size: 13px; color: var(--muted); }
.unit-pill {
  display: inline-block;
  margin-top: 6px;
  font-size: 12px;
  font-weight: 600;
  background: #e0f2fe;
  color: #0369a1;
  padding: 2px 8px;
  border-radius: 6px;
}
.btn-primary {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  display: inline-block;
}
.btn-primary:hover { background: var(--primary-dark); }
.modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 50;
}
.modal.hidden { display: none; }
.modal-card {
  background: var(--surface);
  border-radius: 16px;
  max-width: 780px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px;
  position: relative;
}
.modal-small { max-width: 440px; }
.modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: none;
  font-size: 26px;
  cursor: pointer;
  color: var(--muted);
}
.table-wrap { overflow-x: auto; }
.compare-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.compare-table th, .compare-table td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}
.chart-title { margin-top: 22px; }
.chart-wrap { height: 220px; }
.waitlist-form { display: flex; gap: 8px; margin-top: 12px; }
.waitlist-form input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
}
.waitlist-msg { margin-top: 10px; font-size: 14px; color: var(--green); }
.footer {
  border-top: 1px solid var(--border);
  padding: 20px 0;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}
