/* Product card alignment (archive/category/search grids).
   Equal-height cards; title, price, quantity/total and buttons sit at the same
   heights in every card of a row. Additive layer, loads after rs-fix.css. */
.product-grid { align-items: stretch; }
.product-grid > .product-card { display: flex !important; flex-direction: column; height: 100%; }
.product-grid > .product-card .product-media { flex: 0 0 auto; }
.product-grid > .product-card .product-body { flex: 1 1 auto; display: flex !important; flex-direction: column; gap: 6px; min-height: 0; }
.product-grid > .product-card .market-product-category { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-height: 1.4em; line-height: 1.4; }
.product-grid > .product-card .product-body .product-title {
  display: -webkit-box !important; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2;
  overflow: hidden !important; line-height: 1.55 !important;
  height: 3.1em !important; min-height: 3.1em !important; max-height: 3.1em !important;
}
.product-grid > .product-card .market-price-row { flex-wrap: nowrap; align-items: baseline; min-height: 34px; margin-top: 0 !important; }
.product-grid > .product-card .product-body > .gst-cq { margin-top: auto; margin-bottom: 0; min-height: 72px; display: flex; flex-direction: column; justify-content: flex-start; }
.product-grid > .product-card .gst-cq__total { min-height: 22px; white-space: nowrap; }
.product-grid > .product-card .product-body > .market-card-actions { margin-top: auto !important; }
.product-grid > .product-card .product-body > .gst-cq ~ .market-card-actions { margin-top: 10px !important; }
@media (max-width: 640px) {
  .product-grid > .product-card .product-body .product-title { font-size: 14px !important; }
  .product-grid > .product-card .gst-cq__total { white-space: normal; min-height: 36px; }
  .product-grid > .product-card .product-body > .gst-cq { min-height: 88px; }
}
