/* Focused improvements to listing cards; the site's branding and hero stay in trucks.css. */
.listing-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    height: 100%;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgb(15 23 42 / 5%);
    cursor: pointer;
    transition: box-shadow .2s, border-color .2s;
    container-type: inline-size;
    container-name: listing;
}
.listing-card:hover { border-color: #94caa8; box-shadow: 0 7px 18px rgb(15 23 42 / 10%); }
.listing-card:focus-visible, .listing-card a:focus-visible, .listing-card button:focus-visible { outline: 3px solid #16a34a; outline-offset: 3px; }
.listing-card-photo { position: relative; aspect-ratio: 4 / 3; flex-shrink: 0; overflow: hidden; background: #f1f5f9; }
.listing-card-photo img { object-fit: cover; }
.listing-year, .listing-photo-count { position: absolute; bottom: 9px; background: rgb(15 23 42 / 75%); padding: 3px 6px; border-radius: 4px; color: #fff; font-size: 12px; line-height: 1.3; font-weight: 600; pointer-events: none; }
.listing-year { right: 9px; }
.listing-photo-count { left: 9px; }
.listing-featured { position: absolute; top: 9px; left: 9px; display: inline-flex; align-items: center; gap: 5px; padding: 4px 8px; border-radius: 5px; background: #07963e; color: #fff; font-size: 12px; font-weight: 700; }
.listing-featured i { color: #fce55d; }
.listing-favorite { position: absolute; top: 6px; right: 6px; display: flex; width: 40px; height: 40px; align-items: center; justify-content: center; border-radius: 50%; background: rgb(15 23 42 / 25%); color: #fff; }
.listing-favorite button { display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; border-radius: inherit; }
.listing-favorite i { font-size: 20px; filter: drop-shadow(0 1px 2px #333); }
.listing-favorite:hover { background: rgb(15 23 42 / 55%); }
.listing-favorite [aria-pressed=true] { color: #ff7990; }
.listing-card-content { padding: 12px 11px 0; display: flex; flex-direction: column; flex: 1; }
.listing-card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 9px; margin-bottom: 13px; }
.listing-card-heading h3 { flex: 1; min-width: 0; font-size: 14px; line-height: 1.35; font-weight: 700; color: #0f172a; margin: 0; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.7em; }
.listing-card-heading p { flex-shrink: 0; color: #078537; font-size: clamp(16px, 6.5cqi, 20px); font-weight: 800; letter-spacing: -.035em; white-space: nowrap; margin: 0; }
.listing-card-specs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 6px; padding-bottom: 12px; margin-top: auto; color: #475569; font-size: 12px; font-weight: 500; }
.listing-card-specs span { display: flex; align-items: center; gap: 5px; min-width: 0; overflow-wrap: anywhere; }
.listing-card-specs i { color: #64748b; font-size: 12px; flex-shrink: 0; }
.listing-card-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 9px; border-top: 1px solid #edf1f4; padding: 10px 0; font-size: 12px; color: #475569; }
.listing-card-footer>span { min-width: 0; flex: 1 1 100px; }
.listing-card-footer>span i { margin-right: 3px; color: #64748b; }
.listing-card-footer>a { display: inline-flex; justify-content: center; border: 1px solid #16a34a; border-radius: 5px; padding: 6px 9px; font-size: 12px; line-height: 1.2; font-weight: 600; color: #078537; white-space: nowrap; }
.listing-card-footer>a:hover { background: #effcf3; }
.car-content.js-ajax-category-filter { position: relative; }
.category-stock-count { position: absolute; top: 8px; right: 9px; min-width: 24px; padding: 3px 6px; border-radius: 6px; background: #effaf2; color: #168540; font-size: 12px; font-weight: 700; line-height: 1.3; text-align: center; }
.js-ajax-category-filter[aria-current=true] { border-color: #16a34a; box-shadow: 0 0 0 1px #16a34a; }
.listing-results-toolbar { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin: 0 0 18px; flex-wrap: wrap; }
.listing-results-toolbar h2 { padding-left: 10px; border-left: 3px solid #16a34a; font-size: 20px; font-weight: 700; color: #0f172a; line-height: 1.2; }
.listing-results-toolbar p { margin: 7px 0 0 13px; color: #64748b; font-size: 14px; }
.listing-results-toolbar>label { display: flex; align-items: center; gap: 8px; color: #64748b; font-size: 14px; }
.listing-results-toolbar select { padding: 8px; border: 1px solid #e2e8f0; border-radius: 7px; background: #fff; color: #334155; font-size: 14px; max-width: 185px; }
.active-truck-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.active-truck-filters:empty { display: none; }
.active-truck-filters button { display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px; background: #effaf2; color: #166534; border: 1px solid #bbdfc7; border-radius: 20px; font-size: 13px; }
.active-truck-filters button:hover { background: #dcfce7; }
.brand-filter-option:disabled { opacity: .4; cursor: not-allowed; filter: grayscale(70%); }
#truck-filter-feedback { color: #64748b; font-size: 14px; margin-bottom: 12px; }
#truck-filter-feedback:empty { display: none; }
.listing-filter-error { padding: 12px; border: 1px solid #fecaca; background: #fff5f5; border-radius: 8px; color: #991b1b; }
.listing-filter-error button { text-decoration: underline; font-weight: 600; }
.listing-empty-state { background: #fff; border: 1px dashed #cbd5e1; border-radius: 12px; padding: 40px 20px; text-align: center; color: #64748b; }
.listing-empty-state h3 { color: #334155; font-size: 20px; font-weight: 600; margin-bottom: 9px; }
.listing-empty-state button { margin-top: 18px; padding: 10px 18px; border: 1px solid #16a34a; color: #15803d; border-radius: 7px; font-weight: 600; }
#truck-pagination button:disabled { opacity: .4; cursor: default; background: #f8fafc; }
@container listing (min-width: 340px) { .listing-card-specs { grid-template-columns: repeat(4, max-content); justify-content: space-between; } }
@media (max-width: 767px) { .listing-results-toolbar { align-items: start; } .listing-results-toolbar h2 { font-size: 18px; } }
@media (prefers-reduced-motion: reduce) { .listing-card { transition: none; } }
