.products {
  background: #fff;
}

.product-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: center;
}

.product-card {
  flex: 1 1 calc(33.333% - 24px);
  max-width: calc(33.333%);
  background: var(--ui-bg);
  border: 1px solid var(--ui-border);
  border-radius: var(--ui-radius);
  box-shadow: var(--ui-shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--ui-shadow-lg);
}

.product-media {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--ui-bg-secondary);
}

.product-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.product-body {
  padding: 16px 16px 0 16px;
}

.product-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: .25rem;
  color: #111827;
}

.product-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: .75rem;
}

.tag {
  font-size: .75rem;
  background: var(--ui-bg-secondary);
  border: 1px solid var(--ui-border);
  border-radius: 999px;
  padding: 4px 10px;
}

.product-desc {
  color: #4b5563;
  font-size: .95rem;
  line-height: 1.5;
}

.product-actions {
  display: flex;
  gap: 10px;
  padding: 16px;
  margin-top: auto;
}

/* Button variant: ghost for preview */
.btn-ghost {
  background: transparent;
  color: var(--ui-primary);
  border: 1.5px solid var(--ui-primary);
  border-radius: 50px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all .2s ease;
}

.btn-ghost:hover {
  background: var(--ui-primary);
  color: var(--ui-primary-contrast);
  text-decoration: none;         /* sicherheitshalber auch hier */
}

.view-btn {
  /* reuses .btn base styles you already have */
}

/* Responsive */
@media (max-width: 1024px) {
  .product-card { grid-column: span 6; }
}

@media (max-width: 640px) {
  .product-card { grid-column: span 12; }
  .product-actions {
    flex-direction: column;
  }
}
