.prodotti-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
  margin-bottom: 20px;
}

.product-card {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  overflow: hidden;
  display: flex;
  position: relative;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.card-img img {
  width: 100%;
  height: 200px;
  aspect-ratio: 4/3;
  object-fit: cover;
}

.card-body {
  padding: 1rem;
  display: flex;
  flex-direction: column;
}

.card-body h3 {
  margin: 0 0 0.5rem;
  font-size: 1.2rem;
}

.card-body .descrizione {
  font-size: 0.95rem;
  color: #444;
  flex-grow: 1;
}

.ambiti {
  margin-top: 0.8rem;
}

.badge {
  display: inline-block;
  background: #f0f0f0;
  border-radius: 12px;
  padding: 0.2rem 0.6rem;
  margin: 0 0.3rem 0.3rem 0;
  font-size: 0.8rem;
}

.card-gallery {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.8rem;
}

.card-gallery img {
  width: 48%;
  border-radius: 6px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
  object-fit: cover;
}

.card-button-spacing{
  height: 50px;
}

.card-button-container{
  padding: 15px;
  position: absolute;
  bottom: 0;
}

.card-link{
    display: inline-block;
    padding: 0.5rem 1rem;
    background: #0073aa;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background 0.3s ease;
}

.card-link:hover {
    background: #005f8d;
    transform: translateY(-2px);
}