/* =========================================================
   Ferretería La Janina — Propuesta de rediseño
   Estética de ferretería tradicional de barrio: naranja
   industrial, gris metal y tonos tierra. Robusto y claro,
   sin decoración superflua ni animaciones juguetonas.
   ========================================================= */

:root {
  /* Marca: naranja industrial (herramienta/aviso), no naranja "app" */
  --rust-900: #4a1c08;
  --rust-700: #c1440e;
  --rust-600: #d9530f;
  --rust-050: #fbeee1;

  --amber: #e8a723; /* acento cálido puntual, guiño al mascotón amarillo del logo real */

  /* Neutros: gris metal y hormigón, no blanco de "app" */
  --ink: #23262a;
  --ink-soft: #5a6068;
  --line: #ddd7c9;
  --bg: #faf8f3;
  --bg-soft: #efe9dd;
  --bg-dark: #1c1f22;
  --white: #ffffff;

  --radius: 4px;
  --radius-lg: 8px;
  --shadow-sm: 0 4px 14px rgba(28, 31, 34, .08);
  --shadow: 0 14px 32px rgba(28, 31, 34, .16);
  --shadow-lg: 0 26px 60px rgba(28, 31, 34, .30);

  --maxw: 1160px;
  --ease: cubic-bezier(.2, .7, .2, 1);

  --font-body: 'Work Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Oswald', 'Arial Narrow', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: 86px; overflow-x: hidden; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.1;
  font-weight: 600;
  letter-spacing: .01em;
  text-transform: uppercase;
}

.wrap { width: min(100% - 40px, var(--maxw)); margin-inline: auto; }

/* Eyebrow: versalita con línea a los lados, sin píldora de color */
.eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--font-display); font-weight: 500; font-size: .82rem;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--rust-700);
}
.eyebrow::before { content: ''; width: 28px; height: 2px; background: var(--rust-700); }

.section { padding: clamp(56px, 8vw, 104px) 0; }
.section-head { max-width: 640px; margin-bottom: 46px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center .eyebrow { justify-content: center; }
.section-head.center .eyebrow::before { display: none; }
.section-head.center .eyebrow::after { content: ''; width: 28px; height: 2px; background: var(--rust-700); }
.section-head h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); margin: 14px 0 12px; }
.section-head p { color: var(--ink-soft); font-size: 1.04rem; text-transform: none; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-weight: 600; font-size: .92rem;
  letter-spacing: .04em; text-transform: uppercase;
  padding: 14px 26px; border-radius: var(--radius);
  cursor: pointer; border: 1.5px solid transparent;
  transition: background .25s var(--ease), color .25s, border-color .25s, transform .2s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--rust-700); color: #fff; }
.btn-primary:hover { background: var(--rust-900); }
.btn-wa { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-wa:hover { border-color: #25D366; color: #1a8f47; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--rust-700); color: var(--rust-700); }
.btn svg { width: 18px; height: 18px; }

/* ---------- Header ---------- */
.header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  padding: 20px 0; transition: padding .35s var(--ease), background .35s, box-shadow .35s;
}
.header.scrolled { background: rgba(28,31,34,.95); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 6px 24px rgba(0,0,0,.25); padding: 13px 0; }

/* El header vive siempre sobre un fondo oscuro (velo del hero o barra sólida
   tras hacer scroll), así que la marca puede fijarse en blanco sin necesitar
   una segunda variante de logo (gotcha conocido: logo claro sobre cabecera
   que cambia de transparente a clara se vuelve invisible). */
.header--hero::before {
  content: ''; position: absolute; inset: 0 0 auto 0; height: 160px; pointer-events: none;
  background: linear-gradient(180deg, rgba(15,12,8,.72), rgba(15,12,8,0));
  z-index: 0; transition: opacity .35s;
}
.header--hero.scrolled::before { opacity: 0; }
.header .nav { position: relative; z-index: 5; }
.header .brand { color: #fff; }
.header .brand .brand-sub { color: var(--amber); }
.header .nav-links > a { color: rgba(255,255,255,.86); }
.header .nav-links > a:hover { color: var(--amber); }
.header .btn-ghost { color: #fff; border-color: rgba(255,255,255,.4); }
.header .btn-ghost:hover { border-color: var(--amber); color: var(--amber); }
.header .burger { color: #fff; }

.nav { display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 600; font-size: 1.22rem; letter-spacing: .01em; }
.brand-mark { width: 38px; height: 38px; border-radius: var(--radius); background: var(--rust-700); display: grid; place-items: center; flex: 0 0 auto; }
.brand-mark svg { width: 22px; height: 22px; }
.brand span { display: flex; flex-direction: column; line-height: 1.05; }
.brand .brand-sub { font-size: .62rem; font-weight: 500; letter-spacing: .18em; }

.nav-links { display: flex; align-items: center; gap: 28px; font-weight: 500; font-size: .88rem; letter-spacing: .03em; text-transform: uppercase; }
.nav-links > a { transition: color .2s; }

.nav-cta { display: flex; align-items: center; gap: 12px; }
.burger { display: none; position: relative; background: none; border: 0; width: 28px; height: 28px; cursor: pointer; }
.burger svg { position: absolute; inset: 0; margin: auto; width: 100%; height: 100%; transition: opacity .2s; }
.burger .icon-close { opacity: 0; }
.header.menu-open .burger .icon-menu { opacity: 0; }
.header.menu-open .burger .icon-close { opacity: 1; }

/* Panel móvil: el elemento que anima max-height va SIN padding propio (si no,
   "cerrado" deja una barra sólida del alto del padding tapando la cabecera).
   El padding real vive en .mobile-menu-inner. z-index por debajo de .header
   .nav para que marca + hamburguesa queden siempre visibles y pulsables. */
.mobile-menu {
  display: none;
  position: fixed; left: 0; right: 0; top: 0; z-index: 2;
  background: var(--bg-dark); box-shadow: var(--shadow-lg);
  max-height: 0; overflow: hidden;
  transition: max-height .4s var(--ease);
}
.mobile-menu.open { max-height: 100vh; overflow-y: auto; }
.mobile-menu-inner { display: flex; flex-direction: column; gap: 2px; padding: 92px 24px 24px; }
.mm-link { padding: 14px 6px; border-bottom: 1px solid rgba(255,255,255,.1); font-family: var(--font-display); font-weight: 500; color: rgba(255,255,255,.88); text-transform: uppercase; font-size: .92rem; letter-spacing: .04em; }
.mm-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
/* El panel móvil tiene fondo oscuro: .btn-wa por defecto usa texto oscuro
   (pensado para fondos claros) y quedaría casi invisible aquí. */
.mobile-menu .btn-wa { color: #fff; border-color: rgba(255,255,255,.35); }
.mobile-menu .btn-wa:hover { border-color: #25D366; color: #4ee08a; }

@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-cta .btn-ghost { display: none; }
  .burger { display: block; }
  .mobile-menu { display: flex; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100svh; display: flex; align-items: center;
  background: linear-gradient(180deg, rgba(15,12,8,.38) 0%, rgba(15,12,8,.58) 55%, rgba(15,12,8,.90) 100%), url('img/exterior-tienda.jpg') center 42% / cover no-repeat;
}
.hero-inner { color: #fff; max-width: 660px; }
.hero .eyebrow { color: var(--amber); }
.hero .eyebrow::before { background: var(--amber); }
.hero h1 { font-size: clamp(2.1rem, 5.4vw, 3.6rem); margin: 20px 0 18px; font-weight: 600; }
.hero h1 em { font-style: normal; color: var(--amber); }
.hero .lead { font-family: var(--font-body); text-transform: none; font-size: 1.1rem; color: rgba(255,255,255,.86); max-width: 540px; margin-bottom: 30px; font-weight: 400; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 32px; }
.hero .btn-ghost { color: #fff; border-color: rgba(255,255,255,.4); }
.hero .btn-ghost:hover { border-color: #25D366; color: #4ee08a; }
.hero-trust { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; color: rgba(255,255,255,.68); font-size: .88rem; letter-spacing: .02em; }
.hero-trust .stars { color: var(--amber); letter-spacing: 2px; }
.hero-trust b { color: #fff; font-family: var(--font-display); }
.hero-trust .div { width: 1px; height: 20px; background: rgba(255,255,255,.28); }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.d1 { transition-delay: .08s; }
.d2 { transition-delay: .16s; }
.d3 { transition-delay: .24s; }
.d4 { transition-delay: .32s; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Tira de departamentos (estática, sin marquee: tono sobrio) ---------- */
.dept-strip { background: var(--bg-dark); color: rgba(255,255,255,.82); padding: 16px 0; overflow-x: auto; }
.dept-strip-inner { display: flex; gap: 0; width: max-content; margin-inline: auto; }
.dept-strip-inner span {
  font-family: var(--font-display); font-weight: 500; font-size: .86rem; letter-spacing: .08em; text-transform: uppercase;
  padding: 0 22px; position: relative;
}
.dept-strip-inner span:not(:last-child)::after { content: ''; position: absolute; right: 0; top: 2px; bottom: 2px; width: 1px; background: rgba(255,255,255,.2); }

/* ---------- La ferretería (texto + foto) ---------- */
.zones { background: var(--bg-soft); }
.about-grid { display: grid; grid-template-columns: .95fr 1.05fr; gap: 56px; align-items: center; }
.about-photo { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 4/3; }
.about-photo img { width: 100%; height: 100%; object-fit: cover; }
.about-text .section-head { margin-bottom: 28px; }
.about-text > p { color: var(--ink-soft); margin-bottom: 24px; font-size: 1.02rem; }
.trait-list { display: flex; flex-direction: column; gap: 0; border-top: 1px solid var(--line); }
.trait { display: flex; gap: 18px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.trait .num { font-family: var(--font-display); font-size: 1.05rem; color: var(--rust-700); font-weight: 600; flex-shrink: 0; width: 26px; }
.trait h4 { font-size: .98rem; margin-bottom: 4px; text-transform: none; }
.trait p { color: var(--ink-soft); font-size: .92rem; }
@media (max-width: 880px) { .about-grid { grid-template-columns: 1fr; gap: 30px; } .about-photo { aspect-ratio: 16/9; } }

/* ---------- Departamentos ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 20px; }
.dept-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 20px; }
.dept-card {
  position: relative; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm);
  aspect-ratio: 4/5;
}
.dept-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.dept-card:hover img { transform: scale(1.06); }
.dept-caption {
  position: absolute; inset: auto 0 0 0; padding: 18px 16px;
  background: linear-gradient(180deg, transparent, rgba(15,12,8,.92));
  color: #fff;
}
.dept-caption .tag { display: block; font-size: .68rem; text-transform: uppercase; letter-spacing: .1em; color: var(--amber); margin-bottom: 3px; font-weight: 600; font-family: var(--font-display); }
.dept-caption h3 { font-size: 1.02rem; color: #fff; text-transform: none; font-weight: 600; }

/* ---------- Servicios destacados ---------- */
.serv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.serv {
  position: relative; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 28px 24px 24px; overflow: hidden;
}
.serv::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--rust-700); }
.serv .top { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.serv .serv-ico { width: 46px; height: 46px; border-radius: var(--radius); background: var(--rust-050); color: var(--rust-700); display: grid; place-items: center; flex: 0 0 auto; }
.serv .serv-ico svg { width: 24px; height: 24px; }
.serv h3 { font-size: 1.08rem; margin-bottom: 8px; }
.serv p { color: var(--ink-soft); font-size: .94rem; text-transform: none; }

/* ---------- Stats ---------- */
.stats { background: var(--bg-dark); border-radius: var(--radius-lg); padding: 44px 28px; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; text-align: center; }
.stat { border-right: 1px solid rgba(255,255,255,.12); }
.stat:last-child { border-right: 0; }
.stats .num { font-family: var(--font-display); font-size: clamp(1.8rem, 3.4vw, 2.5rem); font-weight: 700; color: var(--amber); }
.stats .lbl { color: rgba(255,255,255,.62); font-size: .84rem; margin-top: 8px; text-transform: none; }
@media (max-width: 720px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } .stat { border-right: 0; border-bottom: 1px solid rgba(255,255,255,.12); padding-bottom: 18px; } }

/* ---------- Galería ---------- */
.gallery-teaser, .gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.gallery-teaser figure, .gallery figure { border-radius: var(--radius); overflow: hidden; cursor: pointer; aspect-ratio: 4/3; }
.gallery-teaser img, .gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.gallery-teaser figure:hover img, .gallery figure:hover img { transform: scale(1.05); }
@media (max-width: 720px) { .gallery-teaser, .gallery { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Opiniones ---------- */
.testi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.testi-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 26px 24px; }
.testi-quote { font-family: var(--font-display); color: var(--rust-700); font-size: 2.4rem; line-height: 1; margin-bottom: 4px; display: block; }
.testi-card p { font-size: 1rem; color: var(--ink); margin-bottom: 16px; text-transform: none; }
.testi-name { font-family: var(--font-display); font-weight: 600; font-size: .88rem; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-soft); }

/* ---------- Info práctica / horario ---------- */
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 0; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.info-item { padding: 26px 24px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.info-item h4 { font-size: .96rem; margin-bottom: 8px; text-transform: none; }
.info-item p { color: var(--ink-soft); font-size: .9rem; text-transform: none; }

.horario-table { width: 100%; border-collapse: collapse; margin-top: 4px; }
.horario-table td { padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: .94rem; }
.horario-table td:first-child { color: var(--ink-soft); }
.horario-table td:last-child { text-align: right; font-family: var(--font-display); font-weight: 600; letter-spacing: .02em; }
.horario-table tr:last-child td { border-bottom: 0; }
.horario-table .closed { color: var(--rust-700); }

/* ---------- Contacto ---------- */
.contact-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: stretch; }
.contact-card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: clamp(28px, 4vw, 44px);
}
.contact-card .eyebrow { margin-bottom: 16px; }
.contact-card h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); margin-bottom: 12px; }
.contact-card > p { color: var(--ink-soft); margin-bottom: 24px; text-transform: none; }
.contact-line { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.contact-line .ico { width: 42px; height: 42px; border-radius: var(--radius); background: var(--rust-050); color: var(--rust-700); display: grid; place-items: center; font-size: 1.1rem; flex: 0 0 auto; }
.contact-line small { display: block; color: var(--ink-soft); font-size: .8rem; }
.contact-line b { font-size: 1rem; font-weight: 600; }
.contact-actions { display: flex; gap: 12px; margin: 24px 0 8px; flex-wrap: wrap; }
.contact-horario { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.contact-horario h4 { font-size: .84rem; letter-spacing: .1em; color: var(--ink-soft); margin-bottom: 10px; text-transform: uppercase; }

.map-card { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); min-height: 340px; filter: grayscale(.2) contrast(1.05); }
.map-card iframe { width: 100%; height: 100%; border: 0; min-height: 340px; }

@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }

/* ---------- CTA final ---------- */
.cta-final { background: var(--bg-dark); }
.cta-box { text-align: center; color: #fff; }
.cta-box .eyebrow { justify-content: center; color: var(--amber); }
.cta-box .eyebrow::before { display: none; }
.cta-box .eyebrow::after { content: ''; width: 28px; height: 2px; background: var(--amber); }
.cta-box h2 { color: #fff; font-size: clamp(1.7rem, 3.6vw, 2.5rem); margin: 14px 0; }
.cta-box p { color: rgba(255,255,255,.7); max-width: 480px; margin: 0 auto 28px; text-transform: none; font-size: 1.02rem; }
.cta-box .btn-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.cta-box .btn-ghost { color: #fff; border-color: rgba(255,255,255,.35); }
.cta-box .btn-ghost:hover { border-color: var(--amber); color: var(--amber); }

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: rgba(255,255,255,.66); padding: 54px 0 26px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 38px; margin-bottom: 40px; }
.footer h5 { color: #fff; font-family: var(--font-display); font-size: .9rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 16px; font-weight: 600; }
.footer ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer a:hover { color: var(--amber); }
.footer .brand { color: #fff; margin-bottom: 14px; }
.footer p { font-size: .9rem; max-width: 34ch; text-transform: none; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.1); font-size: .8rem; }
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- WhatsApp flotante ---------- */
/* El negocio SÍ publica un número de WhatsApp real (verificado en la ficha
   actual), así que el botón persistente puede ser WhatsApp con garantías. */
.wa-float {
  position: fixed; right: 22px; bottom: 22px; z-index: 90;
  width: 56px; height: 56px; border-radius: 50%; background: #25D366; color: #fff;
  display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow);
  border: 1.5px solid rgba(255,255,255,.25); transition: transform .3s var(--ease);
}
.wa-float:hover { transform: scale(1.06); }
.wa-float svg { width: 28px; height: 28px; fill: #fff; }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 200; background: rgba(15,12,8,.95);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity .3s;
}
.lightbox.open { opacity: 1; pointer-events: auto; }
.lightbox img { max-width: min(92vw, 1000px); max-height: 86vh; border-radius: 4px; }
.lb-close, .lb-prev, .lb-next {
  position: absolute; background: rgba(255,255,255,.1); color: #fff; border: 1px solid rgba(255,255,255,.2); border-radius: 50%;
  width: 44px; height: 44px; font-size: 1.3rem; cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background .2s;
}
.lb-close:hover, .lb-prev:hover, .lb-next:hover { background: rgba(255,255,255,.2); }
.lb-close { top: 22px; right: 22px; }
.lb-prev { left: 22px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 22px; top: 50%; transform: translateY(-50%); }

@media (max-width: 720px) {
  .hero { padding-top: 90px; }
}
