/* ==========================================================================
   Farejador de Cashback — design tokens
   Palette: mint-white paper, deep bottle green ink, money green, gold stamp.
   Type: system stack, personality via weight/scale (self-contained, no CDN).
   ========================================================================== */
:root {
  --bg: #f2f7f3;
  --card: #ffffff;
  --ink: #132019;
  --muted: #54685c;
  --brand: #0d3b2a;
  --brand-soft: #e3efe7;
  --money: #0fa35a;
  --money-ink: #0b7a44;
  --stamp: #f2a413;
  --stamp-ink: #4a3400;
  --line: #dce7de;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow: 0 1px 2px rgba(19, 32, 25, .06), 0 10px 28px -14px rgba(19, 32, 25, .22);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; }

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

:focus-visible {
  outline: 3px solid var(--money);
  outline-offset: 2px;
  border-radius: 4px;
}

.wrap {
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: 20px;
}

/* --- Header ------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(242, 247, 243, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-block: 12px;
  flex-wrap: wrap;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--brand);
  font-size: 1.05rem;
  white-space: nowrap;
}
.logo:hover { text-decoration: none; }

.logo-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--brand);
  font-size: 1.2rem;
}

.header-search {
  flex: 1 1 260px;
  display: flex;
  min-width: 200px;
}

.header-search input {
  flex: 1;
  border: 1.5px solid var(--line);
  background: var(--card);
  border-radius: 999px;
  padding: 9px 18px;
  font: inherit;
  font-size: .92rem;
  color: var(--ink);
}
.header-search input::placeholder { color: var(--muted); }
.header-search input:focus {
  outline: none;
  border-color: var(--money);
  box-shadow: 0 0 0 3px rgba(15, 163, 90, .18);
}

.site-nav {
  display: flex;
  gap: 4px;
  margin-left: auto;
}

.site-nav a {
  color: var(--brand);
  font-weight: 600;
  font-size: .92rem;
  padding: 8px 12px;
  border-radius: 999px;
}
.site-nav a:hover { background: var(--brand-soft); text-decoration: none; }

/* --- Buttons ------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font: inherit;
  font-weight: 700;
  font-size: .92rem;
  border: none;
  cursor: pointer;
  border-radius: 999px;
  padding: 11px 22px;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }

.btn-money {
  background: var(--money-ink);
  color: #fff;
  box-shadow: 0 6px 16px -6px rgba(15, 163, 90, .55);
}
.btn-money:hover { background: #09623a; }

.btn-ghost {
  background: transparent;
  color: var(--brand);
  border: 1.5px solid var(--line);
}
.btn-ghost:hover { border-color: var(--brand); }

.btn-sm { padding: 8px 16px; font-size: .85rem; }

/* --- Hero ---------------------------------------------------------------- */
.hero {
  padding-block: 56px 40px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: 48px;
  align-items: center;
}

.eyebrow {
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--money-ink);
  margin: 0 0 10px;
}

.hero h1 {
  font-size: clamp(2rem, 4.4vw, 3.1rem);
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1.08;
  margin: 0 0 16px;
  color: var(--brand);
}

.sniff {
  text-decoration: underline dotted var(--money);
  text-decoration-thickness: 3px;
  text-underline-offset: 7px;
}

.hero p.lead {
  font-size: 1.08rem;
  color: var(--muted);
  margin: 0 0 26px;
  max-width: 46ch;
}

.hero-search {
  display: flex;
  gap: 10px;
  max-width: 520px;
}

.hero-search input {
  flex: 1;
  border: 1.5px solid var(--line);
  background: var(--card);
  border-radius: 999px;
  padding: 14px 22px;
  font: inherit;
  font-size: 1rem;
  box-shadow: var(--shadow);
}
.hero-search input:focus {
  outline: none;
  border-color: var(--money);
  box-shadow: 0 0 0 4px rgba(15, 163, 90, .18);
}

.trust-line {
  margin-top: 18px;
  font-size: .85rem;
  color: var(--muted);
}
.trust-line strong { color: var(--brand); }

/* --- Podium (hero signature) --------------------------------------------- */
.podium {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 22px;
}

.podium h2 {
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 14px;
}

.podium-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 10px;
  border-radius: var(--radius);
}
.podium-row + .podium-row { border-top: 1px dashed var(--line); }

.podium-row.winner {
  background: linear-gradient(90deg, rgba(242, 164, 19, .10), transparent 70%);
}

.rank {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: .8rem;
  font-weight: 800;
  background: var(--brand-soft);
  color: var(--brand);
}
.podium-row.winner .rank { background: var(--stamp); color: var(--stamp-ink); }

.podium-store {
  flex: 1;
  min-width: 0;
}
.podium-store .name {
  font-weight: 700;
  font-size: .95rem;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.podium-store .via { font-size: .78rem; color: var(--muted); }

.podium-pct {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--money-ink);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* --- Stamp: the signature badge ------------------------------------------ */
.stamp {
  display: inline-block;
  background: var(--stamp);
  color: var(--stamp-ink);
  font-size: .66rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  transform: rotate(-2deg);
  box-shadow: 0 2px 6px -2px rgba(242, 164, 19, .7);
}

/* --- Sections ------------------------------------------------------------ */
.section { padding-block: 36px; }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.section-head h2 {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--brand);
  margin: 0;
}

.section-head .more { font-size: .88rem; font-weight: 600; white-space: nowrap; }

/* --- Category chips ------------------------------------------------------ */
.chips {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: 9px 16px;
  font-size: .9rem;
  font-weight: 600;
  color: var(--brand);
  transition: border-color .12s ease, transform .12s ease;
}
.chip:hover {
  border-color: var(--money);
  text-decoration: none;
  transform: translateY(-1px);
}

/* --- Cards grid ----------------------------------------------------------- */
.grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform .14s ease, box-shadow .14s ease;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 2px 4px rgba(19, 32, 25, .07), 0 18px 36px -16px rgba(19, 32, 25, .3);
}

.card-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.monogram {
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: .02em;
}

.card-top .store-name {
  font-weight: 700;
  line-height: 1.2;
}
.card-top .store-cat {
  display: block;
  font-size: .78rem;
  color: var(--muted);
  font-weight: 400;
}

.offer-pct {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -.03em;
  color: var(--money-ink);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.offer-pct small {
  display: block;
  font-size: .78rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0;
  margin-top: 4px;
}

.program-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: .78rem;
  font-weight: 700;
  color: var(--ink);
  background: var(--bg);
  border-radius: 999px;
  padding: 4px 12px;
  width: fit-content;
}
.program-chip::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--pc, var(--money));
}

.card .btn { margin-top: auto; }

/* --- Store page ------------------------------------------------------------ */
.breadcrumb {
  font-size: .84rem;
  color: var(--muted);
  padding-top: 24px;
}
.breadcrumb a { color: var(--muted); }

.store-hero {
  display: flex;
  align-items: center;
  gap: 18px;
  padding-block: 20px 8px;
  flex-wrap: wrap;
}

.store-hero .monogram {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  font-size: 1.4rem;
}

.store-hero h1 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -.02em;
  margin: 0;
  color: var(--brand);
}

.store-hero .store-meta {
  font-size: .88rem;
  color: var(--muted);
}

.store-hero .spacer { margin-left: auto; }

/* Comparison rows */
.compare {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.compare-row {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  box-shadow: var(--shadow);
  flex-wrap: wrap;
}

.compare-row.winner {
  border-color: var(--money);
  background: linear-gradient(90deg, rgba(15, 163, 90, .06), var(--card) 55%);
}

.compare-program {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1 1 200px;
  min-width: 0;
}

.program-dot {
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--pc, var(--money));
  color: #fff;
  font-weight: 800;
  font-size: .95rem;
}

.compare-program .program-name { font-weight: 700; }
.compare-program .updated {
  display: block;
  font-size: .76rem;
  color: var(--muted);
  font-weight: 400;
}

.compare-pct {
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -.03em;
  color: var(--money-ink);
  font-variant-numeric: tabular-nums;
  min-width: 96px;
  text-align: right;
}

/* --- How it works ----------------------------------------------------------- */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.step {
  background: var(--brand);
  color: #eaf4ed;
  border-radius: var(--radius-lg);
  padding: 22px;
}

.step .n {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--money-ink);
  color: #fff;
  font-weight: 800;
  font-size: .9rem;
  margin-bottom: 12px;
}

.step h3 { margin: 0 0 6px; font-size: 1.02rem; color: #fff; }
.step p { margin: 0; font-size: .88rem; color: #c4dccb; }

/* --- Programs ------------------------------------------------------------- */
.program-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.program-card .bar { height: 6px; background: var(--pc, var(--money)); }

.program-card .body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.program-card h3 { margin: 0; font-size: 1.1rem; font-weight: 800; color: var(--brand); }
.program-card p { margin: 0; font-size: .88rem; color: var(--muted); flex: 1; }

.bonus-pill {
  display: inline-block;
  font-size: .78rem;
  font-weight: 700;
  color: var(--money-ink);
  background: rgba(15, 163, 90, .1);
  border-radius: 999px;
  padding: 4px 12px;
  width: fit-content;
}

/* --- Empty state / 404 ------------------------------------------------------ */
.empty {
  text-align: center;
  padding-block: 64px;
}
.empty .big { font-size: 3.4rem; }
.empty h1, .empty h2 { color: var(--brand); letter-spacing: -.02em; margin: 10px 0 6px; }
.empty p { color: var(--muted); margin: 0 0 22px; }

/* --- Footer ------------------------------------------------------------------ */
.site-footer {
  margin-top: 48px;
  background: var(--brand);
  color: #c4dccb;
  padding-block: 40px 28px;
  font-size: .88rem;
}

.site-footer .cols {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 28px;
}

.site-footer h4 {
  color: #fff;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  margin: 0 0 10px;
}

.site-footer a { color: #eaf4ed; display: block; padding-block: 3px; }

.site-footer .brand-line {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-weight: 800;
  margin-bottom: 10px;
}

.disclaimer {
  border-top: 1px solid rgba(255, 255, 255, .14);
  padding-top: 18px;
  font-size: .78rem;
  color: #9dbba6;
  line-height: 1.6;
}

/* --- Responsive ----------------------------------------------------------------- */
@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 32px;
    padding-block: 36px 24px;
  }
  .site-footer .cols { grid-template-columns: 1fr; gap: 20px; }
  .compare-pct { text-align: left; }
}

@media (max-width: 560px) {
  .site-nav { margin-left: 0; }
  .hero-search { flex-direction: column; }
  .hero-search .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .card, .chip { transition: none; }
  .btn:hover, .card:hover, .chip:hover { transform: none; }
}
