/* Vehicle listing tables become cards on phones (under 640px wide).
   Each cell shows its column name from data-label, set by /js/listing-cards.js. */
.jr-sort { display: none; }
@media (max-width: 640px) {
  div.table-scroll { overflow: visible; border: 0; box-shadow: none; background: none; }
  .table-scroll table.listings, .table-scroll table.listings tbody { display: block; width: 100%; min-width: 0; }
  .table-scroll table.listings thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .table-scroll table.listings tr { display: flex; flex-direction: column; gap: 4px; margin: 0 0 12px; padding: 14px 16px;
    background: #fff; border: 1px solid rgba(28,75,53,0.14); border-radius: 10px; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
  .table-scroll table.listings tr:hover td { background: none; }
  .table-scroll table.listings td { display: flex; justify-content: space-between; align-items: center; gap: 12px;
    padding: 2px 0; border: 0; white-space: normal; font-size: 15px; text-align: right; }
  .table-scroll table.listings td::before { content: attr(data-label); flex: 0 0 auto; text-align: left;
    font-size: 13px; font-weight: 600; color: #6B6B6B; }
  .table-scroll table.listings td.price-cell { order: -1; justify-content: flex-start; font-size: 21px; font-weight: 700;
    padding-bottom: 6px; margin-bottom: 4px; border-bottom: 1px solid rgba(28,75,53,0.1); }
  .table-scroll table.listings td.price-cell::before { display: none; }
  .table-scroll table.listings td:empty { display: none; }
  .table-scroll table.listings td.photo-col { order: 10; justify-content: flex-start; }
  .table-scroll table.listings td.photo-col::before { display: none; }
  .table-scroll table.listings td.photo-col a { min-height: 44px; display: inline-flex; align-items: center; }
  .table-scroll table.listings td.no-results { display: block; text-align: center; }
  .table-scroll table.listings td.no-results::before { display: none; }
  .jr-sort { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; font-size: 14px; font-weight: 600; }
  .jr-sort select { flex: 1; min-height: 44px; padding: 0 12px; border-radius: 8px; border: 1px solid rgba(28,75,53,0.3);
    background: #fff; font: inherit; font-weight: 500; }
}
