/* AUTOHUB_MOBILE_LISTINGS_2COL_V1 */

@media (max-width: 600px) {
    .cars-grid,
    .listings-grid,
    .products-grid,
    .latest-cars-grid {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 10px !important;
    }

    .cars-grid > *,
    .listings-grid > *,
    .products-grid > *,
    .latest-cars-grid > * {
        min-width: 0;
        max-width: 100%;
        box-sizing: border-box;
    }

    .car-card,
    .listing-card,
    .product-card {
        min-width: 0;
        padding: 10px;
        overflow: hidden;
    }

    .car-card img,
    .listing-card img,
    .product-card img {
        max-width: 100%;
    }

    .car-card h2,
    .listing-card h2,
    .product-card h2,
    .car-card h3,
    .listing-card h3 {
        overflow-wrap: anywhere;
    }

    .products-grid .products-empty,
    .cars-grid .cars-empty,
    .listings-grid .listings-empty {
        grid-column: 1 / -1;
    }
}


/* AUTOHUB_MOBILE_CARD_POLISH_V2 */
@media (max-width: 600px) {

    /* Bütün elan kartları */
    .cars-grid .car-card,
    .listings-grid .listing-card,
    .products-grid .product-card,
    .latest-cars-grid .latest-car-card {
        min-width: 0;
        padding: 0 !important;
        overflow: hidden;
        border-radius: 13px;
        display: flex;
        flex-direction: column;
        gap: 0;
    }

    /* Şəkillər */
    .cars-grid .car-photo,
    .listings-grid .listing-photo,
    .latest-cars-grid .latest-car-photo {
        width: 100%;
        height: auto !important;
        aspect-ratio: 4 / 3;
        overflow: hidden;
        border-radius: 0;
        margin: 0;
    }

    .cars-grid .car-photo img,
    .listings-grid .listing-photo img,
    .latest-cars-grid .latest-car-photo img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    /* Kart daxilində məsafələr */
    .cars-grid .car-content,
    .listings-grid .listing-content,
    .latest-cars-grid .latest-car-content {
        min-width: 0;
        padding: 10px !important;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
        flex: 1;
    }

    /* Başlıqlar */
    .cars-grid .car-content h2,
    .listings-grid .listing-content h2,
    .products-grid .product-card h2,
    .latest-cars-grid .latest-car-content h3 {
        font-size: 12px !important;
        line-height: 1.4 !important;
        font-weight: 650;
        margin: 0 !important;
        min-width: 0;
        overflow: hidden;
        overflow-wrap: anywhere;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }

    /* Qiymətlər */
    .cars-grid .car-price,
    .listings-grid .listing-price,
    .products-grid .product-price,
    .latest-cars-grid .latest-car-price {
        font-size: 16px !important;
        font-weight: 800 !important;
        line-height: 1.25 !important;
        letter-spacing: -.3px;
        margin: 0 !important;
        overflow-wrap: anywhere;
    }

    /* Avtomobilin texniki məlumatları */
    .cars-grid .car-specs,
    .latest-cars-grid .latest-car-specs {
        display: flex;
        flex-wrap: wrap;
        gap: 4px 7px;
        margin: 2px 0 0;
    }

    .cars-grid .car-specs span,
    .latest-cars-grid .latest-car-specs span {
        font-size: 10px !important;
        line-height: 1.35;
        padding: 0 !important;
        border: 0;
        background: transparent !important;
        color: var(--muted);
    }

    .cars-grid .car-specs span:nth-child(n+3),
    .latest-cars-grid .latest-car-specs span:nth-child(n+3) {
        display: none;
    }

    /* Şəhər */
    .cars-grid .car-city,
    .latest-cars-grid .latest-car-city {
        font-size: 10px !important;
        line-height: 1.4;
        margin: 0 !important;
        color: var(--muted);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    /* Ehtiyat hissələrinin kateqoriyaları */
    .listings-grid .listing-badges {
        display: flex;
        flex-wrap: wrap;
        gap: 4px;
        margin: 0;
    }

    .listings-grid .listing-badges span {
        max-width: 100%;
        font-size: 9px !important;
        line-height: 1.3;
        padding: 3px 6px !important;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .listings-grid .listing-description {
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        overflow: hidden;
        overflow-wrap: anywhere;
        font-size: 10px !important;
        line-height: 1.45;
        margin: 0 !important;
        color: var(--muted);
    }

    /* Şəxsi məhsul elanları */
    .products-grid .product-card {
        padding: 10px !important;
        gap: 6px;
    }

    .products-grid .product-card > div:first-child {
        width: 100%;
        min-width: 0;
    }

    .products-grid .product-main-image,
    .products-grid .product-image-placeholder {
        display: block;
        width: 100%;
        max-width: 100%;
        height: auto;
        aspect-ratio: 4 / 3;
        object-fit: cover;
        border-radius: 9px;
    }

    .products-grid .product-card p {
        font-size: 10px !important;
        line-height: 1.4;
        margin: 0 !important;
        overflow-wrap: anywhere;
    }

    .products-grid .product-status {
        align-self: flex-start;
        max-width: 100%;
        font-size: 10px;
    }

    /* Boş nəticə mesajları iki sütunu tutsun */
    .cars-grid > :only-child:not(.car-card),
    .listings-grid > :only-child:not(.listing-card),
    .products-grid > :only-child:not(.product-card),
    .latest-cars-grid > :only-child:not(.latest-car-card) {
        grid-column: 1 / -1;
    }
}
