/* RESET */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

/* BODY */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: #B2FBA5;
  /*linear-gradient(135deg, #03A9F4, #81D4FA);*/
  background-attachment: fixed;
  color: #333;
}
/*CARRUSEL DE IMÁGENES */

.carrusel {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.carrusel .imagenes {
  position: relative;
  width: 300px;   /* tamaño fijo para la foto principal */
  height: 300px;
}

.carrusel .imagenes img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain; /* mantiene proporción */
  display: none;       /* todas ocultas por defecto */
}

.carrusel .imagenes img.active {
  display: block;      /* solo la activa se muestra */
}

.carrusel button {
  background: rgba(0,0,0,0.5);
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  padding: 5px 10px;
  border-radius: 50%;
}
/* FILTROS DINÁMICOS */
#filtros-barra {
  
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;          /* sin padding interno */
  margin-bottom: 0;    /* sin espacio debajo */
}

.filtro {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}

.filtro h3 {
  flex-basis: 100%;
  text-align: center;
  font-size: 14px;
  margin-bottom: 2px;  /* casi pegado a los chips */
  color: #333;
  border: none;
  padding-bottom: 0;
}


/* Chips amigables */
.filtro input[type="checkbox"] {
  display: none; /* ocultamos el checkbox real */
}

.filtro label {
  display: inline-block;
  background: #eee;
  color: #333;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

/* Hover */
.filtro label:hover {
  background: #ddd;
}

/* Seleccionado → verde */
.filtro input[type="checkbox"]:checked + label {
  background: #28a745;   /* verde */
  color: #fff;
  font-weight: bold;
}



/* IA */
/* Contenedor principal del chatbot */
#chatbot {
  width: 350px; 
  height: 500px; 
  border: 2px solid #007bff; 
  border-radius: 10px; 
  background: #f9f9f9; 
  display: none; 
  flex-direction: column; 
  position: fixed; 
  bottom: 20px; 
  right: 20px; 
  box-shadow: 0 4px 12px rgba(0,0,0,0.2); 
  font-family: "Segoe UI", Arial, sans-serif; }

#chat-header {
  background: #007bff;
  color: white;
  font-weight: bold;
  padding: 10px;
  border-radius: 8px 8px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#close-chat {
  cursor: pointer;
}

#open-chat {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #007bff;
  color: white;
  border: none;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* Footer siempre abajo */ 
#chat-footer { 
  display: flex; 
  align-items: center;
  padding: 8px; 
  border-top: 1px solid #ddd;
   background: #fff; 
}

/* Message box estilo compacto */
#chat-input {
  flex: 1;
  border: 1px solid #ccc;
  border-radius: 16px;
  padding: 6px 12px;
  font-size: 13px;
  outline: none;
}

#chat-input:focus {
  border-color: #007bff;
  box-shadow: 0 0 4px rgba(0, 123, 255, 0.4);
}

/* Botón enviar estilo minimalista */
#chat-footer button {
  margin-left: 8px;
  background: #007bff;
  color: white;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-size: 16px;
  cursor: pointer;
}

#chat-footer button:hover {
  background: #0056b3;
  transform: scale(1.05);
}

#chat-footer button:active {
  transform: scale(0.95);
}
/* Área de mensajes con scroll */ 
#chat-log { 
  flex: 1; /* ocupa todo el espacio disponible */
  padding: 10px; overflow-y: auto; /* activa scroll vertical */ 
  font-size: 14px; 
}
/* Mensajes del usuario (gris clarito) */
.user-message {
  background: #f0f0f0;   /* gris suave */
  color: #333333;        /* texto gris oscuro */
  padding: 8px 12px;
  border-radius: 12px;
  margin: 6px 0;
  max-width: 80%;
  align-self: flex-end;  /* se alinea a la derecha */
  box-shadow: 0 2px 4px rgba(0,0,0,0.1); /* sombra sutil */
}

/* Mensajes del bot (azul clarito) */
.bot-message {
  background: #e6f0ff;   /* azul muy suave */
  color: #003366;        /* texto azul oscuro */
  padding: 8px 12px;
  border-radius: 12px;
  margin: 6px 0;
  max-width: 80%;
  align-self: flex-start; /* se alinea a la izquierda */
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}


/* HEADER */
header {
  background-color: #000;
  color: white;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding-left: 40px;
  gap: 20px;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
}

button.login {
  background: linear-gradient(135deg, #1976d2, #0d47a1); /* azul */
  color: white;
}

button.registro {
  background: linear-gradient(135deg, #43a047, #2e7d32); /* verde */
  color: white;
}
.logo {
  height: 70px;
}

.social-icons {
  text-align: right;   /* alinea todo el contenido a la derecha */
  margin: 10px;        /* opcional, espacio alrededor */
}

.social-icons a {
  display: inline-block;
  margin: 10px;
  font-size: 30px; /* tamaño del icono */
  color: white;
  background: #333; /* fondo neutro */
  width: 50px;
  height: 50px;
  line-height: 50px;
  text-align: center;
  border-radius: 50%; /* círculo */
  transition: 0.3s;
}

.social-icons a.instagram { background: #E1306C; }
.social-icons a.facebook { background: #1877F2; }
.social-icons a.whatsapp { background: #25D366; }
.social-icons a.gmail { background: #D44638; }

.social-icons a:hover {
  transform: scale(1.1); /* efecto zoom */
  opacity: 0.8; /* efecto transparencia */
}

/* CONTENEDOR DE CATEGORÍAS */
.contenedor {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 30px;
  padding: 60px;
  flex: 1;
}

/* CUADROS DE CATEGORÍAS */
.cuadro {
  background-color: white;
  border-radius: 12px;
  text-align: center;
  font-size: 20px;
  font-weight: bold;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cuadro:hover {
  transform: scale(1.05);
  box-shadow: 0 12px 20px rgba(0, 0, 0, 0.3);
}

.imagen-categoria {      
  width: 100%;
  height: 250px;        /* tu rectángulo fijo */
  background-color: #ddd;
  overflow: hidden;
  border-radius: 10px;
  position: relative;         /* útil si después querés poner texto encima */
}

.imagen-categoria img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important; /* llena el rectángulo recortando lo que sobra */
  display: block;           /* elimina espacios raros de inline-block */
  transition: transform 0.4s ease;
}

.cuadro:hover .imagen-categoria img {
  transform: scale(1.1);     /* zoom suave al pasar el mouse */
}

.cuadro p {
  padding: 15px 0;
  color: #000;
}
/* PRODUCTOS */
#productos {
  background-color: white;
  border-radius: 12px;
  padding: 50px;
  margin: 5px;
  flex: 1;
  text-align: center;
  /* ❌ quitamos sombra para estilo limpio */
}

#productos.oculto {
  display: none;
}

#productos h2 {
  font-size: 32px;
  color: #0288d1;
  margin-bottom: 30px;
}

#lista-productos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
  padding: 10px;
  margin-bottom: 3px;
}

/* PRODUCTOS EN TARJETAS LIMPIAS */
.item {
  background-color: white;
  text-align: center;
  padding: 8px;
  cursor: pointer;
  width: 100%;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}


.item:hover {
  /* ❌ sin efectos hover */
  transform: none;
  box-shadow: none;
}

.item img {
  width: 100%;
  height: 120px;
  object-fit: contain;
  border-radius: 0;
  border: 1px solid #ddd;
}

/* contenedor de nombre y precio */
.item .info {
  display: flex;
  justify-content: space-between; /* nombre a la izquierda, precio a la derecha */
  align-items: center;
  margin-top: 8px;
  width: 100%;
}

.item .info h3 {
  font-size: 15px;
  color: #000;
  margin: 0;
  text-align: left;
  flex: 1;
}


.item .info p {
  font-size: 14px;
  color: #0288d1;
  font-weight: bold;
  margin: 0;
}
  
/* DETALLE DE PRODUCTO (VENTANA EMERGENTE) */
#detalle-producto {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

#detalle-producto.oculto {
  display: none;
}

.detalle-contenido {
  background: white;
  display: flex;
  padding: 30px;
  border-radius: 15px;
  gap: 30px;
  max-width: 800px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.4);
}

.detalle-contenido img {
  display: block;          /* se comporta como bloque */
  margin: 0 auto;          /* centra horizontalmente */
  max-width: 100%;         /* se adapta al ancho disponible */
  height: auto; 
  align-items: center;           /* mantiene proporción */
}

.detalle-contenido .info {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.detalle-contenido h2 {
  font-size: 28px;
  margin-bottom: 15px;
  color: #0288d1;
}

.descripcion {
  font-size: 16px;
  color: #555;
  margin-bottom: 10px;
}

.precio {
  font-size: 22px;
  color: #000;
  font-weight: bold;
  margin-bottom: 20px;
}

#carrito-icono {
  position: fixed;   /* se queda fijo en la pantalla */
  top: 10px;         /* distancia desde el borde superior */
  right: 10px;       /* distancia desde el borde derecho */
  z-index: 9999;     /* asegura que esté encima de todo */
  font-size: 28px;   /* tamaño del ícono 🛒 */
  cursor: pointer;   /* cambia el cursor al pasar por encima */
}

.acciones-carrito {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.acciones-carrito label {
  font-size: 16px;
  color: #333;
  font-weight: 500;
}

.acciones-carrito input {
  width: 80px;
  padding: 10px;
  font-size: 16px;
  border: 2px solid #0288d1;
  border-radius: 8px;
  text-align: center;
  outline: none;
  transition: border-color 0.3s;
}

.acciones-carrito input:focus {
  border-color: #026aa7;
}

.btn-agregar {
  background: linear-gradient(135deg, #0288d1, #03a9f4);
  color: white;
  border: none;
  padding: 10px 16px;       /* 👉 más chico que antes */
  font-size: 14px;          /* 👉 texto más pequeño */
  font-weight: bold;
  border-radius: 6px;
  cursor: pointer;
  transition: transform 0.2s, background 0.3s;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  width: auto;              /* 👉 se ajusta al contenido */
  text-align: center;
}

.btn-agregar:hover {
  background: linear-gradient(135deg, #026aa7, #0288d1);
  transform: scale(1.05);
}

/* CÍRCULOS DE COLORES */
.colores {
  display: flex;
  gap: 10px;
}

.color {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid #aaa;
}

.rojo { background-color: red; }
.azul { background-color: blue; }
.negro { background-color: black; }

/* BOTÓN CERRAR DETALLE */
#cerrar-detalle {
  position: absolute;
  top: 40px;
  right: 60px;
  background-color: #03A9F4;
  border: none;
  color: white;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
}

#cerrar-detalle:hover {
  background-color: #0288d1;
}

/* BOTÓN VOLVER */
#volver {
  background-color: #03A9F4;
  border: none;
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s ease;
  font-size: 16px;
}

#volver:hover {
  background-color: #0288d1;
}
.boton-paginacion {
  background-color: #03A9F4;
  border: none;
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s ease;
  font-size: 16px;
  margin: 5px; /* espacio entre botones */
  margin-top: 0px;
}

.boton-paginacion:hover {
  background-color: #0288d1;
}
.contador-paginacion {
  margin: 0 10px;
  font-size: 14px;
  color: #555;
  font-weight: 500;
}
.contador-paginacion {
  font-size: 14px;
  color: #666;
  font-style: italic;
  margin-bottom: 8px; /* separa el texto de los botones */
  display: block;     /* fuerza que quede arriba */
}



/* FOOTER */
footer {
  background-color: #03A9F4;
  color: white;
  text-align: center;
  padding: 15px 0;
  font-size: 14px;
  box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.2);
}

/* BUSCADOR */
.buscador-contenedor {
  width: 100%;
  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: blue(6px);
  padding: 25px 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.2);
}

.buscador-contenedor input {
  width: 350px;
  padding: 12px 18px;
  border-radius: 25px;
  border: none;
  outline: none;
  font-size: 17px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.buscador-contenedor button {
  padding: 12px 22px;
  background-color: #0288d1;
  color: white;
  border: none;
  border-radius: 25px;
  font-size: 16px;
  cursor: pointer;
  transition: 0.3s;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.buscador-contenedor button:hover {
  background-color: #015f99;
  transform: scale(1.05);
}

#carrito-icono {
  position: fixed;
  top: 20px;   /* lo pone arriba la derecha */
  right: 20px;
  background: black;
  color: white;
  border-radius: 50%;
  width: 70px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 24px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

#carrito-count {
  position: absolute;
  top: 5px;
  right: 5px;
  background: red;
  color: white;
  border-radius: 50%;
  padding: 4px 8px;
  font-size: 12px;
}
/* Panel del carrito */
#carrito {
  position: fixed;
  top: 0;
  right: 0;
  width: 380px;
  height: 100%;
  background: #f9f9f9;
  box-shadow: -2px 0 8px rgba(0,0,0,0.3);
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  z-index: 9999;
  display: flex;
  flex-direction: column;
}

#carrito.visible {
  transform: translateX(0);
}

/* Encabezado */
#carrito h2 {
  background: #007bff;
  color: white;
  padding: 15px;
  margin: 0;
  font-size: 20px;
  text-align: center;
  border-bottom: 2px solid #0056b3;
}

/* Lista de productos */
#carrito-lista {
  flex: 1;
  padding: 15px;
}

#carrito-lista .item {
  background: black;
  border-radius: 8px;
  padding: 10px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between; /* estira el fondo hasta el botón */
  gap: 10px;
  width: 100%; /* ocupa todo el ancho disponible */
}


#carrito-lista .item img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 6px;
}

#carrito-lista .item h3 {
  font-size: 16px;
  margin: 0;
}

#carrito-lista .item p {
  margin: 2px 0;
  font-size: 14px;
}

/* Resumen */
#carrito-resumen {
  padding: 15px;
  background: #fff;
  border-top: 2px solid #ddd;
  font-size: 18px;
  font-weight: bold;
  text-align: right;
}

/* Botones */
.btn-carrito {
  background: #000;
  color: #fff;
  border: none;
  padding: 12px;
  margin: 10px 15px;
  cursor: pointer;
  border-radius: 6px;
  font-size: 15px;
  font-weight: bold;
  transition: background 0.3s, transform 0.2s;
}

.btn-carrito:hover {
  background: #333;
  transform: scale(1.05);
}

.btn-carrito:active {
  transform: scale(0.95);
}  
.btn-eliminar {
  background: #e53935;       /* rojo intenso */
  color: #fff;               /* texto blanco */
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s, transform 0.2s;
}

.btn-eliminar:hover {
  background: #c62828;       /* rojo más oscuro al pasar el mouse */
  transform: scale(1.05);    /* efecto de agrandarse */
}

.btn-eliminar:active {
  transform: scale(0.95);    /* efecto al hacer clic */
}
/* 📱 Celulares chicos (hasta 480px) */


#lista-productos {
  display: flex;
  flex-direction: column; /* apila los grupos */
  gap: 40px;
}

.grupo {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
}

.grupo h2 {
  grid-column: 1 / -1; /* título ocupa toda la fila */
  font-size: 22px;
  color: #0288d1;
  margin-bottom: 15px;
  text-align: left;
  border-bottom: 2px solid #ddd;
  padding-bottom: 5px;
}

.item {
  background: #fff;
  border: 1px solid #ddd;
  padding: 10px;
  text-align: center;
}
@media (max-width: 769px) {
  h1 {
    font-size: 24px;
    white-space: pre-line;
    margin: 10px 0;
  }

  #detalle-producto {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    overflow-y: auto;
  }

  .detalle-contenido {
  display: flex;              /* activa flexbox */
  flex-direction: column;     /* elementos en columna */
  align-items: center;        /* centra horizontalmente */
  justify-content: center;    /* centra verticalmente si hay espacio */
  text-align: center;
  padding: 15px;
  gap: 10px;
  max-width: 95%;
  width: 100%;
  box-sizing: border-box;
  }

  .detalle-contenido .imagenes img { 
     /* tamaño máximo de la imagen */
    width: 100%;
    height: 100%; 
    display: block; 
    margin: 0 auto; 
  }
  .detalle-contenido h2 {
    font-size: 18px;
  }

  .descripcion {
    font-size: 12px;
  }

  .precio {
    font-size: 16px;
  }

   #lista-productos {
    width: 100%;              /* ✅ Ocupa todo el ancho disponible */
    max-width: 100%;          /* ✅ No se sale de la pantalla */
    margin: 0 auto;           /* ✅ Centrado */
    padding: 10px;           /* ✅ Espacio interno */
    margin-left: -100px;
  }

  .grupo {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* ✅ Dos columnas iguales */
    gap: 12px;                             /* ✅ Espacio entre productos */
  }

  .grupo h2 {
    grid-column: 1 / -1; /* Título ocupa toda la fila */
    font-size: 22px;
    color: #0288d1;
    margin-bottom: 15px;
    text-align: left;
    border-bottom: 2px solid #ddd;
    padding-bottom: 5px;
  }

  .item { /* Cambiado a verde */
    border: 1px solid #ddd;
    padding: 10px;
    text-align: center;
    width:175px
  }

  /* Íconos sociales */
  .social-icons {
    position: absolute;
    top:2%;
    right: 80%;
    left:-25px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 15px;
  }

  .social-icons a img {
    width: 32px;
    height: 32px;
  }

  .oculto {
    display: none;
  }

  /* Chatbot */
  #chatbot { 
    width: 60%;         
    height: 70vh;       
    bottom: 10px;       
    right: 10px;        /* fijo en el costado derecho */
    border-radius: 12px; 
    border: 2px solid #007bff;
    background: #f9f9f9; 
    display: none; 
    flex-direction: column; 
    position: fixed; 
    box-shadow: 0 4px 12px rgba(0,0,0,0.2); 
    font-family: "Segoe UI", Arial, sans-serif; 
  }

  #chat-header {
    background: #007bff;
    color: white;
    font-weight: bold;
    padding: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 12px 12px 0 0;
  }

  #chat-log {
    flex: 1;              
    padding: 12px;
    overflow-y: auto;     
    font-size: 14px;
  }

  #chat-footer {
    display: flex;
    align-items: center;
    padding: 10px;
    border-top: 1px solid #ddd;
    background: #fff;
  }

  #chat-input {
    width:30%;
    flex: 1;
    border: 1px solid #ccc;
    border-radius: 16px;
    padding: 8px 12px;
    font-size: 14px;
    outline: none;
  }

  #chat-footer button {
    margin-left:-20%;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 18px;
    cursor: pointer;
  }
 #controles-paginacion {
    display: grid;
    grid-template-columns: 1fr auto 1fr; /* 👉 tres columnas: izquierda, centro, derecha */
    align-items: center;                 /* 👉 alineados verticalmente */
    justify-items: center;               /* 👉 cada celda centrada */
    gap: 12px;                           /* 👉 espacio entre columnas */
    margin-bottom: 20px;                 /* 👉 separación con el botón Volver */
  }

  #controles-paginacion .boton-paginacion:first-child {
    justify-self: end;   /* 👉 Anterior a la derecha de su celda */
  }

  #controles-paginacion .contador-paginacion {
    justify-self: center; /* 👉 contador centrado */
  }

  #controles-paginacion .boton-paginacion:last-child {
    justify-self: start; /* 👉 Siguiente a la izquierda de su celda */
  }

  #volver {
    position: fixed;            /* 👉 siempre visible */
    bottom: 20px;               /* 👉 abajo */
    left: 20px;                 /* 👉 a la izquierda */
    width: 60px;
    height: 60px;
    border-radius: 50%;         /* 👉 círculo */
    background-color: #03A9F4;  /* 👉 color de fondo */
    border: none;
    cursor: pointer;
    display: flex;              /* 👉 centra el SVG */
    align-items: center;
    justify-content: center;
    z-index: 1000;              /* 👉 por encima del contenido */
  }

  #volver svg {
    width: 28px;
    height: 28px;
  }

  #volver:hover {
    background-color: #0288d1;  /* 👉 efecto hover */
  }


}
