/* Reset básico */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Estilos generales */
body {
  font-family: 'Poppins', sans-serif;
  background-color: #ffffff;
  color: #333;
  line-height: 1.6;
  padding: 0;
}

[id="servicios"],
[id="productos"] {
  scroll-margin-top: 120px;
  /* Ajusta según la altura de tu header */
}

/* Top-Encabezado */
#top-header,
header {
  position: sticky;
  top: 0;
  z-index: 999;
}

.top-header {
  background-color: #000;
  color: #f7f7f7;
  font-size: 14px;
  padding: 10px 40px;
  padding-top: 10PX;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #DDD;
}

.top-header-content {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;

}


.top-info {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  white-space: nowrap;
}

.top-info span {
  display: flex;
  align-items: center;
  gap: 6px;
  text-align: center;
}

.social-icons {
  display: flex;
  align-items: center;
  gap: 16px;
}

.social-icons img {
  width: 35px;
  filter: brightness(0) invert(1);
  /* Blanco */
  transition: transform 0.3s ease;
}

.social-icons img:hover {
  transform: scale(1.2);
}

.top-header .social-icons img {
  transform: scale(1.4);
  transition: transform 0.3s ease;
  margin: 0 8px;
}

/* Encabezado */
header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  background: white;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.container-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 40px;
  transition: padding 0.3s ease;
  max-width: 1200px;
  margin: 0 auto;
}

/* Logo tamaño normal */
.logo {
  width: 70px;
  height: auto;
  transition: width 0.3s ease;
}

.menu {
  list-style: none;
  display: flex;
  gap: 40px;
}

.menu li a {
  font-family: 'Segoe UI', sans-serif;
  font-weight: bold;
  font-size: 18px;
  color: #000;
  text-decoration: none;
  position: relative;
  transition: color 0.3s ease;
}

.menu li a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -5px;
  height: 2px;
  width: 0%;
  background-color: #d32f2f;
  transition: width 0.3s ease;
}

.menu li a:hover {
  color: #d32f2f;
}

.menu li a:hover::after {
  width: 100%;
}

nav ul {
  display: flex;
  gap: 30px;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Header al hacer scroll */
header.shrink .container-header {
  padding: 8px 60px;
}

header.shrink .logo {
  width: 80px;
}


/* Animación hover subrayado moderno */
.menu li a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -5px;
  height: 2px;
  width: 0%;
  background-color: #d32f2f;
  transition: width 0.3s ease;
}

.menu li a:hover {
  color: #d32f2f;
}

.menu li a:hover::after {
  width: 100%;
}

/* Banner principal */
.hero-slider {
  width: 100%;
  height: 60vh;
  overflow: hidden;
  position: relative;
  margin-bottom: 0;
  padding-bottom: 0;
  font-family: 'Montserrat', sans-serif;
}

/* Swiper slides */
.swiper-wrapper {
  height: 100%;
}

.swiper-slide {
  position: relative;
  width: 100%;
  height: 100%;
}

.swiper-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

/* Capa oscura sobre la imagen */
.banner-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1;
}

/* Texto del banner */
.caption {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: white;
  text-shadow: none;
  z-index: 2;
  animation: fadeInUp 1.2s ease-out forwards;
}

.caption h1 {
  font-weight: 700;
  font-size: 45px;
  letter-spacing: 1px;
  margin-bottom: 10px;
}

.caption p {
  font-weight: 400;
  font-size: 18px;
  letter-spacing: 0.5px;
}

.swiper-slide .caption {
  position: absolute;
  top: calc(50% + 40px);
  /* 40px = altura de tu header */
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: white;
  z-index: 2;
  padding: 20px;
}

/* Flechas del slider */
.swiper-button-next,
.swiper-button-prev {
  color: red !important;
  z-index: 3;
  background: transparent !important;
  padding: 10px;
  border-radius: 50%;
  box-shadow: none !important;
  text-shadow: none !important;
}

.swiper-button-next::after,
.swiper-button-prev::after {
  font-size: 28px;
  font-weight: bold;
}

/* Paginación (puntos) */
.swiper-pagination {
  bottom: 20px !important;
}

.swiper-pagination-bullet {
  background: rgba(255, 0, 0, 0.3);
  /* rojo con transparencia */
  opacity: 1;
}

.swiper-pagination-bullet-active {
  background: red !important;
}

/* Animaciones */
@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translate(-50%, -60%);
  }

  100% {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

@keyframes fadeInUpBottom {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive */
@media (max-width: 768px) {
  .hero-slider {
    height: 65vh;
  }

  .caption h1 {
    font-size: 24px;
  }

  .caption p {
    font-size: 14px;
  }

  .caption-left .caption {
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
  }

  .caption-bottom .caption {
    bottom: 80px;
  }
}

/* Estilos para el botón "Ver productos" */
.btn-banner {
  display: inline-block;
  margin-top: 20px;
  padding: 10px 20px;
  background-color: red;
  color: white;
  font-weight: bold;
  border-radius: 8px;
  text-decoration: none;
  transition: 0.3s;
}

.btn-banner:hover {
  background-color: #c40000;
}

/* Marcas */
.marcas-slider {
  overflow: hidden;
  background: #fff;
  padding: 10px 0;
  border-top: 2px solid #ccc;
  border-bottom: 2px solid #ccc;
}

.slider-track {
  display: flex;
  gap: 60px;
  animation: deslizar 25s linear infinite;
  align-items: center;
}

.slider-track img {
  height: 40px;
  max-width: 100px;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.slider-track img:hover {
  transform: scale(1.1);
}

@keyframes deslizar {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

.marcas-slider:hover .slider-track {
  animation-play-state: paused;
}

/* Servicios */
#servicios {
  background: #fff;
  padding: 40px 0;
  text-align: center;
}

#servicios h1 {
  text-align: center;
  font-size: 38px;
  color: #d32f2f;
  font-weight: 800;
  margin-bottom: 40px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.servicios-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  max-width: 1200px;
  margin: 40px auto 0 auto;
  padding: 0 20px;
}

.servicio-card {
  background-color: rgba(255, 255, 255, 0.95);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  text-align: center;
  height: 100%;
  background-blend-mode: lighten;
  backdrop-filter: blur(2px);
  background-position: center center;
  background-repeat: no-repeat;
  background-size: 60%;
}

.servicio-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.servicio-card h3 {
  color: #d32f2f;
  font-size: 18px;
  font-weight: 700;
  font-family: 'Segoe UI', sans-serif;
  white-space: pre-line;
}

.servicio-card p {
  margin-top: 15px;
  font-size: 16px;
  line-height: 1.5;
  color: #444;
}

/* Botón "Ver más" */
.btn-ver {
  display: inline-block;
  margin-top: 20px;
  background: #000;
  color: white;
  padding: 10px 20px;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.btn-ver:hover {
  background-color: #d32f2f;
  color: #fff;
}

/* MODAL */
.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.6);
}

/* CONTENIDO DEL MODAL */
.modal-contenido {
  position: relative;
  margin: 5% auto;
  padding: 40px 30px;
  border-radius: 12px;
  max-width: 80vh;
  width: 90%;
  text-align: center;
  background-color: rgba(255, 255, 255, 0.95);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
  animation: aparecerModal 0.3s ease;
  overflow: hidden;
  overflow-y: auto;
  font-family: 'Segoe UI', sans-serif;
}

/* MARCA DE AGUA */
.modal-contenido::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: var(--imagen-marca-agua);
  background-repeat: no-repeat;
  background-position: center center;
  background-size: contain;
  opacity: 0.05;
  z-index: 0;
  pointer-events: none;
}

/* Asegura que el texto esté por encima */
.modal-contenido>* {
  position: relative;
  z-index: 1;
}

.modal-contenido h3 {
  font-size: 28px;
  font-weight: bold;
  color: #d32f2f;
  margin-bottom: 20px;
  font-family: 'Segoe UI', sans-serif;
}

.modal-contenido p {
  font-size: 18px;
  color: #333;
  line-height: 1.6;
  margin: 0 auto;
  max-width: 800px;
  text-align: justify;
  /* ✅ Esto lo justifica a ambos lados */
  text-align-last: center;
  /* ✅ Centra la última línea */
}

.modal-cerrar {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 32px;
  font-weight: bold;
  color: #444;
  cursor: pointer;
  transition: 0.3s;
  z-index: 2;
}

.modal-cerrar:hover {
  color: #000;
}

#main-content.blur {
  filter: blur(6px);
  transition: 0.3s ease;
}

#contenido-pagina.blur-activo {
  filter: blur(5px);
  transition: filter 0.3s ease;
}

/* ANIMACIÓN */
@keyframes aparecerModal {
  from {
    opacity: 0;
    transform: translateY(40px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Productos */
.producto-msg {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-top: 40px;
  margin-bottom: 60px;
  font-size: 18px;
  font-weight: 400;
  color: #333;
  gap: 15px;
}

.btn-whatsapp {
  display: inline-block;
  margin-top: 10px;
  padding: 10px 20px;
  background-color: #25D366;
  color: white;
  font-weight: bold;
  border-radius: 6px;
  text-decoration: none;
}

.btn-whatsapp:hover {
  background-color: #1eb75b;
}

/* Contenedor de productos */
.productos-container {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 30px;
  padding: 0 5%;
  flex-wrap: wrap;
}

.titulo-productos {
  text-align: center;
  font-size: 28px;
  color: #c92020;
  margin-top: 40px;
  margin-bottom: 30px;
  font-weight: bold;
}

/* Lateral izquierdo */
.filtro-lateral {
  flex: 0 0 220px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.subtitulo-filtro {
  font-weight: bold;
  color: #c92020;
  margin-bottom: 10px;
}

.filtro-btn {
  display: block;
  width: 100%;
  padding: 10px 15px;
  background: #f5f5f5;
  border: none;
  margin-bottom: 8px;
  cursor: pointer;
  text-align: left;
  font-weight: 500;
}

.filtro-btn.active {
  background: #c92020;
  color: white;
}

/* Grilla de productos */
.lista-productos {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 20px;
}

/* Tarjetas de producto */
.producto-card {
  background: #fff;
  padding: 15px;
  border-radius: 10px;
  box-shadow: 0px 1px 8px rgba(0, 0, 0, 0.08);
  text-align: center;
  transition: transform 0.2s ease;
  cursor: pointer;
}

.producto-card:hover {
  transform: translateY(-5px);
}

.producto-card img {
  width: 100%;
  height: 200px;
  object-fit: contain;
  transition: opacity 0.5s ease-in-out;
  border-radius: 10px;
}

.producto-card h4 {
  font-weight: 600;
  color: #1e1e1e;
  font-size: 16px;
}

.buscador-productos {
  margin-bottom: 15px;
}

.buscador-productos input {
  width: 100%;
  padding: 10px 15px;
  border-radius: 8px;
  border: 1px solid #ddd;
  box-sizing: border-box;
}

/* Modal Producto (sin conflicto con Servicios) */
.modal-producto {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
}

.modal-producto-contenido {
  position: relative;
  margin: 5% auto;
  padding: 20px;
  background: white;
  width: 90%;
  max-width: 600px;
  text-align: center;
  border-radius: 10px;
}

.cerrar-modal-producto {
  position: absolute;
  top: 10px;
  right: 20px;
  font-size: 30px;
  color: black;
  cursor: pointer;
  z-index: 10001;
}

.slider-container {
  position: relative;
}

#modal-imagen {
  max-width: 100%;
  height: auto;
  margin-bottom: 10px;
}

.anterior,
.siguiente {
  position: absolute;
  top: 50%;
  font-size: 30px;
  color: black;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 10000;
  transform: translateY(-50%);
}

.anterior {
  left: 10px;
}

.siguiente {
  right: 10px;
}

.anterior:hover,
.siguiente:hover {
  background-color: rgba(0, 0, 0, 0.8);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Responsivo para móviles */
@media (max-width: 768px) {
  .productos-container {
    flex-direction: column;
    padding: 0 20px;
  }

  .filtro-lateral {
    width: 100%;
    text-align: center;
    margin-bottom: 20px;
  }

  .subtitulo-filtro {
    font-size: 16px;
    margin-bottom: 10px;
  }

  .botones-filtro {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
  }

  .filtro-btn {
    flex: 0 0 45%;
    padding: 10px;
    font-size: 14px;
    text-align: center;
  }

  .lista-productos {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }

  .producto-card img {
    height: 120px;
  }

  .producto-card h4 {
    font-size: 14px;
  }

  .producto-msg {
    padding: 0 15px;
  }
}


/* Secciones */
section {
  padding: 40px 0;
}

#productos .producto {
  background-color: white;
  padding: 15px;
  margin: 10px 0;
  border-left: 5px solid #1976d2;
}

#servicios {
  background-color: #ffffff;
  padding: 60px 0;
}

#contacto {
  background-color: #ede7f6;
  padding: 30px;
}

/* Contacto */
#contacto {
  background-color: white;
  padding: 40px 20px;
}

#contacto h1 {
  font-size: 32px;
  color: #c92020;
  margin-bottom: 30px;
  text-align: center;
}

.contacto-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
}

.form-contacto,
.mapa {
  width: 100%;
  max-width: 500px;
  min-height: 400px;
  box-sizing: border-box;
}

/* Formulario */
.form-contacto {
  display: flex;
  flex-direction: column;
}

.form-contacto input,
.form-contacto textarea {
  padding: 10px;
  margin-bottom: 15px;
  border: 1px solid #ccc;
  border-radius: 6px;
  width: 100%;
}

.form-contacto textarea {
  resize: vertical;
  min-height: 120px;
}

.form-contacto button {
  background-color: #c92020;
  color: white;
  border: none;
  padding: 12px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
}

.form-contacto button:hover {
  background-color: #c40000;
}

/* Mapa */
.mapa iframe {
  width: 100%;
  height: 400px;
  border-radius: 6px;
  border: none;
}

/* Responsive */
@media (min-width: 768px) {
  .contacto-container {
    flex-direction: row;
    align-items: stretch;
  }

  .form-contacto,
  .mapa {
    flex: 1 1 500px;
  }
}

/* ===== WHATSAPP FAB — OVERRIDES FINALES ===== */
.whatsapp-container{
  position:fixed !important;
  bottom:20px !important; right:20px !important;
  z-index:1100 !important;
  display:flex !important; align-items:center !important; gap:8px !important;
  font-family:'Montserrat',sans-serif !important;
}

.whatsapp-text{
  background:#fff !important; color:#333 !important;
  font-size:14px !important; font-weight:500 !important;
  padding:6px 12px !important; border-radius:20px !important;
  box-shadow:0 2px 6px rgba(0,0,0,.15) !important;
  white-space:nowrap !important;
  opacity:0 !important; transform:translateX(8px) !important;
  transition:opacity .2s ease, transform .2s ease !important;
  pointer-events:none !important;
  z-index:100 !important;
}

.whatsapp-button{
  position:relative !important;
  width:60px !important; height:60px !important;
  display:flex !important; align-items:center !important; justify-content:center !important;
  text-decoration:none !important;
  overflow:visible !important;
}

/* Fondo verde detrás */
.whatsapp-button::after{
  content:"" !important;
  position:absolute !important; left:0; top:0;
  width:60px !important; height:60px !important;
  border-radius:50% !important;
  background:#25d366 !important;
  animation:pulse 1.5s infinite !important;
  box-shadow:0 4px 10px rgba(0,0,0,.25) !important;
  z-index:0 !important;   /* atrás */
}

/* Ícono delante SIEMPRE */
.whatsapp-button img{
  position:relative !important;
  width:32px !important; height:32px !important;
  z-index:2 !important;   /* delante del fondo */
  display:block !important;
}

/* Hover / focus: muestra la burbuja */
.whatsapp-container:hover .whatsapp-text,
.whatsapp-button:focus .whatsapp-text,
.whatsapp-button:focus-visible .whatsapp-text{
  opacity:1 !important; transform:translateX(0) !important;
}

@keyframes pulse{
  0%{transform:scale(1);   box-shadow:0 0 0 0 rgba(37,211,102,.6)}
  70%{transform:scale(1.1);box-shadow:0 0 0 12px rgba(37,211,102,0)}
  100%{transform:scale(1); box-shadow:0 0 0 0 rgba(37,211,102,0)}
}

/* En móviles: solo ícono */
@media (max-width:600px){
  .whatsapp-text{ display:none !important; }
}

/* Safe area iOS */
@supports (padding: max(0px)){
  .whatsapp-container{
    bottom:max(20px, env(safe-area-inset-bottom)) !important;
    right:max(20px, env(safe-area-inset-right)) !important;
  }
}

/* Footer */
footer {
  text-align: center;
  padding: 20px;
  background-color: #1a1a1a;
  color: white;
  margin-top: 40px;
}

#productos {
  background-color: #f9f9f9;
  padding: 40px 20px;
}

.producto {
  background-color: white;
  border-radius: 8px;
  padding: 20px;
  margin: 20px auto;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  max-width: 700px;
  transition: transform 0.2s ease;
}

.producto:hover {
  transform: scale(1.01);
}

.producto h3 {
  color: #0d47a1;
  margin-bottom: 8px;
}

.producto p {
  margin-bottom: 4px;
}

.producto small {
  color: #666;
  font-style: italic;
}