.product-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 2rem;
    transition: all 0.4s ease;
}

.product-item {
    background-color: #fff;
    border: 1px solid #ddd;
    padding: 10px;
    transition: opacity 0.3s ease, transform 0.3s ease;
    opacity: 1;
    transform: scale(1);
}

.product-item img {
    width: 100%;
    height: auto;
    display: block;
}

.product-item.hide {
  opacity: 0;
  transform: scale(0.95);
  pointer-events: none;
  position: absolute;
}

.block2-btn {
  height: 40px;
  min-width: 139px;
  position: absolute;
  bottom: -60px;
  left: 50%;
  transform: translateX(-50%);
  padding: 8px 20px;
  background-color: white;
  color: #333333;
  border: none;
  border-radius: 999px;
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  transition:
    bottom 0.3s ease,
    background-color 0.3s ease,
    color 0.3s ease;
}

.block2-pic:hover .block2-btn {
  bottom: 20px;
}

.block2-btn:hover {
  background-color: #000;
  color: #fff;
}
/* Mostrar 2 productos por fila en pantallas pequeñas */
@media screen and (max-width: 768px) {
    .grid-products {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Opcional: 1 producto por fila en pantallas muy pequeñas */
/* @media screen and (max-width: 480px) {
    .grid-products {
        grid-template-columns: 1fr;
    }
} */