/* --- Variables y Reset --- */
:root {
  --primary: #0a2a66;   /* Azul oscuro corporativo */
  --secondary: #164eab; /* Azul más claro */
  --accent: #ff9f1c;    /* Naranja para llamadas a la acción (botones) */
  --text: #333;
  --light: #f4f4f4;
  --white: #ffffff;
  --shadow: 0 5px 15px rgba(0,0,0,0.1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Poppins', sans-serif;
  color: var(--text);
  background-color: #f9f9f9;
}

a { text-decoration: none; }
ul { list-style: none; }

/* --- Barra Top --- */
.top-info {
  background: var(--primary);
  color: var(--white);
  padding: 8px 0;
  font-size: 0.85rem;
  text-align: center;
}

.top-info span {
  margin: 0 10px;
  display: inline-block;
}

/* --- Header Principal --- */
.main-header {
  background: var(--white);
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 10px 0;
}

.container {
  max-width: 1200px;
  margin: auto;
  padding: 0 20px;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo h1 {
  color: var(--primary);
  font-size: 2.1rem;
  font-weight: 700;
  margin: 0;
}

.logo span.dot { color: var(--accent); }
.logo p { font-size: 0.75rem; color: #666; margin-top: -5px;}

.nav-menu a {
  color: var(--text);
  margin-left: 20px;
  font-weight: 500;
  transition: 0.3s;
}

.nav-menu a:hover, .nav-menu a.active {
  color: var(--secondary);
}

/* --- Barra Categorías (Estilo App) --- */
.category-bar {
  background: var(--secondary);
  display: flex;
  overflow-x: auto;
  padding: 10px 0;
  white-space: nowrap;
  box-shadow: inset 0 0 10px rgba(0,0,0,0.2);
}

.category-bar::-webkit-scrollbar { display: none; } /* Ocultar scrollbar */

.category-bar a {
  color: var(--white);
  padding: 8px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 0.8rem;
  border-right: 1px solid rgba(255,255,255,0.1);
  min-width: 80px;
}

.category-bar a i { font-size: 1.2rem; margin-bottom: 5px; }
.category-bar a:hover { background: rgba(255,255,255,0.1); }

/* --- Hero Section (Slider Automático) --- */
.hero {
  height: 450px;
  /* background: url('img/slide1.jpg')...  <- ESTA LÍNEA SE ELIMINA */
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--white);
  overflow: hidden; /* Importante para que no se salgan las imágenes */
}

/* Nuevo contenedor para las imágenes */
.hero-sliders-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1; /* Nivel más bajo */
}

/* Estilo de cada imagen individual */
.slide-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover; /* La imagen llena el espacio sin deformarse */
  opacity: 0; /* Por defecto están invisibles */
  transition: opacity 1.5s ease-in-out; /* Transición suave de 1.5 segundos */
}

/* La clase que hará visible la imagen actual */
.slide-img.active {
  opacity: 1;
  z-index: 2;
}

/* Ajustamos la capa oscura para que esté sobre las imágenes */
.hero-overlay {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(10, 42, 102, 0.4); 
  z-index: 3; /* Encima de las imágenes */
}

/* Ajustamos el contenido de texto para que esté sobre todo */
.hero-content {
  position: relative;
  z-index: 4; /* El nivel más alto para el texto y botones */
  max-width: 700px;
  padding: 20px;
}

/* ... el resto de hero h2, p, btn-primary sigue igual ... */

.hero h2 {
  font-size: 2.5rem;
  margin-bottom: 15px;
  line-height: 1.2;
}

.hero h2 span { color: var(--accent); }
.hero p { font-size: 1.1rem; margin-bottom: 25px; }

.btn-primary {
  background: var(--accent);
  color: var(--white);
  padding: 12px 30px;
  border-radius: 50px;
  font-weight: 600;
  transition: 0.3s;
}

.btn-primary:hover { background: #e68a00; transform: scale(1.05); }

/* --- Productos Grid --- */
.section-padding { padding: 60px 0; }
.section-title {
  text-align: center;
  color: var(--primary);
  margin-bottom: 40px;
  font-size: 2rem;
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: var(--accent);
  margin: 10px auto 0;
}

/* --- Estilos Carrusel de Productos --- */
.product-slider-section {
  padding: 40px 0;
  position: relative;
}

.slider-wrapper {
  position: relative; /* Para posicionar las flechas respecto a esto */
  overflow: hidden;   /* Para que no se salgan las tarjetas */
  padding: 20px 0;
}

.product-container {
  display: flex;        /* Pone los productos en fila */
  overflow-x: hidden;   /* Oculta la barra de desplazamiento fea */
  scroll-behavior: smooth; /* Suaviza el movimiento */
  gap: 20px;
  padding: 10px 0; /* Espacio para la sombra */
}

/* Modificamos la tarjeta para que tenga un tamaño fijo en el slider */
.product-card {
  min-width: 280px;  /* Ancho fijo: asegura que entren aprox 4 en pantalla grande */
  max-width: 280px;
  background: var(--white);
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  transition: 0.3s;
  flex: 0 0 auto; /* Evita que las tarjetas se aplasten */
}

/* Botones del carrusel (Izquierda / Derecha) */
.pre-btn, .nxt-btn {
  border: none;
  width: 45px;
  height: 45px;
  position: absolute;
  top: 50%;
  transform: translateY(-50%); /* Centrado vertical */
  background: var(--primary);
  color: white;
  border-radius: 50%;
  cursor: pointer;
  z-index: 8;
  opacity: 0.7;
  transition: 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.pre-btn:hover, .nxt-btn:hover {
  opacity: 1;
  background: var(--accent);
}

.pre-btn { left: -15px; } /* Ajuste fino a la izquierda */
.nxt-btn { right: -15px; } /* Ajuste fino a la derecha */

/* Ajuste Responsivo */
@media (max-width: 768px) {
  .product-card {
    min-width: 220px; /* En celular las tarjetas son más pequeñas */
  }
}

/* aqui cambien*/
/* --- Estilos Carrusel de Productos --- */
.product-slider-section {
  padding: 40px 0;
  position: relative;
}

.slider-wrapper {
  position: relative; /* Para posicionar las flechas respecto a esto */
  overflow: hidden;   /* Para que no se salgan las tarjetas */
  padding: 20px 0;
}

.product-container {
  display: flex;        /* Pone los productos en fila */
  overflow-x: hidden;   /* Oculta la barra de desplazamiento fea */
  scroll-behavior: smooth; /* Suaviza el movimiento */
  gap: 20px;
  padding: 10px 0; /* Espacio para la sombra */
}

/* Modificamos la tarjeta para que tenga un tamaño fijo en el slider */
.product-card {
  min-width: 280px;  /* Ancho fijo: asegura que entren aprox 4 en pantalla grande */
  max-width: 280px;
  background: var(--white);
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  transition: 0.3s;
  flex: 0 0 auto; /* Evita que las tarjetas se aplasten */
}

/* Botones del carrusel (Izquierda / Derecha) */
.pre-btn, .nxt-btn {
  border: none;
  width: 45px;
  height: 45px;
  position: absolute;
  top: 50%;
  transform: translateY(-50%); /* Centrado vertical */
  background: var(--primary);
  color: white;
  border-radius: 50%;
  cursor: pointer;
  z-index: 8;
  opacity: 0.7;
  transition: 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.pre-btn:hover, .nxt-btn:hover {
  opacity: 1;
  background: var(--accent);
}

.pre-btn { left: -15px; } /* Ajuste fino a la izquierda */
.nxt-btn { right: -15px; } /* Ajuste fino a la derecha */

/* Ajuste Responsivo */
@media (max-width: 768px) {
  .product-card {
    min-width: 220px; /* En celular las tarjetas son más pequeñas */
  }
}

.product-card {
  background: var(--white);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: 0.3s;
  position: relative;
  border: 1px solid #eee;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

.badge {
  position: absolute;
  top: 10px; right: 10px;
  background: var(--accent);
  color: var(--white);
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 0.7rem;
  font-weight: bold;
}
.badge.new { background: #2ecc71; }

/* --- Imágenes de los Productos --- */
.product-card img {
  width: 100%;
  /* Como usaremos fotos cuadradas, podemos usar aspect-ratio para mantenerlo cuadrado */
  aspect-ratio: 1 / 1; 
  height: auto; /* Dejamos que la altura se ajuste sola al ancho */
  
  object-fit: contain; /* Muestra todo el producto */
  padding: 10px; /* Un pequeño margen interno */
  background-color: #fff; /* Fondo blanco para fusionarse con el JPG */
  
  border-bottom: 1px solid #f0f0f0;
  cursor: zoom-in;
}

/* Efecto al pasar el mouse (opcional, para darle vida) */
.product-card img:hover {
  transform: scale(1.05); /* Crece un poquitito */
}

.card-info { padding: 20px; text-align: center; }

.card-info h3 {
  font-size: 1.1rem;
  color: var(--primary);
  margin-bottom: 5px;
}

.desc {
  font-size: 0.85rem;
  color: #777;
  margin-bottom: 15px;
}

.price-row {
  margin-bottom: 15px;
  font-weight: bold;
}

.price { color: var(--primary); font-size: 1.2rem; }
.old-price { text-decoration: line-through; color: #999; font-size: 0.9rem; margin-left: 10px; }

.btn-card {
  display: inline-block;
  background: var(--primary);
  color: var(--white);
  padding: 8px 20px;
  border-radius: 5px;
  font-size: 0.9rem;
  transition: 0.3s;
}

.btn-card:hover { background: var(--secondary); }

/* --- Banner Servicios --- */
.services-banner {
  background: var(--light);
  padding: 40px 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
  text-align: center;
}

.service-item {
  flex: 1;
  min-width: 250px;
  max-width: 350px;
}

.service-item i {
  font-size: 2.5rem;
  color: var(--accent);
  margin-bottom: 15px;
}

/* --- Footer --- */
footer {
  background: #051a42;
  color: rgba(255,255,255,0.7);
  padding: 30px 0;
  text-align: center;
  margin-top: 50px;
}

.socials a {
  color: var(--white);
  font-size: 1.2rem;
  margin: 0 10px;
  transition: 0.3s;
}

.socials a:hover { color: var(--accent); }

/* --- WhatsApp Flotante --- */
.float-wa {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #25d366;
  color: white;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  box-shadow: 2px 2px 10px rgba(0,0,0,0.3);
  z-index: 2000;
  transition: 0.3s;
}

.float-wa:hover { transform: scale(1.1); }

/* --- Responsive (Celulares) --- */
@media (max-width: 768px) {
  .nav-menu { display: none; } /* Ocultamos menú principal en móvil por simplicidad */
  .hero h2 { font-size: 1.8rem; }
  .top-info span { display: block; margin: 2px 0; }
  .logo h1 { font-size: 1.5rem; }
}

/* --- Botones del Slider --- */
.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%); /* Centrar verticalmente exacto */
  background: rgba(0, 0, 0, 0.3); /* Fondo semitransparente */
  color: white;
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%; /* Botón redondo */
  font-size: 1.2rem;
  cursor: pointer;
  z-index: 10; /* Encima de todo */
  transition: 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slider-btn:hover {
  background: var(--accent); /* Se pone naranja al pasar el mouse */
  transform: translateY(-50%) scale(1.1); /* Crece un poquito */
}

/* Posición Izquierda y Derecha */
.prev-btn {
  left: 20px;
}

.next-btn {
  right: 20px;
}

/* Ajuste para móviles: hacerlos más pequeños */
@media (max-width: 768px) {
  .slider-btn {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }
}
/* --- Estilos del Botón Hamburguesa --- */
.menu-toggle {
  display: none; /* Oculto en PC */
  font-size: 1.8rem;
  cursor: pointer;
  color: var(--primary);
}

/* --- Media Query (Solo para Celulares) --- */
@media (max-width: 768px) {
  
  /* 1. Mostrar el botón hamburguesa */
  .menu-toggle {
    display: block;
  }

  /* 2. Transformar el menú en una lista vertical oculta */
  .nav-menu {
    position: absolute;
    top: 70px; /* Altura del header aprox */
    left: -100%; /* Lo escondemos a la izquierda fuera de la pantalla */
    width: 100%;
    height: 100vh; /* Ocupa toda la altura */
    background: var(--white);
    flex-direction: column; /* Elementos uno debajo del otro */
    align-items: center;
    justify-content: start;
    padding-top: 50px;
    transition: 0.3s ease; /* Animación suave al salir */
    box-shadow: 0 5px 10px rgba(0,0,0,0.1);
  }

  /* 3. Estilo de los enlaces en celular */
  .nav-menu a {
    margin: 20px 0;
    font-size: 1.2rem;
    width: 100%;
    text-align: center;
  }

  /* 4. Clase que activaremos con JS para mostrar el menú */
  .nav-menu.active {
    left: 0; /* Lo movemos al centro de la pantalla */
  }
}
/* --- Efecto Lightbox (Pantalla Completa) --- */

/* 1. Indicamos al usuario que la imagen se puede ampliar */
.product-card img {
  cursor: zoom-in; /* El cursor cambia a una lupa */
}

/* 2. El fondo oscuro (Oculto por defecto) */
.lightbox {
  position: fixed;
  z-index: 3000; /* Por encima de TODO (header, whatsapp, etc) */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9); /* Negro al 90% */
  display: none; /* Invisible al principio */
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* Cuando le agreguemos la clase 'active' con JS, se mostrará */
.lightbox.active {
  display: flex;
  opacity: 1;
}

/* 3. La imagen dentro del lightbox */
.lightbox-img {
  max-width: 90%;  /* Ocupa máximo el 90% del ancho de la pantalla */
  max-height: 90%; /* Ocupa máximo el 90% del alto de la pantalla */
  
  object-fit: contain; /* IMPORTANTE: Asegura que se vea completa aquí también */
  
  border-radius: 5px;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}
/* Animación de entrada de la imagen */
.lightbox.active .lightbox-img {
  transform: scale(1);
}

/* 4. Botón de cerrar (X) */
.close-lightbox {
  position: absolute;
  top: 20px;
  right: 30px;
  color: white;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.3s;
}

.close-lightbox:hover {
  color: var(--accent);
}