body {
  visibility: hidden;
}

.categoria-titulo {
  font-size: 2rem;
  margin-top: 30px;
  margin-bottom: 15px;
  border-bottom: 3px solid #ffc107;
  display: inline-block;
  color: #000;
}

.productos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.producto {
  text-align: center;
  border: 1px solid #eee;
  padding: 10px;
  border-radius: 8px;
  background-color: #f9f9f9;
  transition: transform 0.2s ease;
}

.producto img {
  width: 100%;
  max-height: 130px;
  object-fit: contain;
  margin-bottom: 8px;
}

.producto p {
  font-weight: bold;
  font-size: 1rem;
  color: #333;
}

.producto:hover {
  transform: scale(1.05);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.buscador {
  margin: 30px 0;
  display: flex;
  align-items: center;
}

.buscador input[type="text"] {
  width: 100%;
  padding: 12px;
  font-size: 1rem;
  border: 2px solid #ccc;
  border-radius: 6px 0 0 6px;
  outline: none;
}

.buscador button {
  padding: 12px 16px;
  background-color: #ffc107;
  color: black;
  border: 2px solid #ccc;
  border-left: none;
  font-size: 1rem;
  cursor: pointer;
  border-radius: 0 6px 6px 0;
  transition: background-color 0.3s ease;
}

.buscador button:hover {
  background-color: #e6b800;
}

.productos-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* 4 columnas */
  gap: 20px; /* espacio entre productos */
  margin-top: 20px;
}r

.producto {
  background-color: #f8f8f8;
  border-radius: 10px;
  overflow: hidden;
  text-align: center;
  box-shadow: 0 0 0 3px #ffc107; /* contorno amarillo */
  border: 2px solid #000;         /* borde negro */
  display: flex;
  flex-direction: column;
  height: 100%;
}

.producto img {
  width: 100%;
  height: 200px; /* Puedes aumentar a 220px o 250px si quieres más grande */
  object-fit: cover;
  display: block;
}

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

#modal-producto {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0,0,0,0.6);
  display: none; /* cambiar a flex en JS */
  justify-content: center;
  align-items: flex-end; /* lo manda hacia abajo */
  z-index: 1000;
}

.modal-contenido {
  background: white;
  padding: 20px;
  border-radius: 20px 20px 0 0; /* esquinas redondeadas arriba */
  width: 100%;
  max-width: 500px;
  text-align: center;
  position: relative;
  animation: slideUp 0.4s ease;
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-contenido img {
  width: 100%;
  height: auto;
  margin-bottom: 15px;
  border-radius: 10px;
}

.modal-contenido .cerrar {
  position: absolute;
  top: 15px;
  right: 15px;
  font-size: 30px;
  font-weight: bold;
  color: #333;
  cursor: pointer;
}

.modal-contenido .btn-whatsapp {
  display: inline-block;
  margin-top: 10px;
  padding: 10px 18px;
  background-color: #25d366;
  color: white;
  font-weight: bold;
  border-radius: 50px;
  text-decoration: none;
  transition: background-color 0.3s ease;
}

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

.productos-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* 4 productos por fila en laptop */
  gap: 20px;
  padding: 20px;
}

@media (max-width: 768px) {
  .productos-grid {
    grid-template-columns: repeat(2, 1fr); /* 2 productos por fila en celular */
  }
}

.categorias {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
}

.boton-categoria {
  background-color: #0056b3;
  color: white;
  border: none;
  border-radius: 12px;
  padding: 10px 16px;
  cursor: pointer;
  font-weight: bold;
  transition: background-color 0.3s, transform 0.2s;
}

.boton-categoria:hover {
  background-color: #003d80;
  transform: scale(1.05);
}

#btnSubir {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: linear-gradient(to right, #ffcc00, #ff6600);
  color: white;
  border: none;
  border-radius: 50%;
  padding: 15px;
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  z-index: 999;
  display: none; /* Oculto al principio */
  transition: background 0.3s, transform 0.3s;
}

#btnSubir:hover {
  background: linear-gradient(to right, #ffaa00, #ff3300);
  transform: scale(1.1);
}

.btn-instagram {
  display: inline-block;
  background-color: orange; /* Color de fondo */
  color: white; /* Texto blanco */
  padding: 10px 15px;
  margin-left: 5px; /* Espacio entre botones */
  border-radius: 5px;
  text-decoration: none;
  font-family: Arial, sans-serif;
  font-size: 14px;
  transition: background-color 0.3s ease;
}

.btn-instagram:hover {
  background-color: darkorange; /* Color cuando pasa el mouse */
}

/* Eliminar márgenes por defecto */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Evitar que algo se desborde y genere scroll horizontal */
body {
  overflow-x: hidden;
}

/* Dar respiro en los lados de la página */
body {
  padding-left: 15px;
  padding-right: 15px;
}

/* Asegurar que todo quede centrado */
.container, 
.productos-grid, 
header, 
footer {
  margin: 0 auto;
  max-width: 1200px; /* para que no se alargue demasiado en pantallas grandes */
}

.header-left {
  width: 100%;
  padding: 0 10px;
  box-sizing: border-box;
  text-align: center;
}

.header-left h1 {
  font-size: clamp(14px, 6vw, 32px); /* tamaño adaptable */
  margin: 0 auto;
  white-space: nowrap;                /* siempre en una línea */
}

.header-left hr {
  width: 50%;                       /* ancho de la línea */
  margin: 10px auto;                 /* espacio arriba y abajo, centrado */
  border: 2px solid #000;           /* color y grosor */
}

/* Por si acaso aún había scroll lateral por algo suelto */
html, body { overflow-x: hidden; }

@media (max-width: 600px) {
  .productos {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* siempre 2 columnas en celular */
    gap: 15px;
    padding: 10px;
    box-sizing: border-box;
    justify-items: center; /* centra cada producto dentro de su columna */
  }

  .producto {
    width: 100%;      /* ocupa todo el ancho de la columna */
    max-width: 180px; /* evita que se estire demasiado */
  }

  .producto img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
  }
}
