/* ============================================================
   HomeViet — home.css
   ============================================================ */

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --blue: #1A56DB;
    --blue-dark: #1343B0;
    --blue-light: #EBF2FF;
    --accent: #F97316;
    --bg: #F5F7FA;
    --white: #FFFFFF;
    --text: #111827;
    --text-muted: #6B7280;
    --border: #E5E7EB;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 32px rgba(26, 86, 219, 0.12);
    --green: #059669;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ── NAV ── */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 3rem;
    height: 68px;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.logo {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--blue);
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: var(--blue);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.logo span {
    color: var(--accent);
}

.nav-links {
    display: flex;
    gap: 0.25rem;
    list-style: none;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.5rem 0.875rem;
    border-radius: 6px;
    transition: color 0.2s, background 0.2s;
}

.nav-links a:hover {
    color: var(--blue);
    background: var(--blue-light);
}

.nav-links a.active {
    color: var(--blue);
    font-weight: 600;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Buttons */
.btn-ghost {
    padding: 0.5rem 1rem;
    border: 1.5px solid var(--border);
    background: transparent;
    color: var(--text);
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
}

.btn-ghost:hover {
    border-color: var(--blue);
    color: var(--blue);
}

.btn-primary {
    padding: 0.55rem 1.25rem;
    background: var(--blue);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-primary:hover {
    background: var(--blue-dark);
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0.4rem 0.875rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--blue);
    background: var(--blue-light);
    border: 1.5px solid #DBEAFE;
}

.nav-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--blue);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
}

/* ── HERO ── */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 7rem 2rem 5rem;
    position: relative;
    text-align: center;
    overflow: hidden;
    background: linear-gradient(180deg, #EBF2FF 0%, #F5F7FA 60%);
}

.hero-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    opacity: 0.45;
}

.hero-blob-1 {
    width: 500px;
    height: 500px;
    background: #BFDBFE;
    top: -100px;
    left: -100px;
}

.hero-blob-2 {
    width: 400px;
    height: 400px;
    background: #FED7AA;
    bottom: 0;
    right: -80px;
}

.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0.4rem 1rem;
    background: var(--white);
    border: 1.5px solid #DBEAFE;
    border-radius: 50px;
    font-size: 0.75rem;
    color: var(--blue);
    font-weight: 600;
    margin-bottom: 1.75rem;
    box-shadow: var(--shadow-sm);
    animation: fadeUp 0.5s ease both;
}

.hero-tag-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #22C55E;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(0.8);
    }
}

.hero h1 {
    font-size: clamp(2.4rem, 6vw, 4.2rem);
    font-weight: 800;
    line-height: 1.15;
    max-width: 780px;
    color: var(--text);
    letter-spacing: -1px;
    animation: fadeUp 0.6s 0.1s ease both;
}

.hero h1 em {
    font-style: normal;
    color: var(--blue);
}

.hero h1 .acc {
    color: var(--accent);
}

.hero-sub {
    margin-top: 1.25rem;
    font-size: 1.05rem;
    color: var(--text-muted);
    max-width: 520px;
    line-height: 1.7;
    animation: fadeUp 0.6s 0.2s ease both;
}

/* ── SEARCH ── */
.search-wrap {
    margin-top: 2.5rem;
    width: 100%;
    max-width: 760px;
    animation: fadeUp 0.6s 0.3s ease both;
}

.search-box-wrap {
    background: var(--white);
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(26, 86, 219, 0.15);
    overflow: hidden;
    border: 1.5px solid #DBEAFE;
}

.tab-row {
    display: flex;
    padding: 0 1.25rem;
    border-bottom: 1px solid var(--border);
    background: #FAFBFF;
}

.tab {
    padding: 0.875rem 1.25rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 2.5px solid transparent;
    transition: color 0.2s, border-color 0.2s;
    white-space: nowrap;
}

.tab.active {
    color: var(--blue);
    border-bottom-color: var(--blue);
}

.search-input-row {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    gap: 0.5rem;
}

.search-icon {
    color: var(--text-muted);
    padding: 0 0.5rem;
    font-size: 1.1rem;
}

.search-input-row input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text);
    font-family: inherit;
    font-size: 0.95rem;
}

.search-input-row input::placeholder {
    color: #9CA3AF;
}

.divider-v {
    width: 1px;
    height: 28px;
    background: var(--border);
    flex-shrink: 0;
}

.search-select {
    border: none;
    outline: none;
    background: transparent;
    font-family: inherit;
    font-size: 0.85rem;
    color: var(--text);
    font-weight: 500;
    cursor: pointer;
    padding: 0 0.75rem;
}

.search-btn {
    padding: 0.7rem 1.5rem;
    background: var(--blue);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
}

.search-btn:hover {
    background: var(--blue-dark);
}

.hot-links {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    justify-content: center;
    font-size: 0.78rem;
    color: var(--text-muted);
    align-items: center;
}

.hot-links span {
    font-weight: 500;
}

.hot-links a {
    color: var(--text-muted);
    text-decoration: none;
    border: 1px solid var(--border);
    background: var(--white);
    padding: 0.28rem 0.7rem;
    border-radius: 50px;
    transition: color 0.2s, border-color 0.2s, background 0.2s;
    font-weight: 500;
}

.hot-links a:hover {
    color: var(--blue);
    border-color: #BFDBFE;
    background: var(--blue-light);
}

/* ── STATS ── */
.stats-bar {
    display: flex;
    background: var(--white);
    border-radius: 14px;
    border: 1px solid var(--border);
    overflow: hidden;
    margin-top: 2.5rem;
    box-shadow: var(--shadow-sm);
    animation: fadeUp 0.6s 0.4s ease both;
}

.stat {
    flex: 1;
    text-align: center;
    padding: 1.25rem 1rem;
    border-right: 1px solid var(--border);
}

.stat:last-child {
    border-right: none;
}

.stat-num {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--blue);
    letter-spacing: -0.5px;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
    font-weight: 500;
}

/* ── SECTION ── */
.section {
    padding: 4rem 3rem;
    max-width: 1280px;
    margin: 0 auto;
}

.section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.section-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    color: var(--blue);
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 0.4rem;
}

.section-label::before {
    content: '';
    width: 16px;
    height: 3px;
    background: var(--blue);
    border-radius: 2px;
}

.section-title {
    font-size: clamp(1.5rem, 2.5vw, 2rem);
    font-weight: 800;
    letter-spacing: -0.5px;
}

.see-all {
    font-size: 0.82rem;
    color: var(--blue);
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0.4rem 0.875rem;
    border: 1.5px solid #DBEAFE;
    border-radius: 8px;
    background: var(--blue-light);
    transition: background 0.2s, gap 0.2s;
}

.see-all:hover {
    background: #DBEAFE;
    gap: 8px;
}

/* ── CATEGORY CARDS ── */
.cat-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

.cat-card {
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    cursor: pointer;
    transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
}

.cat-card:hover {
    border-color: #BFDBFE;
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.cat-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.cat-icon {
    width: 52px;
    height: 52px;
    background: var(--blue-light);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.cat-title {
    font-size: 1.2rem;
    font-weight: 700;
}

.cat-count {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 2px;
}

.cat-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.65;
    margin-bottom: 1.25rem;
}

.cat-sub-items {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.pill {
    padding: 0.28rem 0.75rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 50px;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
    transition: background 0.2s, color 0.2s;
    cursor: pointer;
}

.pill:hover {
    background: var(--blue-light);
    color: var(--blue);
    border-color: #BFDBFE;
}

/* ── LISTING CARDS ── */
.listings-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.listing-card {
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}

.listing-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: #BFDBFE;
}

.listing-img {
    height: 190px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
}

.listing-img-1 {
    background: linear-gradient(135deg, #DBEAFE 0%, #BFDBFE 100%);
}

.listing-img-2 {
    background: linear-gradient(135deg, #D1FAE5 0%, #A7F3D0 100%);
}

.listing-img-3 {
    background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%);
}

.listing-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 0.28rem 0.65rem;
    border-radius: 6px;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-sell {
    background: var(--blue);
    color: #fff;
}

.badge-rent {
    background: var(--green);
    color: #fff;
}

.listing-save {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    background: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: transform 0.15s;
    border: none;
}

.listing-save:hover {
    transform: scale(1.15);
}

.listing-body {
    padding: 1.125rem;
}

.listing-price {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--blue);
    margin-bottom: 0.3rem;
    letter-spacing: -0.5px;
}

.listing-name {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
    color: var(--text);
    line-height: 1.4;
}

.listing-loc {
    font-size: 0.78rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 3px;
    margin-bottom: 0.875rem;
    font-weight: 500;
}

.listing-specs {
    display: flex;
    gap: 0.75rem;
    border-top: 1px solid var(--border);
    padding-top: 0.75rem;
}

.spec {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 3px;
    font-weight: 500;
    background: var(--bg);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

/* ── FOOTER ── */
.footer-wrap {
    background: var(--white);
    border-top: 1px solid var(--border);
    margin-top: 2rem;
}

footer {
    padding: 2.5rem 3rem;
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-logo {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--blue);
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-logo span {
    color: var(--accent);
}

.footer-copy {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 5px;
}

.footer-links {
    display: flex;
    gap: 1.75rem;
}

.footer-links a {
    font-size: 0.82rem;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--blue);
}

/* ── OVERLAY BACKDROP ── */
.overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 300;
    background: rgba(17, 24, 39, 0.5);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
}

.overlay.open {
    display: flex;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(28px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ── AUTH MODAL ── */
.auth-modal {
    background: var(--white);
    border-radius: 20px;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18);
    animation: slideUp 0.3s ease;
    overflow: hidden;
}

.auth-header {
    background: linear-gradient(135deg, #1A56DB, #2563EB);
    padding: 2rem 2rem 1.5rem;
    text-align: center;
    color: #fff;
    position: relative;
}

.auth-logo {
    font-size: 1.3rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.auth-logo span {
    color: #FDE68A;
}

.auth-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.auth-sub {
    font-size: 0.82rem;
    opacity: 0.8;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.35);
}

.auth-tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
}

.auth-tab {
    flex: 1;
    padding: 0.875rem;
    text-align: center;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    color: var(--text-muted);
    border-bottom: 2.5px solid transparent;
    transition: color 0.2s, border-color 0.2s;
}

.auth-tab.active {
    color: var(--blue);
    border-bottom-color: var(--blue);
}

.auth-body {
    padding: 1.75rem 2rem 2rem;
}

.auth-panel {
    display: none;
}

.auth-panel.active {
    display: block;
    animation: slideUp 0.25s ease;
}

.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.4rem;
}

.form-input {
    width: 100%;
    padding: 0.7rem 0.875rem;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.9rem;
    color: var(--text);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.1);
}

.form-input::placeholder {
    color: #9CA3AF;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.btn-auth {
    width: 100%;
    padding: 0.8rem;
    background: var(--blue);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    margin-top: 0.5rem;
    transition: background 0.2s;
}

.btn-auth:hover {
    background: var(--blue-dark);
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.25rem 0;
    color: var(--text-muted);
    font-size: 0.78rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.btn-google {
    width: 100%;
    padding: 0.75rem;
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--text);
    transition: background 0.2s;
}

.btn-google:hover {
    background: var(--bg);
}

.auth-footer-note {
    text-align: center;
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 1rem;
}

.auth-footer-note a {
    color: var(--blue);
    font-weight: 600;
    cursor: pointer;
}

/* ── DETAIL PANEL ── */
.detail-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 300;
    background: rgba(17, 24, 39, 0.45);
    backdrop-filter: blur(4px);
    justify-content: flex-end;
}

.detail-overlay.open {
    display: flex;
    animation: fadeIn 0.2s ease;
}

.detail-panel {
    width: 100%;
    max-width: 680px;
    height: 100%;
    background: var(--white);
    overflow-y: auto;
    animation: slideInRight 0.3s ease;
    box-shadow: -8px 0 40px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
}

.detail-close-bar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    background: var(--white);
    border-bottom: 1px solid var(--border);
}

.detail-close-btn {
    padding: 0.4rem 0.875rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 5px;
    transition: background 0.2s;
}

.detail-close-btn:hover {
    background: var(--border);
}

.detail-hero {
    height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    position: relative;
}

.detail-badges {
    position: absolute;
    top: 1rem;
    left: 1rem;
}

.detail-actions-top {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    gap: 8px;
}

.detail-action-btn {
    width: 38px;
    height: 38px;
    background: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    box-shadow: var(--shadow-md);
    cursor: pointer;
    border: none;
    transition: transform 0.15s;
}

.detail-action-btn:hover {
    transform: scale(1.1);
}

.detail-content {
    padding: 1.75rem 1.75rem 1rem;
    flex: 1;
}

.detail-price {
    font-size: 2rem;
    font-weight: 800;
    color: var(--blue);
    letter-spacing: -1px;
    margin-bottom: 0.3rem;
}

.detail-price-note {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

.detail-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0.75rem 0 0.4rem;
    line-height: 1.35;
}

.detail-loc {
    font-size: 0.875rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 500;
    margin-bottom: 1.25rem;
}

.detail-specs-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.detail-spec-box {
    background: var(--bg);
    border-radius: 10px;
    padding: 0.875rem;
    text-align: center;
}

.detail-spec-icon {
    font-size: 1.25rem;
    margin-bottom: 4px;
}

.detail-spec-val {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text);
}

.detail-spec-lbl {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.detail-section {
    margin-bottom: 1.5rem;
}

.detail-section-title {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.detail-section-title::before {
    content: '';
    width: 4px;
    height: 16px;
    background: var(--blue);
    border-radius: 2px;
}

.detail-desc {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.75;
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.detail-tag {
    padding: 0.3rem 0.75rem;
    background: var(--blue-light);
    color: var(--blue);
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
}

.detail-map {
    background: linear-gradient(135deg, #DBEAFE, #EDE9FE);
    border-radius: 12px;
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
    border: 1px solid var(--border);
}

.contact-box {
    margin: 0 1.75rem 1.75rem;
    background: var(--bg);
    border: 1.5px solid var(--border);
    border-radius: 14px;
    padding: 1.25rem;
}

.contact-agent {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1rem;
}

.agent-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--blue);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 700;
    flex-shrink: 0;
}

.agent-name {
    font-weight: 700;
    font-size: 0.95rem;
}

.agent-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.agent-rating {
    color: #F59E0B;
}

.contact-btns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.625rem;
}

.btn-call {
    padding: 0.7rem;
    background: var(--green);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: background 0.2s;
}

.btn-call:hover {
    background: #047857;
}

.btn-msg {
    padding: 0.7rem;
    background: var(--white);
    color: var(--blue);
    border: 1.5px solid var(--blue);
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: background 0.2s;
}

.btn-msg:hover {
    background: var(--blue-light);
}

/* ── TOAST ── */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #111827;
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 500;
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    white-space: nowrap;
    pointer-events: none;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ── ANIMATIONS ── */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── LISTING LIST (horizontal) ── */
.listings-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.listing-hcard {
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
    text-decoration: none;
    color: inherit;
}

.listing-hcard:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: #BFDBFE;
}

.listing-hcard .listing-img {
    width: 200px;
    min-width: 200px;
    height: 150px;
    flex-shrink: 0;
    border-radius: 0;
}

.listing-hcard .listing-body {
    flex: 1;
    padding: 1rem 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.listing-hcard .listing-body-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
}

.listing-hcard .listing-price {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--blue);
    letter-spacing: -0.5px;
    margin-bottom: 0;
}

.listing-hcard .listing-name {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0.3rem 0 0.3rem;
    line-height: 1.4;
    color: var(--text);
}

.listing-hcard .listing-time {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
    flex-shrink: 0;
}

.listing-hcard .listing-specs {
    border-top: none;
    padding-top: 0;
    margin-bottom: 0.5rem;
}

.listing-hcard .listing-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.5rem;
    padding-top: 0.625rem;
    border-top: 1px solid var(--border);
    gap: 10px;
}

.listing-hcard .listing-owner {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
}

.btn-contact {
    padding: 0.45rem 1rem;
    background: var(--green);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background 0.2s;
    text-decoration: none;
}

.btn-contact:hover {
    background: #047857;
}

@media (max-width: 600px) {
    .listing-hcard {
        flex-direction: column;
    }

    .listing-hcard .listing-img {
        width: 100%;
        min-width: unset;
        height: 180px;
    }
}

/* ══════════════════════════════════════════════════════
   FIX: VIP grid card wrapping links
   <a> mặc định là inline — phải set display:block để
   grid layout hoạt động đúng bên trong .listings-grid
══════════════════════════════════════════════════════ */
.listing-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.listing-card-link:hover .listing-card {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(26, 86, 219, 0.12);
}

/* Badge VIP */
.badge-hot {
    background: #e53935 !important;
    color: #fff !important;
}

.badge-vip {
    background: #f59e0b !important;
    color: #fff !important;
}

/* Viền tier màu */
.listing-card--hot {
    border: 2px solid #e53935 !important;
}

.listing-card--vip {
    border: 2px solid #f59e0b !important;
}
/* ── CATEGORY ROW (horizontal scroll) ── */
.cat-row {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    scrollbar-width: none;       /* Firefox */
    -ms-overflow-style: none;    /* IE */
}
.cat-row::-webkit-scrollbar { display: none; }

.cat-pill {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    padding: 1.1rem 1.25rem;
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: 16px;
    cursor: pointer;
    text-decoration: none;
    color: var(--text);
    flex-shrink: 0;
    min-width: 100px;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.cat-pill:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: #BFDBFE;
}

.cat-pill-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    transition: transform 0.2s;
}
.cat-pill:hover .cat-pill-icon {
    transform: scale(1.08);
}

.cat-pill-name {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text);
    text-align: center;
    white-space: nowrap;
}
