:root {
  --bg: #ffffff;
  --ink: #171717;
  --muted: #5f6368;
  --soft: #fafafa;
  --line: rgba(0, 0, 0, 0.08);
  --blue: #0072f5;
  --blue-soft: #ebf5ff;
  --green: #0f8a3b;
  --green-soft: #ebfff2;
  --warn: #a05a00;
  --warn-soft: #fff6df;
  --shadow-card: rgba(0, 0, 0, 0.08) 0 0 0 1px, rgba(0, 0, 0, 0.04) 0 2px 2px,
    rgba(0, 0, 0, 0.04) 0 8px 8px -8px, #fafafa 0 0 0 1px inset;
  --radius: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 50% -20%, rgba(255, 211, 67, 0.24), transparent 34rem),
    radial-gradient(circle at 12% 6%, rgba(0, 114, 245, 0.11), transparent 26rem),
    var(--bg);
  font-feature-settings: "liga";
}

a {
  color: inherit;
}

button,
input,
select {
  font: inherit;
}

button:focus-visible,
input:focus-visible,
a:focus-visible,
select:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px clamp(18px, 4vw, 44px);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(16px);
  box-shadow: rgba(0, 0, 0, 0.08) 0 1px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  color: white;
  background: #171717;
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: -0.04em;
  box-shadow: var(--shadow-card);
}

.brand-copy {
  display: grid;
  line-height: 1.1;
}

.brand-copy strong {
  font-size: 14px;
  font-weight: 600;
}

.brand-copy small {
  color: var(--muted);
  font-size: 12px;
}

.top-nav {
  display: flex;
  gap: 18px;
  font-size: 14px;
  font-weight: 500;
  overflow-x: auto;
  white-space: nowrap;
  padding-bottom: 2px;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.top-nav::-webkit-scrollbar {
  display: none;
}

.top-nav a {
  color: #3d3d3d;
  text-decoration: none;
  flex: 0 0 auto;
}

.top-nav a:hover {
  color: var(--ink);
}

main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  padding: clamp(54px, 10vw, 118px) 0 36px;
  text-align: center;
}

.hero-badge,
.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: #0068d6;
  font-size: 12px;
  font-weight: 500;
}

.hero h1 {
  max-width: 880px;
  margin: 18px auto 18px;
  font-size: clamp(44px, 7.6vw, 82px);
  line-height: 0.96;
  letter-spacing: clamp(-3.6px, -0.06em, -1.7px);
  font-weight: 600;
  text-wrap: balance;
}

.hero p {
  max-width: 720px;
  margin: 0 auto;
  color: var(--muted);
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.65;
  text-wrap: pretty;
}

.controls {
  display: grid;
  gap: 14px;
  margin: 10px auto 22px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow-card);
}

.search-box {
  display: grid;
  gap: 8px;
}

.search-box span,
.meta-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.search-box input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 0;
  border-radius: 10px;
  background: white;
  box-shadow: rgba(0, 0, 0, 0.1) 0 0 0 1px;
  color: var(--ink);
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter {
  min-height: 40px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: white;
  color: #3d3d3d;
  box-shadow: rgba(0, 0, 0, 0.1) 0 0 0 1px;
  cursor: pointer;
}

.filter.active,
.filter[aria-pressed="true"] {
  background: var(--ink);
  color: white;
}

.filter-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.select-wrap {
  display: grid;
  gap: 6px;
}

.select-wrap span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.select-wrap select {
  height: 40px;
  border: 0;
  border-radius: 10px;
  background: white;
  color: var(--ink);
  padding: 0 10px;
  box-shadow: rgba(0, 0, 0, 0.1) 0 0 0 1px;
}

.data-status {
  margin: 0;
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--blue-soft);
  color: #124f9f;
  font-size: 13px;
  line-height: 1.3;
}

.meta-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  overflow: hidden;
  margin: 22px 0 52px;
  border-radius: 16px;
  box-shadow: var(--shadow-card);
  background: #ebebeb;
}

.meta-strip > div {
  display: grid;
  gap: 6px;
  padding: 18px;
  background: white;
}

.meta-strip strong {
  font-size: 18px;
  letter-spacing: -0.03em;
}

.meta-strip #feedFreshness {
  margin: 0;
  color: var(--muted);
}

.freshness-note {
  margin: 0;
  font-size: 12px;
}

.freshness-note.is-stale {
  color: #a10000;
  font-weight: 500;
}

.freshness-note.is-stale::before {
  content: "⚠️ ";
}

.deal-section {
  margin: 0 0 72px;
  scroll-margin-top: 84px;
}

.section-heading {
  display: grid;
  justify-items: start;
  gap: 10px;
  margin-bottom: 18px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.05;
  letter-spacing: -0.055em;
}

.deal-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.deal-card {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100%;
  overflow: hidden;
  border-radius: var(--radius);
  background: white;
  box-shadow: var(--shadow-card);
}

.card-image {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 230px;
  padding: 22px;
  background: linear-gradient(180deg, #fbfbfb, #f4f4f4);
}

.card-image img {
  width: 100%;
  max-width: 100%;
  max-height: 210px;
  object-fit: contain;
  filter: drop-shadow(0 18px 26px rgba(0, 0, 0, 0.12));
}

.card-image img.image-fallback {
  filter: grayscale(1) brightness(0.95);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
}

.badge.best {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--warn-soft);
  color: var(--warn);
}

.badge.stock {
  background: var(--green-soft);
  color: var(--green);
}

.badge.country {
  background: #f2f2f2;
  color: #404040;
}

.badge.language {
  background: #ececec;
}

.card-body {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.product-title {
  margin: 0;
  font-size: 22px;
  line-height: 1.12;
  letter-spacing: -0.04em;
  font-weight: 600;
}

.product-set {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.3;
}

.price-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.price-block {
  display: grid;
  gap: 4px;
}

.price-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.price {
  font-size: 34px;
  line-height: 0.95;
  letter-spacing: -0.06em;
  font-weight: 600;
}

.per-booster {
  color: var(--muted);
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 13px;
}

.store-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.store-name {
  font-size: 14px;
  font-weight: 500;
}

.comparison {
  display: grid;
  gap: 8px;
  padding-top: 4px;
}

.comparison-title {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.comparison ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.comparison-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border-radius: 10px;
  background: #f7f7f7;
}

.comparison-row.best-offer {
  background: var(--green-soft);
}

.comparison-row div:first-child {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.comparison-row div:first-child strong,
.comparison-row div:first-child span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.comparison-row div:first-child span,
.comparison-price small,
.comparison-delta {
  color: var(--muted);
  font-size: 11px;
}

.comparison-price {
  display: grid;
  justify-items: end;
  gap: 2px;
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 12px;
}

.comparison-delta {
  min-width: 44px;
  text-align: right;
}

.comparison-row a {
  padding: 6px 8px;
  border-radius: 8px;
  color: white;
  background: var(--ink);
  text-decoration: none;
  font-size: 12px;
  font-weight: 500;
}

.link-disabled {
  padding: 6px 8px;
  border-radius: 8px;
  background: #eeeeee;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.card-footer {
  padding: 0 18px 18px;
}

.store-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 10px;
  color: white;
  background: var(--ink);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}

.store-link:hover {
  background: #000;
}

.store-link.disabled,
.store-link.disabled:hover {
  background: #eeeeee;
  color: var(--muted);
  cursor: not-allowed;
}

.empty-state,
.about {
  margin: 0 0 64px;
  padding: clamp(22px, 4vw, 32px);
  border-radius: 18px;
  background: white;
  box-shadow: var(--shadow-card);
}

.empty-state h2,
.about h2 {
  margin: 0 0 10px;
  letter-spacing: -0.04em;
}

.about p {
  color: var(--muted);
  line-height: 1.65;
  margin: 10px 0 0;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  width: min(1180px, calc(100% - 32px));
  margin: 24px auto 0;
  padding: 28px 0 40px;
  color: var(--muted);
  font-size: 13px;
  box-shadow: rgba(0, 0, 0, 0.08) 0 -1px 0;
}

@media (max-width: 900px) {
  .deal-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  main,
  .site-footer {
    width: min(100% - 22px, 1180px);
  }

  .site-header {
    padding: 12px 14px;
  }

  .hero {
    padding-top: 42px;
    text-align: left;
  }

  .hero h1,
  .hero p {
    margin-left: 0;
    margin-right: 0;
  }

  .controls {
    padding: 12px;
  }

  .meta-strip {
    grid-template-columns: 1fr;
    margin-bottom: 40px;
  }

  .section-heading {
    align-items: start;
    flex-direction: column;
  }

  .filter-grid {
    grid-template-columns: 1fr;
  }

  .deal-grid {
    grid-template-columns: 1fr;
  }

  .card-image {
    min-height: 210px;
  }

  .comparison-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .comparison-price {
    justify-items: start;
  }

  .comparison-delta {
    text-align: left;
  }

  .site-footer {
    flex-direction: column;
  }
}
