/* SAGA Electrónica — base del sitio público: tokens, reset, componentes genéricos y páginas simples.
   Cabecera: header.css · Inicio: home.css · Producto: product.css · Tarjeta: card.css · Categoría: catalog.css · Pie: footer.css */

:root {
  --bg: #f4f6f9;
  --surface: #fff;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --brand: #9bd010;
  --brand-ink: #3d5200;
  --brand-soft: #f1f9d8;
  --wa: #16a34a;
  --danger: #b91c1c;
  --glow: rgba(155, 208, 16, .35);
  --radius: 16px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 8px 24px rgba(15, 23, 42, .06);
  --shadow-lg: 0 2px 4px rgba(15, 23, 42, .05), 0 24px 48px -12px rgba(15, 23, 42, .18);
  --wrap: 1280px;
}

/* ---------- Reset y tipografía ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
/* En PC el sitio se ve mejor al 90%: se aplica por defecto (el celular y las pantallas chicas quedan igual). */
@media (min-width: 1024px) { html { zoom: .9; } }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 800; line-height: 1.2; }
h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.25rem, 2.5vw, 1.6rem); letter-spacing: -.01em; }
p { margin: 0 0 .75rem; }
.muted { color: var(--muted); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; z-index: 100; padding: .5rem 1rem; background: var(--ink); color: #fff; }
.skip:focus { left: 8px; top: 8px; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }

/* ---------- Secciones ---------- */
.section { padding-top: 44px; padding-bottom: 12px; }
.section h2 { position: relative; margin-bottom: 14px; padding-bottom: 10px; }
.section h2::after { content: ""; position: absolute; left: 0; bottom: 0; width: 38px; height: 4px; border-radius: 4px; background: var(--brand); }
.section-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; }
.section-head a { font-weight: 600; color: var(--brand-ink); text-decoration: none; }
.section-head h2 { margin: 0; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .7rem 1.2rem;
  border: 1.5px solid transparent; border-radius: 999px; font: inherit; font-weight: 600; text-decoration: none; text-align: center; cursor: pointer;
  transition: transform .15s, box-shadow .2s, background .2s, border-color .2s;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--brand); color: #1a2600; box-shadow: 0 6px 18px -4px var(--glow), inset 0 -2px 0 rgba(0, 0, 0, .08); }
.btn-primary:hover { background: #8abd0c; transform: translateY(-2px); box-shadow: 0 12px 24px -6px rgba(155, 208, 16, .55); }
.btn-ghost { background: var(--surface); border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-glass { background: rgba(255, 255, 255, .1); color: #fff; border-color: rgba(255, 255, 255, .25); backdrop-filter: blur(6px); }
.btn-glass:hover { background: rgba(255, 255, 255, .2); }
.btn-wa { padding: .9rem 1.5rem; background: var(--wa); color: #fff; font-size: 1.05rem; box-shadow: 0 10px 24px -8px rgba(22, 163, 74, .6); }
.btn-wa:hover { background: #15803d; }

/* ---------- Avisos ---------- */
.promo-bar { padding: .45rem 16px; background: var(--ink); color: #fff; text-align: center; font-size: .9rem; font-weight: 600; }
.promo-bar a { text-decoration: none; }
.promo-info { background: #1d4ed8; }
.promo-offer { background: var(--brand); color: #1a2600; }

.banner {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; margin: 18px 0; padding: 18px 22px;
  background: var(--brand-soft); border: 1px solid #d9eb9c; border-radius: 22px; box-shadow: 0 10px 30px -18px rgba(15, 23, 42, .3);
}
.banner p { margin: .2rem 0 0; }
.banner-info { background: #eff6ff; border-color: #bfdbfe; }

.kicker { display: inline-flex; align-items: center; gap: 8px; margin-bottom: .5rem; color: var(--brand-ink); font-size: .85rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.kicker i { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 4px rgba(155, 208, 16, .25); }
.banner .kicker { display: block; margin: 0; }

.pills { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; }
.pills li { padding: .3rem .75rem; background: #fff; border: 1px solid var(--line); border-radius: 999px; font-size: .85rem; font-weight: 600; }

.empty { padding: 48px 20px; text-align: center; background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); }
.empty .actions { justify-content: center; }

/* ---------- Páginas simples: migas y títulos ---------- */
.crumbs { margin-bottom: 12px; font-size: .88rem; color: var(--muted); }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.search-cats { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.search-cats a { padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-weight: 600; font-size: .9rem; text-decoration: none; }
.search-cats a:hover { border-color: var(--brand); background: var(--brand-soft); }
.page-head { margin-bottom: 16px; }
.page-head h1 { letter-spacing: -.03em; }
.page-head .muted { margin: .3rem 0 0; }

/* ---------- Botón flotante de WhatsApp (el pie está en footer.css) ---------- */
.wa-fab { position: fixed; right: 16px; bottom: 16px; z-index: 40; width: 58px; height: 58px; border-radius: 50%; box-shadow: 0 8px 24px rgba(22, 163, 74, .45); transition: transform .15s; }
.wa-fab img { width: 100%; height: 100%; border-radius: 50%; }
.wa-fab:hover { transform: scale(1.07); }

/* ---------- Aparición suave al hacer scroll ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s cubic-bezier(.2, .8, .2, 1); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  body { overflow-anchor: none; } /* evita saltos de scroll cuando el encabezado se pliega */
  .wrap { padding-left: 14px; padding-right: 14px; } /* 2 px menos de margen lateral: más ancho para las tarjetas */
  .section { padding-top: 16px; padding-bottom: 4px; }
  .section h2 { margin-bottom: 10px; padding-bottom: 6px; }
  .section-head { margin-bottom: 8px; }
  .section-head h2 { padding-bottom: 6px; }
  .crumbs { margin-bottom: 6px; font-size: .8rem; }
  .page-head { margin-bottom: 8px; }
  .page-head .muted { margin-top: .1rem; }
  .banner { gap: 10px; margin: 10px 0; padding: 12px 14px; }
  .wa-fab { right: 10px; bottom: 10px; width: 46px; height: 46px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
