/* Product card and product grid, shared by Home, Explore and the store pages (markup: em-public/includes/ProductCard.php).
   Flat: 1px hairline, 8px radius, no shadow. Hover darkens the border. Orange is not used here: the only colour is the green "% off". */

.product-grid { --cols: 2; display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: 8px; }
@media (min-width: 576px) { .product-grid { --cols: 3; gap: 10px; } }
@media (min-width: 768px) { .product-grid { --cols: 4; } }
@media (min-width: 992px) { .product-grid { --cols: 5; gap: 12px; } }
.product-grid [hidden] { display: none !important; }

.product-card-link { display: block; height: 100%; color: inherit; text-decoration: none; }
.product-card { display: flex; flex-direction: column; height: 100%; overflow: hidden; background: #fff; border: 1px solid var(--k-line, #E2E8F0); border-radius: 8px; transition: border-color .15s ease; }
.product-card-link:hover .product-card, .product-card:hover { border-color: #94A3B8; }
.product-card-link:focus-visible { outline: 2px solid var(--k-brand, #E97C43); outline-offset: 2px; border-radius: 8px; }

.product-image-container { position: relative; aspect-ratio: 1 / 1; background: #F6F7F9; overflow: hidden; }
.product-image { display: block; width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; font-size: 0; color: transparent; }
.product-card.is-out .product-image { opacity: .45; }
.product-badge.elite { position: absolute; top: 8px; left: 8px; display: block; padding: 0; background: none; border: 0; }
.product-badge.elite img { display: block; height: 18px; width: auto; font-size: 0; }

.product-info { display: flex; flex-direction: column; gap: 4px; flex: 1; padding: 10px 10px 12px; min-width: 0; }
.product-seller { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 500 12px/1.3 var(--k-mono, ui-monospace, monospace); letter-spacing: .04em; text-transform: uppercase; color: var(--k-mute, #64748B); }
.product-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin: 0; font-size: 13px; font-weight: 500; line-height: 1.4; letter-spacing: 0; color: var(--k-ink, #0F172A); overflow-wrap: anywhere; }
.product-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; margin-top: auto; padding-top: 2px; }
.current-price { font-size: 15px; font-weight: 700; color: var(--k-ink, #0F172A); }
.original-price { font-size: 12px; color: #94A3B8; text-decoration: line-through; }
.discount-badge { font-size: 12px; font-weight: 600; color: var(--k-ok, #15803D); }
.product-meta { display: flex; flex-wrap: wrap; gap: 0 10px; font-size: 12px; line-height: 1.4; color: var(--k-mute, #64748B); }
.product-meta .fa-star { font-size: 11px; color: #F59E0B; }
.product-meta .is-warn { color: var(--k-warn, #B45309); }
.no-products { padding: 32px 0; text-align: center; color: var(--k-mute, #64748B); }

@media (max-width: 767px) {
  .product-info { padding: 8px 8px 10px; }
  .current-price { font-size: 14px; }
}
