/* V19.3 — consistent catalog cards in Arabic and English, independent of title length. */
#productsGrid { align-items: stretch; }
#productsGrid .product-card { display: flex; flex-direction: column; height: 100%; min-width: 0; }
#productsGrid .product-media { flex: 0 0 auto; aspect-ratio: 1 / 1; display: flex; align-items: center; justify-content: center; min-width: 0; overflow: hidden; }
#productsGrid .product-media img { width: 100% !important; height: 100% !important; aspect-ratio: auto !important; object-fit: contain !important; }
#productsGrid .product-content { display: flex; flex-direction: column; flex: 1; min-width: 0; }
#productsGrid .price-line { flex: 0 0 auto; align-content: flex-start; align-items: baseline; }
#productsGrid .current-price { white-space: nowrap; }
#productsGrid .product-actions { flex: 0 0 auto; }
#productsGrid .product-actions > * { display: flex; align-items: center; justify-content: center; box-sizing: border-box; text-align: center; }
@media (min-width: 851px) {
  #productsGrid .product-content h3 { font-size: 17px !important; line-height: 1.55 !important; height: 4.65em; min-height: 4.65em !important; max-height: 4.65em; flex: 0 0 auto; margin: 0 0 9px !important; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow-wrap: anywhere; }
  #productsGrid .product-content p { font-size: 13px !important; line-height: 1.8 !important; height: 5.4em; min-height: 5.4em !important; max-height: 5.4em; flex: 0 0 auto; margin: 0 0 12px !important; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow-wrap: anywhere; }
  #productsGrid .price-line { height: 62px; min-height: 62px; margin: auto 0 0 !important; gap: 4px 8px !important; }
  #productsGrid .product-actions { margin-top: 10px !important; gap: 8px !important; }
  #productsGrid .product-actions > * { min-height: 48px; height: 48px; margin: 0 !important; padding: 8px 5px; line-height: 1.3; }
}
@media (max-width: 850px) {
  #productsGrid .product-content h3 { flex: 0 0 auto; height: 2.9em; }
  #productsGrid .price-line { height: 48px; min-height: 48px; align-content: flex-start; }
  #productsGrid .product-actions .add-to-cart, #productsGrid .product-actions .buy-now { height: 44px; min-height: 44px; margin: 0 !important; }
  #productsGrid .product-actions .button { display: none !important; }
}
