/* RESET BÁSICO */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Arial, sans-serif;
}

/* HEADER */
.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 40px;
}

.logo {
  font-size: 28px;
  font-weight: bold;
  color: #2e3192;
}

/* ===================== */
/* BARRA SUPERIOR */
/* ===================== */

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 40px;
  background-color: #f3f3f3;
  border-bottom: 1px solid #ddd;
}
.logo img {
  height: 60px;
}

/* Contenedor derecho */
.top-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}
/* ================= BUSCADOR ================= */

.search-box {
  display: flex;
}

.search-box input {
  padding: 8px 12px;
  border: 1px solid #ccc;
  width: 220px;
  outline: none;
  font-size: 14px;
}

.search-box button {
  background-color: #2e3192;
  color: white;
  border: none;
  padding: 8px 14px;
  cursor: pointer;
}

.search-box button:hover {
  background-color: #1c1f6b;
}

/* ================= CONTACTO ================= */

.contacto {
  display: flex;
  align-items: center;
  gap: 25px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: #333;
}

/* Icono circular azul */
.icon-circle {
  width: 34px;
  height: 34px;
  background-color: #2e3192;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-circle i {
  color: white;
  font-size: 14px;
}

/* ===================== */
/* MENÚ */
/* ===================== */

.menu {
  background-color: #2e3192;
  position: relative;
  z-index: 1000; /* Para que esté encima del slider */
}

.menu ul {
  list-style: none;
  display: flex;
  justify-content: center;
}

.menu ul li {
  position: relative;
}

.menu ul li a {
  display: block;
  padding: 15px 25px;
  color: white;
  text-decoration: none;
  font-weight: bold;
  text-transform: uppercase;
}

.menu ul li a:hover {
  background-color: #1c1f6b;
}

/* SUBMENÚ */
.submenu {
  display: none !important; /* Oculto por defecto */
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #2e3192;
  min-width: 200px;
  z-index: 1001;
}

.submenu li a {
  padding: 12px;
  border-top: 1px solid rgba(255,255,255,0.2);
}

/* Mostrar solo al hacer hover */
.menu ul li:hover > .submenu {
  display: block !important;
}

/* ===================== */
/* SLIDER */
/* ===================== */

.slider {
  position: relative;
  width: 100%;
  height: 60vh;
  min-height: 250px;
  max-height: 500px;
  overflow: hidden;
}

.slides {
  position: relative;
  width: 100%;
  height: 100%;
}

.slide {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.slide.active {
  opacity: 1;
}

.texto-slide {
  position: absolute;
  bottom: 8%;
  right: 5%;
  background-color: #1ea64b;
  color: white;
  padding: 12px 20px;
  font-size: 1.5vw;
  max-width: 80%;
}

/* Botones slider */
.prev, .next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0,0,0,0.5);
  color: white;
  border: none;
  padding: 15px;
  cursor: pointer;
  font-size: 20px;
}

.prev { left: 20px; }
.next { right: 20px; }

.prev:hover, .next:hover {
  background-color: rgba(0,0,0,0.8);
}

/* ===================== */
/* PRODUCTOS */
/* ===================== */

.productos {
  padding: 50px;
  text-align: center;
}

.productos h2 {
  margin-bottom: 30px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* 4 columnas iguales */
  gap: 25px; /* espacio entre cards */
  padding: 0; 
}

.card {
  border: 2px solid #1ea64b;
  padding: 0; /* si usas solo imágenes, no hace falta padding */
  background: #f9f9f9;
  border-radius: 5px;
  overflow: hidden;
}

/* ===================== */
/* FOOTER */
/* ===================== */

footer {
  background-color: #2e3192;
  color: white;
  margin-top: 50px;
}

.footer-container {
  display: flex;
  justify-content: space-between;
  padding: 40px;
  flex-wrap: wrap;
}
.footer-container > div {
  flex: 1;
  min-width: 220px;
}
.footer-container h3 {
  margin-bottom: 15px;
  font-size: 16px;
  border-bottom: 2px solid #1ea64b;
  display: inline-block;
  padding-bottom: 5px;
}
.footer-container p {
  font-size: 14px;
  margin-bottom: 6px;
}

/* ===================== */
/* REDES SOCIALES */
/* ===================== */

.social-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.social-links a {
  color: white;
  text-decoration: none;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: 0.3s;
}

.social-links a:hover {
  color: #1ea64b;
}

.social-links i {
  font-size: 16px;
}


.copy {
  text-align: center;
  padding: 15px;
  background-color: #1c1f6b;
}

/* ===================== */
/* RESPONSIVE */
/* ===================== */

@media (max-width: 768px) {

  .menu ul {
    flex-direction: column;
    align-items: center;
  }

  .menu ul li {
    width: 100%;
    text-align: center;
  }

  .submenu {
    position: relative;
    width: 100%;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .footer-container {
    flex-direction: column;
    text-align: center;
    gap: 20px;
  }

  .texto-slide {
    font-size: 16px;
    right: 10%;
    left: 10%;
    text-align: center;
  }

}
@media (max-width: 1024px) {
  .grid {
    grid-template-columns: repeat(2, 1fr); /* 2 columnas en tablet */
  }
}

@media (max-width: 768px) {
  .grid {
    grid-template-columns: 1fr; /* 1 columna en móvil */
  }
}

/* Miniaturas dentro de .card */
.card img.thumbnail {
  width: 100%;
  height: auto;
  cursor: pointer;
  display: block;
  transition: transform 0.3s ease;
}

.card img.thumbnail:hover {
  transform: scale(1.05);
}

/* Modal (imagen grande) */
.modal {
  display: none; /* Oculto por defecto */
  position: fixed;
  z-index: 2000; /* Muy arriba para tapar todo */
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.8); /* Fondo semitransparente */
  justify-content: center;
  align-items: center;
}

/* Imagen dentro del modal */
.modal-content {
  max-width: 90%;
  max-height: 80%;
  border-radius: 8px;
  box-shadow: 0 0 15px rgba(30, 166, 75, 0.8);
}

/* Botón cerrar */
.close {
  position: fixed;
  top: 30px;
  right: 40px;
  color: white;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  user-select: none;
  transition: color 0.3s ease;
}

.close:hover {
  color: #1ea64b;
}
/* ===================== */
/* PÁGINAS INTERNAS */
/* ===================== */

.contenido-interno {
  padding: 60px 20px;
}

.contenido-interno .container {
  max-width: 1000px;
  margin: auto;
}

.contenido-interno h1 {
  text-align: center;
  margin-bottom: 40px;
  color: #2e3192;
}

.bloque {
  margin-bottom: 40px;
}

.bloque h2 {
  color: #1ea64b;
  margin-bottom: 15px;
}

.bloque p {
  line-height: 1.6;
  font-size: 16px;
}
/* ===================== */
/* GRID 3 COLUMNAS */
/* ===================== */

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-top: 30px;
}

.grid-3 .card {
  background: #ffffff;
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  text-align: center;
  padding-bottom: 20px;
  transition: 0.3s ease;
}

.grid-3 .card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.grid-3 .card img {
  width: 100%;
  height: auto;
  display: block;
}

.grid-3 .card h3 {
  margin: 15px 10px 10px;
  color: #2e3192;
  font-size: 28px;
}

.grid-3 .card p {
  padding: 0 15px;
  font-size: 14px;
  color: #555;
}

/* Responsive */

@media (max-width: 1024px) {
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .grid-3 {
    grid-template-columns: 1fr;
  }
}
/* ===== BANNER SOLO IMAGEN ===== */

.banner-productos {
  width: 100%;
  height: 400px; /* Puedes cambiar la altura */
  background-image: url("../img/banner-web-insumat-1-ts1630083330.png"); /* Cambia por tu imagen */
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  margin-bottom: 50px;
}
/* ===== RESPONSIVE BANNER ===== */
@media (max-width: 768px) {
  .banner-productos {
    height: 250px;
  }
}
.productos-reducido .grid-3 {
  width: 70%;        /* Reduce 30% */
  margin: 0 auto;    /* Centra el grid */
}

@media (max-width: 768px) {
  .productos-reducido .grid-3 {
    width: 95%;
  }
}

/* ===== TEXTO MÁS PEQUEÑO SOLO EN ESTA SECCIÓN ===== */

.productos-reducido .card h3 {
  font-size: 16px;   /* Tamaño más pequeño del título */
}

.productos-reducido .card p {
  font-size: 13px;   /* Texto descriptivo más pequeño */
}


/* ===== DETALLE PRODUCTO ===== */

.detalle-producto {
  padding: 60px 0;
}

.contenedor-detalle {
  width: 85%;
  margin: 0 auto;
  display: flex;
  gap: 50px;
  align-items: flex-start;
}

/* Galería izquierda */
.galeria {
  width: 45%;
}

.imagen-principal img {
  width: 100%;
  border-radius: 8px;
}

.miniaturas {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}

.miniaturas img {
  width: 70px;
  cursor: pointer;
  border-radius: 5px;
  transition: 0.3s;
}

.miniaturas img:hover {
  opacity: 0.7;
  transform: scale(1.05);
}

/* Información derecha */
.info-producto {
  width: 55%;
}

.info-producto h2 {
  font-size: 28px;
  margin-bottom: 20px;
}

.info-producto p {
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 20px;
}

.info-producto ul {
  list-style: none;
  padding: 0;
}

.info-producto li {
  margin-bottom: 10px;
}

@media (max-width: 768px) {
  .contenedor-detalle {
    flex-direction: column;
  }

  .galeria,
  .info-producto {
    width: 100%;
  }

  .miniaturas {
    justify-content: center;
  }
}

.thumb {
  width: 70px;
  cursor: pointer;
  opacity: 0.6;
  transition: 0.3s;
}

.thumb.activa {
  opacity: 1;
  border: 2px solid #ff6600;
}
.card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}