.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
  max-width: 1100px;
  margin: 0 auto;
  padding: var(--space-md);
}

@media (min-width: 768px) {
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {
  .product-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.product-card {
  background: var(--color-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.product-card__img-wrap {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--color-accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.product-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-card__placeholder-icon {
  font-size: 28px;
}

.product-card__cart-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  background: var(--color-primary);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  border-radius: var(--radius-pill);
  padding: 2px 7px;
}

/*
 * The image + name sit inside a link to the detail page; the bottom row (price +
 * Add button) is a sibling of that link, so the padding that used to live on
 * .product-card__body alone is now split between the two to keep the identical box.
 */
.product-card__link {
  display: block;
}

.product-card__body {
  padding: var(--space-sm) var(--space-sm) 0 var(--space-sm);
}

.product-card__name {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
  margin: 0 0 var(--space-xs) 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card__bottom-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-xs);
  padding: 0 var(--space-sm) var(--space-sm) var(--space-sm);
}

.product-card__price-wrap {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.product-card__price {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-primary);
}

.product-card__price--original {
  font-size: 12px;
  color: var(--color-text-muted);
  text-decoration: line-through;
}

.product-card__add-btn {
  border: none;
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 600;
  background: var(--color-primary);
  color: #fff;
  white-space: nowrap;
}
