/* Reset básico */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", Arial, sans-serif;
}

/* Fondo general */
body {
  background: linear-gradient(135deg, #f7f9fc, #eef2f7);
  padding: 30px;
  color: #333;
}

/* Título principal */
h1 {
  text-align: center;
  margin-bottom: 35px;
  font-size: 2.3rem;
  color: #6a1b9a;
  letter-spacing: 1px;
  animation: fadeDown 1s ease forwards;
}

/* Contenedor catálogo */
.catalogo {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 25px;
  margin-bottom: 35px;
}

/* Tarjeta producto */
.producto {
  background: #ffffff;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  transition: all 0.4s ease;
  position: relative;
  cursor: pointer;
  animation: fadeUp 1s ease forwards;
  padding-bottom: 10px; 
}

/* Hover: actitud comercial */
.producto:hover {
  transform: translateY(-12px) scale(1.03);
  box-shadow: 0 18px 45px rgba(106, 27, 154, 0.25);
}

/* Imagen */
.producto img {
  width: 100%;
  height: auto;              /* 👈 ya NO forzamos altura */
  max-height: 200px;         /* 👈 límite elegante */
  object-fit: contain;       /* 👈 nunca se corta */
  display: block;
  margin: 0 auto;            /* 👈 centrada */
  background: #fff;
  padding: 12px;
  transition: transform 0.4s ease, filter 0.4s ease;
}


/* Zoom + brillo suave */
.producto:hover img {
  transform: scale(1.1);
  filter: brightness(1.05);
}

/* Contenido */
.producto h3 {
  font-size: 1.1rem;
  margin: 15px 15px 5px;
  color: #6a1b9a;
}

.producto p {
  margin: 0 15px 22px;
  font-size: 0.95rem;
  color: #666;
  line-height: 1.4;
}

/* Banda promocional */
.producto::after {
  content: "⭐ En stock";
  position: absolute;
  top: 16px;
  left: -60px;
  background: linear-gradient(135deg, #ff9800, #ff5722);
  color: #fff;
  padding: 6px 75px;
  transform: rotate(-45deg);
  font-size: 0.75rem;
  font-weight: bold;
  box-shadow: 0 6px 18px rgba(0,0,0,0.25);
}

/* Animaciones */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(45px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeDown {
  from {
    opacity: 0;
    transform: translateY(-45px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive */
@media (max-width: 480px) {
  h1 {
    font-size: 1.7rem;
  }

  .producto img {
    height: 150px;
  }
}
@media (max-width: 480px) {
  .producto img {
    height: 150px;
    padding: 8px;
  }
}
