/* ============================================================
   base.css — sistema de diseño compartido de rosarioruedas.com
   Lo usan TODAS las páginas: home, catálogo, categorías y productos.
   Cada página suma después su propio archivo (home.css, catalogo.css,
   categoria.css, producto.css). Para cambiar el "look" del sitio entero,
   tocá los tokens de acá abajo (colores, radios, sombras).
   ============================================================ */

/* ── TOKENS ── */
:root {
  --naranja:      #E8610A;   /* relleno, bordes, detalles */
  --naranja-dark: #C4510A;   /* texto naranja y botones (contraste AA sobre blanco) */
  --naranja-soft: #FDEEE1;
  --tinta:        #1C1C1C;
  --gris-700:     #4B4B4B;
  --gris-500:     #66635C;   /* texto secundario (contraste AA) */
  --gris-400:     #8C8A85;   /* solo decorativo, no para texto */
  --gris-100:     #F7F6F3;
  --gris-50:      #FBFAF8;
  --blanco:       #FFFFFF;
  --borde:        #E3DFD6;
  --verde-wa:      #13853F;  /* WhatsApp, oscurecido para que el texto blanco se lea */
  --verde-wa-dark: #0F6E34;
  --font-display: 'Plus Jakarta Sans', sans-serif;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono:    'IBM Plex Mono', monospace;
  --radio-sm:     6px;
  --radio-md:     10px;
  --radio-full:   8px;       /* nombre histórico: radio de botones y etiquetas */
  --sombra:       0 1px 2px rgba(28,28,28,0.05), 0 4px 14px rgba(28,28,28,0.05);
  --sombra-hover: 0 10px 28px rgba(28,28,28,0.12);
  --header-h:     67px;
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body { font-family: var(--font-body); background: var(--blanco); color: var(--tinta); line-height: 1.55; min-height: 100vh; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }
button { cursor: pointer; font: inherit; border: none; background: none; color: inherit; }
a { color: inherit; }
ul { list-style: none; }
::selection { background: var(--naranja); color: #fff; }
:focus-visible { outline: 2px solid var(--naranja); outline-offset: 2px; }
.mono { font-family: var(--font-mono); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* ── BOTONES ── */
.btn, .btn-primario, .btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  font-family: inherit; font-weight: 700; font-size: 0.9rem; line-height: 1.1;
  padding: 0.8rem 1.4rem; border-radius: var(--radio-full); border: 1.5px solid transparent;
  text-decoration: none; cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.15s;
}
.btn:hover, .btn-primario:hover, .btn-ghost:hover { transform: translateY(-1px); }
.btn-primary { background: var(--naranja-dark); color: #fff; }
.btn-primary:hover { background: #A94408; }
.btn-primario { background: var(--tinta); color: #fff; }
.btn-primario:hover { background: #000; }
.btn-ghost { background: transparent; color: var(--tinta); border-color: var(--borde); }
.btn-ghost:hover { border-color: var(--tinta); background: var(--blanco); }
.btn-wa { background: var(--verde-wa); color: #fff; }
.btn-wa:hover { background: var(--verde-wa-dark); }
.btn-wa svg { width: 18px; height: 18px; fill: #fff; flex-shrink: 0; }

/* ── HEADER (compartido) ── */
.header { background: var(--blanco); position: sticky; top: 0; z-index: 110; border-bottom: 1px solid var(--borde); }
.header::before { content: ''; display: block; height: 3px; background: var(--naranja); }
.header-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 1.5rem;
  display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 1rem;
}
.logo { display: flex; align-items: center; gap: 0.65rem; text-decoration: none; flex-shrink: 0; }
.logo-icon { width: 32px; height: 32px; flex-shrink: 0; }
.logo-text strong { display: block; font-family: var(--font-display); font-size: 1.02rem; font-weight: 800; color: var(--tinta); line-height: 1.2; }
.logo-text span { font-size: 0.68rem; color: var(--gris-500); font-weight: 600; letter-spacing: 0.02em; }
.nav { flex: 1; display: flex; justify-content: center; gap: 0.2rem; }
.nav a { padding: 0.5rem 0.85rem; border-radius: var(--radio-sm); font-size: 0.86rem; font-weight: 600; color: var(--gris-700); text-decoration: none; transition: background 0.15s, color 0.15s; }
.nav a:hover { background: var(--gris-100); color: var(--tinta); }
.nav a[aria-current="page"] { color: var(--naranja-dark); }
.header-cta { font-size: 0.82rem; padding: 0.6rem 1.1rem; white-space: nowrap; }
@media (max-width: 860px) { .nav { display: none; } .header-inner { justify-content: space-between; } }

/* ── FRANJA NARANJA ANTES DEL PIE ── */
.footer-cta { background: var(--naranja-dark); padding: 2.4rem 1.5rem; text-align: center; }
.footer-cta p:first-child { color: #fff; font-family: var(--font-display); font-size: 1.2rem; font-weight: 800; margin-bottom: 0.5rem; }
.footer-cta p:last-child { color: rgba(255,255,255,0.92); font-size: 0.9rem; max-width: 60ch; margin: 0 auto; }

/* ── PIE DE PÁGINA (compartido) ── */
.footer { background: var(--tinta); color: rgba(255,255,255,0.66); padding: 2.6rem 1.5rem 2.2rem; font-size: 0.86rem; line-height: 1.65; }
.footer-inner { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 2rem; }
@media (max-width: 760px) { .footer-inner { grid-template-columns: 1fr; gap: 1.6rem; } }
.footer-brand { display: block; color: #fff; font-family: var(--font-display); font-weight: 800; font-size: 1.05rem; margin-bottom: 0.5rem; }
.footer-title { color: #fff; font-family: var(--font-display); font-weight: 700; font-size: 0.9rem; margin-bottom: 0.6rem; }
.footer p + p { margin-top: 0.35rem; }
.footer-links li + li { margin-top: 0.3rem; }
.footer a { color: rgba(255,255,255,0.82); text-decoration: none; transition: color 0.15s; }
.footer a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }

/* ── FLOTANTES ── */
.btn-top {
  position: fixed; bottom: 1.25rem; left: 1.25rem; z-index: 120;
  width: 44px; height: 44px; border-radius: 50%; background: #fff;
  border: 1px solid var(--borde); box-shadow: var(--sombra-hover);
  display: none; align-items: center; justify-content: center; color: var(--tinta);
  transition: transform 0.15s;
}
.btn-top.show { display: flex; }
.btn-top:hover { transform: translateY(-2px); }
@media (max-width: 480px) { .btn-top { width: 38px; height: 38px; bottom: 1rem; left: 1rem; } }
.wa-float {
  position: fixed; bottom: 1.25rem; right: 1.25rem; z-index: 130;
  background: var(--verde-wa); color: #fff; border-radius: 50%;
  width: 58px; height: 58px; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 20px rgba(19,133,63,0.45); transition: transform 0.15s, background 0.15s;
}
.wa-float:hover { transform: scale(1.06); background: var(--verde-wa-dark); }

/* ── APARICIÓN SUAVE AL SCROLLEAR ──
   Solo se activa si el JS corrió (la página agrega la clase "js" a <html>);
   sin JS el contenido se ve siempre. */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.5s ease-out, transform 0.5s ease-out; }
.js .reveal.in-view { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; transition: none; } }

/* ── PÁGINA DE ERROR (404) ── */
.pagina-error { max-width: 640px; margin: 0 auto; padding: 4rem 1.5rem 4.5rem; text-align: center; }
.pagina-error-codigo { font-size: 0.8rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--naranja-dark); margin-bottom: 0.8rem; }
.pagina-error h1 { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.7rem, 4vw, 2.3rem); line-height: 1.15; margin-bottom: 0.8rem; }
.pagina-error > p { color: var(--gris-700); font-size: 0.98rem; max-width: 52ch; margin: 0 auto; }
.form-buscar { display: flex; gap: 0.5rem; max-width: 460px; margin: 1.6rem auto 0; }
.form-buscar input { flex: 1; min-width: 0; border: 1.5px solid var(--borde); border-radius: var(--radio-full); padding: 0.75rem 1rem; font: inherit; font-size: 0.92rem; color: var(--tinta); background: #fff; }
.form-buscar input:focus { outline: none; border-color: var(--naranja); }
.pagina-error-acciones { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.7rem; margin-top: 1.4rem; }
