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

body {
  font-family: 'Poppins', 'Inter', sans-serif;
  background-color: #fff;
  color: #222;
  overflow-x: hidden;
}

/* =================== BANNER PROMOCIONAL =================== */
.promo-banner {
  background-color: #f8c202;
  color: #111;
  text-align: center;
  padding: 8px 0;
  font-weight: 500;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1001;
  overflow: hidden;
}

.promo-banner span {
  display: inline-block;
  white-space: nowrap;
  padding-left: 100%; 
  animation: scrollBanner 18s linear infinite;
}

@keyframes scrollBanner {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

/* =================== HEADER =================== */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: white;
  padding: 10px 40px;
  position: fixed;
  top: 37px; 
  width: 100%;
  z-index: 1000;
  border-bottom: 1px solid #ddd;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.logo img {
  width: 45px;
  height: 45px;
}

.logo h1 {
  font-size: 1.3rem;
  letter-spacing: 1px;
}

/* =================== NAVEGACIÓN =================== */
nav ul {
  list-style: none;
  display: flex;
  gap: 25px;
}

nav a {
  text-decoration: none;
  color: #333;
  font-weight: 500;
  transition: color 0.3s;
}

nav a:hover {
  color: #0073e6;
}

/* =================== SLIDER =================== */
.slider {
  position: relative;
  margin-top: 100px;
  width: 100%;
  overflow: hidden;
}

.slider-container {
  display: flex;
  transition: transform 0.8s ease-in-out;
  width: 400%; 
}

.slider-container img {
  width: 25%; 
  height: auto;
  flex-shrink: 0;
  border-radius: 0;
}

/* Botones de navegación */
.prev, .next {
  cursor: pointer;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0, 0, 0, 0.4);
  color: white;
  border: none;
  font-size: 2rem;
  padding: 5px 17px;
  border-radius: 50%;
  transition: background-color 0.3s;
  z-index: 2;
}

.prev { left: 20px; }
.next { right: 20px; }

.prev:hover, .next:hover {
  background-color: rgba(0, 0, 0, 0.7);
}

.slider-dots {
  text-align: center;
  margin-top: 10px;
}

.dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  margin: 0 4px;
  background-color: #bbb;
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 0.3s;
}

.dot.active { background-color: #f8c202; }

/* =================== SECCIÓN PRINCIPAL =================== */
main {
  padding-top: 40px;
  text-align: center;
}

.destacados h2 {
  font-size: 1.8rem;
  margin-bottom: 30px;
}

.productos {
  display: flex;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
  max-width: 1200px;
  margin: 0 auto;
}

.producto {
  border: 1px solid #eee;
  border-radius: 10px;
  padding: 15px;
  width: 220px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s;
  cursor: pointer;
  background: white;
}

.producto:hover {
  transform: translateY(-5px);
}

.producto img {
  width: 100%;
  border-radius: 10px;
  object-fit: contain;
}

.producto h3 {
  margin: 10px 0 5px;
  font-size: 1rem;
}

/* =================== DETALLE PRODUCTO =================== */
#detalle-producto {
  display: none;
  flex-direction: row;
  justify-content: center;
  align-items: flex-start;
  padding: 60px 20px;
  gap: 40px;
  position: relative; 
}

.cerrar-btn {
  position: absolute;
  top: 15px;
  right: 45px; 
  background-color: transparent;
  color: #555;
  border: 1px solid #ddd;
  font-size: 1.2rem;
  font-weight: 300;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  line-height: 1;
  transition: all 0.2s;
}

.cerrar-btn:hover {
  background-color: #f0f0f0;
  color: #222;
  border-color: #ccc;
  transform: rotate(90deg);
}

#detalle-producto img {
  width: 320px;
  border-radius: 10px;
}

.info {
  max-width: 400px;
  text-align: left;
}

.info ul {
  margin: 15px 0;
  line-height: 1.6;
}

.precio {
  font-size: 1.4rem;
  font-weight: bold;
  margin-top: 15px;
}

.btn-whatsapp {
  display: inline-block;
  background-color: #25D366;
  color: white;
  text-decoration: none;
  padding: 12px 20px;
  border-radius: 8px;
  margin-top: 20px;
  font-weight: bold;
  transition: background-color 0.3s;
}

.btn-whatsapp:hover {
  background-color: #1ebe57;
}

/* =================== INFO EMPRESA & FOOTER =================== */
.info-empresa {
  display: flex;
  justify-content: space-around;
  align-items: flex-start;
  flex-wrap: wrap;
  background-color: #555;
  color: #fff;
  padding: 50px 20px;
  text-align: left;
}

.info-column {
  width: 220px;
  margin: 20px;
}

.info-column h3 {
  margin-bottom: 15px;
  font-size: 1.1rem;
  color: #f8c202;
}

.info-column p {
  font-size: 0.9rem;
  line-height: 1.5;
}

.redes img {
  width: 28px;
  height: 28px;
  margin: 0 5px;
  filter: brightness(0) invert(1);
  transition: transform 0.2s;
}

footer {
  text-align: center;
  padding: 20px;
  border-top: 1px solid #ddd;
  font-size: 0.9rem;
  color: #555;
  background-color: #f9f9f9;
}

/* =================== VERSIÓN MÓVIL (CORREGIDA) =================== */
@media (max-width: 768px) {
  /* Forzamos la fuente para que sea igual que en PC */
  body, h1, h2, h3, a, p, span, button {
    font-family: 'Poppins', sans-serif !important;
  }

  header {
    flex-direction: column;
    padding: 8px;
    top: 32px;
  }

  .logo img {
    width: 35px;
    height: 35px;
  }

  .logo h1 {
    font-size: 1.1rem;
  }

  nav ul {
    gap: 10px;
    padding: 5px 0;
    justify-content: center;
  }

  nav a {
    font-size: 0.75rem;
  }

  /* Reducimos el margen superior del slider para acercarlo al header */
  .slider {
    margin-top: 115px; 
    height: auto;
    aspect-ratio: 16 / 9;
  }

  /* Reducimos el espacio entre slider y lentes destacados */
  main {
    padding-top: 10px; 
  }

  .destacados h2 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    margin-top: 10px;
  }

  /* Catálogo en 2 columnas */
  .productos {
    display: grid;
    grid-template-columns: 1fr 1fr; 
    gap: 10px;
    padding: 10px;
  }

  .producto {
    width: 100%;
    padding: 10px;
  }

  .producto img {
    height: 110px;
  }

  .producto h3 {
    font-size: 0.85rem;
  }

  /* Ajuste de detalle producto */
  #detalle-producto {
    flex-direction: column;
    padding: 30px 15px;
  }
}