/* ofertas.online — sistema de diseño propio (no reutiliza el CSS de Ofertamanía MX) */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@600;700;800;900&family=Inter:wght@400;500;600;700&display=swap');

:root[data-theme="dark"] {
  --bg: #0b0d12;
  --bg-elevated: #12151d;
  --surface: #161a24;
  --surface-2: #1d2230;
  --border: #262c3b;
  --text: #f3f5f9;
  --text-muted: #9aa3b8;
  --gold: #f7b400;
  --gold-2: #ffd166;
  --red: #e63946;
  --shadow: 0 10px 30px rgba(0,0,0,0.45);
  --hero-glow: radial-gradient(60% 60% at 70% 30%, rgba(247,180,0,0.16), transparent 70%);
}

:root[data-theme="light"] {
  --bg: #f6f7fb;
  --bg-elevated: #ffffff;
  --surface: #ffffff;
  --surface-2: #f0f2f8;
  --border: #e3e6ef;
  --text: #14161f;
  --text-muted: #5c6273;
  --gold: #c98700;
  --gold-2: #a86a00;
  --red: #d62839;
  --shadow: 0 10px 30px rgba(20,22,31,0.08);
  --hero-glow: radial-gradient(60% 60% at 70% 30%, rgba(201,135,0,0.10), transparent 70%);
}

/* Colores reales de marca por categoría — Amazon/Mercado Libre usan su
   propio color reconocible; Bancarios usa verde (asociación con dinero/banca)
   para que el usuario identifique la categoría de un vistazo. */
:root {
  --amazon: #ff9900;
  --amazon-ink: #131921;
  --meli: #3483fa;
  --meli-ink: #2d3277;
  --bank: #12b76a;
  --bank-ink: #065f46;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.25s ease, color 0.25s ease;
}
h1, h2, h3, .display {
  font-family: 'Poppins', 'Inter', sans-serif;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0;
}
a { color: inherit; }
img { max-width: 100%; display: block; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
button { font-family: inherit; }

/* ---------- Topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-icon { width: 42px; height: 42px; border-radius: 50%; background: var(--gold); padding: 3px; box-shadow: var(--shadow); }
.brand-icon img { border-radius: 50%; }
.brand-word { font-family: 'Poppins', sans-serif; font-weight: 900; font-size: 1.32rem; line-height: 1; }
.brand-word .accent { color: var(--gold); }
.nav-links { display: flex; gap: 28px; }
.nav-links a { text-decoration: none; font-weight: 600; font-size: 0.92rem; color: var(--text-muted); transition: color 0.15s; }
.nav-links a:hover { color: var(--text); }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.theme-toggle-btn {
  width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font-size: 1.05rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.15s, background 0.15s;
}
.theme-toggle-btn:hover { transform: translateY(-1px); background: var(--surface-2); }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; background: var(--bg); }
.hero::before { content: ""; position: absolute; inset: 0; background: var(--hero-glow); pointer-events: none; }
.hero-grid {
  position: relative; display: grid; grid-template-columns: 1.1fr 0.9fr;
  align-items: center; gap: 40px; padding: 64px 24px 40px;
}
.hero-grid-stacked {
  position: relative; display: flex; flex-direction: column; align-items: center;
  gap: 12px; padding: 56px 24px 20px; text-align: center;
}
.hero-copy-centered { max-width: 720px; display: flex; flex-direction: column; align-items: center; }
.hero-copy-centered .hero-sub { max-width: 56ch; }
.hero-copy-centered .hero-cats { justify-content: center; }
.hero-copy-centered .hero-actions { justify-content: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--border); color: var(--text-muted);
  padding: 6px 14px; border-radius: 999px; font-size: 0.8rem; font-weight: 700;
  margin-bottom: 18px;
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--bank); box-shadow: 0 0 0 3px color-mix(in srgb, var(--bank) 25%, transparent); }
.hero h1 { font-size: clamp(2.1rem, 4vw, 3.2rem); line-height: 1.08; }
.hero h1 .hl { color: var(--gold); }
.hero-sub { color: var(--text-muted); font-size: 1.05rem; margin-top: 18px; max-width: 46ch; line-height: 1.55; }
.hero-sub strong { color: var(--text); }
.hero-cats { display: flex; gap: 10px; margin-top: 26px; flex-wrap: wrap; }
.hero-cat-chip {
  display: flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border); font-weight: 700; font-size: 0.86rem;
  text-decoration: none; color: var(--text);
}
.hero-actions { margin-top: 30px; display: flex; gap: 14px; flex-wrap: wrap; }
.btn {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; gap: 8px; padding: 14px 26px; border-radius: 999px;
  font-weight: 700; font-size: 0.95rem; text-decoration: none; border: none; cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: linear-gradient(135deg, var(--gold), var(--gold-2)); color: #16130a; box-shadow: 0 10px 24px rgba(247,180,0,0.28); }
.btn-primary:hover { filter: brightness(1.04); }

/* Brillo animado: barra de luz que recorre el botón cada pocos segundos,
   igual patrón que usaba Ofertamanía en sus botones de acción. */
.btn::after, .btn-redeem::after {
  content: ''; position: absolute; top: 0; left: 0; width: 45%; height: 100%;
  background: linear-gradient(120deg, transparent 0%, rgba(255,255,255,0.65) 50%, transparent 100%);
  transform: translateX(-220%) skewX(-20deg);
  animation: btn-shine-sweep 3.2s ease-in-out infinite;
  pointer-events: none;
}
@keyframes btn-shine-sweep {
  0% { transform: translateX(-220%) skewX(-20deg); }
  35%, 100% { transform: translateX(310%) skewX(-20deg); }
}
@media (prefers-reduced-motion: reduce) {
  .btn::after, .btn-redeem::after { animation: none; display: none; }
}

/* Botón de WhatsApp — verde de marca real, con el mismo brillo de arriba */
.btn-whatsapp { background: #25d366; color: #06210f; box-shadow: 0 10px 24px rgba(37,211,102,0.32); }
.btn-whatsapp:hover { filter: brightness(1.05); }
.wa-icon { width: 18px; height: 18px; flex-shrink: 0; }
.btn-outline { background: transparent; border: 1.5px solid var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--gold); }

.hero-art { position: relative; display: flex; justify-content: center; align-items: flex-end; height: 100%; }
.hero-art img { width: min(420px, 90%); filter: drop-shadow(0 30px 40px rgba(0,0,0,0.35)); }
.hero-art-wide { height: auto; margin-top: 12px; animation: float-y 4.2s ease-in-out infinite; }
.hero-art-wide img {
  width: min(980px, 100%); transform-origin: bottom center;
  animation: bull-idle 3.4s ease-in-out infinite;
}
.hero-art-wide img.bull-greet {
  animation: bull-greet 0.85s cubic-bezier(.34,1.56,.64,1) 1, bull-idle 3.4s ease-in-out infinite 0.85s;
}
@keyframes float-y { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes bull-idle {
  0%, 100% { transform: rotate(-0.8deg) scale(1); }
  50% { transform: rotate(0.8deg) scale(1.012); }
}
@keyframes bull-greet {
  0% { transform: scale(0.82) rotate(-7deg); }
  45% { transform: scale(1.07) rotate(5deg); }
  70% { transform: scale(0.97) rotate(-2.5deg); }
  100% { transform: scale(1) rotate(-0.8deg); }
}

/* Humito saliendo de la nariz — posiciones calculadas a mano contra los
   pixeles reales de torazo-hero.png (fosas nasales ~30-34% ancho, ~25% alto),
   ancladas a un wrapper que hace inline-block al tamaño real de la imagen
   para que el % siga alineado aunque la imagen escale responsive. */
.hero-bull-wrap { position: relative; display: inline-block; line-height: 0; }
.hero-bull-wrap img { display: block; }
.nostril-smoke { position: absolute; width: 0; height: 0; }
.nostril-smoke.smoke-left { left: 30.5%; top: 24.5%; }
.nostril-smoke.smoke-right { left: 36%; top: 25.6%; }
.nostril-smoke span {
  position: absolute; bottom: 0; left: 0; margin-left: -8px;
  width: 15px; height: 15px; border-radius: 50%;
  background: radial-gradient(circle, rgba(238,239,244,0.95) 0%, rgba(190,193,205,0.6) 48%, rgba(190,193,205,0) 75%);
  opacity: 0; filter: blur(0.8px);
  animation: smoke-puff 2.8s ease-out infinite;
}
.nostril-smoke span:nth-child(2) { animation-delay: 0.95s; }
.nostril-smoke span:nth-child(3) { animation-delay: 1.9s; }
.smoke-left span { --drift: -5px; }
.smoke-right span { --drift: 6px; }
@keyframes smoke-puff {
  0% { opacity: 0; transform: translate(0, 0) scale(0.3); }
  14% { opacity: 0.9; }
  100% { opacity: 0; transform: translate(var(--drift, 4px), -20px) scale(2.2); }
}

/* ---------- Stats strip ---------- */
.stats-strip { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--bg-elevated); }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; padding: 26px 24px; text-align: center; }
.stat-num { font-family: 'Poppins', sans-serif; font-weight: 900; font-size: 1.7rem; color: var(--gold); }
.stat-label { color: var(--text-muted); font-size: 0.85rem; margin-top: 4px; }

/* ---------- Section shared ---------- */
.section { padding: 70px 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 36px; }
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.section-head p { color: var(--text-muted); margin-top: 10px; font-size: 1rem; }

/* ---------- Category filter pills ---------- */
.filter-pills { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin-bottom: 36px; }
.filter-pill {
  display: flex; align-items: center; gap: 9px; padding: 12px 22px; border-radius: 999px;
  border: 1.5px solid var(--border); background: var(--surface); color: var(--text-muted);
  font-weight: 700; font-size: 0.9rem; cursor: pointer; transition: all 0.15s;
}
.filter-pill .pill-icon { width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.85rem; flex-shrink: 0; }
.filter-pill[data-filter="amazon"] .pill-icon { background: color-mix(in srgb, var(--amazon) 22%, transparent); }
.filter-pill[data-filter="mercadolibre"] .pill-icon { background: color-mix(in srgb, var(--meli) 22%, transparent); }
.filter-pill[data-filter="bancario"] .pill-icon { background: color-mix(in srgb, var(--bank) 22%, transparent); }
.filter-pill:hover { color: var(--text); border-color: color-mix(in srgb, var(--gold) 50%, var(--border)); }
.filter-pill.active { color: #16130a; border-color: transparent; }
.filter-pill.active[data-filter="amazon"] { background: var(--amazon); color: #16130a; }
.filter-pill.active[data-filter="mercadolibre"] { background: var(--meli); color: #fff; }
.filter-pill.active[data-filter="bancario"] { background: var(--bank); color: #06210f; }

/* ---------- Coupon grid ---------- */
.coupon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.coupon-empty { grid-column: 1/-1; text-align: center; color: var(--text-muted); padding: 40px 20px; }

.coupon-card {
  position: relative; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 22px; box-shadow: var(--shadow);
  border-top: 4px solid var(--cat-color, var(--gold));
  display: flex; flex-direction: column; gap: 14px;
}
.coupon-card[data-store="amazon"] { --cat-color: var(--amazon); }
.coupon-card[data-store="mercadolibre"] { --cat-color: var(--meli); }
.coupon-card[data-store="bancario"] { --cat-color: var(--bank); }

.coupon-top { display: flex; align-items: center; justify-content: space-between; }
.coupon-store {
  display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 0.78rem;
  text-transform: uppercase; letter-spacing: 0.03em; color: var(--cat-color);
}
.coupon-store .store-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--cat-color); }
.coupon-rank { font-size: 0.78rem; font-weight: 700; color: var(--text-muted); }

.coupon-discount { font-family: 'Poppins', sans-serif; font-weight: 800; font-size: 1.28rem; line-height: 1.2; }
.coupon-lines { display: flex; flex-direction: column; gap: 3px; color: var(--text-muted); font-size: 0.86rem; }
.coupon-expiry { font-size: 0.82rem; color: var(--text-muted); display: flex; align-items: center; gap: 6px; }

.coupon-code-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--surface-2); border: 1px dashed var(--border); border-radius: var(--radius-sm);
  padding: 10px 14px;
}
.coupon-code-masked { font-family: 'Courier New', monospace; font-weight: 700; letter-spacing: 0.04em; }

.btn-redeem {
  position: relative; overflow: hidden;
  width: 100%; padding: 13px; border-radius: var(--radius-sm); border: none; cursor: pointer;
  background: var(--cat-color, var(--gold)); color: #14161f; font-weight: 800; font-size: 0.92rem;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: filter 0.15s, transform 0.1s;
}
.btn-redeem:hover { filter: brightness(1.08); }
.btn-redeem:active { transform: scale(0.98); }

.coupon-foot { display: flex; align-items: center; justify-content: space-between; font-size: 0.78rem; color: var(--text-muted); }
.foot-badges { display: flex; gap: 8px; }
.badge-verified, .badge-trending { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; }
.badge-verified { color: var(--bank); }
.badge-trending { color: var(--red); }
.copy-count { display: inline-flex; align-items: center; gap: 5px; }

/* ---------- How it works ---------- */
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.step-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 26px; text-align: center; }
.step-num {
  width: 46px; height: 46px; border-radius: 50%; margin: 0 auto 14px;
  display: flex; align-items: center; justify-content: center; font-weight: 800;
  background: linear-gradient(135deg, var(--gold), var(--gold-2)); color: #16130a; font-family: 'Poppins', sans-serif;
}
.step-card h3 { font-size: 1.02rem; margin-bottom: 8px; }
.step-card p { color: var(--text-muted); font-size: 0.9rem; line-height: 1.5; margin: 0; }

/* ---------- Trust row ---------- */
.trust-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.trust-item { display: flex; gap: 14px; align-items: flex-start; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 20px; }
.trust-icon { font-size: 1.4rem; }
.trust-item h4 { font-size: 0.95rem; margin: 0 0 4px; }
.trust-item p { margin: 0; color: var(--text-muted); font-size: 0.85rem; line-height: 1.4; }

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(135deg, var(--surface), var(--surface-2));
  border: 1px solid var(--border); border-radius: 28px;
  padding: 48px; text-align: center; position: relative; overflow: hidden;
}
.cta-band h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
.cta-band p { color: var(--text-muted); margin: 12px auto 0; max-width: 50ch; }
.cta-band .btn { margin-top: 24px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-elevated); padding: 50px 0 24px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.footer-brand p { color: var(--text-muted); font-size: 0.88rem; margin-top: 10px; max-width: 32ch; line-height: 1.5; }
.footer-col h5 { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); margin-bottom: 14px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-col a { text-decoration: none; font-size: 0.9rem; color: var(--text); opacity: 0.85; }
.footer-col a:hover { opacity: 1; color: var(--gold); }
.footer-bottom { border-top: 1px solid var(--border); margin-top: 36px; padding-top: 20px; text-align: center; color: var(--text-muted); font-size: 0.82rem; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--text); color: var(--bg); padding: 12px 22px; border-radius: 999px;
  font-weight: 700; font-size: 0.88rem; box-shadow: var(--shadow); z-index: 100;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; padding-top: 40px; }
  .hero-grid-stacked { padding-top: 40px; }
  .nav-links { display: none; }
  .stats-grid, .steps-grid, .trust-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .topbar-actions .wa-label { display: none; }
  .topbar-actions .btn-whatsapp { padding: 10px !important; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
  .cta-band { padding: 32px 20px; }
}
