/* ══════════════════════════════════════════
   BETHEL · ESTILOS COMUNES
   Base, encabezado, botones, tarjetas de producto,
   pie de página y botones flotantes.
   Lo usan todas las páginas; cada página agrega su propio CSS.

   Tema claro y cálido. Para una franja oscura (espresso),
   agrega la clase .oscuro a la sección: los colores se ajustan solos.
══════════════════════════════════════════ */

:root {
  --fondo: #f7f1e8;
  --fondo-2: #efe6d8;
  --fondo-3: #e5d9c6;
  --superficie: #fffcf7;
  --texto: #2a1f19;
  --texto-2: #5d4c40;
  --texto-3: #8b7869;
  --dorado: #c9a24a;          /* rellenos: botones, insignias */
  --dorado-texto: #8f6a1d;    /* texto dorado legible sobre crema */
  --dorado-claro: #e2c47e;
  --dorado-hover: #b58f38;
  --dorado-suave: rgba(201, 162, 74, 0.14);
  --borde: rgba(42, 31, 25, 0.1);
  --borde-dorado: rgba(160, 120, 40, 0.35);
  --espresso: #1b1411;
  --wa: #25d366;
  --radio: 22px;
  --radio-sm: 14px;
  --ancho: 1200px;
  --header-h: 72px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --sombra: 0 20px 50px rgba(60, 40, 20, 0.12);
  --sombra-sm: 0 6px 20px rgba(60, 40, 20, 0.08);
  --serif: "Playfair Display", Georgia, serif;

  /* Relleno fuerte (botón principal, íconos en círculo) y el texto que va encima */
  --solido: #1b1411;
  --sobre-solido: #fbf6ef;
  --sobre-solido-acento: #e2c47e;
  /* Etiquetas semitransparentes sobre fotos */
  --cristal: rgba(255, 252, 247, 0.92);
  /* Encabezado y barra fija */
  --cabecera: rgba(247, 241, 232, 0.82);
  --cabecera-solida: rgba(247, 241, 232, 0.95);
  color-scheme: light;
}

/* ══════════════════════════════════════════
   TEMA OSCURO (botón del encabezado)
══════════════════════════════════════════ */
:root[data-tema="oscuro"],
.oscuro {
  --fondo: #1b1411;
  --fondo-2: #241b17;
  --fondo-3: #2f2420;
  --superficie: #241b17;
  --texto: #fbf6ef;
  --texto-2: rgba(251, 246, 239, 0.74);
  --texto-3: rgba(251, 246, 239, 0.52);
  --dorado-texto: #e2c47e;
  --dorado-suave: rgba(201, 162, 74, 0.16);
  --borde: rgba(255, 255, 255, 0.1);
  --borde-dorado: rgba(201, 162, 74, 0.4);
  --sombra: 0 24px 60px rgba(0, 0, 0, 0.45);
  --sombra-sm: 0 6px 20px rgba(0, 0, 0, 0.3);
  --solido: #c9a24a;
  --sobre-solido: #1b1411;
  --sobre-solido-acento: #1b1411;
  --cristal: rgba(27, 20, 17, 0.85);
  --cabecera: rgba(27, 20, 17, 0.82);
  --cabecera-solida: rgba(27, 20, 17, 0.95);
}
:root[data-tema="oscuro"] { color-scheme: dark; }

/* Franjas oscuras: resaltan sobre el fondo claro, y en el tema oscuro van un tono más profundo */
.oscuro { background: var(--fondo); color: var(--texto); }
:root[data-tema="oscuro"] .oscuro { --fondo: #110c0a; --fondo-2: #1b1411; --superficie: #1b1411; }

/* ── Base ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: "Poppins", system-ui, sans-serif;
  background: var(--fondo);
  color: var(--texto);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

img, svg { display: block; max-width: 100%; }
/* Lo que se oculta con el atributo hidden se oculta siempre, aunque su clase le dé otro display */
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: none; }
input, textarea, select { font: inherit; }
h1, h2, h3 { text-wrap: balance; }

:focus-visible { outline: 2px solid var(--dorado-texto); outline-offset: 3px; border-radius: 6px; }

.container { width: min(100% - 32px, var(--ancho)); margin-inline: auto; }
.section { padding: clamp(72px, 10vw, 120px) 0; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.saltar {
  position: fixed; left: 16px; top: -60px; z-index: 3000;
  background: var(--espresso); color: #fff; font-weight: 600;
  padding: 10px 18px; border-radius: 10px;
  transition: top 0.2s;
}
.saltar:focus { top: 12px; }

/* Íconos (definidos en iconos.js) */
.i { width: 20px; height: 20px; flex-shrink: 0; }
.i-sm { width: 16px; height: 16px; }
.i-lg { width: 28px; height: 28px; }

/* ── Tipografía ── */
.kicker {
  display: inline-flex; align-items: center; gap: 12px;
  color: var(--dorado-texto);
  font-size: 0.74rem; font-weight: 600;
  letter-spacing: 3px; text-transform: uppercase;
  margin-bottom: 14px;
}
.kicker::before { content: ""; width: 28px; height: 1px; background: currentColor; opacity: 0.6; }

.titulo {
  font-family: var(--serif);
  font-size: clamp(2rem, 4.4vw, 3.1rem);
  line-height: 1.1;
  font-weight: 600;
  letter-spacing: -0.5px;
}

.acento { font-family: var(--serif); font-style: italic; font-weight: 500; color: var(--dorado-texto); }

.texto { color: var(--texto-2); font-weight: 300; font-size: 1.02rem; line-height: 1.8; }

.encabezado { max-width: 680px; margin-bottom: clamp(36px, 5vw, 56px); }
.encabezado.centrado { margin-inline: auto; text-align: center; }
.encabezado.centrado .kicker::after { content: ""; width: 28px; height: 1px; background: currentColor; opacity: 0.6; }
.encabezado .texto { margin-top: 14px; }

.encabezado-fila {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 24px;
  margin-bottom: clamp(28px, 4vw, 44px);
}
.encabezado-fila .encabezado { margin-bottom: 0; }

/* ── Barra de progreso de lectura ── */
.scroll-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 1100;
  background: linear-gradient(90deg, var(--dorado), var(--dorado-claro));
  transform-origin: left; transform: scaleX(0);
}

/* ══════════════════════════════════════════
   ENCABEZADO
══════════════════════════════════════════ */
.header {
  position: sticky; top: 0; z-index: 1000;
  height: var(--header-h);
  background: var(--cabecera);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border-bottom: 1px solid transparent;
  transition: background 0.3s, box-shadow 0.3s, border-color 0.3s;
}
.header.scrolled {
  background: var(--cabecera-solida);
  border-bottom-color: var(--borde);
  box-shadow: var(--sombra-sm);
}

.header-inner { height: 100%; display: flex; align-items: center; gap: 12px; }
.header-inner .nav { margin-right: 12px; }

.brand { display: flex; align-items: center; gap: 10px; margin-right: auto; }
.brand-logo {
  width: 42px; height: 42px; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--solido);
  color: var(--sobre-solido-acento);
}
.brand-logo .i { width: 24px; height: 24px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name { font-family: var(--serif); color: var(--texto); font-size: 1.5rem; font-weight: 600; }
.brand-subtitle { color: var(--dorado-texto); font-size: 0.62rem; font-weight: 500; letter-spacing: 2.2px; text-transform: uppercase; white-space: nowrap; }
@media (max-width: 360px) { .brand-subtitle { display: none; } }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--texto-2);
  font-size: 0.92rem; font-weight: 500;
  transition: color 0.25s, background 0.25s;
}
.nav a:hover { color: var(--texto); background: var(--borde); }
.nav a[aria-current="page"] { color: var(--texto); background: var(--dorado-suave); }
.nav .nav-wa { display: none; }

/* Botón de tema claro / oscuro */
.tema-toggle {
  position: relative;
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--borde-dorado);
  color: var(--texto);
  transition: background 0.25s, transform 0.4s var(--ease);
}
.tema-toggle:hover { background: var(--dorado-suave); }
.tema-toggle:active { transform: rotate(-30deg); }
.tema-toggle .i { position: absolute; transition: opacity 0.3s, transform 0.4s var(--ease); }
.tema-toggle .icono-sol { opacity: 0; transform: rotate(-90deg) scale(0.6); color: var(--dorado-texto); }
:root[data-tema="oscuro"] .tema-toggle .icono-luna { opacity: 0; transform: rotate(90deg) scale(0.6); }
:root[data-tema="oscuro"] .tema-toggle .icono-sol { opacity: 1; transform: none; }

.menu-toggle {
  display: none;
  width: 44px; height: 44px; border-radius: 12px;
  align-items: center; justify-content: center; flex-direction: column; gap: 5px;
  border: 1px solid var(--borde);
}
.menu-toggle span {
  width: 20px; height: 2px; border-radius: 2px; background: var(--texto);
  transition: transform 0.3s var(--ease), opacity 0.2s;
}
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ══════════════════════════════════════════
   BOTONES
══════════════════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 50px;
  padding: 12px 26px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.93rem; font-weight: 600; letter-spacing: 0.2px;
  white-space: nowrap;
  transition: background 0.25s, color 0.25s, border-color 0.25s, box-shadow 0.25s, transform 0.25s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn .i-flecha-mov { transition: transform 0.25s var(--ease); }
.btn:hover .i-flecha-mov { transform: translateX(4px); }

.btn-primary { background: var(--solido); color: var(--sobre-solido); }
.btn-primary:hover { filter: brightness(1.15); box-shadow: var(--sombra-sm); }

.btn-dorado { background: var(--dorado); color: var(--espresso); }
.btn-dorado:hover { background: var(--dorado-claro); box-shadow: 0 12px 30px rgba(201, 162, 74, 0.3); }

.btn-ghost { background: transparent; border-color: var(--borde-dorado); color: var(--texto); }
.btn-ghost:hover { border-color: var(--texto); }

.btn-outline { border-color: var(--borde-dorado); color: var(--dorado-texto); background: var(--dorado-suave); }
.btn-outline:hover { background: var(--dorado); color: var(--espresso); border-color: var(--dorado); }

.btn-wa { background: var(--wa); color: #05260f; }
.btn-wa:hover { background: #3be07c; box-shadow: 0 12px 30px rgba(37, 211, 102, 0.28); }

.btn-sm { min-height: 40px; padding: 8px 18px; font-size: 0.85rem; }
.btn-block { width: 100%; }

.enlace-flecha {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--texto); font-weight: 600; font-size: 0.92rem;
  white-space: nowrap;
  border-bottom: 1px solid var(--borde-dorado);
  padding-bottom: 3px;
}
.enlace-flecha .i { width: 18px; height: 18px; color: var(--dorado-texto); transition: transform 0.25s var(--ease); }
.enlace-flecha:hover .i { transform: translateX(4px); }

/* ══════════════════════════════════════════
   TARJETAS DE SECCIÓN (catálogo e inicio)
══════════════════════════════════════════ */
.secciones-grid {
  display: grid;
  grid-template-columns: repeat(var(--columnas, 4), minmax(0, 1fr));
  gap: 16px;
}

.seccion-card {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: var(--radio);
  overflow: hidden;
  background: var(--fondo-2);
  text-align: left;
  padding: 0;
  isolation: isolate;
}
.seccion-card img {
  position: absolute; inset: 0; z-index: -1;
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.8s var(--ease);
}
.seccion-overlay { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, transparent 40%, rgba(27, 20, 17, 0.82) 100%); }
.seccion-icono {
  position: absolute; top: 14px; left: 14px;
  width: 42px; height: 42px; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--cristal); color: var(--dorado-texto);
}
.seccion-icono svg { width: 24px; height: 24px; }
.seccion-texto { position: absolute; left: 18px; right: 60px; bottom: 16px; display: flex; flex-direction: column; color: #fbf6ef; }
.seccion-texto strong { font-family: var(--serif); font-size: 1.35rem; font-weight: 600; line-height: 1.15; }
.seccion-texto small { color: var(--dorado-claro); font-size: 0.8rem; }
.seccion-flecha {
  position: absolute; right: 16px; bottom: 18px;
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--dorado); color: var(--espresso);
  transition: transform 0.4s var(--ease);
}
.seccion-flecha svg { width: 18px; height: 18px; }
.seccion-card:hover img { transform: scale(1.06); }
.seccion-card:hover .seccion-flecha { transform: translateX(4px); }

/* Sección sin muebles publicados todavía: invita a preguntar */
.seccion-card.vacia { display: flex; flex-direction: column; justify-content: flex-end; border: 1px dashed var(--borde-dorado); background: var(--fondo-2); }
.seccion-card.vacia .seccion-icono { position: static; width: 56px; height: 56px; margin: auto; background: var(--superficie); }
.seccion-card.vacia .seccion-icono svg { width: 30px; height: 30px; }
.seccion-card.vacia .seccion-texto { position: static; padding: 0 16px 18px; color: var(--texto); text-align: center; }
.seccion-card.vacia .seccion-texto small { color: var(--dorado-texto); }

/* ══════════════════════════════════════════
   TARJETA DE PRODUCTO (catálogo e inicio)
══════════════════════════════════════════ */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 22px;
}

.product-card {
  position: relative;
  display: flex; flex-direction: column;
  background: var(--superficie);
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.4s var(--ease), border-color 0.3s, box-shadow 0.4s;
}
.product-card:hover { transform: translateY(-6px); border-color: var(--borde-dorado); box-shadow: var(--sombra); }

.product-image {
  position: relative; display: block; width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--fondo-2);
}
.product-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s var(--ease), opacity 0.5s; }
.product-image .img-hover { position: absolute; inset: 0; opacity: 0; }
.product-card:hover .product-image img { transform: scale(1.04); }
.product-card:hover .product-image .img-hover { opacity: 1; }

.product-badge {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  padding: 4px 12px; border-radius: 999px;
  background: var(--solido); color: var(--sobre-solido-acento);
  font-size: 0.68rem; font-weight: 600; letter-spacing: 1px; text-transform: uppercase;
}
.foto-count {
  position: absolute; right: 12px; bottom: 12px; z-index: 2;
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 999px;
  background: var(--cristal); color: var(--texto);
  font-size: 0.72rem; font-weight: 500;
}

.product-badge, .foto-count { pointer-events: none; }

.product-info { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 4px; flex-grow: 1; }
.product-cat { color: var(--dorado-texto); font-size: 0.68rem; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; }
.product-info h3 { font-family: var(--serif); font-size: 1.22rem; font-weight: 600; line-height: 1.25; }

/* El enlace del nombre cubre toda la tarjeta (el corazón queda encima) */
.product-link::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.product-link:focus-visible { outline: none; }
.product-card:has(.product-link:focus-visible) { outline: 2px solid var(--dorado-texto); outline-offset: 3px; }
.product-resumen { color: var(--texto-2); font-size: 0.86rem; }
.product-medidas { display: flex; align-items: center; gap: 6px; color: var(--texto-3); font-size: 0.8rem; }
.product-medidas svg { width: 14px; height: 14px; flex-shrink: 0; color: var(--dorado-texto); }
.product-ver {
  margin-top: auto; padding-top: 12px;
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--texto); font-size: 0.84rem; font-weight: 600;
}
.product-ver svg { width: 16px; height: 16px; color: var(--dorado-texto); transition: transform 0.25s var(--ease); }
.product-card:hover .product-ver svg { transform: translateX(4px); }

/* Esqueleto de carga */
.skeleton { pointer-events: none; }
.seccion-card.skeleton, .skeleton .product-image, .sk-linea {
  background: linear-gradient(90deg, var(--fondo-2) 25%, var(--fondo-3) 50%, var(--fondo-2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}
.sk-linea { display: block; height: 14px; border-radius: 6px; width: 75%; }
.sk-linea.corta { width: 45%; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ══════════════════════════════════════════
   LLAMADO FINAL (CTA)
══════════════════════════════════════════ */
.cta-box {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 32px;
  padding: clamp(32px, 5vw, 56px);
  border-radius: 28px;
  background:
    radial-gradient(circle at 100% 0%, rgba(201, 162, 74, 0.22), transparent 55%),
    var(--fondo-2);
}
.cta-box h2 { font-family: var(--serif); font-size: clamp(1.8rem, 3.6vw, 2.6rem); font-weight: 600; line-height: 1.12; margin-bottom: 10px; }
.cta-box p { color: var(--texto-2); font-weight: 300; max-width: 520px; }
.cta-box > * { min-width: 0; }
.cta-acciones { display: flex; gap: 12px; flex-wrap: wrap; }
.section-cta { padding: 16px 0 clamp(64px, 8vw, 96px); }

/* Variante con la mascota de Bethel a la derecha */
.cta-mascota { grid-template-columns: 1fr 280px; padding-block: 0; }
.cta-mascota > div { padding-block: clamp(32px, 5vw, 56px); }
.cta-mascota .kicker { margin-bottom: 10px; }
.cta-mascota .cta-acciones { margin-top: 24px; }
.mascota {
  align-self: end;
  width: 100%; height: 100%; max-height: 360px;
  object-fit: cover; object-position: top;
  border-radius: 24px 24px 0 0;
}

/* ══════════════════════════════════════════
   PREGUNTAS (acordeón), DATOS DE CONTACTO Y MIGAS
   (inicio, páginas de sección y página de cada mueble)
══════════════════════════════════════════ */
.acordeon { display: flex; flex-direction: column; gap: 10px; }
.acordeon details {
  border-radius: var(--radio-sm);
  background: var(--superficie);
  box-shadow: var(--sombra-sm);
  transition: box-shadow 0.3s;
}
.acordeon details[open] { box-shadow: var(--sombra); }
.acordeon summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 22px;
  font-family: var(--serif); font-size: 1.12rem; font-weight: 600;
  cursor: pointer; list-style: none;
}
.acordeon summary::-webkit-details-marker { display: none; }
.acordeon summary::after {
  content: "+"; flex-shrink: 0;
  width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--dorado-suave); color: var(--dorado-texto);
  font-family: "Poppins", sans-serif; font-size: 1.2rem; font-weight: 400;
  transition: transform 0.3s var(--ease), background 0.3s;
}
.acordeon details[open] summary::after { transform: rotate(45deg); background: var(--solido); color: var(--sobre-solido); }
.acordeon details p { padding: 0 22px 20px; color: var(--texto-2); font-weight: 300; line-height: 1.75; }

.datos { list-style: none; display: flex; flex-direction: column; gap: 16px; margin-bottom: 30px; }
.datos li { display: flex; gap: 14px; align-items: center; }
.dato-icono {
  flex-shrink: 0;
  width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--superficie); color: var(--dorado-texto);
  box-shadow: var(--sombra-sm);
}
.datos strong { display: block; font-size: 0.74rem; letter-spacing: 1.5px; text-transform: uppercase; color: var(--texto-3); font-weight: 600; }
.datos span, .datos a, .datos address { color: var(--texto); font-style: normal; }
.datos a:hover { color: var(--dorado-texto); }

/* Migas de pan: Inicio › Salas › Sala Caprini */
.migas { margin-bottom: 18px; }
.migas ol { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; color: var(--texto-3); font-size: 0.84rem; }
.migas li + li::before { content: "›"; margin-right: 8px; color: var(--dorado-texto); }
.migas a { color: var(--texto-2); border-bottom: 1px solid transparent; transition: border-color 0.2s, color 0.2s; }
.migas a:hover { color: var(--texto); border-bottom-color: var(--borde-dorado); }
.migas [aria-current] { color: var(--texto); font-weight: 500; }

/* ══════════════════════════════════════════
   PIE DE PÁGINA (siempre oscuro: agregar clase .oscuro)
══════════════════════════════════════════ */
.footer-top {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px;
  padding: 64px 0 40px;
}
.footer .brand { margin-bottom: 16px; }
.footer-description { color: var(--texto-3); font-size: 0.9rem; font-weight: 300; max-width: 300px; line-height: 1.75; }
.footer-title {
  color: var(--dorado-texto); font-size: 0.74rem; font-weight: 600;
  letter-spacing: 2px; text-transform: uppercase;
  margin-bottom: 18px;
}
.footer-list { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.footer-list a, .footer-list li {
  display: flex; align-items: flex-start; gap: 10px;
  color: var(--texto-2); font-size: 0.9rem; font-weight: 300;
  transition: color 0.2s;
}
.footer-list .i { width: 18px; height: 18px; margin-top: 2px; color: var(--dorado-texto); }
.footer-list a:hover { color: var(--dorado-texto); }
/* Redes sociales (se llenan desde script.js) */
.footer-redes { display: flex; gap: 10px; margin-top: 20px; }
.footer-redes:empty { display: none; }
.footer-redes a {
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--borde-dorado); color: var(--dorado-texto);
  transition: background 0.25s, color 0.25s;
}
.footer-redes a:hover { background: var(--dorado); color: var(--espresso); }
.footer-bottom { border-top: 1px solid var(--borde); padding: 18px 0; color: var(--texto-3); font-size: 0.82rem; }
.footer-bottom .container { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ══════════════════════════════════════════
   BOTONES FLOTANTES
══════════════════════════════════════════ */
.whatsapp-bubble, .back-to-top {
  position: fixed; right: 20px; z-index: 900;
  width: 56px; height: 56px; border-radius: 50%;
  display: grid; place-items: center;
  transition: transform 0.3s var(--ease), opacity 0.3s, box-shadow 0.3s;
}
.whatsapp-bubble {
  bottom: 20px;
  background: var(--wa); color: #fff;
  box-shadow: 0 10px 28px rgba(37, 211, 102, 0.4);
}
.whatsapp-bubble .i { width: 30px; height: 30px; }
.whatsapp-bubble::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  border: 2px solid var(--wa);
  animation: pulso 2.6s ease-out infinite;
}
@keyframes pulso { from { transform: scale(1); opacity: 0.6; } to { transform: scale(1.6); opacity: 0; } }

.back-to-top {
  bottom: 88px; right: 25px; width: 46px; height: 46px;
  background: var(--superficie); color: var(--texto);
  border: 1px solid var(--borde-dorado);
  box-shadow: 0 8px 24px rgba(27, 20, 17, 0.25);
  opacity: 0; pointer-events: none; transform: translateY(10px);
}
.back-to-top .i { width: 22px; height: 22px; }
.back-to-top.visible { opacity: 1; pointer-events: auto; transform: none; }
.whatsapp-bubble:hover, .back-to-top.visible:hover { transform: translateY(-3px) scale(1.05); }

/* ══════════════════════════════════════════
   APARICIÓN AL HACER SCROLL
   (solo si el JavaScript cargó: clase .js en <html>)
══════════════════════════════════════════ */
.js .reveal {
  opacity: 0; transform: translateY(26px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.js .reveal.visible { opacity: 1; transform: none; }

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

/* ══════════════════════════════════════════
   OPTIMIZACIÓN POR DISPOSITIVO
══════════════════════════════════════════ */

/* Celulares con muesca o barra de gestos (iPhone, Android): los botones flotantes
   no quedan debajo de la barra del sistema */
.whatsapp-bubble { bottom: calc(20px + env(safe-area-inset-bottom)); right: calc(20px + env(safe-area-inset-right)); }
.back-to-top { bottom: calc(88px + env(safe-area-inset-bottom)); right: calc(25px + env(safe-area-inset-right)); }
.footer-bottom { padding-bottom: calc(18px + env(safe-area-inset-bottom)); }

/* Pantallas táctiles: sin efectos de "pasar el mouse" que se quedan pegados,
   y una respuesta al tocar */
@media (hover: none) {
  .btn:hover, .product-card:hover, .paso:hover, .valor-card:hover, .proposito-card:hover,
  .whatsapp-bubble:hover, .back-to-top.visible:hover { transform: none; box-shadow: none; }
  .product-card:hover { border-color: var(--borde); }
  .seccion-card:hover img, .product-card:hover .product-image img { transform: none; }
  .product-card:hover .product-image .img-hover { opacity: 0; }
  .btn:active, .product-card:active, .seccion-card:active { transform: scale(0.98); }
}

/* Pantallas grandes (monitores de 27" o más) */
@media (min-width: 1600px) {
  :root { --ancho: 1340px; }
  html { font-size: 17px; }
}

/* Celular en horizontal: el menú abierto se puede desplazar */
@media (max-height: 500px) and (orientation: landscape) {
  .nav { max-height: calc(100dvh - var(--header-h)); overflow-y: auto; }
}

/* Tabletas y portátiles pequeños: el menú completo cabe sin apretarse */
@media (max-width: 1080px) and (min-width: 861px) {
  .nav a { padding: 8px 10px; font-size: 0.88rem; }
  .header-wa { padding-inline: 14px; }
}

/* ══════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════ */
@media (max-width: 960px) {
  .footer-top { grid-template-columns: 1fr 1fr; }
  .footer-top > :first-child { grid-column: 1 / -1; }
  .secciones-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cta-box { grid-template-columns: 1fr; }
  .cta-mascota { grid-template-columns: 1fr 220px; }
}

@media (max-width: 860px) {
  :root { --header-h: 64px; }

  .menu-toggle { display: flex; }
  .header-wa { display: none; }

  .nav {
    position: fixed; left: 0; right: 0; top: var(--header-h);
    flex-direction: column; align-items: stretch; gap: 4px;
    padding: 16px 16px 24px;
    background: var(--fondo);
    border-bottom: 1px solid var(--borde);
    box-shadow: 0 24px 40px rgba(60, 40, 20, 0.15);
    transform: translateY(-12px); opacity: 0; visibility: hidden;
    transition: transform 0.3s var(--ease), opacity 0.25s, visibility 0.25s;
  }
  .nav.abierto { transform: none; opacity: 1; visibility: visible; }
  .nav a { padding: 14px 16px; font-size: 1.05rem; border-radius: 12px; }
  .nav .nav-wa,
  .nav .nav-wa:hover { display: flex; margin-top: 10px; background: var(--wa); color: #05260f; border-radius: 999px; }

  .encabezado-fila { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 640px) {
  .brand-logo { width: 38px; height: 38px; }
  .brand-name { font-size: 1.3rem; }
  .brand-subtitle { font-size: 0.56rem; }

  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .product-info { padding: 12px 12px 14px; }
  .product-info h3 { font-size: 1rem; }
  .product-resumen { font-size: 0.78rem; }
  .product-medidas { font-size: 0.72rem; }
  .product-medidas svg, .product-ver { display: none; }

  .secciones-grid { gap: 10px; }
  .seccion-texto { left: 12px; right: 12px; bottom: 12px; }
  .seccion-texto strong { font-size: 1.1rem; }
  .seccion-flecha { display: none; }
  .seccion-icono { width: 36px; height: 36px; top: 10px; left: 10px; }

  .footer-top { grid-template-columns: 1fr; gap: 32px; padding: 48px 0 28px; }
  .cta-acciones .btn { flex: 1 1 100%; white-space: normal; text-align: center; }
  .cta-mascota { grid-template-columns: 1fr; }
  .mascota { max-height: 240px; width: 62%; justify-self: center; }

  .whatsapp-bubble { width: 54px; height: 54px; right: calc(16px + env(safe-area-inset-right)); bottom: calc(16px + env(safe-area-inset-bottom)); }
  .back-to-top { right: calc(20px + env(safe-area-inset-right)); bottom: calc(80px + env(safe-area-inset-bottom)); }
}
