/* ========================================
   INLINE LISTING STYLES
   ======================================== */

/* 1. ОТМЕНЯЕМ GRID ДЛЯ КОНТЕЙНЕРА С INLINE */
.es-listings:has(.es-listing-inline) {
    display: block !important;
    grid-template-columns: none !important;
    gap: 0 !important;
    row-gap: 0 !important;
    column-gap: 0 !important;
    grid-column-gap: 0 !important;
    grid-row-gap: 0 !important;
}

/* 2. КАЖДАЯ СТРОКА - РАВНОМЕРНОЕ РАСПРЕДЕЛЕНИЕ */
.es-listing-inline {
    display: flex;
    gap: 30px; /* РАССТОЯНИЕ МЕЖДУ ЭЛЕМЕНТАМИ */
    padding: 4px 0;
    border-bottom: 1px solid #f0f0f0;
    align-items: center !important;
    flex-wrap: nowrap;
    justify-content: space-between; /* РАВНОМЕРНО ПО ВСЕЙ ШИРИНЕ */
    height: auto !important;
    min-height: 28px;
    width: 100% !important;
}

/* 3. АДРЕС - МОЖЕТ РАСТЯГИВАТЬСЯ */
.es-listing-inline .es-listing__title {
    flex: 2; /* ЗАНИМАЕТ БОЛЬШЕ МЕСТА */
    min-width: 150px;
    display: inline-flex !important;
    align-items: center !important;
}

.es-listing-inline .es-listing__title a {
    color: #007bff;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    display: inline-block;
    line-height: 1.2 !important;
}

/* 4. ТИП (SALE/RENT) - ФИКСИРОВАННЫЙ */
.es-listing-inline .es-listing__type {
    padding: 2px 14px !important;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0; /* НЕ СЖИМАЕТСЯ */
    display: inline-flex !important;
    align-items: center !important;
    height: auto !important;
    line-height: 1.4 !important;
    min-width: 50px;
    justify-content: center;
}

.es-listing-inline .es-listing__type--sale {
    background: #dc3545;
    color: #fff;
}

.es-listing-inline .es-listing__type--rent {
    background: #28a745;
    color: #fff;
}

/* 5. ЦЕНА - ЗЕЛЕНАЯ, ФИКСИРОВАННАЯ */
.es-listing-inline .es-listing__price {
    color: #10ea1f !important;
    font-weight: 700;
    font-size: 14px;
    white-space: nowrap;
    flex-shrink: 0; /* НЕ СЖИМАЕТСЯ */
    display: inline-flex !important;
    align-items: center !important;
    line-height: 1.2 !important;
    min-width: 80px;
    justify-content: flex-end;
}

.es-listing-inline .es-listing__price .es-price {
    color: #10ea1f !important;
    display: inline-block;
    line-height: 1.2 !important;
}

/* 6. ВСЕ ЭЛЕМЕНТЫ ВНУТРИ - ВЕРТИКАЛЬНО ПО ЦЕНТРУ */
.es-listing-inline > * {
    display: inline-flex !important;
    align-items: center !important;
    vertical-align: middle !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* ========================================
   МОБИЛЬНАЯ ВЕРСИЯ
   ======================================== */

@media (max-width: 768px) {
    .es-listing-inline {
        gap: 15px;
        padding: 3px 0;
        min-height: 24px;
        flex-wrap: nowrap;
        overflow-x: auto;
    }
    
    .es-listing-inline .es-listing__title {
        flex: 1;
        min-width: 80px;
    }
    
    .es-listing-inline .es-listing__title a {
        font-size: 11px;
    }
    
    .es-listing-inline .es-listing__type {
        font-size: 9px;
        padding: 1px 10px !important;
        min-width: 40px;
    }
    
    .es-listing-inline .es-listing__price {
        font-size: 12px;
        min-width: 60px;
    }
}

/* ========================================
   ПРИНУДИТЕЛЬНОЕ ВЫРАВНИВАНИЕ
   ======================================== */

.es-listing-inline,
.es-listing-inline .es-listing__title,
.es-listing-inline .es-listing__title a,
.es-listing-inline .es-listing__type,
.es-listing-inline .es-listing__price,
.es-listing-inline .es-listing__price .es-price {
    vertical-align: middle !important;
    align-items: center !important;
    display: inline-flex !important;
    box-sizing: border-box !important;
}