/* iFBARGAIN — shared styles. Pure vanilla CSS, mobile-first.
   Inter (Google Fonts) with a system-font fallback stack. */

:root {
  --brand: #e63946;
  --brand-dark: #b51f2e;
  --brand-darker: #7f1d2d;
  --brand-light: #fff1f2;
  --brand-grad: linear-gradient(135deg, #f2545f 0%, var(--brand) 45%, var(--brand-dark) 100%);
  --accent: #f59e0b;
  --ink: #1b2230;
  --ink-soft: #2b3446;
  --muted: #5b6472;
  --bg: #f6f7fa;
  --card: #ffffff;
  --line: #e6e9ef;
  --radius: 16px;
  --radius-lg: 22px;
  --shadow: 0 8px 28px rgba(20, 25, 40, 0.09);
  --shadow-lg: 0 18px 48px rgba(20, 25, 40, 0.14);
  --maxw: 1120px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --ring: 0 0 0 3px rgba(230, 57, 70, 0.18);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 0.5em; letter-spacing: -0.015em; }
p { margin: 0 0 1em; }
::selection { background: var(--brand); color: #fff; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 1.25rem; }
.section { padding: 3.5rem 0; }
.section-title { font-size: clamp(1.5rem, 2.5vw, 1.9rem); text-align: center; margin-bottom: 0.25em; font-weight: 800; }
.section-sub { text-align: center; color: var(--muted); max-width: 640px; margin: 0 auto 2.25rem; font-size: 1.02rem; }

/* ---------- Header ---------- */
.site-header {
  background: rgba(255, 255, 255, 0.85);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 2px 16px rgba(20, 25, 40, 0.05);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.7rem 1.25rem;
  max-width: var(--maxw);
  margin: 0 auto;
}
.logo { font-size: 1.45rem; font-weight: 800; letter-spacing: 0.5px; color: var(--ink); white-space: nowrap; }
.logo span { color: var(--brand); }
.logo:hover { text-decoration: none; }
.main-nav { margin-left: auto; display: flex; gap: 1.1rem; align-items: center; }
.main-nav a { color: var(--ink); font-weight: 600; font-size: 0.95rem; padding: 0.35rem 0.1rem; position: relative; }
.main-nav a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 2px;
  background: var(--brand); border-radius: 2px; transition: right 0.18s ease;
}
.main-nav a:hover { color: var(--brand); text-decoration: none; }
.main-nav a:hover::after { right: 0; }

/* Language switcher (injected by i18n.js) */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  background: #eef0f4;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.18rem;
  flex-shrink: 0;
}
.lang-switch button {
  border: none;
  background: transparent;
  padding: 0.32rem 0.7rem;
  border-radius: 999px;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.4px;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.lang-switch button:hover { color: var(--ink); }
.lang-switch button.active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 4px rgba(20, 25, 40, 0.18);
}
.lang-sep { color: #b9c0cc; font-size: 0.8rem; user-select: none; }

@media (max-width: 640px) {
  .header-inner { flex-wrap: wrap; row-gap: 0.5rem; }
  .main-nav { margin-left: 0; width: 100%; justify-content: flex-start; gap: 0.9rem; order: 3; }
}

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(900px 340px at 15% -10%, rgba(255, 255, 255, 0.22), transparent 60%),
    radial-gradient(700px 300px at 90% 110%, rgba(0, 0, 0, 0.25), transparent 60%),
    linear-gradient(125deg, var(--brand-darker) 0%, var(--brand-dark) 45%, var(--brand) 100%);
  color: #fff;
  padding: 4.5rem 0 4rem;
  text-align: center;
}
.hero h1 { font-size: clamp(2rem, 5vw, 2.9rem); margin-bottom: 0.4em; font-weight: 800; letter-spacing: -0.02em; }
.hero p.lead { font-size: 1.15rem; opacity: 0.96; max-width: 640px; margin: 0 auto 1.6rem; line-height: 1.55; }
.hero-search {
  display: flex;
  max-width: 540px;
  margin: 0 auto;
  gap: 0;
  background: #fff;
  border-radius: 999px;
  padding: 0.3rem;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.22);
}
.hero-search input {
  flex: 1;
  padding: 0.75rem 1.1rem;
  border: none;
  border-radius: 999px;
  font-size: 1rem;
  font-family: inherit;
  background: transparent;
  min-width: 0;
}
.hero-search input:focus { outline: none; }
.hero-search:focus-within { box-shadow: 0 14px 36px rgba(0, 0, 0, 0.22), var(--ring); }
.hero-search button {
  padding: 0.75rem 1.6rem;
  border: none;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  font-size: 1rem;
  font-family: inherit;
  transition: background 0.15s ease, transform 0.15s ease;
}
.hero-search button:hover { background: #000; transform: translateY(-1px); }
.hero-note { margin-top: 1.1rem; font-size: 0.9rem; opacity: 0.88; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  background: var(--brand-grad);
  color: #fff;
  font-weight: 700;
  font-family: inherit;
  padding: 0.75rem 1.6rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  text-align: center;
  box-shadow: 0 6px 18px rgba(230, 57, 70, 0.32);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}
.btn:hover {
  color: #fff;
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(230, 57, 70, 0.4);
  filter: brightness(1.05);
}
.btn:active { transform: translateY(0); }
.btn-block { display: block; width: 100%; }
.btn-dark { background: linear-gradient(135deg, var(--ink-soft) 0%, var(--ink) 100%); box-shadow: 0 6px 18px rgba(27, 34, 48, 0.3); }
.btn-dark:hover { background: #000; box-shadow: 0 10px 24px rgba(27, 34, 48, 0.4); }

/* ---------- Deal cards ---------- */
.grid-deals {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.5rem;
}
.deal-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 10px rgba(20, 25, 40, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.deal-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: #dfe3ea;
}
.deal-media { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; background: #eef0f4; }
.deal-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.35s ease; }
.deal-card:hover .deal-media img { transform: scale(1.05); }
.deal-media:hover { text-decoration: none; }
.badge {
  position: absolute;
  top: 0.7rem;
  left: 0.7rem;
  background: linear-gradient(135deg, #fbbf24, var(--accent));
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}
.badge.hot { background: var(--brand-grad); }
.pct {
  position: absolute;
  bottom: 0.7rem;
  right: 0.7rem;
  background: rgba(20, 25, 40, 0.88);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  color: #fff;
  font-weight: 800;
  font-size: 0.85rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
}
.deal-body { padding: 1.15rem 1.15rem 1.25rem; display: flex; flex-direction: column; flex: 1; }
.retailer { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.8px; color: var(--muted); margin: 0 0 0.4rem; font-weight: 700; }
.deal-title { font-size: 1.02rem; margin: 0 0 0.45rem; font-weight: 700; }
.deal-title a { color: var(--ink); }
.deal-title a:hover { color: var(--brand); }
.stars { color: var(--accent); font-size: 0.9rem; margin: 0 0 0.5rem; letter-spacing: 1px; }
.stars small { color: var(--muted); letter-spacing: 0; margin-left: 0.3rem; }
.price-row { margin: auto 0 0.9rem; padding-top: 0.55rem; display: flex; align-items: baseline; gap: 0.6rem; }
.price { font-size: 1.4rem; font-weight: 800; color: var(--brand-dark); letter-spacing: -0.01em; }
.price-row s { color: var(--muted); font-size: 0.95rem; }

/* ---------- Category cards ---------- */
.grid-cats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
  gap: 1.1rem;
}
.cat-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem 0.9rem;
  text-align: center;
  color: var(--ink);
  box-shadow: 0 2px 10px rgba(20, 25, 40, 0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.cat-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
  text-decoration: none;
  border-color: #f3b7bc;
}
.cat-glyph { font-size: 2.4rem; display: block; margin-bottom: 0.6rem; }
.cat-card h3 { font-size: 1rem; margin: 0 0 0.25rem; font-weight: 700; }
.cat-card p { font-size: 0.84rem; color: var(--muted); margin: 0; }

/* ---------- How it works ---------- */
.steps { display: grid; grid-template-columns: 1fr; gap: 1.25rem; }
@media (min-width: 720px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 2rem 1.4rem;
  text-align: center;
  box-shadow: 0 2px 10px rgba(20, 25, 40, 0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.step:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.step-num {
  width: 56px; height: 56px;
  margin: 0 auto 1.1rem;
  border-radius: 50%;
  background: var(--brand-grad);
  color: #fff;
  font-size: 1.5rem;
  font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 16px rgba(230, 57, 70, 0.35);
}
.step h3 { font-size: 1.1rem; font-weight: 700; }
.step p { color: var(--muted); font-size: 0.95rem; margin: 0; }

/* ---------- Newsletter ---------- */
.newsletter {
  background:
    radial-gradient(600px 220px at 20% 0%, rgba(255, 255, 255, 0.08), transparent 60%),
    linear-gradient(140deg, #242e42 0%, var(--ink) 100%);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 2.75rem 1.75rem;
  text-align: center;
  box-shadow: var(--shadow-lg);
}
.newsletter h2 { margin-bottom: 0.4em; font-weight: 800; letter-spacing: -0.015em; }
.newsletter p { opacity: 0.88; max-width: 540px; margin: 0 auto 1.35rem; }
.news-form { display: flex; max-width: 470px; margin: 0 auto; background: #fff; border-radius: 999px; padding: 0.3rem; }
.news-form input {
  flex: 1;
  padding: 0.7rem 1.1rem;
  border: none;
  border-radius: 999px;
  font-size: 1rem;
  font-family: inherit;
  background: transparent;
  min-width: 0;
}
.news-form input:focus { outline: none; }
.news-form:focus-within { box-shadow: var(--ring); }
.news-form button { border-radius: 999px; box-shadow: none; }
.form-success {
  background: rgba(20, 83, 45, 0.9);
  border: 1px solid #22c55e;
  padding: 1.1rem 1.25rem;
  border-radius: var(--radius);
  max-width: 470px;
  margin: 0 auto;
  text-align: left;
}
.form-note { font-size: 0.8rem; opacity: 0.7; margin-top: 0.85rem; }

/* ---------- Category page toolbar ---------- */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 0.5rem;
}
.toolbar input[type="search"], .toolbar select {
  padding: 0.7rem 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.95rem;
  font-family: inherit;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.toolbar input[type="search"] { flex: 1; min-width: 200px; }
.toolbar input[type="search"]:focus, .toolbar select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: var(--ring);
}
.result-count { color: var(--muted); font-size: 0.9rem; font-weight: 600; margin: 0 0 1.5rem; }
.empty-state { text-align: center; color: var(--muted); padding: 3rem 0; }

/* ---------- Deal detail ---------- */
.deal-detail {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.25rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  margin-top: 1.5rem;
  box-shadow: var(--shadow);
}
@media (min-width: 820px) { .deal-detail { grid-template-columns: 1fr 1fr; padding: 2.75rem; } }
.deal-detail img { border-radius: var(--radius); width: 100%; aspect-ratio: 4 / 3; object-fit: cover; box-shadow: 0 4px 18px rgba(20, 25, 40, 0.12); }
.deal-detail img.pay-logo { width: auto; height: 24px; aspect-ratio: auto; object-fit: contain; border-radius: 5px; box-shadow: none; }
.deal-detail h1 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 800; }
.deal-detail .price { font-size: 2.1rem; }
.deal-meta { color: var(--muted); font-size: 0.9rem; margin-bottom: 1rem; }
.cta-row { display: flex; gap: 0.75rem; flex-wrap: wrap; margin: 1.35rem 0; }
.affil-note { font-size: 0.82rem; color: var(--muted); background: var(--brand-light); border: 1px dashed var(--brand); padding: 0.75rem 1rem; border-radius: 12px; }
.callout {
  font-size: 0.92rem;
  background: linear-gradient(135deg, #fff5f6 0%, var(--brand-light) 100%);
  border: 1px solid #f3b7bc;
  padding: 1rem 1.2rem;
  border-radius: var(--radius);
}

/* ---------- Content pages ---------- */
.prose {
  max-width: 780px;
  margin: 0 auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 4vw, 2.75rem);
  box-shadow: var(--shadow);
}
.prose h1 { font-size: 1.9rem; font-weight: 800; }
.prose h2 { font-size: 1.32rem; margin-top: 1.75em; font-weight: 700; }
.prose ul { padding-left: 1.25rem; }
.prose li { margin-bottom: 0.45rem; }

/* ---------- Forms ---------- */
.form label { display: block; font-weight: 600; margin: 1.1rem 0 0.4rem; font-size: 0.95rem; }
.form input, .form textarea, .form select {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 1rem;
  font-family: inherit;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.form input:focus, .form textarea:focus, .form select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: var(--ring);
}
.form textarea { min-height: 140px; resize: vertical; }
.form .btn { margin-top: 1.35rem; }

/* ---------- Footer ---------- */
.site-footer {
  background: linear-gradient(160deg, #1c2434 0%, #141a26 100%);
  color: #cfd6e2;
  margin-top: 3.5rem;
}
.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 3rem 1.25rem 1.75rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}
@media (min-width: 720px) { .footer-inner { grid-template-columns: 1.4fr 1fr 1fr; } }
.site-footer h4 { color: #fff; font-size: 1rem; margin-bottom: 0.85rem; font-weight: 700; }
.site-footer a { color: #cfd6e2; transition: color 0.15s ease; }
.site-footer a:hover { color: #fff; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 0.5rem; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding: 1.1rem 1.25rem 1.4rem;
  text-align: center;
  font-size: 0.85rem;
  color: #9aa3b5;
  max-width: var(--maxw);
  margin: 0 auto;
}
.footer-bottom p { margin: 0.3rem 0; }
.footer-bottom a { color: #c9d1df; font-weight: 600; }

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

/* Accepted card badges (free: PayPal guest card checkout) */
.pay-badges{display:flex;gap:6px;justify-content:center;align-items:center;flex-wrap:wrap;margin-top:10px}
.pay-badge{font-size:10px;font-weight:800;letter-spacing:.08em;color:#54687e;background:#fff;border:1px solid #d9e1ea;border-radius:5px;padding:3px 8px;line-height:1.4;white-space:nowrap}
.pay-logo{height:24px;width:auto;display:inline-block;background:#fff;border:1px solid #d9e1ea;border-radius:5px;vertical-align:middle}
.hero .pay-logo{height:28px}
