/* === CATÁLOGO DE PRODUCTOS === */
.catalogo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 20px;
  margin-top: 20px;
}
@media (min-width: 576px) {
  .catalogo-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
}
@media (min-width: 768px) {
  .catalogo-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 992px) {
  .catalogo-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 1200px) {
  .catalogo-grid { grid-template-columns: repeat(5, 1fr); }
}

.producto-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
  height: auto;
  min-height: 240px; /* Altura mínima para mantener proporción */
  padding: 10px; /* Espacio interno uniforme */
}

.producto-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}

.producto-img-container {
  width: 100%;
  height: 230px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f9f9f9;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid #eee;
}
.producto-img {
  max-width: 80%;
  max-height: 80%;
  object-fit: contain;
  border-radius: 8px;
  transition: transform 0.2s ease;
}
.producto-img:hover {
  transform: scale(1.05);
}
.placeholder-img {
  color: #adb5bd;
  font-size: 2rem;
}

.producto-info {
  padding: 12px 0;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.producto-nombre {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 6px;
  color: #333;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}
.producto-precio {
  font-size: 0.9rem;
  color: #ecba16;
  font-weight: 700;
  margin-bottom: 10px;
}

/* Botón de comprar con estilo del sitio */
.btn-hero {
  background: linear-gradient(135deg, #fcec95, #ecba16);
  color: #000 !important;
  border: none;
  border-radius: 8px;
  padding: 8px 12px;
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 3px 0 #a88b0f;
  transition: all 0.2s ease;
  display: block;
  text-align: center;
  text-decoration: none;
  width: 100%;
  margin-top: auto; /* Empuja el botón hacia abajo */
}
.btn-hero:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 0 #a88b0f;
  color: #000 !important;
}

/* Modal de detalles */
.modal-detalle {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}
.modal-detalle-content {
  background: white;
  border-radius: 16px;
  width: 90%;
  max-width: 320px;
  max-height: 85vh;
  overflow-y: auto;
  padding: 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  text-align: center;
}
.modal-detalle-content h5 {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  color: #ecba16;
  margin-bottom: 10px;
}
.detalle-img {
  width: 100%;
  max-height: 200px;
  object-fit: contain;
  border-radius: 10px;
  margin-bottom: 15px;
}
#detalle-descripcion {
  font-size: 0.9rem;
  color: #555;
  margin-bottom: 10px;
}
#detalle-precio,
#detalle-cantidad,
#detalle-categoria,
#detalle-medida {
  font-size: 0.9rem;
  color: #333;
  font-weight: 600;
  margin: 4px 0;
}
#detalle-precio {
  color: #ecba16;
  font-size: 1rem;
}

/* Toast */
#toast {
  position: fixed;
  top: 16px;
  right: 16px;
  padding: 10px 16px;
  color: white;
  border-radius: 6px;
  font-weight: 500;
  z-index: 2000;
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}
#toast.show {
  opacity: 1;
}
.success { background-color: #28a745; }
.error { background-color: #dc3545; }