/* 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: #2e7d32; /* verde elegante */
  letter-spacing: 1px;
  animation: fadeDown 1s ease forwards;
}

/* Contenedor catálogo */
.catalogo {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 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;
}

/* Hover elegante */
.producto:hover {
  transform: translateY(-10px) scale(1.03);
  box-shadow: 0 18px 40px rgba(46, 125, 50, 0.25);
}

/* Imagen — balanceada y sin recortes */
.producto img {
  width: 100%;
  height: auto;
  max-height: 170px;          /* 👈 compacta como pediste */
  object-fit: contain;
  display: block;
  margin: 0 auto;
  background: #fff;
  padding: 8px;
  transition: transform 0.4s ease, filter 0.4s ease;
}

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

/* Contenido */
.producto h3 {
  font-size: 1.05rem;
  margin: 10px 15px 4px;
  color: #2e7d32;
}

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

/* Banda En stock */
.producto::after {
  content: "📦 En stock";
  position: absolute;
  top: 14px;
  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 {
    max-height: 145px;
    padding: 6px;
  }
}
