/* Estilos generales */
body {
  font-family: 'Roboto', sans-serif;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  background-color: #f4f4f4;
}

header {
  background-color: #2f2f2f;
  color: #fff;
  padding: 10px 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

header nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 30px;
  width: 100%;
  max-width: 1200px;
}

header nav a {
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  padding: 8px 15px;
  transition: background-color 0.3s;
}

header nav a:hover {
  background-color: #d00;
  border-radius: 5px;
}

/* Banner */
.banner {
  width: 100%;
  height: 500px; /* Ajusta esta altura según tus necesidades */
  overflow: hidden;
  position: relative;
  background-color: #2f2f2f;
}

.banner-images {
  display: flex;
  transition: transform 1.3s ease-in-out; /* Reducción del tiempo de transición */
  width: 100%;
}

.banner img {
  
  width: 100%;
  height: 100%; 
  object-fit: cover;
  max-width: 100%;
  flex: 1;
  margin: 0;
}

@keyframes slideImages {
  0% { transform: translateX(0); }
  20% { transform: translateX(-100%); }
  60% { transform: translateX(-195%); }

}

.banner-images {
  animation: slideImages 22s infinite linear; /* Animación lineal y más rápida */
}

/* Diseño responsivo */
@media (max-width: 768px) {
  .banner {
    height: 300px; /* Ajusta la altura para dispositivos móviles */
  }
}

@media (max-width: 480px) { 
  .banner {
    height: 200px; /* Ajusta la altura para pantallas más pequeñas */
  }
}
/* Sección de productos destacados */
.products-section {
  padding: 40px 20px;
  background-color: #fff;
  text-align: center;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.products-section h2 {
  font-size: 2.5rem;
  margin-bottom: 30px;
  color: #333;
}

.product {
  display: inline-block;
  width: 300px;
  margin: 20px;
  background-color: #fff; /* Blanco puro */
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  text-align: center;
  position: relative;
  transition: transform 0.2s ease-in-out; /* Transición suave al pasar el mouse */
}

.product img {
  max-width: 100%; /* Asegurar que las imágenes no superen el ancho del contenedor */
  height: auto; /* Mantener la proporción de la imagen */
  object-fit: cover; /* Rellenar todo el contenedor, recortando si es necesario */
}

.product:hover {
  transform: translateY(-5px); /* Levanta ligeramente al pasar el mouse */
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2); /* Sombra más pronunciada al pasar el mouse */
}

/* Etiqueta 'TOP' en rojo */
.top-label {
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: #d00;
  color: #fff;
  font-size: 1rem;
  font-weight: bold;
  padding: 5px 10px;
  border-radius: 5px;
}

/* Estilo de la imagen de producto */
.product img {
  width: 100%;
  height: 300px;
  object-fit: cover; /* Asegura que la imagen se recorte bien */
}

/* Estilo de la información del producto */
.product-info {
  padding: 15px;
}

/* Títulos de los productos */
.product-info h3 {
  font-size: 1.4rem;
  color: #333;
  margin-bottom: 10px;
  line-height: 1.5;
  height: 60px; /* Esto asegura que el texto no se desborde */
  overflow: hidden;
}

/* Descripción del producto (si existe) */
.product-info p {
  font-size: 1rem;
  color: #777;
  margin-bottom: 10px;
}

/* Precio */
.product-info .price {
  font-size: 1.2rem;
  color: #d00;
  font-weight: bold;
}
/* Estilos generales del encabezado */
header {
  background-color: #2f2f2f;
  padding: 10px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

header nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

/* Estilo de los enlaces en el menú */
header nav a {
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  padding: 8px 15px;
  transition: background-color 0.3s;
}

header nav a:hover {
  background-color: #d00;
  border-radius: 5px;
}

/* Menú en dispositivos de escritorio */
ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
}

ul li {
  margin: 0 15px;
}

/* Icono del menú en móviles */
.menu-icon {
  display: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  
}

.menu-icon .line {
  width: 30px;
  height: 4px;
  background-color: #fff;
  border-radius: 5px;

}

/* Mostrar el icono del menú solo en dispositivos móviles */
@media (max-width: 768px) {
  ul {
      display: none; /* Ocultamos el menú en móviles */
      position: absolute;
      top: 60px; /* Ajusta según la altura del header */
      right: 0;
      background-color: #2f2f2f;
      width: 100%;
      text-align: center;
      padding: 20px 0;
      box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  }

  ul li {
      margin: 15px 0;
  }

  .menu-icon {
      display: flex; /* Mostramos el icono del menú */
  }

  ul.active {
      display: block; /* Muestra el menú cuando tenga la clase 'active' */
  }
}


/* Estilos generales */
body {
  font-family: 'Roboto', sans-serif;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  background-color: #f4f4f4;
}

header {
  background-color: #2f2f2f;
  color: #fff;
  padding: 10px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
}

nav {
  display: flex;
  align-items: center;
}

.menu-icon {
  display: none;
  cursor: pointer;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 21px;
}

.line {
  width: 30px;
  height: 3px;
  background-color: white;
}

ul#menu {
  display: flex;
  gap: 20px;
  list-style-type: none;
  margin: 0;
  padding: 0;
}

ul#menu li {
  display: inline-block;
}

ul#menu a {
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  padding: 8px 15px;
  transition: background-color 0.3s;
}

ul#menu a:hover {
  background-color: #d00;
  border-radius: 5px;
}

//* Menú en dispositivos móviles */
@media (max-width: 768px) {
  ul#menu {
      display: none; /* El menú se oculta por defecto */
      position: absolute;
      top: 60px;
      right: 20px;
      background-color: #2f2f2f;
      width: 200px;
      box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
      border-radius: 5px;
      padding: 10px;
      text-align: left;
      z-index: 9999; /* Se coloca el menú por encima de otros elementos */
  }

  ul#menu.active {
      display: block; /* Muestra el menú cuando tiene la clase 'active' */
  }

  .menu-icon {
      display: flex; /* Muestra el icono del menú */
  }
}

/* Si el header tiene algún z-index, asegúrate de que sea menor que el del menú */
header {
  position: relative; /* Asegúrate de que el header esté posicionado para usar z-index */
  z-index: 1; /* Puedes ajustar el valor si es necesario */
}



footer {
  background-color: #333;
  color: #fff;
  padding: 30px 20px;
  text-align: center;
  font-family: 'Roboto', sans-serif;
}

footer .footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
  flex-wrap: wrap;
  padding: 20px 0;
}

footer .contact-info p, footer .social-media p {
  margin: 5px 0;
  font-size: 1rem;
  font-weight: 400;
  color: #ddd;
}

footer .social-media a {
  color: #ddd;
  text-decoration: none;
  font-weight: 500;
  margin-top: 5px;
  display: inline-block;
  padding: 5px 10px;
  border-radius: 50px;
  transition: all 0.3s ease;
}

footer .social-media a:hover {
  color: #fff;
  background-color: #d00;
}

footer .footer-bottom {
  margin-top: 30px;
  font-size: 0.9rem;
  color: #bbb;
  border-top: 1px solid #444;
  padding-top: 10px;
}

footer .footer-bottom p {
  font-weight: 300;
}

footer .social-media a i {
  margin-right: 8px;
}

@media (max-width: 768px) {
  footer .footer-content {
      flex-direction: column;
      text-align: center;
  }

  footer .contact-info, footer .social-media {
      margin-bottom: 15px;
  }
}

 
@media screen and (max-width: 768px) {
  .products-section {
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
  }

  .product {
      width: 48%; /* Para que haya dos productos por fila */
      margin: 1%; /* Espaciado entre productos */
      box-sizing: border-box;
  }

  .product img {
      width: 100%; /* La imagen se ajusta al ancho del contenedor */
      height: auto;
  }
}


/* Estilos generales del carrito */
#cart-sidebar {
  position: fixed;
  top: 0;
  right: -400px; /* Inicialmente está fuera de la pantalla */
  width: 350px;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8); /* Fondo oscuro y transparente */
  color: #fff;
  box-shadow: -2px 0px 20px rgba(0, 0, 0, 0.3);
  transform: translateX(0);
  transition: right 0.3s ease-in-out;
  padding: 20px;
  z-index: 1000;
}

#cart-sidebar.active {
  right: 0; /* Cuando está activo, se desliza hacia la derecha */
}

.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid rgba(255, 255, 255, 0.2);
  margin-bottom: 20px;
}

.cart-header h2 {
  font-size: 24px;
  margin: 0;
}

#close-cart {
  background: none;
  border: none;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
}

.cart-items {
  max-height: 80%;
  overflow-y: auto;
}

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  margin-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  background-color: rgba(255, 255, 255, 0.1); /* Fondo translúcido para los items */
  border-radius: 5px;
}

.cart-item img {
  width: 50px;
  height: 50px;
  border-radius: 5px;
}

.cart-item h4 {
  font-size: 16px;
  margin: 0;
  color: #fff;
}

.cart-item p {
  color: #fff;
  font-size: 14px;
  margin: 0;
}

.remove-item {
  background: none;
  border: none;
  color: #ff4747;
  font-size: 18px;
  cursor: pointer;
}

/* Total del carrito */
.cart-footer {
  position: absolute;
  bottom: 20px;
  width: 100%;
  text-align: center;
}

.cart-footer p {
  margin: 10px 0;
  font-size: 18px;
}

/* Estilo para el icono de carrito en el header */
#cart-icon {
  position: fixed;
  top: 20px;
  right: 20px;
  font-size: 30px;
  color: #fff;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 999;
  transition: color 0.3s ease-in-out;
}

#cart-icon:hover {
  color: #ff4747; /* Cambia el color del icono en hover */
}

/* Estilos generales del botón */
.add-to-cart {
  background-color: rgba(0, 0, 0, 0.5); /* Fondo transparente */
  color: white;
  border: none;
  padding: 8px 20px;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.3s ease-in-out;
  border-radius: 5px;
}

.add-to-cart:hover {
  background-color: rgba(248, 243, 243, 0.8); /* Fondo oscuro al hacer hover */
}

.cart-sidebar .whatsapp-button {
  background-color: #25D366; /* Verde de WhatsApp */
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 16px;
  margin-top: 10px;
  width: 100%;
}

.cart-sidebar .whatsapp-button:hover {
  background-color: #128C7E; /* Verde más oscuro */
}
