/* Cazador de Ofertas — web pública. Móvil primero, modo claro y oscuro automático. */
:root {
  --bg: #f5f6fa;
  --surface: #ffffff;
  --surface-2: #f0f2f7;
  --text: #0f172a;
  --muted: #5b6475;
  --border: #e2e6ee;
  --brand: #ea580c;
  --brand-2: #c2410c;
  --brand-soft: #fff1e7;
  --navy: #0f172a;
  --navy-2: #1e293b;
  --tg: #229ed9;
  --amazon: #ff9900;
  --red: #dc2626;
  --blue: #1d4ed8;
  --green: #15803d;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 6px 20px rgba(15, 23, 42, .06);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1120;
    --surface: #111a2e;
    --surface-2: #17223b;
    --text: #e6e9f2;
    --muted: #9aa4b8;
    --border: #22304f;
    --brand: #fb923c;
    --brand-2: #f97316;
    --brand-soft: #2a1a0f;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3);
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
a { color: var(--brand-2); }
img { max-width: 100%; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.wrap.narrow { max-width: 780px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 8px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 99; }

/* botones */
.btn { display: inline-flex; align-items: center; gap: 8px; border-radius: 999px; padding: 11px 18px; font-weight: 700;
  text-decoration: none; border: 1px solid transparent; cursor: pointer; font-size: 15px; line-height: 1.1; }
.btn svg { width: 18px; height: 18px; }
.btn.small { padding: 7px 12px; font-size: 13px; }
.btn-brand { background: var(--brand); color: #fff; }
.btn-brand:hover { background: var(--brand-2); }
.btn-tg { background: var(--tg); color: #fff; }
.btn-tg:hover { filter: brightness(1.07); }
.btn-ghost { background: transparent; color: inherit; border-color: currentColor; }
.btn-amazon { background: var(--amazon); color: #111; width: 100%; justify-content: center; font-size: 17px; padding: 15px 18px; }
.btn-amazon:hover { filter: brightness(1.05); }

/* cabecera */
.topbar { position: sticky; top: 0; z-index: 20; background: var(--surface); box-shadow: 0 1px 0 var(--border); }
.topbar-in { display: flex; align-items: center; gap: 14px; padding-top: 10px; padding-bottom: 10px; }
.brand { display: flex; align-items: center; gap: 9px; color: var(--text); text-decoration: none; white-space: nowrap; }
.brand-ico { width: 34px; height: 34px; color: var(--brand); flex: none; }
.brand-name { font-weight: 800; font-size: 19px; letter-spacing: -.2px; }
.brand-name em { font-style: normal; color: var(--brand); }
.search { position: relative; flex: 1; display: flex; max-width: 560px; margin-left: auto; }
.search input { flex: 1; min-width: 0; border: 1.5px solid var(--border); background: var(--surface-2); color: var(--text);
  border-radius: 999px 0 0 999px; padding: 10px 16px; font-size: 15px; outline: none; }
.search input:focus { border-color: var(--brand); background: var(--surface); }
.search button { border: 0; background: var(--brand); color: #fff; border-radius: 0 999px 999px 0; padding: 0 16px; cursor: pointer; }
.search button svg { width: 20px; height: 20px; display: block; }
.search-pop { position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; z-index: 30; }
.search-pop a { display: flex; gap: 10px; align-items: center; padding: 8px 12px; color: var(--text); text-decoration: none; }
.search-pop a:hover, .search-pop a.sel { background: var(--surface-2); }
.search-pop img { width: 40px; height: 40px; object-fit: contain; background: #fff; border-radius: 6px; flex: none; }
.search-pop .all { justify-content: center; font-weight: 700; color: var(--brand-2); border-top: 1px solid var(--border); }
.search-pop .none { padding: 12px; color: var(--muted); }
.catbar { border-top: 1px solid var(--border); }
.catbar-in { display: flex; gap: 6px; overflow-x: auto; padding-top: 8px; padding-bottom: 8px; scrollbar-width: none; }
.catbar-in::-webkit-scrollbar { display: none; }
.catbar a { flex: none; display: flex; gap: 6px; align-items: center; padding: 6px 12px; border-radius: 999px; font-size: 14px;
  color: var(--text); text-decoration: none; background: var(--surface-2); border: 1px solid var(--border); }
.catbar a:hover, .catbar a.on { border-color: var(--brand); color: var(--brand-2); }

/* portada */
.hero { background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 70%, #3b1d0c 130%); color: #f8fafc; }
.hero-in { display: grid; grid-template-columns: 1.4fr 1fr; gap: 34px; padding-top: 42px; padding-bottom: 42px; align-items: center; }
.kicker { text-transform: uppercase; letter-spacing: .08em; font-size: 12.5px; font-weight: 700; color: var(--brand); margin: 0 0 8px; }
.hero .kicker { color: #fdba74; }
.hero h1 { font-size: clamp(30px, 4.6vw, 48px); line-height: 1.08; margin: 0 0 14px; letter-spacing: -.8px; }
.hero h1 span { color: #fdba74; }
.hero-sub { font-size: 17.5px; color: #cbd5e1; margin: 0 0 22px; max-width: 620px; }
.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; }
.hero .btn-ghost { color: #f8fafc; }
.hero-status { margin: 18px 0 0; font-size: 14px; color: #94a3b8; display: flex; align-items: center; gap: 8px; }
.pulse { width: 9px; height: 9px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 0 rgba(34, 197, 94, .6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px rgba(34, 197, 94, 0); } 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); } }
.hero-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.hero-points li { background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1); border-radius: 14px; padding: 14px 16px; }
.hero-points strong { display: block; color: #fff; }
.hero-points span { color: #cbd5e1; font-size: 14.5px; }

/* bloques */
.block { margin: 34px 0; }
.block-head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.block-head h2 { margin: 0; font-size: 23px; letter-spacing: -.3px; }
.block-head a { margin-left: auto; font-weight: 700; text-decoration: none; }
.page-title { margin: 8px 0 18px; }
.page-title h1 { margin: 0 0 6px; font-size: clamp(26px, 3.4vw, 34px); letter-spacing: -.5px; }
.crumbs { font-size: 13.5px; color: var(--muted); padding-top: 16px; }
.crumbs a { color: var(--muted); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }

/* tarjetas de oferta */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 14px; }
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(215px, 1fr); gap: 14px; overflow-x: auto;
  scroll-snap-type: x mandatory; padding-bottom: 6px; }
.rail > * { scroll-snap-align: start; }
.deal { overflow: hidden; transition: transform .12s ease, box-shadow .12s ease; }
.deal:hover { transform: translateY(-2px); }
.deal-link { color: inherit; text-decoration: none; display: flex; flex-direction: column; height: 100%; }
.deal-img { position: relative; aspect-ratio: 1 / 1; background: #fff; display: grid; place-items: center; padding: 14px; }
.deal-img img { max-height: 100%; object-fit: contain; }
.rank { position: absolute; top: 10px; left: 10px; background: var(--navy); color: #fff; font-weight: 800; border-radius: 10px;
  padding: 3px 9px; font-size: 14px; }
.deal-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; }
.deal-title { font-size: 15.5px; line-height: 1.3; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.deal-meta { margin: 0; font-size: 13px; color: var(--muted); }
.labels { display: flex; gap: 6px; flex-wrap: wrap; min-height: 22px; }
.lbl { font-size: 11px; font-weight: 800; letter-spacing: .04em; border-radius: 6px; padding: 3px 7px; }
.lbl-minimo { background: #fee2e2; color: #991b1b; }
.lbl-chollazo { background: #ffedd5; color: #9a3412; }
.lbl-mejor { background: #dcfce7; color: #166534; }
.lbl-destacada { background: #e0e7ff; color: #3730a3; }
.lbl-prime { background: #dbeafe; color: #1e40af; }

/* categorías, pasos, guías */
.cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.cat { display: flex; flex-direction: column; gap: 3px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); color: var(--text); text-decoration: none; }
.cat:hover { border-color: var(--brand); }
.cat-ico { font-size: 26px; }
.cat-name { font-weight: 800; }
.cat-sub { font-size: 13px; color: var(--muted); }
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.steps li { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.steps span { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--brand-soft);
  color: var(--brand-2); font-weight: 800; margin-bottom: 8px; }
.steps strong { display: block; font-size: 17px; }
.steps p { margin: 4px 0 0; color: var(--muted); }
.guides { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.guide { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; color: var(--text); text-decoration: none; }
.guide:hover { border-color: var(--brand); }
.guide-ico { font-size: 24px; }
.cta-tg { display: flex; gap: 20px; align-items: center; justify-content: space-between; flex-wrap: wrap;
  background: linear-gradient(135deg, #0e7ab0, var(--tg)); color: #fff; border-radius: 18px; padding: 24px 26px; }
.cta-tg h2 { margin: 0 0 4px; }
.cta-tg p { margin: 0; color: #e0f2fe; }
.cta-tg .btn-brand { background: #fff; color: #0e7ab0; }
.empty { text-align: center; padding: 36px 18px; background: var(--surface); border: 1px dashed var(--border); border-radius: var(--radius); }
.empty-ico { font-size: 40px; margin: 0; }
.empty-title { font-weight: 800; font-size: 20px; margin: 6px 0; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 14px; }
.chip { border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 999px; padding: 6px 13px;
  font-size: 14px; cursor: pointer; }
.chip.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.chips.static .chip { cursor: default; }
.sortbar { display: flex; gap: 8px; align-items: center; margin-bottom: 14px; font-size: 14px; }

/* texto largo (guías y páginas legales) */
.prose { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 26px; margin: 12px 0 24px; }
.prose h1 { font-size: clamp(26px, 3.4vw, 34px); line-height: 1.15; letter-spacing: -.5px; margin: 0 0 12px; }
.prose h2 { font-size: 21px; margin: 26px 0 8px; }
.prose p, .prose li { color: var(--text); }
.prose .lead { font-size: 18px; color: var(--muted); }
.prose-box { padding: 18px 22px; margin: 18px 0 30px; }
.cta-inline { display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 16px 20px; margin-bottom: 24px; }
.cta-inline p { margin: 0; }

/* página de oferta */
.offer { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin: 14px 0 20px; }
.offer-gallery { background: #fff; border-radius: var(--radius); border: 1px solid var(--border); padding: 18px; }
.offer-main { width: 100%; aspect-ratio: 1 / 1; object-fit: contain; }
.offer-thumbs { display: flex; gap: 8px; overflow-x: auto; margin-top: 10px; }
.offer-thumbs button { border: 1px solid var(--border); background: #fff; border-radius: 8px; padding: 4px; cursor: pointer; }
.offer-thumbs img { width: 56px; height: 56px; object-fit: contain; display: block; }
.offer-info h1 { font-size: clamp(22px, 2.8vw, 30px); line-height: 1.2; margin: 8px 0; }
.fulltitle { color: var(--muted); font-size: 14px; margin-bottom: 12px; }
.paid { font-size: 13px; color: var(--muted); margin: 8px 0; }
.note { font-size: 14px; background: var(--brand-soft); border-radius: 10px; padding: 10px 12px; }
.why { padding: 14px 18px; margin-top: 14px; }
.why h2 { font-size: 17px; margin: 0 0 6px; }
.ended-banner { display: none; background: #fee2e2; color: #991b1b; border-radius: 10px; padding: 10px 12px; font-weight: 700; }
.is-expired .ended-banner { display: block; }
.is-expired .why, .is-expired .labels { display: none; }

/* pie */
.footer { background: var(--navy); color: #cbd5e1; margin-top: 50px; padding: 34px 0 26px; font-size: 14.5px; }
.footer a { color: #e2e8f0; text-decoration: none; }
.footer a:hover { text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 24px; }
.footer-brand { font-weight: 800; font-size: 18px; color: #fff; margin: 0 0 4px; }
.footer .muted { color: #94a3b8; }
.footer-h { font-weight: 700; color: #fff; margin: 0 0 8px; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.legal-notes { border-top: 1px solid #1e293b; margin-top: 24px; padding-top: 16px; font-size: 12.5px; color: #94a3b8; }
.legal-notes p { margin: 4px 0; }

@media (max-width: 900px) {
  .hero-in, .offer { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .topbar-in { flex-wrap: wrap; }
  .search { order: 3; flex-basis: 100%; max-width: none; margin-left: 0; }
  .btn-tg span { display: none; }
  .topbar .btn-tg { margin-left: auto; padding: 10px; }
  .hero-in { padding-top: 28px; padding-bottom: 28px; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .rail { grid-auto-columns: 62%; }
  .cats { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .cat { padding: 12px 14px; }
  .cat-sub { display: none; }
  .hero-points { display: none; }
  .block { margin: 26px 0; }
  .deal-title { font-size: 14.5px; }
  .prose { padding: 18px; }
}
