/* =====================================================
   FILTROS
===================================================== */

.filtros-top {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 15px;
  flex-wrap: wrap;
  
}

.filtro-btn {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid #ddd;
  background: #fff;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s ease;
}

.filtro-btn:hover {
  background: #f3f3f3;
}

.filtro-btn.active {
  background: var(--color-primario);
  color: #fff;
  border-color: var(--color-primario);
}


/* =====================================================
   GRID DEL CATALOGO
===================================================== */

.catalogo-grid {
  max-width: 1400px;
  margin: auto;
  padding: 30px 40px;

  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
}


/* =====================================================
   PRODUCTO CARD (PRO)
===================================================== */

.producto-card {
  display: flex;
  flex-direction: column;

  background: #fff;
  border-radius: 10px;
  padding: 16px;

  border: 1px solid #eee;

  transition: transform 0.25s ease, box-shadow 0.25s ease;
}



.producto-card img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 12px;
}

.producto-card h3 {
  font-size: 15px;
  margin-bottom: 6px;
}

.producto-card .precio {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 12px;
}


/* =====================================================
   BOTON AGREGAR
===================================================== */

.btn-agregar {
  margin-top: auto;
  padding: 10px;
  border-radius: var(--border-radius);
  border: none;
  cursor: pointer;

  background: var(--color-primario);
  color: #fff;
  font-weight: 500;

  transition: all 0.2s ease;
}

.btn-agregar:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  background: var(--color-primario-oscuro);
}

.btn-agregar:active {
  transform: scale(0.95);
}



/* =====================================================
   ERROR ANIMATION
===================================================== */

.producto-card.error {
  animation: shake 0.3s;
  border-color: #f97316;
}

@keyframes shake {
  25% { transform: translateX(-5px); }
  50% { transform: translateX(5px); }
  75% { transform: translateX(-5px); }
}


/* =====================================================
   TOAST
===================================================== */

.toast {
  position: fixed;
  bottom: 30px;
  right: 30px;

  padding: 12px 20px;
  border-radius: var(--border-radius);

  font-size: 14px;
  font-weight: 500;

  color: #fff;

  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;

  transition: all 0.3s ease;
  z-index: 9999;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast.success {
  background: #16a34a;
}

.toast.warning {
  background: #f97316;
}


/* =====================================================
   MOBILE
===================================================== */

@media (max-width: 768px) {

  .catalogo-grid {
    grid-template-columns: repeat(2, 1fr); /* 🔥 FORZAMOS 2 COLUMNAS */
    gap: 15px;
    padding: 20px;
  }

  .producto-card {
    padding: 10px;
  }

  .producto-card img {
    height: 160px;
  }

  .producto-card h3 {
    font-size: 13px;
  }

  .producto-card .precio {
    font-size: 14px;
  }

  .btn-agregar {
    padding: 8px;
    font-size: 13px;
  }

}