
:root {
  --bg: #08121b;
  --panel: rgba(12, 22, 34, 0.9);
  --line: rgba(148, 163, 184, 0.16);
  --ink: #eff5ff;
  --muted: #93a7c1;
  --accent: #61a8ff;
  --accent-soft: rgba(97, 168, 255, 0.14);
  --good: #2dd4bf;
  --gold: #fbbf24;
  --shadow: 0 24px 64px rgba(2, 8, 18, 0.42);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--ink);
  font-family: "Avenir Next", "Segoe UI", Helvetica, Arial, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(97, 168, 255, 0.16), transparent 28%),
    radial-gradient(circle at top right, rgba(45, 212, 191, 0.12), transparent 24%),
    linear-gradient(180deg, #08121b 0%, #0d1724 50%, #111d2a 100%);
}
.page {
  width: min(1220px, calc(100vw - 24px));
  margin: 16px auto 56px;
}
.hero, .search-shell, .panel, .result-card, .cart-chip, .store-card, .detail-card {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}
.hero {
  padding: 30px;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.8fr);
  gap: 18px;
}
.eyebrow {
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 11px;
  font-weight: 700;
}
h1, h2, h3, p { margin: 0; }
h1 {
  margin-top: 14px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 0.96;
  letter-spacing: -0.04em;
  max-width: 10ch;
}
h2 {
  font-size: clamp(24px, 3vw, 32px);
  letter-spacing: -0.03em;
}
.hero-copy p {
  margin-top: 16px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.6;
  max-width: 42rem;
}
.hero-versus {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.hero-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid rgba(97, 168, 255, 0.18);
  border-radius: 999px;
  background: rgba(255,255,255,0.04);
  font-size: 15px;
  font-weight: 700;
}
.hero-brand img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}
.hero-vs {
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.hero-card {
  padding: 16px 18px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(97, 168, 255, 0.12), rgba(255,255,255,0.03));
  border: 1px solid rgba(97, 168, 255, 0.18);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: center;
}
.hero-metric {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding-right: 12px;
  border-right: 1px solid rgba(148, 163, 184, 0.14);
}
.hero-metric:last-child {
  padding-right: 0;
  border-right: 0;
}
.hero-label, .section-note, .mini-copy, .store-meta, .detail-copy, .result-meta {
  color: var(--muted);
}
.hero-label {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.hero-value {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.search-shell {
  margin-top: 16px;
  padding: 22px;
}
.search-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 10px;
}
.search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
}
#item-search {
  width: 100%;
  min-height: 58px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(5, 10, 18, 0.64);
  color: var(--ink);
  padding: 0 18px;
  font: inherit;
  font-size: 17px;
}
button {
  appearance: none;
  border: 1px solid rgba(97, 168, 255, 0.3);
  background: var(--accent-soft);
  color: var(--ink);
  border-radius: 999px;
  min-height: 46px;
  padding: 0 16px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}
.filter-chip {
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.04);
  color: var(--muted);
}
.filter-chip.active {
  color: var(--ink);
  border-color: rgba(97, 168, 255, 0.3);
  background: var(--accent-soft);
}
.results-list, .cart-list, .item-detail-list, .store-summary {
  display: grid;
  gap: 12px;
}
.results-list { margin-top: 18px; }
.results-pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
}
.pager-meta {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}
.pager-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}
.pager-button {
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
}
.pager-button[disabled] {
  opacity: 0.45;
  cursor: default;
}
.result-card {
  padding: 16px;
  border-radius: 22px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  background: rgba(255,255,255,0.03);
}
.result-title, .store-name {
  font-size: 22px;
  font-weight: 700;
}
.result-card h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.result-copy {
  min-width: 0;
}
.result-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.result-toggle {
  min-height: 38px;
  padding: 0 12px;
}
.result-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}
.pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.pill.category { background: rgba(97, 168, 255, 0.12); color: #cfe1ff; }
.pill.coverage { background: rgba(45, 212, 191, 0.12); color: #9ef0e4; }
.result-detail-panel {
  grid-column: 1 / -1;
  display: grid;
  gap: 10px;
  margin-top: 6px;
  padding-top: 12px;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
}
.result-offer-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255,255,255,0.04);
}
.result-offer-store {
  font-size: 15px;
  font-weight: 700;
}
.result-offer-product {
  color: var(--muted);
  font-size: 13px;
  margin-top: 2px;
}
.result-offer-unit {
  font-size: 15px;
  font-weight: 700;
  text-align: right;
}
.result-offer-shelf {
  color: var(--muted);
  font-size: 13px;
  text-align: right;
}
.layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}
.panel {
  padding: 24px;
}
.panel-wide { margin-top: 16px; }
.section-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: end;
  margin-bottom: 18px;
}
.cart-empty, .detail-empty {
  padding: 20px;
  border-radius: 20px;
  background: rgba(255,255,255,0.03);
  color: var(--muted);
}
.cart-chip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 16px;
  border-radius: 20px;
  background: rgba(255,255,255,0.03);
}
.cart-chip h3, .detail-card h3 { font-size: 20px; }
.qty-controls {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.qty-button {
  min-width: 36px;
  padding: 0;
}
.qty-value {
  min-width: 22px;
  text-align: center;
  font-weight: 700;
  color: var(--ink);
}
.ghost {
  border-color: var(--line);
  background: rgba(255,255,255,0.04);
  color: var(--muted);
}
.store-card {
  padding: 18px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
}
.store-card.best {
  border-color: rgba(45, 212, 191, 0.28);
}
.store-rank {
  color: var(--gold);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.store-total {
  margin-top: 10px;
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.04em;
}
.detail-card {
  padding: 20px;
  border-radius: 22px;
}
.detail-copy { margin-top: 8px; line-height: 1.5; }
.offer-grid {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}
.offer-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255,255,255,0.04);
}
.offer-rank {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
}
.offer-store {
  font-size: 17px;
  font-weight: 700;
}
.offer-product {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
  margin-top: 4px;
}
.offer-price {
  text-align: right;
  font-weight: 700;
  font-size: 18px;
}
.offer-shelf {
  text-align: right;
  color: var(--muted);
  font-size: 14px;
}
@media (max-width: 900px) {
  .hero, .layout, .offer-row { grid-template-columns: 1fr; }
  .hero-card {
    grid-template-columns: 1fr;
  }
  .hero-metric {
    padding-right: 0;
    border-right: 0;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  }
  .hero-metric:last-child {
    padding-bottom: 0;
    border-bottom: 0;
  }
  .result-card {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 12px;
  }
  .result-card h3 {
    white-space: normal;
    overflow: visible;
    text-overflow: initial;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }
  .result-actions {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }
  .result-offer-row {
    grid-template-columns: 1fr;
  }
  .result-offer-unit, .result-offer-shelf {
    text-align: left;
  }
  .results-pager {
    align-items: stretch;
  }
  .pager-controls {
    justify-content: space-between;
  }
  .section-head { align-items: start; }
  .offer-price, .offer-shelf { text-align: left; }
}
