/* ========= Clean marketplace card style (no HTML changes) ========= */

.listing-card a {
    text-decoration: none;
    color: inherit;
}

/* Card */
.listing-card .card {
    border: 1px solid #e9edf3;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06) !important;
    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease;
}

@media (hover: hover) {
    .listing-card .card:hover {
        transform: translateY(-2px);
        box-shadow: 0 10px 22px rgba(0, 0, 0, 0.1) !important;
    }
}

/* Image */
.card-img-top {
    height: 290px !important;
    width: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* SOLD / Reserved */
.sold-card {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 3;
    display: none;
    border-radius: 999px;
    padding: 0.35rem 0.55rem;
    font-weight: 700;
}

.car-sold .sold-card {
    display: inline-flex;
}
.car-sold .card-img-top {
    filter: grayscale(0.15) brightness(0.92);
}
.car-sold {
    opacity: 1;
}

/* Compare badge (top-right) */
.compare-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 3;
    border-radius: 999px;
    padding: 0.32rem 0.45rem;
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    border: 0;
    transition:
        transform 0.15s ease,
        background 0.15s ease;
}
.compare-badge:hover {
    transform: scale(1.06);
    background: rgba(0, 0, 0, 0.6);
}

/* Emission badge: keep but make it not “floaty” */
.emission-container {
    position: absolute;
    top: 10px;
    right: 15px;
    z-index: 3;
    scale: 0.85;
    padding: 0;
    border-radius: 999px;
}

:dir(rtl) .emission-container {
    right: auto;
    left: 10px;
}

/* Body spacing */
.listing-card .card-body {
    padding: 12px 12px 10px !important;
}

/* PRICE: make it look like the screenshot (simple, readable, not a pill) */
.price-card {
    position: static; /* removes overlap */
    background: transparent;
    padding: 0;
    margin: 0 0 6px 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

.price-card .d-flex {
    align-items: baseline;
    gap: 6px;
}

.price-card h5.fw-bold {
    font-size: 1.25rem;
    line-height: 1.1;
    margin: 0 !important;
    color: #0b5ed7 !important; /* bootstrap-ish primary */
}

.price-card h5 {
    font-size: 1rem;
    margin: 0 !important;
    color: #0b5ed7;
}

.price-card span {
    font-size: 0.78rem;
    font-weight: 700;
    color: #ff7a00;
    margin: 0 !important;
}

/* Title row + actions */
h6.card-title {
    font-size: 0.95rem !important;
    /* font-weight: 800; */
    color: #111827;
    margin: 0 !important;
}

.listing-card .bg-white {
    background: transparent !important;
    padding-bottom: 0 !important;
}

.like-car {
    cursor: pointer;
    transition:
        transform 0.15s ease,
        opacity 0.15s ease;
}
.like-car:hover {
    transform: scale(1.08);
}
.like-car i.active {
    color: #e11d48 !important;
} /* liked heart */

/* Specs row: 2x2 grid look */
.listing-card .small {
    height: auto !important; /* override inline height */
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #eef2f7;
    row-gap: 10px;
}

.listing-card .small > div {
    justify-content: flex-start !important; /* better alignment */
    padding-left: 4px;
    gap: 8px;
}

.listing-card .small img {
    opacity: 0.8;
}

.listing-card .small small {
    font-size: 0.78rem;
    color: #6b7280 !important;
    font-weight: 600;
}

/* Mobile tweaks */
@media (max-width: 576px) {
    .card-img-top {
        height: 200px;
    }
    .listing-card .card-body {
        padding: 12px !important;
    }
}
