/* ==========================================================
   AM OFFICE · HOJA DE ESTILOS
   ========================================================== */

/* COLORES DE LA MARCA */
:root {
  --azul: #0209DE;
  --azul-oscuro: #0107AE;
  --negro: #000000;
  --gris: #8E8E8E;
  --blanco: #FEFEFE;
  --fondo: #F4F5F8;
  --texto: #50505A;
  --borde: #E5E6ED;
  --whatsapp: #25D366;
  --whatsapp-oscuro: #1DA851;
  --suave: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 105px;
}

body {
  background: var(--blanco);
  color: var(--negro);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

ul,
ol {
  list-style: none;
}

[hidden] {
  display: none !important;
}

a:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--azul);
  outline-offset: 5px;
}

.contacto a:focus-visible {
  outline-color: white;
}

.contenedor {
  width: min(1140px, 90%);
  margin-inline: auto;
}

.seccion {
  padding: 90px 0;
}

p {
  color: var(--texto);
}

h1,
h2,
h3 {
  line-height: 1.15;
}

h2 {
  font-size: clamp(30px, 4vw, 44px);
  letter-spacing: -1.4px;
}

.etiqueta {
  margin-bottom: 16px;
  color: var(--azul);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* BOTONES Y ENLACES */
.boton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 14px 23px;
  border: 1px solid var(--azul);
  border-radius: 6px;
  background: var(--azul);
  color: white;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  transition: background 0.25s ease, transform 0.25s var(--suave), box-shadow 0.25s ease;
}

.boton:hover {
  background: var(--azul-oscuro);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px #0209DE30;
}

.secundario {
  background: transparent;
  border-color: #D7D8E0;
  color: var(--negro);
}

.secundario:hover {
  background: #EEEEF4;
  box-shadow: none;
}

.boton-whatsapp {
  background: var(--whatsapp);
  border-color: var(--whatsapp);
  color: white;
}

.boton-whatsapp:hover {
  background: var(--whatsapp-oscuro);
  box-shadow: 0 10px 24px #00000030;
}

.icono-wa {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  fill: currentColor;
}

.enlace {
  display: inline-block;
  padding: 10px 0;
  color: var(--azul);
  font-size: 14px;
  font-weight: 700;
}

.enlace:hover {
  text-decoration: underline;
  text-underline-offset: 5px;
}

/* BARRA DE PROGRESO DE SCROLL */
.progreso {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 40;
  width: 100%;
  height: 3px;
  background: var(--azul);
  transform: scaleX(0);
  transform-origin: left;
}

/* ENCABEZADO */
.encabezado {
  position: sticky;
  top: 0;
  z-index: 20;
  background: #FEFEFEF2;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--borde);
  transition: box-shadow 0.3s ease;
}

.encabezado.con-sombra {
  box-shadow: 0 6px 24px #00000012;
}

.navegacion {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 82px;
  transition: min-height 0.3s var(--suave);
}

.encabezado.con-sombra .navegacion {
  min-height: 70px;
}

.marca {
  display: flex;
  align-items: center;
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -1px;
  white-space: nowrap;
}

.marca strong {
  color: var(--azul);
}

.logo {
  width: 150px;
  max-height: 60px;
  object-fit: contain;
}

.menu {
  display: flex;
  align-items: center;
  gap: 26px;
}

.menu > a:not(.boton) {
  position: relative;
  padding: 12px 0;
  font-size: 14px;
  font-weight: 600;
  transition: color 0.2s ease;
}

.menu > a:not(.boton)::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 6px;
  width: 100%;
  height: 2px;
  background: var(--azul);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--suave);
}

.menu > a:not(.boton):hover,
.menu > a.activo {
  color: var(--azul);
}

.menu > a:not(.boton):hover::after,
.menu > a.activo::after {
  transform: scaleX(1);
}

/* PORTADA */
.portada {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 65px;
  padding: 70px 0;
}

h1 {
  margin-bottom: 24px;
  font-size: clamp(40px, 5vw, 66px);
  line-height: 1.05;
  letter-spacing: -2.5px;
}

h1 span {
  color: var(--azul);
}

.descripcion {
  max-width: 500px;
  font-size: 17px;
}

.acciones {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 28px 0 24px;
}

.garantias {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
}

.garantias li {
  position: relative;
  padding-left: 22px;
  color: var(--texto);
  font-size: 13px;
  font-weight: 600;
}

.garantias li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--azul);
  font-weight: 900;
}

.visual {
  position: relative;
}

.foto {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  min-width: 0;
  aspect-ratio: 4 / 3;
  border-radius: 10px;
  background: #EDEEF4;
}

.foto img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.foto-portada {
  aspect-ratio: 1 / 1.08;
  background: linear-gradient(140deg, #E8EAF5, #F5F6FA);
}

.placeholder {
  padding: 25px;
  text-align: center;
  color: #626779;
}

.placeholder strong {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
}

.placeholder span {
  display: block;
  font-size: 12px;
}

.insignia {
  position: absolute;
  bottom: 26px;
  left: -24px;
  padding: 20px 28px;
  border-radius: 6px;
  background: var(--azul);
  color: white;
  box-shadow: 0 12px 30px #0209DE25;
  animation: flotar 5s ease-in-out infinite;
}

.insignia strong {
  display: block;
  font-size: 35px;
  line-height: 1.1;
}

.insignia span {
  font-size: 13px;
}

@keyframes flotar {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* ENTRADA DE LA PORTADA */
.portada-texto > *,
.visual {
  animation: aparecer 0.9s var(--suave) both;
}

.portada-texto > *:nth-child(2) { animation-delay: 0.08s; }
.portada-texto > *:nth-child(3) { animation-delay: 0.16s; }
.portada-texto > *:nth-child(4) { animation-delay: 0.24s; }
.portada-texto > *:nth-child(5) { animation-delay: 0.32s; }
.visual { animation-delay: 0.2s; }

@keyframes aparecer {
  from {
    opacity: 0;
    transform: translateY(26px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* FRANJA */
.franja {
  background: var(--negro);
  color: white;
}

.franja-contenido {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 23px 0;
  font-size: 14px;
}

.franja-contenido span::before {
  content: "•";
  margin-right: 12px;
  color: #A4A7FF;
}

/* TÍTULOS DE SECCIÓN */
.titulo-seccion {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 35px;
  margin-bottom: 44px;
}

.titulo-seccion > p {
  max-width: 360px;
  font-size: 15px;
}

/* SERVICIOS */
.servicios {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 26px;
}

.servicio {
  padding-top: 23px;
  border-top: 2px solid var(--borde);
  position: relative;
}

.servicio::before {
  content: "";
  position: absolute;
  top: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--azul);
  transform: scaleX(0.25);
  transform-origin: left;
  transition: transform 0.5s var(--suave);
}

.servicio:hover::before {
  transform: scaleX(1);
}

.numero {
  color: var(--azul);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
}

.servicio h3 {
  margin: 23px 0 14px;
  font-size: 21px;
}

.servicio p {
  font-size: 14px;
}

.consulta {
  margin-top: 25px;
}

/* PRODUCTOS */
.fondo-suave {
  background: var(--fondo);
}

/* Carrusel que se desliza */
.productos {
  --separacion: 24px;
  --visibles: 3;
  display: flex;
  gap: var(--separacion);
  padding: 10px 2px 30px;
  margin: -10px -2px -10px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.productos::-webkit-scrollbar {
  display: none;
}

.productos:focus-visible {
  outline: 3px solid var(--azul);
  outline-offset: 4px;
  border-radius: 10px;
}

.productos .producto {
  flex: 0 0 calc((100% - var(--separacion) * (var(--visibles) - 1)) / var(--visibles));
  scroll-snap-align: start;
}

.carrusel-controles {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 18px;
}

.puntos {
  display: flex;
  gap: 8px;
}

.punto {
  width: 8px;
  height: 8px;
  border-radius: 8px;
  background: #C9CBDD;
  transition: width 0.4s var(--suave), background 0.3s ease;
}

.punto.activo {
  width: 28px;
  background: var(--azul);
}

.flechas {
  display: flex;
  gap: 10px;
}

.flecha {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--azul);
  border-radius: 50%;
  background: var(--azul);
  color: white;
  font-size: 20px;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.25s var(--suave), opacity 0.25s ease;
}

.flecha:hover:not(:disabled) {
  background: var(--azul-oscuro);
  transform: scale(1.08);
}

.flecha:disabled {
  border-color: #D7D8E0;
  background: transparent;
  color: var(--gris);
  cursor: default;
  opacity: 0.6;
}

.flecha:focus-visible {
  outline: 3px solid var(--azul);
  outline-offset: 4px;
}

/* Tarjeta destacada: amoblamiento completo */
.producto.producto-destacado {
  border-color: var(--azul);
  background: var(--azul);
}

.producto-destacado .foto {
  background: #1A21E6;
}

.producto-destacado .placeholder {
  color: #DCDDFF;
}

.producto-destacado .categoria {
  background: #FFFFFF26;
  color: white;
}

.producto-destacado h3,
.producto-destacado p,
.producto-destacado .enlace {
  color: white;
}

.producto {
  overflow: hidden;
  border: 1px solid var(--borde);
  border-radius: 10px;
  background: var(--blanco);
  transition: border-color 0.3s ease, box-shadow 0.4s ease, transform 0.4s var(--suave);
}

.producto .foto {
  border-radius: 0;
}

.producto .foto img {
  transition: transform 0.6s var(--suave);
}

.producto-info {
  padding: 25px;
}

.categoria {
  display: inline-block;
  margin-bottom: 12px;
  padding: 4px 10px;
  border-radius: 20px;
  background: #E9EAFC;
  color: var(--azul);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.producto h3 {
  margin-bottom: 12px;
  font-size: 22px;
}

.producto p {
  margin-bottom: 13px;
  font-size: 14px;
}

@media (hover: hover) {
  .producto:hover {
    border-color: #C0C3E7;
    box-shadow: 0 18px 40px #0000000F;
    transform: translateY(-6px);
  }

  .producto.producto-destacado:hover {
    border-color: var(--azul-oscuro);
  }

  .producto:hover .foto img {
    transform: scale(1.05);
  }
}

/* CÓMO TRABAJAMOS */
.pasos {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  counter-reset: paso;
}

.paso {
  padding: 30px;
  border: 1px solid var(--borde);
  border-radius: 10px;
  background: var(--blanco);
  transition: border-color 0.3s ease, transform 0.4s var(--suave);
}

.paso-numero {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 20px;
  border-radius: 50%;
  background: var(--azul);
  color: white;
  font-size: 18px;
  font-weight: 700;
}

.paso h3 {
  margin-bottom: 10px;
  font-size: 20px;
}

.paso p {
  font-size: 14px;
}

@media (hover: hover) {
  .paso:hover {
    border-color: #C0C3E7;
    transform: translateY(-4px);
  }
}

/* NOSOTROS */
.nosotros {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 65px;
}

.texto-nosotros {
  margin: 22px 0;
}

.lista {
  padding-left: 20px;
  margin-bottom: 18px;
  list-style: disc;
}

.lista li {
  margin-bottom: 10px;
  color: var(--texto);
  font-size: 15px;
}

.lista li::marker {
  color: var(--azul);
}

/* PREGUNTAS FRECUENTES */
.faq-contenedor {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  align-items: start;
  gap: 65px;
}

.faq details {
  border-bottom: 1px solid var(--borde);
}

.faq summary {
  position: relative;
  padding: 22px 40px 22px 0;
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
  list-style: none;
  transition: color 0.2s ease;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 50%;
  color: var(--azul);
  font-size: 26px;
  font-weight: 400;
  transform: translateY(-50%);
  transition: transform 0.3s var(--suave);
}

.faq details[open] summary::after {
  transform: translateY(-50%) rotate(45deg);
}

.faq summary:hover {
  color: var(--azul);
}

.faq details p {
  padding: 0 40px 22px 0;
  font-size: 15px;
  animation: aparecer 0.4s var(--suave) both;
}

/* CONTACTO */
.contacto {
  padding: 75px 0;
  background: var(--azul);
  color: white;
}

.contacto-contenido {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  align-items: center;
  gap: 90px;
}

.contacto .etiqueta {
  color: #DCDDFF;
}

.descripcion-contacto {
  max-width: 500px;
  margin: 20px 0 25px;
  color: white;
}

.datos-contacto {
  padding-left: 35px;
  border-left: 1px solid #FFFFFF50;
}

.datos-contacto h3 {
  margin-bottom: 12px;
  font-size: 18px;
}

.datos-contacto address {
  margin-bottom: 12px;
  font-style: normal;
}

.datos-contacto a {
  text-decoration: underline;
  text-underline-offset: 5px;
}

.titulo-telefono {
  margin-top: 30px;
}

/* PIE DE PÁGINA */
footer {
  padding: 25px 0;
}

.pie {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: var(--texto);
  font-size: 12px;
}

/* BOTÓN FLOTANTE DE WHATSAPP (VERDE) */
.whatsapp-flotante {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 30;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 35px;
  background: var(--whatsapp);
  color: white;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 8px 26px #25D36666;
  transition: background 0.25s ease, transform 0.3s var(--suave);
  animation: pulso 2.6s ease-out infinite;
}

.whatsapp-flotante:hover {
  background: var(--whatsapp-oscuro);
  transform: translateY(-3px) scale(1.03);
}

.whatsapp-flotante:focus-visible {
  outline-color: var(--negro);
}

@keyframes pulso {
  0% { box-shadow: 0 8px 26px #25D36666, 0 0 0 0 #25D36688; }
  70% { box-shadow: 0 8px 26px #25D36666, 0 0 0 16px #25D36600; }
  100% { box-shadow: 0 8px 26px #25D36666, 0 0 0 0 #25D36600; }
}

/* ANIMACIONES AL HACER SCROLL
   (sin JavaScript todo se ve normal) */
[data-animar] {
  opacity: 1;
  transform: none;
}

[data-animar].pendiente {
  opacity: 0;
  transform: translateY(34px);
}

[data-animar].visible {
  opacity: 1;
  transform: none;
  transition:
    opacity 0.8s var(--suave) var(--retraso, 0ms),
    transform 0.8s var(--suave) var(--retraso, 0ms),
    border-color 0.3s ease,
    box-shadow 0.4s ease;
}

[data-animar]:focus-within {
  opacity: 1;
  transform: none;
}

/* TABLET */
@media (max-width: 950px) {
  .portada,
  .nosotros {
    gap: 35px;
  }

  .servicios {
    grid-template-columns: repeat(2, 1fr);
    gap: 35px;
  }

  .productos {
    --visibles: 2;
  }

  .pasos {
    grid-template-columns: 1fr;
  }

  .faq-contenedor {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .menu {
    gap: 16px;
  }

  .contacto-contenido {
    gap: 40px;
  }
}

/* CELULAR */
@media (max-width: 680px) {
  html {
    scroll-padding-top: 155px;
  }

  .navegacion,
  .encabezado.con-sombra .navegacion {
    flex-wrap: wrap;
    gap: 12px;
    min-height: 0;
    padding: 15px 0;
  }

  .marca {
    font-size: 23px;
  }

  .logo {
    width: 125px;
    max-height: 45px;
  }

  .menu {
    width: 100%;
    justify-content: space-between;
    gap: 8px;
  }

  .menu > a:not(.boton) {
    font-size: 12px;
  }

  .menu .boton {
    min-height: 42px;
    padding: 8px 12px;
    font-size: 12px;
  }

  .portada {
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 42px 0;
  }

  h1 {
    font-size: clamp(39px, 10vw, 58px);
    letter-spacing: -1.8px;
  }

  .descripcion {
    font-size: 16px;
  }

  .acciones .boton {
    flex: 1;
  }

  .foto-portada {
    aspect-ratio: 4 / 3;
  }

  .insignia {
    left: 16px;
    bottom: 16px;
    padding: 15px 22px;
  }

  .insignia strong {
    font-size: 29px;
  }

  .franja-contenido {
    flex-direction: column;
    gap: 10px;
    font-size: 13px;
  }

  .seccion {
    padding: 58px 0;
  }

  .titulo-seccion {
    display: block;
    margin-bottom: 30px;
  }

  .titulo-seccion > p {
    margin-top: 18px;
  }

  .servicios {
    gap: 28px 20px;
  }

  .servicio h3 {
    font-size: 18px;
  }

  .productos {
    --visibles: 1.15;
  }

  .nosotros,
  .contacto-contenido {
    grid-template-columns: 1fr;
  }

  .contacto {
    padding: 55px 0;
  }

  .datos-contacto {
    padding: 28px 0 0;
    border-left: 0;
    border-top: 1px solid #FFFFFF50;
  }

  .pie {
    flex-direction: column;
    gap: 7px;
    padding-bottom: 65px;
  }

  .whatsapp-flotante {
    right: 15px;
    bottom: 15px;
    padding: 14px;
  }

  .whatsapp-flotante span {
    display: none;
  }
}

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

/* ACCESIBILIDAD: MENOS MOVIMIENTO */
@media (prefers-reduced-motion: reduce) {
  html,
  .productos {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  [data-animar],
  [data-animar].pendiente,
  [data-animar].visible {
    opacity: 1;
    transform: none;
  }
}

/* IMPRESIÓN */
@media print {
  [data-animar].pendiente {
    opacity: 1;
    transform: none;
  }

  .encabezado {
    position: static;
  }

  .whatsapp-flotante,
  .progreso {
    display: none;
  }
}

/* ===== COMPARADOR ANTES / DESPUÉS ===== */
.comparador {
  --posicion: 50%;
  cursor: ew-resize;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}

.comparador img {
  pointer-events: none;
  -webkit-user-drag: none;
}

/* Muestra la foto "antes" solo hasta la posición de la barra */
.comparador .comparador-antes {
  clip-path: inset(0 calc(100% - var(--posicion)) 0 0);
}

.comparador-barra {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--posicion);
  z-index: 2;
  width: 3px;
  background: #fff;
  box-shadow: 0 0 12px #00000040;
  transform: translateX(-50%);
  pointer-events: none;
}

.comparador-asa {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--azul);
  color: #fff;
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 2px;
  box-shadow: 0 6px 20px #00000040;
  transform: translate(-50%, -50%);
  transition: transform 0.2s ease;
}

.comparador.arrastrando .comparador-asa {
  transform: translate(-50%, -50%) scale(1.12);
}

.comparador-etiqueta,
.comparador-pista {
  position: absolute;
  z-index: 2;
  padding: 6px 12px;
  border-radius: 20px;
  background: #000000B3;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  pointer-events: none;
}

.comparador-etiqueta {
  bottom: 14px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.comparador-etiqueta-antes {
  left: 14px;
}

.comparador-etiqueta-despues {
  right: 14px;
}

.comparador-pista {
  top: 14px;
  left: 50%;
  white-space: nowrap;
  transform: translateX(-50%);
  transition: opacity 0.3s ease;
}

.comparador.usado .comparador-pista {
  opacity: 0;
}

/* Campo de teclado: invisible, pero accesible con Tab y flechas */
.comparador-rango {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.comparador-rango:focus-visible ~ .comparador-barra .comparador-asa {
  outline: 3px solid #fff;
  outline-offset: 3px;
}