/* =========================================================
   PROPERTY DETAIL PAGE
   Scope: Views/Property/Detail.cshtml
   Breakpoints: desktop > 1000px, tablet/mobile <= 1000px, small mobile <= 575px
   ========================================================= */

.home-hero-header {
    margin-bottom: 0 !important;
}

:root {
    --hn-detail-fixed-header-height: 112px;
    --hn-detail-container: 1200px;
    --hn-detail-gap: 18px;
    --hn-detail-radius-lg: 18px;
    --hn-detail-radius-md: 14px;
    --hn-detail-text: #0f172a;
    --hn-detail-muted: #64748b;
    --hn-detail-soft: #f8fafc;
    --hn-detail-border: rgba(15, 23, 42, .08);
    --hn-detail-shadow: 0 10px 28px rgba(15, 23, 42, .06);
    --hn-detail-primary: #2563eb;
    --hn-detail-danger: #ef4444;
    --hn-detail-mobile-contact-height: 118px;
    --nhawow-profile-avatar-bg: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    --nhawow-profile-avatar-text: #9f1239;
}

.hn-fab-contact {
    display: none !important;
}

.detail-wrap,
.detail-wrap * {
    box-sizing: border-box;
}

.detail-wrap {
    max-width: var(--hn-detail-container);
    margin: var(--hn-detail-fixed-header-height) auto 28px;
    padding: 0 16px;
    overflow: visible;
}

.detail-title {
    margin: 18px 0 14px;
    font-size: clamp(22px, 2.2vw, 30px);
    line-height: 1.35;
    font-weight: 800;
    color: var(--hn-detail-text);
    text-align: left;
    word-break: break-word;
}
.detail-title,
.card,
.house-info-section,
.detail-similar {
    scroll-margin-top: calc(var(--hn-detail-fixed-header-height) + 16px);
}
.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(300px, .9fr);
    gap: var(--hn-detail-gap);
    align-items: start;
}

    .detail-grid > div,
    .detail-grid > aside {
        min-width: 0;
    }

.detail-left {
    min-width: 0;
}

.card {
    background: #fff;
    border-radius: var(--hn-detail-radius-lg);
    padding: 16px;
    box-shadow: var(--hn-detail-shadow);
    border: 1px solid var(--hn-detail-border);
    min-width: 0;
}

.detail-gallery-card,
.detail-summary-card {
    overflow: hidden;
}

.detail-card-spaced {
    margin-top: var(--hn-detail-gap);
}

.section-title,
.basic-info-side,
.house-info-title {
    position: relative;
    margin: 0 0 12px;
    padding-left: 14px;
    color: #0f172a;
}

    .section-title:before,
    .basic-info-side:before,
    .house-info-title:before {
        content: "";
        position: absolute;
        left: 0;
        top: 50%;
        transform: translateY(-50%);
        width: 4px;
        height: 22px;
        border-radius: 999px;
        background: linear-gradient(180deg, #ff6b6b 0%, #ef4444 100%);
        box-shadow: 0 2px 8px rgba(239, 68, 68, .22);
    }

.section-title {
    font-size: 17px;
    line-height: 1.35;
    font-weight: 900;
}

.preview,
.gallery-main,
.preview-shell,
.basic-info-wrap,
.basic-info-grid,
.basic-info-item,
.detail-price-row,
.similar-scroll,
.map-wrap {
    min-width: 0;
}

/* =========================================================
   GALLERY
   ========================================================= */
.preview {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    display: block;
    width: 100%;
    border: 0;
    padding: 0;
    background: #000;
    cursor: pointer;
    text-align: left;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: pan-y;
}

    .preview img {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 10;
        object-fit: contain;
        display: block;
        background: #000;
        user-select: none;
        -webkit-user-drag: none;
    }

.badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgb(59, 164, 255);
    color: #fff;
    padding: 6px 10px;
    border-radius: 999px;
    font-weight: 900;
    font-size: 12px;
    z-index: 4;
    box-shadow: 0 8px 18px rgba(0, 0, 0, .18);
}

.play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(to bottom, rgba(0, 0, 0, .08), rgba(0, 0, 0, .38));
    z-index: 2;
}

    .play .btn {
        width: 66px;
        height: 66px;
        border-radius: 999px;
        background: rgba(15, 23, 42, .86);
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 10px 24px rgba(0, 0, 0, .25);
    }

        .play .btn span {
            color: #fff;
            font-weight: 900;
            font-size: 12px;
            letter-spacing: .6px;
        }

.hint {
    margin-top: 10px;
    color: #64748b;
    font-size: 13px;
}

.danger {
    color: #ef4444;
}

.gallery-main,
.preview-shell {
    position: relative;
}

.preview-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    border: 0;
    background: rgba(15, 23, 42, .72);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(0, 0, 0, .18);
}

    .preview-nav:hover {
        background: rgba(15, 23, 42, .88);
    }

    .preview-nav.prev {
        left: 12px;
    }

    .preview-nav.next {
        right: 12px;
    }

    .preview-nav i {
        font-size: 14px;
    }

.preview-counter {
    position: absolute;
    right: 12px;
    bottom: 12px;
    z-index: 5;
    background: rgba(15, 23, 42, .78);
    color: #fff;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    box-shadow: 0 8px 18px rgba(0, 0, 0, .16);
}

.gallery-strip {
    margin-top: 12px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
    gap: 10px;
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 163, 184, .7) transparent;
}

    .gallery-strip::-webkit-scrollbar {
        height: 6px;
    }

    .gallery-strip::-webkit-scrollbar-thumb {
        background: rgba(148, 163, 184, .7);
        border-radius: 999px;
    }

    .gallery-strip::-webkit-scrollbar-track {
        background: transparent;
    }

#detailGalleryStrip {
    scroll-behavior: smooth;
}

.gallery-thumb {
    position: relative;
    border: 2px solid transparent;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    background: #fff;
    padding: 0;
    transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .06);
    -webkit-tap-highlight-color: transparent;
    scroll-snap-align: start;
}

    .gallery-thumb:hover {
        transform: translateY(-1px);
    }

    .gallery-thumb.is-active {
        border-color: #2563eb;
        box-shadow: 0 0 0 3px rgba(37, 99, 235, .14);
    }

    .gallery-thumb img {
        width: 100%;
        height: 78px;
        object-fit: cover;
        display: block;
        background: #f3f4f6;
        user-select: none;
        -webkit-user-drag: none;
    }

.thumb-vr-badge {
    position: absolute;
    left: 6px;
    top: 6px;
    z-index: 2;
    background: rgb(59, 164, 255);
    color: #fff;
    font-size: 10px;
    line-height: 1;
    padding: 5px 7px;
    border-radius: 999px;
    font-weight: 900;
}

.gallery-empty {
    color: #64748b;
    font-size: 13px;
    margin-top: 12px;
}

/* =========================================================
   LIGHTBOX
   ========================================================= */
.detail-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, .92);
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

    .detail-lightbox.is-open {
        display: flex;
    }

.detail-lightbox-inner {
    position: relative;
    width: min(1100px, 100%);
    height: min(82vh, 760px);
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: none;
    overflow: hidden;
}

.detail-lightbox-stage {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.detail-lightbox-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, .35);
    background: #0f172a;
    user-select: none;
    -webkit-user-drag: none;
    transform-origin: center center;
    will-change: transform;
    cursor: grab;
}

    .detail-lightbox-img.is-grabbing {
        cursor: grabbing;
    }

.detail-lightbox-close,
.detail-lightbox-nav,
.detail-lightbox-tool {
    position: absolute;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, .16);
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.detail-lightbox-close {
    top: -10px;
    right: -10px;
    width: 42px;
    height: 42px;
    font-size: 22px;
    font-weight: 900;
    z-index: 5;
}

.detail-lightbox-nav {
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    font-size: 16px;
    z-index: 4;
}

    .detail-lightbox-nav.prev {
        left: 12px;
    }

    .detail-lightbox-nav.next {
        right: 12px;
    }

.detail-lightbox-tools {
    position: absolute;
    top: 12px;
    left: 12px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    z-index: 5;
}

.detail-lightbox-tool {
    position: static;
    width: 40px;
    height: 40px;
    font-size: 14px;
}

.detail-lightbox-zoom-text {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 58px;
    height: 40px;
    border-radius: 999px;
    padding: 0 12px;
    background: rgba(15, 23, 42, .56);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
}

.detail-lightbox-counter {
    position: absolute;
    right: 14px;
    bottom: 14px;
    background: rgba(15, 23, 42, .76);
    color: #fff;
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 12px;
    font-weight: 800;
    z-index: 4;
}

/* =========================================================
   RIGHT COLUMN / SUMMARY
   ========================================================= */
.right {
    position: sticky;
    top: calc(var(--hn-detail-fixed-header-height) + 12px);
    align-self: start;
    display: flex;
    flex-direction: column;
    gap: 18px;
    /* max-height: calc(100vh - 104px);*/
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 4px;
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 163, 184, .7) transparent;
}

    .right::-webkit-scrollbar {
        width: 6px;
    }

    .right::-webkit-scrollbar-thumb {
        background: rgba(148, 163, 184, .7);
        border-radius: 999px;
    }

    .right::-webkit-scrollbar-track {
        background: transparent;
    }

.detail-price-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.detail-price-line {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    white-space: nowrap;
}

    .detail-price-line i {
        color: #ef4444;
        font-size: 14px;
        opacity: .95;
        flex: 0 0 auto;
    }

.detail-price-text {
    color: #ef4444;
    font-weight: 900;
    font-size: 18px;
    line-height: 1.15;
    white-space: nowrap;
}

.detail-fav-btn.js-fav-toggle {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    border: none !important;
    outline: none;
    cursor: pointer;
    background: rgba(15, 23, 42, .08);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

    .detail-fav-btn.js-fav-toggle i {
        color: #64748b !important;
        font-size: 14px;
    }

    .detail-fav-btn.js-fav-toggle.is-fav {
        background: #ef4444 !important;
    }

        .detail-fav-btn.js-fav-toggle.is-fav i {
            color: #fff !important;
        }

.meta {
    margin-top: 8px;
    color: #475569;
    font-size: 14px;
    line-height: 1.5;
}

.addr {
    margin-top: 6px;
    color: #475569;
    line-height: 1.6;
    word-break: break-word;
}

.detail-summary-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    align-items: center;
}

.detail-summary-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #475569;
    font-size: 14px;
    line-height: 1.5;
    font-weight: 600;
}

    .detail-summary-chip i {
        color: #64748b;
        font-size: 14px;
        flex: 0 0 auto;
    }

.detail-summary-address {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

    .detail-summary-address i {
        margin-top: 4px;
        color: #64748b;
        flex: 0 0 auto;
    }

    .detail-summary-address span {
        min-width: 0;
        word-break: break-word;
    }

.mobile-summary {
    display: none;
    margin-top: 18px;
}

.mobile-only-card {
    display: none;
}

/* =========================================================
   BASIC INFO / DESCRIPTION
   ========================================================= */
.house-info-section {
    margin-top: 18px;
}

.house-info-title {
    margin-bottom: 14px;
    font-size: 28px;
    font-weight: 900;
}

.basic-info-card {
    padding: 0;
    overflow: hidden;
}

.basic-info-wrap {
    display: grid;
    gap: 20px;
    padding: 22px 20px;
}

.basic-info-side {
    font-size: 20px;
    line-height: 1.4;
    font-weight: 800;
    margin-bottom: 0;
}

.basic-info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 28px;
}

.basic-info-item {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
}

.basic-info-item_if {
    grid-template-columns: 73px minmax(0, 1fr) !important;
}

.basic-info-label {
    color: #334155;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.5;
}

.basic-info-value {
    color: #0f172a;
    font-size: 15px;
    line-height: 1.6;
    word-break: break-word;
}

.desc-card {
    margin-top: 14px;
}

.detail-description-text {
    color: #334155;
    line-height: 1.7;
    word-break: break-word;
}

/* =========================================================
   AMENITIES / MAP
   ========================================================= */
.amenity-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.amenity-chip {
    width: auto;
    max-width: 100%;
    min-width: 104px;
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
}

.amenity-icon {
    width: auto;
    height: 22px;
    object-fit: contain;
    display: block;
}

.amenity-text {
    display: block;
    line-height: 1.35;
    white-space: normal;
    word-break: break-word;
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
}

.amenity-map-card {
    overflow: hidden;
}

.amenity-map-section {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid #e5e7eb;
}

    .amenity-map-section .section-title {
        margin-bottom: 12px;
    }

    .amenity-map-section .map-wrap iframe {
        height: 260px;
    }

.mobile-map-card {
    display: none;
}

.muted {
    color: #64748b;
}

.map-note {
    display: inline-flex;
    align-items: center;
    margin-bottom: 10px;
    padding: 6px 10px;
    border-radius: 999px;
    background: #fff4e5;
    color: #9a6700;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
}

.leaflet-map {
    width: 100%;
    height: 360px;
    border-radius: 16px;
    overflow: hidden;
    background: var(--hn-detail-soft);
}

.leaflet-map .leaflet-control-attribution {
    font-size: 10px;
}

.map-frame-shell {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
}

.map-frame-shell iframe {
    display: block;
    width: 100%;
    border: 0;
}

.map-wrap {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(15, 23, 42, .08);
}

    .map-wrap iframe {
        width: 100%;
        height: 300px;
        border: 0;
        display: block;
    }

.map-open {
    position: absolute;
    right: 10px;
    top: 10px;
    background: rgba(15, 23, 42, .85);
    color: #fff;
    text-decoration: none;
    padding: 8px 10px;
    border-radius: 999px;
    font-weight: 800;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    z-index: 2;
    box-shadow: 0 8px 18px rgba(0, 0, 0, .18);
}

    .map-open:hover {
        opacity: .95;
    }

/* =========================================================
   SIMILAR
   ========================================================= */
.similar-scroll {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    overflow: visible;
    padding: 4px 2px 0;
    align-items: stretch;
}

    .similar-scroll > .property-card--hero {
        min-width: 0;
        height: 100%;
    }

.detail-similar {
    margin-top: var(--hn-detail-gap);
    overflow: visible;
}

    .detail-similar .property-card--hero {
        min-width: 0;
        height: 100%;
    }

        .detail-similar .property-card--hero .property-card-link--body,
        .detail-similar .property-card--hero .property-card-body {
            height: 100%;
        }

        .detail-similar .property-card--hero .property-card-title {
            min-height: calc(1.35em * 2);
        }

        .detail-similar .property-card--hero .property-card-address span {
            -webkit-line-clamp: 2;
        }

        .detail-similar .property-card--hero .property-card-meta-inline {
            min-height: 40px;
        }

    .detail-similar.is-collapsed .similar-scroll > .property-card--hero:nth-child(n+4) {
        display: none;
    }

.detail-similar-more-wrap {
    margin-top: 18px;
    display: flex;
    justify-content: center;
}

.detail-similar-more-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 44px;
    padding: 0 22px;
    border: 1px solid rgba(15, 23, 42, .12);
    border-radius: 14px;
    background: #fff;
    color: #0f172a;
    font-size: 15px;
    font-weight: 800;
    box-shadow: 0 8px 20px rgba(15, 23, 42, .06);
    cursor: pointer;
    transition: .2s ease;
}

    .detail-similar-more-btn:hover {
        transform: translateY(-1px);
    }

    .detail-similar-more-btn i {
        transition: transform .2s ease;
    }

.detail-similar.is-expanded .detail-similar-more-btn i {
    transform: rotate(180deg);
}

.detail-infor-tags {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.detail-infor-tag {
    padding: 5px 9px;
    border-radius: 999px;
    background: #f1f5f9;
    font-size: 11px;
    color: #334155;
    border: 1px solid rgba(15, 23, 42, .08);
    white-space: nowrap;
}

/* =========================================================
   RESPONSIVE: DETAIL LAYOUT / GALLERY / SIMILAR
   ========================================================= */
@media (max-width: 1100px) {
    .detail-grid {
        grid-template-columns: minmax(0, 1.35fr) minmax(280px, .88fr);
        gap: 16px;
    }

    .basic-info-grid {
        gap: 12px 20px;
    }

    .basic-info-item {
        grid-template-columns: 130px minmax(0, 1fr);
    }

    .similar-scroll {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }
}

@media (max-width: 1000px) {
    :root {
        --hn-detail-fixed-header-height: 104px;
    }

    .detail-wrap {
        margin: var(--hn-detail-fixed-header-height) auto 22px;
        padding: 0 14px;
        overflow-x: hidden;
    }

    .detail-grid {
        grid-template-columns: 1fr;
    }

    .right {
        display: none;
    }

    .mobile-summary {
        display: block;
    }

    .mobile-only-card,
    .mobile-map-card {
        display: block;
    }

    .preview img {
        aspect-ratio: 16 / 10;
    }

    .gallery-strip {
        margin-top: 12px;
        display: flex;
        gap: 10px;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 0 2px 6px;
        grid-template-columns: none;
        scroll-snap-type: x proximity;
        -webkit-overflow-scrolling: touch;
    }

    .gallery-thumb {
        flex: 0 0 96px;
        width: 96px;
    }

        .gallery-thumb img {
            height: 72px;
        }

    .basic-info-wrap {
        padding: 18px 16px;
        gap: 16px;
    }

    .basic-info-side {
        font-size: 18px;
    }

    .basic-info-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px 18px;
    }

    .basic-info-item {
        grid-template-columns: 120px minmax(0, 1fr);
        gap: 10px;
    }

    .map-wrap iframe {
        height: 260px;
    }

    .similar-scroll {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }
}

@media (max-width: 1000px) {
    .detail-wrap {
        padding: 0 12px;
    }

    .detail-title {
        margin: 12px 0 10px;
        font-size: 22px;
    }

    .card {
        padding: 14px;
        border-radius: 16px;
    }

    .section-title,
    .basic-info-side,
    .house-info-title {
        padding-left: 12px;
    }

        .section-title:before,
        .basic-info-side:before,
        .house-info-title:before {
            width: 4px;
            height: 20px;
        }

    .section-title {
        font-size: 15px;
        margin-bottom: 10px;
    }

    .house-info-section {
        display: flex;
        flex-direction: column;
        gap: 14px;
    }

    .mobile-only-card {
        display: block;
        order: 1;
        margin-top: 15px !important;
    }

    .basic-info-card {
        order: 2;
    }

    .desc-card {
        order: 3;
        margin-top: 0;
    }

    .preview img {
        aspect-ratio: 4 / 3;
        object-fit: contain;
        background: #000;
    }

    .preview-nav {
        width: 38px;
        height: 38px;
    }

        .preview-nav.prev {
            left: 8px;
        }

        .preview-nav.next {
            right: 8px;
        }

    .preview-counter {
        right: 8px;
        bottom: 8px;
        font-size: 11px;
        padding: 5px 8px;
    }

    .detail-price-row {
        align-items: flex-start;
        gap: 10px;
    }

    .detail-price-line {
        white-space: normal;
        line-height: 1.3;
    }

    .detail-price-text {
        font-size: 16px;
    }

    .meta,
    .addr {
        font-size: 14px;
        line-height: 1.55;
    }

    .detail-summary-meta {
        gap: 8px 10px;
    }

    .detail-summary-chip {
        font-size: 13px;
    }

    .amenity-list {
        gap: 10px;
    }

    .amenity-chip {
        width: auto;
        max-width: 100%;
        min-width: 0;
        flex: 0 0 auto;
        padding: 12px 8px;
        border-radius: 14px;
    }

    .amenity-text {
        font-size: 12px;
    }

    .amenity-icon {
        height: 20px;
    }

    .map-wrap iframe {
        height: 220px;
    }

    .similar-scroll {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
        padding: 2px 2px 0;
    }

    .detail-similar.is-collapsed .similar-scroll > .property-card--hero:nth-child(n+3) {
        display: none;
    }

    .detail-similar.is-expanded .similar-scroll > .property-card--hero:nth-child(n+11) {
        display: none;
    }

    .detail-similar-more-wrap {
        margin-top: 14px;
    }

    .detail-similar-more-btn {
        min-height: 40px;
        padding: 0 18px;
        font-size: 14px;
    }

    .detail-lightbox {
        padding: 10px;
    }

    .detail-lightbox-close {
        top: 0;
        right: 0;
        width: 36px;
        height: 36px;
    }

    .detail-lightbox-nav {
        width: 40px;
        height: 40px;
    }

        .detail-lightbox-nav.prev {
            left: 4px;
        }

        .detail-lightbox-nav.next {
            right: 4px;
        }

    .detail-lightbox-tools {
        top: 8px;
        left: 8px;
        gap: 6px;
    }

    .detail-lightbox-tool {
        width: 36px;
        height: 36px;
    }

    .detail-lightbox-zoom-text {
        min-width: 52px;
        height: 36px;
        font-size: 11px;
        padding: 0 10px;
    }

    .detail-lightbox-counter {
        right: 10px;
        bottom: 10px;
        font-size: 11px;
        padding: 6px 10px;
    }
}

@media (max-width: 575px) {
    :root {
        --hn-detail-fixed-header-height: 92px;
    }

    .property-card--hero .property-card-meta-item{
        font-size:10px !important
    }
    .property-view-count {
        gap: 2px;
        font-size: 10px !important;
    }
    .property-card--hero .property-card-price {
        font-size: 13px !important;
        font-weight: 500 !important
     
    }

    .property-card--hero .property-card-title {
   
        font-size: 11px !important;
       
    }
    .property-card--hero .property-card-address {
     
         gap: 0px !important; 
        font-size: 10px !important;
      
    }
    .property-card--hero .property-card-body {
        padding: 5px 6px 10px !important;

    }

    .detail-similar-more-btn {
       
        font-size: 11px;
    }
    .detail-wrap {
        padding: 0 10px;
        margin: var(--hn-detail-fixed-header-height) auto 18px;
    }

    .detail-title {
        font-size: 18px;
        margin: 10px 0 8px;
    }

    .card {
        padding: 12px;
        border-radius: 14px;
    }

    .section-title,
    .basic-info-side,
    .house-info-title {
        padding-left: 11px;
    }

        .section-title:before,
        .basic-info-side:before,
        .house-info-title:before {
            height: 18px;
        }

    .preview img {
        aspect-ratio: 4 / 3;
        object-fit: contain;
        background: #000;
    }

    .badge {
        top: 8px;
        left: 8px;
        font-size: 10px;
        padding: 5px 8px;
    }

   /* .play .btn {
        width: 56px;
        height: 56px;
    }*/

        .play .btn span {
            font-size: 11px;
        }

    .gallery-thumb {
        flex: 0 0 76px;
        width: 76px;
        border-radius: 10px;
    }

        .gallery-thumb img {
            height: 58px;
        }

    .detail-price-text {
        font-size: 15px;
    }

    .meta,
    .addr {
        font-size: 13px;
    }

    .detail-infor-tags,
    .amenity-list {
        gap: 8px;
    }

    .detail-infor-tag {
        font-size: 10px;
        padding: 4px 8px;
    }

    .basic-info-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px 10px;
    }

    .basic-info-item {
        grid-template-columns: 72px minmax(0, 1fr);
        gap: 6px;
    }

    .basic-info-label {
        font-size: 11px;
    }

    .basic-info-value {
        font-size: 12px;
    }

    .amenity-chip {
        width: auto;
        min-width: 0;
        max-width: 100%;
        flex: 0 0 auto;
        padding: 10px 8px;
    }

    .amenity-icon {
        height: 18px;
    }

    .amenity-text {
        font-size: 11px;
    }

    .map-open {
        top: 8px;
        right: 8px;
        font-size: 11px;
        padding: 7px 9px;
        gap: 6px;
    }

    .map-wrap iframe {
        height: 200px;
    }
}

@media (max-width: 389px) {
    :root {
        --hn-detail-fixed-header-height: 88px;
    }
    .detail-wrap {
        padding: 0 8px;
    }

    .card {
        padding: 10px;
    }

    .preview-nav {
        width: 34px;
        height: 34px;
    }

    .detail-price-text {
        font-size: 14px;
    }

    .basic-info-wrap {
        padding: 14px 12px;
    }

    .basic-info-side {
        font-size: 15px;
    }

    .basic-info-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .basic-info-item {
        grid-template-columns: 64px minmax(0, 1fr);
        gap: 6px;
    }

    .basic-info-label {
        font-size: 10.5px;
    }

    .basic-info-value {
        font-size: 11.5px;
    }

    .amenity-list {
        gap: 8px;
    }
}

@media (min-width: 1001px) {
    .detail-similar.is-expanded .similar-scroll > .property-card--hero:nth-child(n+16) {
        display: none;
    }
}

/* =========================================================
   OWNER CONTACT / SHARE: DESKTOP CARDS + MOBILE ACTION BAR
   ========================================================= */
.detail-owner-stack {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.detail-owner-card,
.detail-share-card {
    overflow: hidden;
}

.detail-owner-head {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.detail-owner-avatar {
    width: 48px;
    height: 48px;
    border-radius: 999px;
    flex: 0 0 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--nhawow-profile-avatar-bg);
    color: var(--nhawow-profile-avatar-text);
    font-size: 18px;
    font-weight: 900;
    box-shadow: inset 0 0 0 1px rgba(37, 99, 235, .14);
}


.detail-owner-avatar-link,
.detail-owner-avatar-link:hover,
.detail-owner-avatar-link:focus,
.detail-owner-name-link,
.detail-owner-name-link:hover,
.detail-owner-name-link:focus {
    color: inherit;
    text-decoration: none;
}

.detail-owner-avatar-link {
    display: inline-flex;
    flex: 0 0 auto;
    border-radius: 999px;
    outline: none;
}

.detail-owner-profile-link:not(.is-disabled) {
    cursor: pointer;
}

.detail-owner-profile-link.is-disabled {
    pointer-events: none;
}

.detail-owner-profile-link:not(.is-disabled):hover .detail-owner-avatar,
.detail-owner-profile-link:not(.is-disabled):focus-visible .detail-owner-avatar {
    box-shadow: inset 0 0 0 1px rgba(37, 99, 235, .20), 0 8px 18px rgba(37, 99, 235, .18);
    transform: translateY(-1px);
}

.detail-owner-name-link {
    min-width: 0;
    color: #0f172a;
    font-size: 15px;
    font-weight: 900;
    word-break: break-word;
}

.detail-owner-name-link:hover,
.detail-owner-name-link:focus {
    color: #0d8bff;
}

.detail-owner-name em.is-gold-agent,
.detail-mobile-owner-tags span.is-gold-agent {
    background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
    color: #fff;
}

.detail-owner-meta {
    min-width: 0;
    flex: 1 1 auto;
}

.detail-owner-name {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    color: #0f172a;
    line-height: 1.25;
}

.detail-owner-name span {
    font-size: 15px;
    font-weight: 900;
    min-width: 0;
    word-break: break-word;
}

.detail-owner-name em {
    display: inline-flex;
    align-items: center;
    height: 20px;
    padding: 0 7px;
    border-radius: 999px;
    background: #2563eb;
    color: #fff;
    font-style: normal;
    font-size: 10px;
    font-weight: 900;
    white-space: nowrap;
}

.detail-owner-sub {
    margin-top: 4px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #64748b;
    font-size: 12px;
    font-weight: 600;
}

.detail-owner-call {
    margin-top: 14px;
    width: 100%;
    min-height: 44px;
    border: 1px solid rgba(37, 99, 235, .45);
    border-radius: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    background: #fff;
    color: #2563eb;
    font-size: 14px;
    font-weight: 900;
    text-decoration: none;
    cursor: pointer;
    transition: background .16s ease, box-shadow .16s ease, transform .16s ease;
}

.detail-owner-call:hover {
    background: rgba(37, 99, 235, .06);
    box-shadow: 0 8px 20px rgba(37, 99, 235, .14);
    transform: translateY(-1px);
    color: #1d4ed8;
}

.detail-owner-call-locked {
    color: #2563eb;
}

.detail-owner-note {
    margin-top: 8px;
    text-align: center;
    color: #64748b;
    font-size: 12px;
    line-height: 1.45;
    font-weight: 600;
}

.detail-share-actions {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.detail-share-item {
    border: 0;
    padding: 0;
    background: transparent;
    color: #334155;
    text-decoration: none;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 7px;
    min-width: 0;
    cursor: pointer;
    font-family: inherit;
}

.detail-share-item span {
    width: 38px;
    height: 38px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 14px;
    font-weight: 900;
    box-shadow: 0 8px 18px rgba(15, 23, 42, .10);
}

.detail-share-item em {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-style: normal;
    font-size: 11px;
    line-height: 1.2;
    color: #475569;
    font-weight: 700;
}

.detail-share-facebook span {
    background: #1877f2;
}

.detail-share-zalo span {
    background: #0ea5e9;
    font-size: 11px;
}

.detail-share-messenger span {
    background: linear-gradient(135deg, #7c3aed 0%, #ec4899 100%);
}

.detail-share-copy span {
    background: #e2e8f0;
    color: #334155;
}

.detail-mobile-contact-bar {
    display: none;
}

@media (max-width: 1000px) {
    body.hn-detail-mobile-contact-active {
        padding-bottom: calc(var(--hn-detail-mobile-contact-height, 118px) + 16px);
    }

    /*
       Fix iOS/Chrome mobile: thanh gọi/chia sẻ nằm trong .body-content,
       còn footer là sibling có z-index cao hơn. Nếu giữ .body-content z-index thấp,
       khi cuộn xuống cuối trang footer sẽ phủ lên nửa dưới của thanh fixed.
       Nâng riêng stacking context của trang detail để thanh mobile luôn nằm trên footer,
       nhưng không đổi layout desktop và không ảnh hưởng trang khác.
    */
    body.hn-detail-mobile-contact-active .body-content {
        position: relative;
        z-index: 100;
    }

    body.hn-detail-mobile-contact-active .footer-section {
        position: relative;
        z-index: 1;
    }

    .detail-owner-stack-desktop {
        display: none;
    }

    .detail-mobile-contact-bar {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 99990;
        display: block;
        padding: 9px 12px calc(10px + env(safe-area-inset-bottom));
        background: rgba(255, 255, 255, .98);
        border-top: 1px solid rgba(15, 23, 42, .10);
        box-shadow: 0 -12px 32px rgba(15, 23, 42, .14);
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
        -webkit-transform: translate3d(0, 0, 0);
        transform: translate3d(0, 0, 0);
        will-change: transform;
        contain: layout paint;
        transition: opacity .12s ease;
    }

    @supports (-webkit-touch-callout: none) {
        .detail-mobile-contact-bar {
            background: #fff;
            -webkit-backdrop-filter: none;
            backdrop-filter: none;
        }
    }

    .detail-mobile-owner-row {
        display: flex;
        align-items: center;
        gap: 9px;
        min-width: 0;
        margin-bottom: 8px;
    }

    .detail-mobile-owner-avatar {
        width: 38px;
        height: 38px;
        flex-basis: 38px;
        font-size: 15px;
    }

    .detail-mobile-owner-main {
        min-width: 0;
        flex: 1 1 auto;
    }

    .detail-mobile-owner-name {
        color: #0f172a;
        font-size: 13px;
        font-weight: 900;
        line-height: 1.25;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .detail-mobile-owner-tags {
        margin-top: 2px;
        display: flex;
        align-items: center;
        gap: 6px;
        color: #64748b;
        font-size: 10px;
        line-height: 1.2;
        font-weight: 700;
        min-width: 0;
    }

    .detail-mobile-owner-tags span:first-child {
        padding: 2px 6px;
        border-radius: 999px;
        background: #eef6ff;
        color: #2563eb;
        white-space: nowrap;
    }

    .detail-mobile-owner-tags span:last-child {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .detail-mobile-chat-btn {
        width: 42px;
        height: 42px;
        border: 0;
        border-radius: 999px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex: 0 0 42px;
        background: linear-gradient(135deg, #2563eb 0%, #0ea5e9 100%);
        color: #fff;
        box-shadow: 0 8px 18px rgba(37, 99, 235, .26);
        cursor: pointer;
    }

    .detail-mobile-action-row {
        display: grid;
        grid-template-columns: minmax(0, 1.35fr) minmax(0, .65fr);
        gap: 10px;
    }

    .detail-mobile-action {
        min-width: 0;
        height: 44px;
        border-radius: 11px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        border: 1px solid transparent;
        font-family: inherit;
        font-size: 13px;
        font-weight: 900;
        text-decoration: none;
        cursor: pointer;
        white-space: nowrap;
    }

    .detail-mobile-action span {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .detail-mobile-call {
        background: #0d8bff;
        color: #fff;
        box-shadow: 0 8px 20px rgba(13, 139, 255, .24);
    }

    .detail-mobile-share {
        background: #fff;
        color: #2563eb;
        border-color: rgba(37, 99, 235, .28);
    }

    .hn-chatbox {
        bottom: 118px !important;
    }
    .hn-chat-toggle {
        display: none !important;
    }
    .hn-chatbox.open {
        bottom: 14px !important;
        z-index: 100000;
    }
}


@media (max-width: 1000px) {


    .leaflet-map {
        height: 300px;
    }

    .map-frame-shell iframe {
        min-height: 300px;
    }
    .fa-comments {
        font-size: 20px !important
    }
}

@media (max-width: 389px) {
    .detail-mobile-action {
        font-size: 12px;
        gap: 6px;
    }

    .detail-mobile-action-row {
        gap: 8px;
    }
}


/* Khi chatbox ngoài trang detail đang mở trên mobile, ẩn thanh gọi/chia sẻ cố định bên dưới
   để bàn phím không làm các fixed bar tranh vị trí và gây nháy/khoảng trắng. */
@media (max-width: 1000px) {
    body.hn-floating-chat-open .detail-mobile-contact-bar,
    body.hn-floating-chat-keyboard-open .detail-mobile-contact-bar {
        transform: translate3d(0, 130%, 0) !important;
        pointer-events: none !important;
        opacity: 0 !important;
    }
}

/* =========================================================
   OWNER GOLD / ELITE AGENT BADGE UI
   ========================================================= */
.detail-owner-avatar-shell {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border-radius: 999px;
}

.detail-owner-head.is-gold-owner .detail-owner-avatar {
    width: 56px;
    height: 56px;
    flex-basis: 56px;
    font-size: 20px;
    background: var(--nhawow-profile-avatar-bg);
}

.detail-owner-gold-medal {
    position: absolute;
    right: -5px;
    bottom: -4px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 25px;
    height: 25px;
    border: 2px solid #fff;
    border-radius: 999px;
    background: radial-gradient(circle at 35% 28%, #fff7c2 0%, #facc15 36%, #b7791f 100%);
    color: #7c4a03;
    font-size: 12px;
    box-shadow: 0 6px 14px rgba(120, 53, 15, .28);
}

.detail-owner-name .detail-owner-role-badge,
.detail-owner-name .detail-owner-gold-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    height: 24px;
    padding: 0 10px;
    border-radius: 999px;
    font-style: normal;
    font-size: 12px;
    font-weight: 900;
    line-height: 1;
    white-space: nowrap;
}

.detail-owner-name .detail-owner-role-badge {
    background: #64748b;
    color: #fff;
}

.detail-owner-name .detail-owner-gold-badge {
    background: linear-gradient(135deg, #a9791b 0%, #c9a13b 48%, #8a6417 100%);
    color: #fff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22);
}

.detail-owner-name .detail-owner-gold-badge i {
    font-size: 11px;
}

@media (max-width: 1000px) {
    .detail-mobile-owner-row.is-gold-owner {
        align-items: center;
        gap: 12px;
        margin-bottom: 10px;
    }

    .detail-mobile-owner-row.is-gold-owner .detail-mobile-owner-avatar {
        width: 54px;
        height: 54px;
        flex-basis: 54px;
        font-size: 22px;
    }

        .detail-mobile-owner-row.is-gold-owner .detail-mobile-chat-btn {
            width: 54px;
            height: 54px;
            flex-basis: 54px;
            font-size: 19px;
            background: #00B1FE;
            box-shadow: 0 8px 18px rgba(11, 74, 143, .24);
        }

    .detail-mobile-owner-gold-medal {
        right: -5px;
        bottom: -4px;
        width: 24px;
        height: 24px;
        font-size: 11px;
    }

    .detail-mobile-owner-name {
        display: block;
        font-size: 18px;
        line-height: 1.2;
    }

    .detail-mobile-owner-tags {
        margin-top: 6px;
        gap: 7px;
        flex-wrap: wrap;
    }

    .detail-mobile-owner-tags .detail-mobile-owner-role,
    .detail-mobile-owner-tags .detail-mobile-owner-gold {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 4px;
        min-height: 24px;
        padding: 0 10px;
        border-radius: 999px;
        font-size: 12px;
        font-weight: 900;
        line-height: 1;
        white-space: nowrap;
        overflow: visible;
        text-overflow: clip;
    }

    .detail-mobile-owner-tags .detail-mobile-owner-role,
    .detail-mobile-owner-tags span:first-child.detail-mobile-owner-role {
        background: #64748b;
        color: #fff;
    }

    .detail-mobile-owner-tags .detail-mobile-owner-gold,
    .detail-mobile-owner-tags span:last-child.detail-mobile-owner-gold {
        background: linear-gradient(135deg, #a9791b 0%, #c9a13b 48%, #8a6417 100%);
        color: #fff;
    }

    .detail-mobile-owner-time {
        margin-top: 6px;
        color: #64748b;
        font-size: 13px;
        font-weight: 700;
        line-height: 1.2;
        white-space: nowrap;
    }

    .detail-mobile-owner-row.is-gold-owner + .detail-mobile-action-row .detail-mobile-action {
        min-height: 48px;
        border-radius: 12px;
        font-size: 15px;
    }
}

@media (max-width: 520px) {
    .detail-mobile-owner-row.is-gold-owner .detail-mobile-owner-avatar {
        width: 50px;
        height: 50px;
        flex-basis: 50px;
        font-size: 20px;
    }

    .detail-mobile-owner-row.is-gold-owner .detail-mobile-chat-btn {
        width: 50px;
        height: 50px;
        flex-basis: 50px;
        font-size: 18px;
    }

    .detail-mobile-owner-name {
        font-size: 17px;
    }

    .detail-mobile-owner-tags .detail-mobile-owner-role,
    .detail-mobile-owner-tags .detail-mobile-owner-gold {
        min-height: 22px;
        padding-left: 9px;
        padding-right: 9px;
        font-size: 11px;
    }

    .detail-mobile-owner-time {
        font-size: 12px;
    }
}
