﻿/* =========================================================
   HOMENOW - CLEAN CSS
   Giữ nguyên class cũ để không ảnh hưởng HTML / Razor
========================================================= */

:root {
    --hn-primary: #2563eb;
    --hn-primary-hover: #1d4ed8;
    --hn-accent: #00B1FE;
    --hn-text: #111827;
    --hn-text-soft: #4b5563;
    --hn-text-muted: #6b7280;
    --hn-border: #e5e7eb;
    --hn-bg-soft: #f1f5f9;
    --hn-white: #ffffff;
    --hn-shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.08);
    --hn-shadow-md: 0 10px 30px rgba(15, 23, 42, 0.12);
    --hn-shadow-card: 0 10px 20px rgba(15, 23, 42, 0.08);
    --hn-radius-sm: 10px;
    --hn-radius-md: 14px;
    --hn-radius-lg: 18px;
    --hn-radius-pill: 999px;
}

body {
    margin: 0;
    padding: 0;
}

/* =========================================================
   SHARED SEARCH
========================================================= */

.home-search-wrapper {
    background: var(--hn-white);
    border: 1px solid rgba(15, 23, 42, 0.06);
    border-radius: var(--hn-radius-lg);
    box-shadow: var(--hn-shadow-md);
    padding: 8px 10px 6px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 12px;
}

.home-search-top {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 2px 4px 0;
    flex-wrap: nowrap;
}

.home-search-tabs {
    display: inline-flex;
    align-items: center;
    background: var(--hn-bg-soft);
    border-radius: var(--hn-radius-pill);
    padding: 2px;
    flex: 0 0 auto;
    max-width: 100%;
}

.home-search-tab-btn {
    border: none;
    background: transparent;
    color: #475569;
    cursor: pointer;
    white-space: nowrap;
    padding: 8px 14px;
    border-radius: var(--hn-radius-pill);
    font-size: clamp(12px, 1vw, 14px);
    font-weight: 700;
    line-height: 1;
    transition: all .2s ease;
}

    .home-search-tab-btn.active {
        background: var(--hn-white);
        color: #0f172a;
        box-shadow: var(--hn-shadow-sm);
        border: 1px solid var(--hn-accent);
    }

.home-search-input-wrap {
    flex: 1 1 auto;
    min-width: 0;
    padding: 0 8px;
}

    .home-search-input-wrap input {
        width: 100%;
        height: 38px;
        border: none;
        outline: none;
        background: transparent;
        color: var(--hn-text);
        font-size: clamp(13px, 1.05vw, 15px);
    }

        .home-search-input-wrap input::placeholder {
            color: #9ca3af;
        }

.home-search-btn-main {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    border: none;
    border-radius: var(--hn-radius-pill);
    background: var(--hn-primary);
    color: var(--hn-white);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(14px, 1.1vw, 17px);
    transition: all .2s ease;
}

    .home-search-btn-main:hover {
        background: var(--hn-primary-hover);
    }

.home-search-bottom {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 8px 2px;
    margin-top: 2px;
    border-top: 1px solid var(--hn-border);
    flex-wrap: nowrap;
}

.home-search-filter {
    position: relative;
    flex: 1 1 0;
    min-width: 0;
    color: var(--hn-text-soft);
    font-size: 14px;
}

.home-search-filter-select {
    width: 100%;
    height: 30px;
    border: none;
    outline: none;
    appearance: none;
    background: transparent;
    color: var(--hn-text);
    cursor: pointer;
    padding-left: 7px;
    padding-right: 18px;
    font-size: clamp(12px, 1vw, 14px);
}
/*
.home-search-filter::after {
    content: "▾";
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    color: var(--hn-text-muted);
    pointer-events: none;
}*/

/* =========================================================
   HOME HERO
========================================================= */

.home-hero {
    position: relative;
    width: 100%;
    /* background: url('/Assets/Cities/Banner.png') center center / cover no-repeat;*/
    color: #fff;
}

    .home-hero::before {
        content: "";
        position: absolute;
        inset: 0;
        background: rgba(0, 0, 0, 0.45);
    }

.home-hero-shell {
    position: relative;
    z-index: 1;
    width: 90%;
    margin: 0 auto;
    padding: 3% 4% 6%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-sizing: border-box;
}



.home-header-left-box {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.home-logo-icon {
    width: 2rem;
    height: 1.6rem;
    border: 0.15rem solid #fff;
    border-radius: 0.4rem;
    position: relative;
    box-sizing: border-box;
}

    .home-logo-icon::after {
        content: "";
        position: absolute;
        left: 20%;
        bottom: 20%;
        width: 55%;
        height: 45%;
        border-top: 0.15rem solid #fff;
        border-left: 0.15rem solid #fff;
        transform: skewX(-15deg);
        box-sizing: border-box;
    }

.home-header-left {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.home-header-left-top {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    font-size: clamp(1.2rem, 2vw, 1.6rem);
    font-weight: 700;
}

.home-header-left-tagline {
    font-size: 0.8rem;
    opacity: 0.85;
    margin-top: 0.15rem;
}

.home-header-right-box {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
}

.home-header-right-top {
    font-size: clamp(0.9rem, 1.4vw, 1rem);
    margin-bottom: 0;
}

    .home-header-right-top a {
        color: #fff;
        text-decoration: none;
        margin: 0 0.3rem;
    }

        .home-header-right-top a:hover {
            text-decoration: underline;
        }

    .home-header-right-top .nav-post {
        margin-left: 1rem;
        padding: 0.3rem 1.1rem;
        border-radius: var(--hn-radius-pill);
        background: var(--hn-accent);
        font-weight: 600;
        display: inline-block;
    }

        .home-header-right-top .nav-post:hover {
            background: #0098da;
            text-decoration: none;
        }

.home-header-right-bottom {
    font-size: 0.75rem;
    opacity: 0.9;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

    .home-header-right-bottom a {
        color: #fff;
        text-decoration: none;
        margin: 0 0.2rem;
    }

        .home-header-right-bottom a:hover {
            text-decoration: underline;
        }

.lang-active {
    font-weight: 700;
    text-decoration: underline;
}

.home-hero-main {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
}

.home-main-text {
    margin-bottom: 2%;
}

.home-main-title {
    font-size: clamp(1.8rem, 4.5vw, 2.2rem);
    font-weight: 700;
    margin-bottom: 1%;
    text-align: center;
}

.home-sub-title {
    font-size: clamp(1rem, 2vw, 1.25rem);
    text-align: center;
}

.home-main-search {
    margin-top: 7%;
}

    .home-main-search .home-search-wrapper {
        width: 90%;
        margin-left: auto;
        margin-right: auto;
    }

/* =========================================================
   HOME BODY / PROPERTY GRID
========================================================= */

.home-body-container {
    max-width: 1200px;
    margin: 24px auto 40px;
    /*padding: 0 16px;*/
    box-sizing: border-box;
}

.home-section-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 12px;
}

    .home-section-header h2 {
        font-size: 1.2rem;
        font-weight: 600;
        margin: 0;
    }

    .home-section-header a {
        font-size: 0.9rem;
        color: var(--hn-primary);
        text-decoration: none;
    }

        .home-section-header a:hover {
            text-decoration: underline;
        }

.property-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
}

.property-card {
    background: var(--hn-white);
    border-radius: var(--hn-radius-md);
    overflow: hidden;
    box-shadow: var(--hn-shadow-card);
    display: flex;
    flex-direction: column;
    width: 100%;
}

    .property-card img {
        width: 100%;
        height: 140px;
        object-fit: cover;
    }

.property-card-body {
    padding: 10px 12px 12px;
    font-size: 0.9rem;
}

.property-card-title {
    font-weight: 600;
    margin-bottom: 4px;
}

.property-card-address {
    font-size: 0.8rem;
    color: var(--hn-text-muted);
    margin-bottom: 6px;
}

.property-card-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--hn-text-muted);
    margin-bottom: 4px;
}

.property-card-price {
    font-weight: 700;
    color: #16a34a;
    font-size: 0.9rem;
}

/* =========================================================
   LIST PAGE
========================================================= */

.list-shell {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px;
}

    .list-head,
    .list-results_class,
    .list-shell .home-search-wrapper,
    .list-pagination-wrap {
        width: 95%;
        margin-left: auto;
        margin-right: auto;
    }

.list-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

    .list-head h2 {
        margin: 0;
        display: flex;
        align-items: center;
        gap: 12px;
        color: #0f172a;
        font-size: clamp(20px, 2.2vw, 30px);
        font-weight: 800;
        line-height: 1.2;
    }

        .list-head h2::before {
            content: "";
            width: 4px;
            height: clamp(18px, 2vw, 28px);
            border-radius: var(--hn-radius-pill);
            background: #ef4444;
            flex: 0 0 4px;
        }

.list-results_class .property-row-list {
    gap: 18px;
}

#list-results,
#list-results * {
    box-sizing: border-box;
}

    #list-results a,
    #list-results .p-title:hover,
    #list-results .p-img:hover {
        text-decoration: none;
    }

    #list-results img {
        max-width: 100%;
        display: block;
    }

    /* LIST TEXT */

    #list-results .p-title,
    #list-results .property-title,
    #list-results [class*="title"] {
        font-size: clamp(14px, 1vw, 18px) !important;
        line-height: 1.32 !important;
        word-break: break-word !important;
        overflow-wrap: anywhere !important;
    }

    #list-results .p-price,
    #list-results .property-price,
    #list-results .p-contact,
    #list-results .property-contact,
    #list-results [class*="price"],
    #list-results [class*="contact"] {
        display: block !important;
        color: #e24a3b !important;
        font-size: clamp(16px, 1.35vw, 22px) !important;
        font-weight: 800 !important;
        line-height: 1.25 !important;
        white-space: normal !important;
        overflow: visible !important;
        text-overflow: initial !important;
        word-break: break-word !important;
    }

    #list-results .p-meta,
    #list-results .property-meta,
    #list-results .p-tags,
    #list-results [class*="meta"],
    #list-results [class*="tag"] {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 6px 10px !important;
        font-size: clamp(12px, 0.95vw, 15px) !important;
        line-height: 1.45 !important;
    }

    #list-results .p-addr,
    #list-results .property-address,
    #list-results [class*="address"] {
        font-size: clamp(13px, 1vw, 16px) !important;
        line-height: 1.5 !important;
        word-break: break-word !important;
        overflow-wrap: anywhere !important;
    }

    #list-results .p-view,
    #list-results .property-view,
    #list-results .p-area,
    #list-results .property-area {
        font-size: clamp(12px, 0.92vw, 15px) !important;
    }

/* TAG TOOLTIP */

body.meta-tooltip-open {
    overflow: hidden;
}

.property-card-meta-more-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.property-card-meta-more {
    min-width: 28px;
    height: 28px;
    padding: 0 8px;
    border-radius: var(--hn-radius-pill);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--hn-bg-soft);
    border: 1px solid #dbe3ee;
    color: #0f172a;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    user-select: none;
    transition: all .2s ease;
}

    .property-card-meta-more:hover {
        background: #e8f0f8;
        border-color: #c8d8ea;
    }

.property-card-meta-tooltip {
    display: none;
}

.property-card-meta-more-wrap.is-open .property-card-meta-tooltip {
    display: block;
    position: absolute;
    left: 0;
    top: calc(100% + 8px);
    min-width: 220px;
    max-width: 320px;
    padding: 12px 14px;
    border-radius: var(--hn-radius-md);
    background: #0f172a;
    color: #fff;
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.22);
    z-index: 60;
    white-space: normal;
    word-break: break-word;
}

.property-card-meta-tooltip-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 8px;
    padding-right: 18px;
}

.property-card-meta-tooltip-item,
.property-card-meta-tooltip-sep {
    font-size: 12px;
    line-height: 1.45;
}

.property-card-meta-tooltip-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    border: 0;
    border-radius: var(--hn-radius-pill);
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
}

.property-card.is-meta-open,
.p-row.property-card.is-meta-open {
    transform: none !important;
    z-index: auto !important;
}

/* PAGINATION */

.list-pagination-wrap {
    margin-top: 14px;
}

.list-pagination {
    /* background: var(--hn-white);
    border: 1px solid var(--hn-border);
    border-radius: 22px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.10);*/
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.list-pagination-left,
.list-pagination-center,
.list-pagination-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.list-pagination-center {
    justify-content: center;
    flex: 1 1 auto;
}

.list-pagination-center-mobile {
    display: none;
}

.list-pager-btn-text {
    display: inline;
}

.list-pager-btn {
    min-width: 116px;
    height: 42px;
    padding: 0 18px;
    border-radius: var(--hn-radius-md);
    border: 1px solid #cfe8f9;
    background: #eaf6ff;
    color: #3b82a8;
    font-size: clamp(12px, 1vw, 16px);
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all .2s ease;
}

    .list-pager-btn:hover {
        background: #dff0fc;
        color: #256d90;
        text-decoration: none;
    }

    .list-pager-btn.disabled,
    .list-pager-btn[aria-disabled="true"] {
        opacity: .5;
        pointer-events: none;
    }

.list-pager-page,
.list-pager-page-active {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border-radius: var(--hn-radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(13px, 1vw, 17px);
    font-weight: 700;
    text-decoration: none;
    transition: all .2s ease;
}

.list-pager-page {
    background: var(--hn-white);
    border: 1px solid #d9dee7;
    color: #475569;
}

    .list-pager-page:hover {
        border-color: #b8c3d4;
        color: #0f172a;
        text-decoration: none;
    }

.list-pager-page-active {
    background: linear-gradient(135deg, #07215d 0%, #0b2b72 100%);
    border: 1px solid #08245f;
    color: #fff;
    box-shadow: 0 6px 16px rgba(7, 33, 93, 0.22);
}

.list-pager-ellipsis {
    min-width: 22px;
    text-align: center;
    color: #64748b;
    font-size: clamp(14px, 1.1vw, 20px);
    line-height: 1;
}

.list-page-size-select {
    min-width: 250px;
    height: 42px;
    border-radius: 12px;
    border: 1px solid #d9dee7;
    background: var(--hn-white);
    color: #334155;
    font-size: clamp(12px, 1vw, 15px);
    padding: 0 14px;
    outline: none;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

    .list-page-size-select:focus {
        border-color: #8fb8dd;
        box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.08);
    }

/* SCROLL TOP */

.scroll-top-btn {
    position: fixed;
    right: 18px;
    bottom: 154px;
    width: 40px;
    height: 40px;
    border-radius: var(--hn-radius-pill);
    background: rgba(15, 23, 42, .85);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 16px rgba(0, 0, 0, .25);
    cursor: pointer;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: opacity .2s ease, transform .2s ease;
    text-decoration: none;
}

    .scroll-top-btn.show {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
    }

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 1200px) {
    .list-head,
    .list-results_class,
    .list-shell .home-search-wrapper,
    .list-pagination-wrap {
        width: 92%;
    }
}

@media (max-width: 1024px) {
    .list-head,
    .list-results_class,
    .list-shell .home-search-wrapper,
    .list-pagination-wrap {
        width: 96%;
    }

    .list-pagination {
        gap: 10px;
    }

    .list-pager-btn {
        min-width: 96px;
        padding: 0 14px;
    }

    .list-page-size-select {
        min-width: 190px;
    }
}

@media (max-width: 768px) {
    .home-hero-shell {
        width: 100%;
        max-width: 100%;
        padding: 20px 10px 30px;
    }

    .home-header-left-top {
        font-size: 18px;
    }

    .home-header-left-tagline {
        font-size: 11px;
    }

    .home-header-right-top {
        font-size: 13px;
    }

        .home-header-right-top .nav-post {
            padding: 4px 12px;
        }

    .home-header-right-bottom {
        font-size: 10px;
    }

    .home-main-title {
        font-size: 25px;
        line-height: 1.25;
        width: 75%;
        margin: 7% auto 0;
        text-align: center;
    }

    .home-sub-title {
        font-size: 13px;
        padding: 1%;
        text-align: center;
    }

    .home-main-search .home-search-wrapper {
        width: 95%;
    }

    .property-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .home-body-container {
        margin: 24px 15px
    }
}

@media (max-width: 767px) {
    /* .list-shell {
        padding: 10px 8px;
    }
*/
    .list-head,
    .list-results_class,
    .list-shell .home-search-wrapper,
    .list-pagination-wrap {
        width: 100%;
    }

    .home-search-wrapper {
        border-radius: 18px;
        padding: 8px 10px 6px;
    }

    .home-search-top {
        gap: 6px;
        padding: 2px 2px 0;
    }

    .home-search-tab-btn {
        padding: 7px 12px;
        font-size: 13px;
    }

    .home-search-input-wrap {
        padding: 0 4px;
    }

        .home-search-input-wrap input {
            height: 36px;
            font-size: 14px;
        }

    .home-search-btn-main {
        width: 40px;
        height: 40px;
        flex: 0 0 40px;
        font-size: 15px;
    }

    .home-search-bottom {
        gap: 6px;
        padding: 8px 2px 2px;
    }

    .home-search-filter-select {
        height: 28px;
        font-size: 13px;
        padding-left: 4px;
        padding-right: 16px;
    }

    .list-head h2 {
        gap: 10px;
        font-size: clamp(20px, 4.5vw, 24px);
    }

        .list-head h2::before {
            height: 24px;
        }

    .list-pagination {
        padding: 10px 8px;
        border-radius: 16px;
        gap: 8px;
        flex-wrap: nowrap;
        align-items: center;
    }

    .list-pagination-left,
    .list-pagination-right {
        width: auto;
        flex: 0 0 auto;
        justify-content: center;
        gap: 6px;
    }

    .list-pagination-center-desktop {
        display: none !important;
    }

    .list-pagination-center-mobile {
        display: flex !important;
        align-items: center;
        justify-content: center;
        flex: 1 1 auto;
        gap: 6px;
        min-width: 0;
    }

    .list-pager-btn {
        min-width: 34px;
        width: 34px;
        height: 34px;
        padding: 0;
        border-radius: 10px;
        gap: 0;
    }

    .list-pager-btn-text {
        display: none !important;
    }

    .list-pager-page,
    .list-pager-page-active {
        width: 32px;
        height: 32px;
        flex: 0 0 32px;
        font-size: 12px;
        border-radius: 8px;
    }

    .list-pager-ellipsis {
        min-width: 14px;
        font-size: 12px;
    }

    .list-page-size-select {
        width: 100%;
        max-width: 220px;
        min-width: 0;
        height: 34px;
        font-size: 12px;
        padding: 0 10px;
        border-radius: 10px;
    }

    .property-card,
    .p-row,
    .p-main {
        overflow: visible !important;
    }

    .property-card-meta-more-wrap.is-open .property-card-meta-tooltip {
        display: block !important;
        position: fixed !important;
        left: 12px !important;
        right: 12px !important;
        bottom: 14px !important;
        top: auto !important;
        transform: none !important;
        width: auto !important;
        max-width: none !important;
        max-height: min(42vh, 280px) !important;
        overflow-y: auto !important;
        padding: 14px !important;
        border-radius: 16px !important;
        background: #0f172a !important;
        color: #fff !important;
        box-shadow: 0 18px 40px rgba(15, 23, 42, .24) !important;
        z-index: 10060 !important;
        white-space: normal !important;
        word-break: break-word !important;
    }

    .property-card-meta-tooltip-inner {
        padding-right: 22px;
    }

    .property-card-meta-tooltip-item,
    .property-card-meta-tooltip-sep {
        font-size: 12px !important;
        line-height: 1.42 !important;
    }

    .property-card-meta-tooltip-close {
        width: 28px !important;
        height: 28px !important;
        font-size: 16px !important;
    }

    .p-spec-compact,
    .p-spec-compact .p-spec-item,
    .p-spec-compact .p-spec-sep {
        font-size: clamp(10px, 2.9vw, 12px) !important;
        line-height: 1.35 !important;
    }
}

@media (max-width: 520px) {
    /* .list-shell {
        padding: 8px 6px;
    }*/

    .home-search-wrapper {
        border-radius: 16px;
        padding: 8px 8px 6px;
    }

    .home-search-top {
        gap: 5px;
    }

    .home-search-tabs {
        max-width: 170px;
    }

    .home-search-tab-btn {
        padding: 6px 10px;
        font-size: 12px;
    }

    .home-search-input-wrap {
        padding: 0 2px;
    }

        .home-search-input-wrap input {
            height: 34px;
            font-size: 13px;
        }

    .home-search-btn-main {
        width: 38px;
        height: 38px;
        flex-basis: 38px;
        font-size: 14px;
    }

    .home-search-bottom {
        gap: 4px;
        padding: 8px 0 2px;
    }

    .home-search-filter-select {
        height: 26px;
        font-size: 12px;
        padding-left: 2px;
        padding-right: 14px;
    }

    .list-head h2 {
        gap: 8px;
        font-size: clamp(18px, 5vw, 22px);
    }

        .list-head h2::before {
            width: 3px;
            height: 20px;
            flex-basis: 3px;
        }

    .list-pagination {
        padding: 8px 6px;
        gap: 6px;
    }

    .list-pager-btn {
        min-width: 32px;
        width: 32px;
        height: 32px;
        border-radius: 9px;
    }

    .list-pager-page,
    .list-pager-page-active {
        width: 30px;
        height: 30px;
        flex: 0 0 30px;
        font-size: 11px;
        border-radius: 7px;
    }

    .list-pager-ellipsis {
        min-width: 10px;
        font-size: 11px;
    }

    .list-page-size-select {
        max-width: 100%;
        height: 34px;
        font-size: 11px;
        padding: 0 8px;
        border-radius: 10px;
    }

    .scroll-top-btn {
        right: 12px;
        bottom: 154px;
    }
}

@media (max-width: 480px) {
    .home-main-title {
        font-size: 17px;
        line-height: 1.25;
        width: 90%;
        margin: 7% auto 0;
        text-align: center;
    }

    .home-sub-title {
        font-size: 11px;
        padding: 1%;
        text-align: center;
    }

    .home-header-right-top {
        font-size: 12px;
    }

    .home-header-right-bottom {
        font-size: 9px;
    }
}

@media (max-width: 391px) {
    .list-shell {
        padding: 8px;
    }

    .home-search-wrapper {
        padding: 7px 7px 5px;
        border-radius: 14px;
    }

    .home-search-top {
        gap: 4px;
    }

    .home-search-tabs {
        max-width: 152px;
        padding: 2px;
    }

    .home-search-tab-btn {
        padding: 6px 8px;
        font-size: 11px;
    }

    .home-search-input-wrap {
        padding: 0 1px;
    }

        .home-search-input-wrap input {
            height: 32px;
            font-size: 12px;
        }

    .home-search-btn-main {
        width: 34px;
        height: 34px;
        flex-basis: 34px;
        font-size: 13px;
    }

    .home-search-bottom {
        gap: 3px;
        padding: 7px 0 1px;
    }

    .home-search-filter-select {
        height: 24px;
        font-size: 11px;
        padding-left: 1px;
        padding-right: 12px;
    }

    .list-head h2 {
        gap: 7px;
        font-size: 18px;
    }

        .list-head h2::before {
            width: 3px;
            height: 18px;
            flex-basis: 3px;
        }

    #list-results .p-title,
    #list-results .property-title,
    #list-results [class*="title"] {
        font-size: clamp(14px, 4.9vw, 18px) !important;
        line-height: 1.28 !important;
    }

    #list-results .p-price,
    #list-results .property-price,
    #list-results .p-contact,
    #list-results .property-contact,
    #list-results [class*="price"],
    #list-results [class*="contact"] {
        font-size: clamp(13px, 4vw, 17px) !important;
    }

    #list-results .p-meta,
    #list-results .property-meta,
    #list-results .p-tags,
    #list-results [class*="meta"],
    #list-results [class*="tag"] {
        font-size: clamp(10px, 2.9vw, 12px) !important;
        gap: 4px 8px !important;
    }

    #list-results .p-addr,
    #list-results .property-address,
    #list-results [class*="address"] {
        font-size: clamp(10px, 3.1vw, 13px) !important;
        line-height: 1.42 !important;
    }

    #list-results .p-view,
    #list-results .property-view,
    #list-results .p-area,
    #list-results .property-area {
        font-size: clamp(10px, 2.8vw, 12px) !important;
    }

    .list-pagination {
        padding: 7px 5px;
        gap: 4px;
    }

    .list-pager-btn {
        min-width: 30px;
        width: 30px;
        height: 30px;
        border-radius: 8px;
    }

    .list-pager-page,
    .list-pager-page-active {
        width: 28px;
        height: 28px;
        flex: 0 0 28px;
        font-size: 11px;
        border-radius: 7px;
    }

    .list-pager-ellipsis {
        min-width: 8px;
        font-size: 11px;
    }

    .list-page-size-select {
        height: 32px;
        font-size: 11px;
        padding: 0 6px;
        border-radius: 9px;
    }

    .property-card-meta-more-wrap.is-open .property-card-meta-tooltip {
        left: 10px !important;
        right: 10px !important;
        bottom: 10px !important;
        padding: 12px !important;
    }

    .property-card-meta-tooltip-item,
    .property-card-meta-tooltip-sep {
        font-size: 11px !important;
    }

    #list-results .p-title, #list-results .property-title, #list-results [class*="title"] {
        font-size: 11px !important;
        line-height: 1.28 !important;
    }

    #list-results .p-addr, #list-results .property-address, #list-results [class*="address"] {
        font-size: 11px !important;
        line-height: 1.42 !important;
    }
}

@media (max-width: 340px) {
    .home-search-tabs {
        max-width: 140px;
    }

    .home-search-tab-btn {
        padding: 5px 7px;
        font-size: 10px;
    }

    .home-search-input-wrap input {
        font-size: 11px;
    }

    .home-search-btn-main {
        width: 32px;
        height: 32px;
        flex-basis: 32px;
    }

    .home-search-filter-select {
        font-size: 10px;
    }

    .list-pager-btn {
        min-width: 28px;
        width: 28px;
        height: 28px;
        font-size: 10px;
    }

    .list-pager-page,
    .list-pager-page-active {
        width: 26px;
        height: 26px;
        flex: 0 0 26px;
        font-size: 10px;
    }

    .list-page-size-select {
        font-size: 10px;
    }
}

.select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: black !important;
}

/* =========================================
   LIST PAGE MERGED CSS
   Đã gộp từ List.cshtml vào List.css
   Mục tiêu:
   - List.cshtml không còn inline <style>
   - Search mobile giống Home, không có thanh kéo ngang
   - Card list dùng layout giống Home mobile/tablet ngang
   - Không ảnh hưởng logic Razor/JS
========================================= */

/* Ẩn select city thật, chỉ hiển thị label city cố định */
.list-city-hidden-select {
    display: none !important;
}

/* ===== Select2 trong search List ===== */
.list-shell .home-search-filter-ward .select2-container,
.list-shell .home-search-filter-price .select2-container,
.list-shell .home-search-filter-type .select2-container {
    width: 100% !important;
}

.list-shell .home-search-filter-ward .select2-selection--single,
.list-shell .home-search-filter-price .select2-selection--single,
.list-shell .home-search-filter-type .select2-selection--single {
    height: 26px !important;
    min-height: 26px !important;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    display: flex !important;
    align-items: center !important;
}

.list-shell .home-search-filter-ward .select2-selection__rendered,
.list-shell .home-search-filter-price .select2-selection__rendered,
.list-shell .home-search-filter-type .select2-selection__rendered {
    line-height: 26px !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    color: #4b5563 !important;
    font-size: .8rem !important;
    width: 90% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

.list-shell .home-search-filter-ward .select2-selection__arrow,
.list-shell .home-search-filter-price .select2-selection__arrow,
.list-shell .home-search-filter-type .select2-selection__arrow {
    height: 26px !important;
    right: 0 !important;
}

.list-shell .home-search-filter-ward .select2-container--default.select2-container--focus .select2-selection--single,
.list-shell .home-search-filter-ward .select2-container--open .select2-selection--single,
.list-shell .home-search-filter-price .select2-container--default.select2-container--focus .select2-selection--single,
.list-shell .home-search-filter-price .select2-container--open .select2-selection--single,
.list-shell .home-search-filter-type .select2-container--default.select2-container--focus .select2-selection--single,
.list-shell .home-search-filter-type .select2-container--open .select2-selection--single {
    border: none !important;
    box-shadow: none !important;
}

.select2-dropdown {
    border: 1px solid #dbe3ee !important;
    border-radius: 12px !important;
    overflow: hidden;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .12);
}

.select2-search--dropdown {
    padding: 10px;
    background: #fff;
    border-bottom: 1px solid #eef2f7;
}

    .select2-search--dropdown .select2-search__field {
        border: 1px solid #dbe3ee !important;
        border-radius: 8px !important;
        padding: 8px 10px !important;
        font-size: 14px !important;
    }

.select2-results__option {
    padding: 10px 12px !important;
    font-size: 14px !important;
}

.select2-results__option--highlighted[aria-selected] {
    background: #2563eb !important;
    color: #fff !important;
}

.select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: #000 !important;
}

.select2-container--default .select2-selection--single .select2-selection__clear {
    color: #4b5563 !important;
    font-size: 16px !important;
    margin-right: 2px !important;
    line-height: 24px !important;
}

    .select2-container--default .select2-selection--single .select2-selection__clear:hover {
        color: #ef4444 !important;
    }


/* ===== SELECT2 CLEAR/ARROW PATCH - List search =====
   Khi combobox đã chọn giá trị: chỉ hiện dấu X, ẩn mũi tên xuống.
   Không đổi logic Select2, chỉ đổi hiển thị. */
.list-shell .select2-container--default .select2-selection--single {
    position: relative !important;
}

    .list-shell .select2-container--default .select2-selection--single .select2-selection__clear {
        position: absolute !important;
        right: 3px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        z-index: 3 !important;
        margin: 0 !important;
        padding: 0 4px !important;
        width: 18px !important;
        height: 22px !important;
        line-height: 20px !important;
        text-align: center !important;
        color: #4b5563 !important;
        font-size: 16px !important;
        font-weight: 700 !important;
    }

        .list-shell .select2-container--default .select2-selection--single .select2-selection__clear:hover {
            color: #ef4444 !important;
        }

        .list-shell .select2-container--has-value .select2-selection--single .select2-selection__arrow,
        .list-shell .select2-container--default .select2-selection--single .select2-selection__clear ~ .select2-selection__arrow {
            display: none !important;
        }

.list-shell .select2-container--has-value .select2-selection--single .select2-selection__rendered {
    width: 100% !important;
    padding-right: 24px !important;
    box-sizing: border-box !important;
}

/* ===== List layout ===== */
.list-shell {
    width: 100%;
    max-width: 1120px;
    margin-left: auto;
    margin-right: auto;
    padding-left: clamp(10px, 1.6vw, 18px);
    padding-right: clamp(10px, 1.6vw, 18px);
    box-sizing: border-box;
}

    .list-shell .home-search-wrapper {
        width: 100%;
        box-sizing: border-box;
        margin-bottom: 12px;
    }

    .list-shell .home-search-top {
        display: flex;
        align-items: center;
        gap: clamp(8px, 1vw, 12px);
    }

    .list-shell .home-search-tabs {
        flex: 0 0 auto;
    }

    .list-shell .home-search-input-wrap {
        flex: 1 1 auto;
        min-width: 0;
    }

        .list-shell .home-search-input-wrap input {
            width: 100%;
            min-width: 0;
            font-size: clamp(13px, .9vw, 14px);
        }

    .list-shell .home-search-btn-main {
        flex: 0 0 auto;
    }

    .list-shell .home-search-filter-city-fixed {
        width: clamp(118px, 12vw, 150px);
        min-width: clamp(118px, 12vw, 150px);
        max-width: clamp(118px, 12vw, 150px);
    }

    .list-shell .home-search-city-display {
        width: 100%;
        height: 26px;
        min-height: 26px;
        display: flex;
        align-items: center;
        gap: 6px;
        padding: 0 7px;
        font-weight: 700;
        color: #2563eb;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        font-size: clamp(12px, .85vw, 14px);
        box-sizing: border-box;
    }

    .list-shell .home-search-city-icon {
        width: 14px;
        min-width: 14px;
        color: #FF5D90;
        font-style: normal;
        line-height: 1;
        flex: 0 0 auto;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 13px;
    }

    .list-shell .home-search-city-text {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .list-shell .home-search-filter-ward-fixed .select2-container {
        width: 100% !important;
    }

    .list-shell .home-search-bottom {
        display: flex;
        align-items: stretch;
        justify-content: space-between;
        gap: clamp(8px, 1vw, 12px);
        flex-wrap: nowrap;
        width: 100%;
        min-width: 0;
    }

        .list-shell .home-search-bottom > .home-search-filter,
        .list-shell .home-search-bottom .home-search-filter,
        .list-shell .home-search-wrapper,
        .list-shell .home-search-top,
        .list-shell .home-search-bottom,
        .list-shell .home-search-filter,
        .list-shell .home-search-city-display,
        .list-shell .home-search-city-text {
            min-width: 0;
            max-width: 100%;
        }

            .list-shell .home-search-bottom > .home-search-filter:first-child {
                flex: 0 0 clamp(118px, 12vw, 150px);
                max-width: clamp(118px, 12vw, 150px);
            }

    .list-shell .home-search-filter-ward {
        flex: 0 0 clamp(170px, 22vw, 284px);
        max-width: clamp(170px, 22vw, 284px);
    }

    .list-shell .home-search-filter-price,
    .list-shell .home-search-filter-type {
        flex: 1 1 clamp(150px, 18vw, 280px);
        min-width: 0;
    }

.list-head h2 {
    font-size: clamp(20px, 2vw, 28px);
    line-height: 1.25;
}

/* ===== Flow safety ===== */
.list-shell,
.list-head,
.list-results_class,
#list-results,
#list-results .property-row-list,
.list-pagination-wrap {
    min-width: 0;
}

#list-results,
.list-results_class {
    display: flow-root;
    clear: both;
    position: relative;
}

    #list-results .property-row-list {
        display: flex;
        flex-direction: column;
        gap: 16px;
        width: 100%;
    }

    #list-results .p-row {
        width: 100%;
        max-width: 100%;
    }

.footer-section {
    clear: both;
    position: relative;
}

/* ===== Responsive search: desktop/tablet ===== */
@media (max-width: 1199.98px) {
    .list-shell .home-search-bottom {
        gap: 10px;
    }

    .list-shell .home-search-filter-ward {
        flex: 0 0 240px;
        max-width: 240px;
    }

    .list-shell .home-search-filter-price,
    .list-shell .home-search-filter-type {
        flex: 1 1 200px;
    }
}

@media (max-width: 991.98px) {
    .list-shell {
        padding-left: 12px;
        padding-right: 12px;
    }

        .list-shell .home-search-top {
            gap: 8px;
        }

        .list-shell .home-search-input-wrap input,
        .list-shell .home-search-city-display,
        .list-shell .home-search-filter-ward .select2-selection__rendered,
        .list-shell .home-search-filter-price .select2-selection__rendered,
        .list-shell .home-search-filter-type .select2-selection__rendered {
            font-size: 12px !important;
        }

        .list-shell .home-search-bottom {
            gap: 8px;
            flex-wrap: nowrap;
        }

            .list-shell .home-search-bottom > .home-search-filter:first-child {
                flex: 0 0 112px;
                max-width: 112px;
            }

        .list-shell .home-search-filter-ward {
            flex: 0 0 190px;
            max-width: 190px;
        }

        .list-shell .home-search-filter-price,
        .list-shell .home-search-filter-type {
            flex: 1 1 150px;
        }
}

/* ===== Mobile: giống Home, không dùng thanh kéo ngang ===== */
@media (max-width: 770px) {
    .list-shell {
        padding-left: 8px;
        padding-right: 8px;
    }

        .list-shell .home-search-wrapper {
            border-radius: 0 !important;
            overflow: visible !important;
        }

        .list-shell .home-search-bottom {
            display: grid !important;
            grid-template-columns: 1.02fr 1.18fr .9fr .9fr !important;
            gap: 0 !important;
            overflow: visible !important;
            overflow-x: visible !important;
            overflow-y: visible !important;
            -webkit-overflow-scrolling: auto !important;
            scrollbar-width: none !important;
            padding: 6px 0 0 !important;
            border-top: 1px solid #e5e7eb !important;
            margin-top: 6px !important;
            min-width: 0;
            max-width: 100%;
        }

            .list-shell .home-search-bottom > .home-search-filter:first-child,
            .list-shell .home-search-filter-city-fixed,
            .list-shell .home-search-filter-ward,
            .list-shell .home-search-filter-price,
            .list-shell .home-search-filter-type {
                flex: initial !important;
                width: auto !important;
                min-width: 0 !important;
                max-width: none !important;
            }

        .list-shell .home-search-filter + .home-search-filter {
            border-left: 1px solid #eef2f7 !important;
        }

        .list-shell .home-search-city-display,
        .list-shell .home-search-filter-ward .select2-selection--single,
        .list-shell .home-search-filter-price .select2-selection--single,
        .list-shell .home-search-filter-type .select2-selection--single {
            height: 34px !important;
            min-height: 34px !important;
        }

        .list-shell .home-search-filter-ward .select2-selection__rendered,
        .list-shell .home-search-filter-price .select2-selection__rendered,
        .list-shell .home-search-filter-type .select2-selection__rendered {
            line-height: 34px !important;
            font-size: 11px !important;
        }

        .list-shell .home-search-filter-select {
            font-size: .78rem;
        }

    /* Card list giống Home mobile/tablet ngang */
    #list-results .property-row-list {
        display: flex !important;
        flex-direction: column !important;
        gap: 16px !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    #list-results .p-row {
        display: grid !important;
        grid-template-columns: clamp(110px, 30vw, 145px) minmax(0, 1fr) !important;
        grid-template-areas:
            "title title"
            "media main" !important;
        row-gap: 8px !important;
        column-gap: 12px !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        padding: 12px !important;
        border-radius: 0 !important;
        overflow: visible !important;
        box-sizing: border-box !important;
    }

        #list-results .p-row > .p-title-mobile {
            grid-area: title !important;
            display: -webkit-box !important;
            -webkit-box-orient: vertical !important;
            -webkit-line-clamp: 2 !important;
            overflow: hidden !important;
            width: 100% !important;
            min-width: 0 !important;
            margin: 0 !important;
            padding: 0 !important;
            color: #0f172a !important;
            font-size: clamp(13px, 3.2vw, 16px) !important;
            line-height: 1.3 !important;
            font-weight: 800 !important;
            text-transform: uppercase !important;
            text-decoration: none !important;
            overflow-wrap: anywhere !important;
            word-break: break-word !important;
        }

        #list-results .p-row .p-title-desktop {
            display: none !important;
        }

        #list-results .p-row .p-media {
            grid-area: media !important;
            width: 100% !important;
            min-width: 0 !important;
        }

        #list-results .p-row .p-main {
            grid-area: main !important;
            width: 100% !important;
            min-width: 0 !important;
        }

        #list-results .p-row .p-img {
            width: 100% !important;
            aspect-ratio: 4 / 3 !important;
            border-radius: 0 !important;
            overflow: hidden !important;
            background: #f3f4f6 !important;
            color: transparent !important;
            font-size: 0 !important;
            line-height: 0 !important;
        }

            #list-results .p-row .p-img img {
                width: 100% !important;
                height: 100% !important;
                object-fit: cover !important;
                display: block !important;
                color: transparent !important;
                font-size: 0 !important;
                line-height: 0 !important;
                text-indent: -9999px !important;
            }

        #list-results .p-row .p-head {
            display: block !important;
            margin: 0 0 6px !important;
        }

        #list-results .p-row .p-price {
            display: block !important;
            white-space: normal !important;
            font-size: clamp(13px, 3vw, 17px) !important;
            line-height: 1.25 !important;
            margin: 0 0 4px !important;
        }

        #list-results .p-row .p-bottom {
            display: flex !important;
            align-items: center !important;
            justify-content: space-between !important;
            gap: 8px !important;
            min-width: 0 !important;
            padding-top: 6px !important;
        }
}

@media (max-width: 575.98px) {
    .list-shell .home-search-city-display {
        padding: 0 5px;
    }
}

@media (max-width: 391px) {
    .list-shell .home-search-bottom {
        grid-template-columns: 1fr 1.15fr .9fr .9fr !important;
    }

    #list-results .p-row {
        grid-template-columns: 120px minmax(0, 1fr) !important;
    }

        #list-results .p-row > .p-title-mobile {
            font-size: 13px !important;
            line-height: 1.25 !important;
        }
}


/* =========================================
   LIST SELECT2 FINAL PATCH
   - Giá trị đã chọn: hiện X, ẩn tam giác.
   - Áp dụng sau cùng để không bị các block CSS cũ ghi đè.
========================================= */
.list-shell .select2-container--default .select2-selection--single {
    position: relative !important;
}

    .list-shell .select2-container--default .select2-selection--single .select2-selection__clear {
        position: absolute !important;
        right: 3px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        z-index: 5 !important;
        margin: 0 !important;
        padding: 0 4px !important;
        width: 18px !important;
        height: 22px !important;
        line-height: 20px !important;
        text-align: center !important;
        color: #4b5563 !important;
        font-size: 16px !important;
        font-weight: 700 !important;
    }

        .list-shell .select2-container--has-value .select2-selection--single .select2-selection__arrow,
        .list-shell .select2-container--default .select2-selection--single .select2-selection__clear ~ .select2-selection__arrow {
            display: none !important;
        }

.list-shell .select2-container--has-value .select2-selection--single .select2-selection__rendered {
    width: 100% !important;
    padding-right: 24px !important;
    box-sizing: border-box !important;
}

@media (max-width: 770px) {
    .list-shell .select2-container--default .select2-selection--single .select2-selection__clear {
        right: 2px !important;
        height: 24px !important;
        line-height: 22px !important;
    }

    .list-shell .select2-container--has-value .select2-selection--single .select2-selection__rendered {
        padding-right: 22px !important;
    }
}
/* ===== END LIST SELECT2 FINAL PATCH ===== */
/* =========================================
   LIST SELECT2 CLEAR PATCH
   Khi đã chọn giá trị: hiện dấu X, ẩn dấu tam giác.
   Không ảnh hưởng logic JS/Razor.
========================================= */

.list-shell .select2-container--default .select2-selection--single {
    position: relative !important;
}

    .list-shell .select2-container--default .select2-selection--single .select2-selection__clear {
        position: absolute !important;
        right: 4px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        margin: 0 !important;
        padding: 0 4px !important;
        line-height: 1 !important;
        font-size: 16px !important;
        color: #4b5563 !important;
        z-index: 3 !important;
    }

        .list-shell .select2-container--default .select2-selection--single .select2-selection__clear:hover {
            color: #ef4444 !important;
        }

.list-shell .select2-container--has-value .select2-selection--single .select2-selection__arrow {
    display: none !important;
}

.list-shell .select2-container--has-value .select2-selection--single .select2-selection__rendered {
    padding-right: 22px !important;
}