.esw-posts-wrapper {
    width: 100%;
}

.esw-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.esw-header-title {
    margin: 0;
    font-size: 18px;
    font-weight: 500;
}

.esw-view-all {
    display: inline-flex;
    align-items: center;
    font-size: 16px;
    font-weight: 500;
    text-decoration: underline !important;
    font-style: italic;
}

.esw-view-all:hover {
    color: #1d1d1d;
}

/* Swiper tự tính width theo slidesPerView - không set fixed width để hỗ trợ giá trị thập phân (vd: 1.3) */
.esw-posts .esw-term-item,
.esw-posts .esw-item {
    max-width: 100%;
}

.esw-term-card {
    position: relative;
    height: var(--esw-card-height, 605px);
    display: flex;
    flex-direction: column;
    /* overflow: hidden; */
}

.esw-term-card::before,
.esw-card:before {
    content: '';
    position: absolute;
    border-right: .5px solid rgb(218 212 208 / var(--tw-bg-opacity, 1));
    top: 0;
    right: -10px;
    height: 100%;
    z-index: 1;
}

.esw-posts .swiper-slide:last-child .esw-term-card::before {
    border-right: none;
}

/* Chiều cao thumb khi set trong Elementor: --esw-thumb-height + .esw-has-thumb-height (widget PHP). */
.esw-term-card .esw-thumb {
    display: block;
    overflow: hidden;
    min-height: 0;
}

.esw-term-card .esw-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.esw-term-content {
    padding: 18px 22px 22px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 6px;
}

.esw-term-description {
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.esw-term-location {
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}


.esw-term-title {
    font-size: 32px;
    line-height: 1.2;
    margin: 0;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    display: -webkit-box;   
    text-overflow: ellipsis;
    height: 85px;
    font-weight: 400;
    a {
        color: #000;
    }
}

@media (max-width: 768px) {
    .esw-term-title {
        font-size: 20px; 
        height: 49px;  
    }
}

.esw-term-title a:hover {
    color: #1d1d1d;
}

.esw-term-subtitle {
    margin: 0;
    font-size: 16px;
    line-height: 1.4;
    font-weight: 400;
    color: rgba(29, 29, 29, 0.72);
}

.esw-term-link {
    height: 50px;
}

.esw-term-link a {
    font-size: 18px;
    text-decoration: underline !important;
    color: rgb(134 96 16 / 1);
    line-height: 1.3;
    @media (max-width: 768px) {
        font-size: 14px;
    }
}

.esw-term-link a:hover {
    color: rgb(104 74 11 / 1);
}

/* Property card layout: image | title | project | bedrooms | price */
.esw-card--property {
    height: var(--esw-card-height, 605px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.esw-card--property .esw-thumb {
    display: block;
    overflow: hidden;
    flex: 1;
    min-height: 0;
}

/* Card bài viết (post): thumb cũng cần base layout */
.esw-card .esw-thumb {
    display: block;
    overflow: hidden;
}

/* Khi set chiều cao hình ảnh trong Elementor (Chiều cao hình ảnh px) */
/* Áp dụng cho cả card bất động sản (--property) và card bài viết (post) */
.esw-has-thumb-height .esw-card--property .esw-thumb,
.esw-has-thumb-height .esw-card .esw-thumb,
.esw-has-thumb-height .esw-term-card .esw-thumb {
    flex: none;
    height: var(--esw-thumb-height);
}

/* Base img: width 100%, object-fit cover. Height 100% khi chưa set chiều cao. */
.esw-card--property .esw-thumb img,
.esw-card .esw-thumb img,
.esw-term-card .esw-thumb img {
    width: 100% !important;
    object-fit: cover !important;
    display: block;
    height: 100%;
}

/* Khi có set chiều cao: áp dụng height trực tiếp lên img. Ghi đè theme/Elementor height: auto */
.esw-has-thumb-height .esw-card--property .esw-thumb img,
.esw-has-thumb-height .esw-card .esw-thumb img,
.esw-has-thumb-height .esw-term-card .esw-thumb img {
    height: var(--esw-thumb-height) !important;
}

.esw-card--property .esw-card-content {
    padding: 16px 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.esw-card--property .esw-title {
    font-size: 18px;
    line-height: 1.35;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.esw-project {
    font-size: 12px;
    color: #666;
    letter-spacing: 0.02em;
}

.esw-bedrooms {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
}

.esw-bedrooms-icon {
    display: inline-flex;
    color: #555;
}

.esw-bedrooms-icon svg {
    width: 18px;
    height: 14px;
}

.esw-price {
    filter: unset;
    transition: filter 0.2s;
    font-weight: 500;
    font-size: 18px;
    letter-spacing: 0.5px;

}

.esw-price .listing_unit_price_wrapper {
    margin: 0;
}

.esw-meta {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Swiper autoHeight: bỏ chiều cao cố định trên card để Swiper đo đúng slide */
.esw-posts-wrapper.esw-swiper-auto-height .esw-term-card,
.esw-posts-wrapper.esw-swiper-auto-height .esw-card--property {
    height: auto;
    min-height: 0;
}

.esw-posts-wrapper.esw-swiper-auto-height .esw-card--property .esw-thumb {
    flex: none;
}

.esw-term-card,
.esw-card--property {
    position: relative;
}
.esw-term-card::before,
.esw-card--property::before {
    content: '';
    position: absolute;
    background-color: rgb(218 212 208 /1);
    top: 0;
    width: 1px;
    top: 0;
    bottom: 0;
    right: -10px;
    height: 100%;
    z-index: 1;
}