/* Product grid styles — loaded on home, leistungen, loesungen */

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
  padding: 20px 5vw 80px;
}

.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  transition: border-color .18s var(--ease-out), box-shadow .18s var(--ease-out);
}

.product-card:hover {
  border-color: #bfdbfe;
  box-shadow: var(--shadow);
}

.product-media {
  aspect-ratio: 3 / 2;
  background: var(--soft);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.product-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s var(--ease-out);
}

.product-card:hover .product-media img { transform: scale(1.03); }

.product-icon {
  color: var(--brand);
  opacity: .8;
}

.product-icon svg { width: 52px; height: 52px; }

.product-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 14px 16px 16px;
}

.product-cat {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 4px;
}

.product-body h3 {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -.01em;
  line-height: 1.3;
  margin: 0 0 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-link {
  color: var(--text);
  text-decoration: none;
}

/* Stretched link: whole card opens the product */
.product-link::after {
  content: '';
  position: absolute;
  inset: 0;
}

.product-card:hover .product-link { color: var(--brand); }

.product-short {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 12px;
}

.product-price {
  display: flex;
  align-items: baseline;
  gap: 5px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.pp-pre,
.pp-suffix {
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}

.pp-amount {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -.01em;
  color: var(--text);
}

.pp-suffix { opacity: .7; }

.pp-old {
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
  text-decoration: line-through;
  opacity: .7;
}

.pp-sale {
  color: #e03131;
}

.pp-custom {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}

.pp-tax {
  width: 100%;
  color: var(--muted);
  font-size: 11.5px;
}

.product-cta {
  position: relative;
  z-index: 1;
}

@media (max-width: 640px) {
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 16px 4vw 64px;
  }
  .product-media { aspect-ratio: 16 / 10; }
  .product-icon svg { width: 38px; height: 38px; }
  .product-body { padding: 10px 12px 12px; }
  .product-cat { font-size: 11px; }
  .product-body h3 { font-size: 14px; }
  .product-short { font-size: 12px; -webkit-line-clamp: 2; }
  .pp-amount { font-size: 15px; }
  .pp-pre, .pp-suffix { font-size: 11.5px; }
  .pp-tax { font-size: 10.5px; }
  .product-cta .button { font-size: 13px; padding: 8px 10px; }
}
