/* Keep the original 4 / 3 / 2 responsive column layout. */
#productGrid {
  align-items: start;
  grid-auto-rows: auto;
}

#productGrid .product-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: auto;
}

#productGrid .product-media {
  position: relative;
  flex: none;
  width: 100%;
  height: auto;
  min-height: 0;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #fff;
  border-bottom: 1px solid #ece9df;
}

#productGrid .product-media img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  padding: 8%;
  object-fit: contain;
  object-position: center;
}

#productGrid .product-media .placeholder {
  font-size: clamp(48px, 6vw, 74px);
  line-height: 1;
}

#productGrid .product-card-body {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  gap: 0.55rem;
  min-width: 0;
  padding: clamp(12px, 1.4vw, 18px);
}

#productGrid .product-category {
  display: block;
  min-height: 0;
  font-size: 11px;
  line-height: 1.3;
  letter-spacing: 0.07em;
  overflow-wrap: anywhere;
}

#productGrid .product-card h3 {
  flex: 0 0 auto;
  min-height: 0;
  margin: 0;
  font-size: 16px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

#productGrid .product-unit {
  display: block;
  min-height: 0;
  font-size: 13px;
  line-height: 1.3;
  color: #687267;
  overflow-wrap: anywhere;
}

#productGrid .product-price {
  display: block;
  margin-top: 0;
  font-size: 25px;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

#productGrid .product-card button {
  display: block;
  width: 100%;
  min-height: 46px;
  margin-top: 0;
  padding: 12px 10px;
  font-size: 14px;
  line-height: 1.2;
  white-space: normal;
}

@media (max-width: 480px) {
  #productGrid .product-card-body { gap: 8px; padding: 12px; }
  #productGrid .product-category { font-size: 10px; }
  #productGrid .product-card h3 { font-size: 14px; }
  #productGrid .product-unit { font-size: 12px; }
  #productGrid .product-price { font-size: 22px; }
  #productGrid .product-card button { font-size: 12px; }
}
