@import url('https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:wght@400;500;700&display=swap');

/* =========================================
   1. CORE & RESET (CẤU HÌNH CHUNG)
   ========================================= */
*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: 'Be Vietnam Pro', Arial, sans-serif;
    color: #333;
    line-height: 1.6;
    background-color: #f8f9fa;
    margin: 0; 
    padding: 70px 0 0 0; /* Chừa chỗ cho header cố định */
    overflow-x: hidden;
}

main {
    max-width: 1500px;
    margin: 20px auto;
    padding: 0 20px;
    min-height: 60vh;
}

a { text-decoration: none; color: inherit; transition: 0.2s; }
ul { list-style: none; padding: 0; margin: 0; }
button { cursor: pointer; font-family: inherit; }
img, video, iframe { max-width: 100%; height: auto; }

/* Tiện ích chống sao chép */
.copy-protection-enabled {
    -webkit-user-select: none; 
    -moz-user-select: none; 
    -ms-user-select: none; 
    user-select: none;
    -webkit-touch-callout: none;
}
.copy-protection-enabled img { pointer-events: none; }

/* =========================================
   2. HEADER & NAVIGATION
   ========================================= */
.site-header {
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    z-index: 2005;
    height: 70px;
    transition: transform 0.3s ease-in-out;
}

.site-header.header-hidden {
    transform: translateY(-100%);
    box-shadow: none;
}

.header-container {
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    max-width: 1200px; 
    margin: 0 auto; 
    height: 100%;
    padding: 0 20px; 
    position: relative;
}

.header-logo img { height: 50px; width: auto; display: block; }

#hero-btn-all1,
#hero-btn-all11 {
    display: none; /* Ẩn nút đăng tin mặc định trên Desktop */
}

/* Desktop Menu */
.header-nav.desktop-nav ul { display: flex; align-items: center; gap: 15px; }
.header-nav.desktop-nav a { font-weight: 500; padding: 10px; display: flex; align-items: center; gap: 5px; }
.header-nav.desktop-nav a:hover { color: #007bff; }

.nav-icon-link { display: flex; align-items: center; padding: 10px; }
.nav-icon-link i { font-size: 1.3rem; color: #555; transition: transform 0.2s, color 0.2s; }
.nav-icon-link:hover i { color: #ff5252; transform: scale(1.1); }

/* Dropdown Menu Chung */
.dropdown { position: relative; display: inline-block; }
.dropdown .dropdown-menu {
    display: block; 
    visibility: hidden; 
    opacity: 0; 
    pointer-events: none;
    position: absolute; 
    top: 100%; 
    left: 0; 
    min-width: 200px;
    background-color: #fff; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    border: 1px solid #eee; 
    border-radius: 0 0 6px 6px;
    z-index: 9999; 
    padding: 0;
    transition: all 0.2s ease-in-out; 
    transform: translateY(15px);
    flex-direction: column;
}
.dropdown:hover .dropdown-menu { visibility: visible; opacity: 1; pointer-events: auto; transform: translateY(0); }
.dropdown-menu li a { display: block; padding: 10px 15px; color: #333; border-bottom: 1px solid #f5f5f5; font-weight: normal; }
.dropdown-menu li:last-child a { border-bottom: none; }
.dropdown-menu li a:hover { background-color: #f0f8ff; color: #007bff; }

/* Mobile Actions (Ẩn mặc định trên Desktop) */
.mobile-header-actions, 
.mobile-menu-toggle,
.mobile-header-layout { display: none; }

@media screen and (min-width: 769px) {
    #mobile-menu,              
    #mobile-menu-overlay,      
    .mobile-hero-search,       
    .mobile-menu-toggle,       
    .mobile-header-actions,    
    .mobile-bottom-bar,        
    #mobile-back-btn           
    {
        display: none;      
        visibility: hidden; 
        opacity: 0;         
        pointer-events: none; 
        width: 0;           
        height: 0;          
        margin: 0;
        padding: 0;
        position: absolute; 
        top: -9999px;       
        left: -9999px;      
        z-index: -1;        
    }

    /* Logic Auth Desktop */
    .desktop-nav .auth-required,
    #user-dropdown .auth-required { display: none; }
    .desktop-nav .auth-guest,
    #user-dropdown .auth-guest { display: block; }

    body.logged-in .desktop-nav .auth-required,
    body.logged-in #user-dropdown .auth-required { display: flex; }
    body.logged-in #user-dropdown li.auth-required { display: block; }
    body.logged-in .desktop-nav .auth-guest,
    body.logged-in #user-dropdown .auth-guest { display: none; }
}

/* =========================================
   3. SEARCH BAR COMPONENTS
   ========================================= */
/* Desktop Search */
.header-search-wrapper { display: flex; align-items: center; margin-right: 15px; position: relative; }
.header-search-box {
    display: flex; align-items: center; background: #fff;
    border: 1px solid #007bff; border-radius: 20px;
    padding: 2px 5px 2px 15px; width: 250px; transition: width 0.3s;
}
.header-search-box:focus-within { width: 280px; box-shadow: 0 0 5px rgba(0,123,255,0.5); }
#header-keyword-input { border: none; outline: none; width: 100%; font-size: 14px; }
#header-search-action-btn { background: none; border: none; color: #007bff; padding: 6px 10px; }

/* Tooltip Search Hint */
.search-hint-tooltip {
    position: absolute; top: 100%; left: 0; right: 0; margin-top: 8px;
    background-color: #333; color: #fff; padding: 8px 12px;
    border-radius: 4px; font-size: 0.85em; z-index: 1000; text-align: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    opacity: 0; visibility: hidden; transform: translateY(-10px); transition: all 0.3s ease;
}
.search-hint-tooltip.active { opacity: 1; visibility: visible; transform: translateY(0); }
.search-hint-tooltip::before {
    content: ''; position: absolute; top: -6px; left: 50%; transform: translateX(-50%);
    border-left: 6px solid transparent; border-right: 6px solid transparent; border-bottom: 6px solid #333;
}

/* Mobile Search (Mặc định ẩn) */
.mobile-hero-search { display: none; }

/* Container bọc thanh tìm kiếm Modal */
.modal-search-trigger-container {
    display: flex;
    justify-content: center;
    padding: 15px 20px 5px; 
    width: 100%;
}

.modal-search-trigger {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 600px;
    padding: 12px 20px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 30px; 
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
    color: #666;
    font-size: 15px;
    outline: none;
}

.modal-search-trigger:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    border-color: #ccc;
}

.modal-search-trigger i.fa-search {
    color: #888;
    margin-right: 12px;
    font-size: 16px;
}

.modal-search-trigger span {
    flex-grow: 1;
    text-align: left;
    color: #888;
}

.modal-search-trigger .filter-icon {
    color: #007bff; 
    margin-left: 10px;
    font-size: 18px;
}

/* =========================================
   4. NOTIFICATIONS SYSTEM
   ========================================= */
.notification-wrapper { position: relative; display: inline-block; cursor: pointer; }
.notification-bell { font-size: 1.3rem; color: #333; padding: 5px; transition: color 0.3s; }
.notification-bell:hover { color: #007bff; }

.notification-badge {
    position: absolute; top: -5px; right: -5px;
    background-color: #ff5252; color: white; font-size: 0.75rem; font-weight: bold;
    padding: 2px 6px; border-radius: 10px; border: 2px solid #fff;
}

.notification-dropdown {
    display: none; position: absolute; top: 50px; right: -80px;
    width: 350px; background: white; border-radius: 8px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.2); z-index: 99999; border: 1px solid #eee;
    max-height: 400px; overflow-y: auto;
}
.notification-dropdown.active { display: block; animation: fadeInDown 0.2s ease; }

.notif-item {
    position: relative; padding: 15px 40px 15px 15px; border-bottom: 1px solid #f1f1f1;
    cursor: pointer; display: flex; gap: 12px; transition: background 0.2s; background-color: #fff;
}
.notif-item:hover { background-color: #f0f7ff; }
.notif-item.unread { background-color: #e6f2ff; }
.notif-icon { font-size: 1.1rem; margin-top: 2px; min-width: 20px; }
.notif-content h4 { margin: 0 0 4px 0; font-size: 0.95rem; }
.notif-content p { margin: 0; font-size: 0.85rem; color: #666; }
.btn-delete-notif {
    position: absolute; top: 50%; right: 10px; transform: translateY(-50%);
    width: 28px; height: 28px; border-radius: 50%; border: none; background: transparent;
    color: #ccc; display: flex; align-items: center; justify-content: center; transition: 0.2s;
}
.btn-delete-notif:hover { background-color: #ffebee; color: #d32f2f; }

/* =========================================
   5. UI COMPONENTS (MODAL, BUTTONS, PAGINATION)
   ========================================= */
.filter-modal-overlay, .modal-overlay {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.6); z-index: 2020; justify-content: center; align-items: center; padding: 15px;
}
.filter-modal-overlay.active { display: flex; }

.filter-modal-content, .modal-popup, .listing-popup-container {
    background: #fff; border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    width: 100%; max-width: 800px; max-height: 90vh; overflow-y: auto;
    padding: 25px; position: relative;
}
.modal-popup { max-width: 500px; text-align: center; }

.filter-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; }
.filter-control { height: 40px; padding: 0 10px; border: 1px solid #ccc; border-radius: 4px; width: 100%; }
.filter-actions { margin-top: 20px; padding-top: 15px; border-top: 1px solid #eee; display: flex; justify-content: flex-end; gap: 10px; }
#apply-filters-button { background: #28a745; color: white; padding: 10px 20px; border-radius: 4px; border: none; }

/* Multiselect Dropdown */
.multiselect-dropdown { position: relative; }
.dropdown-toggle {
    display: flex; justify-content: space-between; align-items: center; cursor: pointer;
    background: #fff; height: 40px; padding: 0 10px; border: 1px solid #ccc;
    border-radius: 4px; width: 100%; font-size: 14px;
}
.dropdown-options {
    display: none; position: absolute; top: 100%; left: 0; width: 100%;
    background: #fff; border: 1px solid #ccc; border-radius: 4px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.15); z-index: 2005; max-height: 250px; overflow-y: auto; margin-top: 2px;
}
.multiselect-dropdown.is-open .dropdown-options { display: block; }
.checkbox-label { display: flex; align-items: center; padding: 10px; cursor: pointer; border-bottom: 1px solid #f9f9f9; }
.checkbox-label:hover { background: #f1f1f1; }
.checkbox-label input { margin-right: 10px; transform: scale(1.2); }

/* Transaction Bar & Open Filter Btn */
.transaction-type-bar, .transaction-type-bar1 {
    background-color: #fff; padding: 15px 0; border-bottom: 1px solid #eee;
    text-align: center; box-shadow: 0 4px 6px -6px rgba(0,0,0,0.1); margin-bottom: 10px;
}
.trans-container, .trans-container1 { display: inline-flex; gap: 20px; justify-content: center; align-items: center; }

.trans-btn {
    display: flex; align-items: center; gap: 8px; padding: 10px 30px;
    border-radius: 30px; font-weight: 600; font-size: 16px; transition: all 0.3s ease; border: 2px solid transparent;
}
.trans-btn.btn-all { background-color: #f1f8e9; color: #2e7d32; }
.trans-btn.btn-rent { background-color: #e3f2fd; color: #1976d2; }
.trans-btn.btn-sale { background-color: #ffebee; color: #d32f2f; }
.trans-btn.active-mode { transform: scale(1.1); box-shadow: 0 0 10px rgba(0,0,0,0.2); font-weight: bold; border: 2px solid currentColor; opacity: 1; }

.open-filter-trigger-btn {
    display: block; width: 90%; max-width: 600px; margin: 15px auto; padding: 14px 20px;
    background-color: #007bff; color: white; border: none; border-radius: 50px;
    font-size: 1.1em; font-weight: bold; cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.4); position: sticky; top: 80px; z-index: 990;
}

/* Pagination */
#pagination-container { display: flex; justify-content: center; gap: 8px; margin: 30px 0; }
.pagination-btn {
    min-width: 40px; height: 40px; border: 1px solid #007bff; background: #fff; color: #007bff;
    border-radius: 8px; font-weight: 500; display: inline-flex; justify-content: center; align-items: center;
    transition: all 0.2s ease; font-size: 16px;
}
.pagination-btn:hover:not(.active) { background: #e6f2ff; border-color: #0056b3; }
.pagination-btn.active { background-color: #007bff; color: #fff; border-color: #007bff; pointer-events: none; font-weight: bold; }
.pagination-btn.disabled { color: #ccc; border-color: #eee; background: #f9f9f9; cursor: not-allowed; }

/* Breadcrumb & Running Text */
#dynamic-breadcrumb, #breadcrumb-container {
    font-size: 0.9em; color: #666; margin-bottom: 10px;
    white-space: nowrap; overflow-x: auto; overflow-y: hidden; width: 100%;
    padding-bottom: 5px; -webkit-overflow-scrolling: touch;
}
#dynamic-breadcrumb::-webkit-scrollbar, #breadcrumb-container::-webkit-scrollbar { height: 4px; }
#dynamic-breadcrumb::-webkit-scrollbar-thumb, #breadcrumb-container::-webkit-scrollbar-thumb { background: #ccc; border-radius: 4px; }

.running-text-container {
    width: 100%; background-color: #ffeb3b; overflow: hidden;
    position: relative; z-index: 2000; height: 40px; display: flex; align-items: center; border-bottom: 1px solid #ddd;
}
.running-text-wrapper { display: inline-block; white-space: nowrap; padding-left: 100%; animation: scroll-text 20s linear infinite; }
.running-link { color: #d32f2f; font-weight: bold; text-transform: uppercase; }

/* Back To Top */
#back-to-top-btn {
    display: none; position: fixed; bottom: 30px; right: 30px; z-index: 9999;
    background: #007bff; color: white; border: none; padding: 15px;
    border-radius: 50%; font-size: 18px; box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

/* =========================================
   6. LISTING CARDS
   ========================================= */
#data-container, .listing-preview-grid { display: grid; flex-direction: column; gap: 20px; }

.listing-card {
    background: #fff; border: 1px solid #e0e0e0; border-radius: 8px;
    display: flex; flex-direction: row;
    overflow: hidden; text-decoration: none; color: inherit;
    position: relative; transition: box-shadow 0.3s ease, transform 0.3s ease;
    gap: 15px; padding: 12px; height: auto; max-height: none;
}
.listing-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,0.12); transform: translateY(-2px); border-color: #007bff; }

/* KHUNG ẢNH */
.card-image-wrapper, .listing-card-image-container {
    flex: 0 0 180px;
    width: 180px;
    max-width: 180px;
    height: 135px;
    position: relative;
    background: transparent;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden; border-radius: 6px;
}

.card-image-wrapper img, .listing-card-image-container img {
    width: 100%; height: 100%;
    object-fit: cover; display: block;
    transition: transform 0.5s ease;
}

.listing-card:hover .card-image-wrapper img, 
.listing-card:hover .listing-card-image-container img { transform: scale(1.05); }

.listing-card-image-count {
    position: absolute; bottom: 10px; right: 10px; background: rgba(0,0,0,0.6);
    color: #fff; padding: 2px 8px; border-radius: 4px; font-size: 0.8rem; z-index: 2;
}

/* BADGES */
.card-badges {
    position: absolute; top: 6px; right: 6px; z-index: 2;
    display: flex; flex-direction: column; gap: 4px;
}

.badge-chip {
    white-space: nowrap; font-size: 0.68rem; padding: 2px 6px;
    border-radius: 3px; font-weight: 600; line-height: 1.2; display: inline-block;
}

.badge-vip {
    background: linear-gradient(135deg, #ff9800, #f57c00);
    color: #ffffff; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.badge-normal {
    background: rgba(0, 0, 0, 0.6); color: #ffffff;
}

/* PHẦN CHỮ & THÔNG TIN BÊN PHẢI */
.card-content, .listing-card-info {
    flex: 1; display: flex; flex-direction: column;
    justify-content: space-between; min-width: 0; padding: 0; position: relative;
}

.card-title, .listing-card-title {
    margin: 0 0 5px 0;
    color: #007bff;
    font-size: clamp(0.95rem, 1.5vw, 1.1rem);
    font-weight: 700;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-price, .listing-card-price { margin: 0; font-size: 1.2rem; color: #d9534f; font-weight: 700; }
.listing-card-type-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 5px 0; }

.property-type-chip, .listing-card-new-badge-inline, .listing-card-verified-badge-inline {
    display: inline-flex; align-items: center; padding: 4px 10px;
    border-radius: 6px; font-size: 0.8rem; font-weight: 600; white-space: nowrap;
}
.property-type-chip { background: #e3f2fd; color: #0d47a1; }
.listing-card-new-badge-inline { background: #ff5252; color: #fff; }
.listing-card-verified-badge-inline { background: #e8f5e9; color: #2e7d32; border: 1px solid #c8e6c9; }

.card-details, .listing-card-details { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 5px; }
.card-details span, .listing-card-details span {
    background-color: #f1f8ff; color: #0056b3; padding: 4px 8px;
    border-radius: 6px; font-size: 0.85rem; font-weight: 500; border: 1px solid #d0e7ff;
}
.listing-card-description {
    color: #555; font-size: 0.95rem; line-height: 1.5; margin-top: 10px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.listing-card-footer-date { margin-top: auto; padding-top: 10px; font-size: 0.85rem; color: #888; display: flex; align-items: center; gap: 5px; }

.listing-card-actions {
    position: absolute; top: 10px; right: 10px; z-index: 20;
    display: flex; flex-direction: column; gap: 8px;
}

.btn-action {
    width: 32px; height: 32px; border-radius: 50%; background: #fff;
    border: 1px solid #ddd; color: #777; display: flex;
    align-items: center; justify-content: center; cursor: pointer;
    font-size: 1rem; transition: all 0.2s ease; text-decoration: none;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.btn-action:hover { transform: scale(1.1); box-shadow: 0 4px 8px rgba(0,0,0,0.15); }
.btn-action.save-button:hover, .btn-action.save-button.saved { color: #ff5252; border-color: #ff5252; }
.btn-action.save-button.saved i { font-weight: 900; }
.btn-action.edit-button:hover { color: #007bff; border-color: #007bff; }
.btn-action.delete-button:hover { color: #d32f2f; border-color: #d32f2f; background-color: #ffebee; }

.btn-favorite {
    width: 36px; height: 36px; border-radius: 50%; background: #fff;
    border: 1px solid #ddd; color: #999; display: flex; align-items: center;
    justify-content: center; cursor: pointer; font-size: 1.1rem; transition: all 0.2s ease;
}
.btn-favorite:hover { color: #ff5252; border-color: #ff5252; transform: scale(1.1); }
.btn-favorite.saved i { font-weight: 900; color: #ff5252; }

/* GIAO DIỆN DESKTOP Bổ sung cho Card (>= 768px) */
@media (min-width: 768px) {
    .listing-card { flex-wrap: wrap; }
    .card-bottom-info { width: 100%; order: 1; margin-bottom: 5px; }
    .card-title { margin: 0 0 4px 0; font-size: 1.05rem; line-height: 1.3; }
    .card-address { margin: 0; font-size: 0.88rem; color: #666; }
    .card-right-info { flex: 1; display: flex; flex-direction: column; justify-content: space-between; min-width: 0; order: 3; }
    .card-details { font-size: 0.85rem; color: #555; }
    .card-footer { display: flex; justify-content: space-between; align-items: center; }
    .card-price { font-size: 1.15rem; }
    .card-meta { font-size: 0.8rem; color: #777; display: flex; gap: 10px; }
}

/* =========================================
   7. LISTING DETAIL PAGE (TRANG CHI TIẾT)
   ========================================= */
.detail-container { width: 100%; }
.detail-layout-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 30px; margin-top: 20px; }
.detail-left-column { min-width: 0; }
.detail-right-column { position: sticky; top: 90px; height: fit-content; }

/* Header & Breadcrumb Detail */
.detail-container .listing-header-main h1 { font-size: 1.8rem; color: #222; margin-bottom: 10px; line-height: 1.4; font-weight: 700; text-transform: capitalize; }
.detail-container .listing-address-row { color: #666; font-size: 1rem; margin-bottom: 20px; border-bottom: 1px solid #eee; padding-bottom: 15px; }

/* Gallery Detail */
.detail-container .main-image-wrapper { 
    position: relative; width: 100%; aspect-ratio: 16/9; 
    background: #f0f0f0; border-radius: 8px; overflow: hidden; border: 1px solid #ddd; margin-bottom: 10px; 
}
.detail-container #main-image { width: 100%; height: 100%; object-fit: contain; background-color: #000; }
.detail-container .thumbnail-strip { display: flex; gap: 10px; overflow-x: auto; padding: 5px 0 10px; }
.detail-container .thumbnail-image {
    width: 90px; height: 65px; object-fit: cover; border-radius: 4px;
    border: 2px solid #fff; cursor: pointer; flex-shrink: 0; opacity: 0.7; transition: 0.2s;
}
.detail-container .thumbnail-image.active, .detail-container .thumbnail-image:hover { border-color: #007bff; opacity: 1; }

/* Price Action Bar */
.detail-container .price-action-bar {
    display: flex; justify-content: space-between; align-items: center;
    background: #fff; padding: 15px 20px; border-radius: 8px; margin-bottom: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05); border: 1px solid #eee;
}
.detail-container .price-box .price-value { font-size: 1.6rem; font-weight: 800; color: #d9534f; }
.detail-container .action-box { display: flex; gap: 10px; }
.detail-container .action-button {
    background: #fff; border: 1px solid #ddd; padding: 8px 15px;
    border-radius: 6px; font-weight: 500; color: #555; display: flex; align-items: center; gap: 5px;
}
.detail-container .action-button:hover { background: #f8f9fa; color: #007bff; border-color: #007bff; }

/* Specs & Description */
.detail-section { margin-bottom: 30px; }
.detail-section h3 { font-size: 1.3rem; color: #333; border-left: 4px solid #007bff; padding-left: 10px; margin-bottom: 20px; font-weight: 700; }
.detail-container .specs-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; }
.detail-container .spec-item { display: flex; flex-direction: column; padding: 12px; background: #f9f9f9; border-radius: 6px; border: 1px solid #eee; }
.detail-container .spec-label { font-size: 0.85rem; color: #777; margin-bottom: 5px; }
.detail-container .spec-value { font-size: 1rem; font-weight: 600; color: #333; }
.detail-container .description-content { font-size: 1rem; line-height: 1.8; color: #444; text-align: justify; }

/* Sidebar Contact */
.detail-container .contact-box { background: #fff; padding: 20px; border-radius: 8px; border: 1px solid #e0e0e0; box-shadow: 0 4px 12px rgba(0,0,0,0.05); text-align: center;}
.detail-container #show-contact-button {
    width: 100%; padding: 12px; background: linear-gradient(135deg, #28a745, #218838);
    color: white; font-weight: bold; font-size: 1.1rem; border: none; border-radius: 6px;
    box-shadow: 0 4px 6px rgba(40, 167, 69, 0.3); transition: transform 0.2s; margin-top: 10px;
}
.detail-container #show-contact-button:hover { transform: translateY(-2px); }

/* Related Listings */
#related-listings-section {
    position: relative;
    padding: 20px 20px 0 20px;
    margin-top: 40px;
    border-top: 1px solid #eee;
}

#related-listings-container {
    display: flex;
    flex-wrap: nowrap;
    gap: 15px;
    overflow-x: auto;
    scroll-behavior: auto;
    padding-bottom: 10px;
    scrollbar-width: none; 
    -ms-overflow-style: none; 
}
#related-listings-container::-webkit-scrollbar { display: none; }

#related-listings-container .listing-card {
    flex: 0 0 calc(25% - 12px); 
    max-width: 280px;
    flex-direction: column; 
    height: 100%;
    border: 1px solid #eee;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    background: #fff;
    border-radius: 8px;
    padding: 0;
}

#related-listings-container .listing-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

#related-listings-container .listing-card-image-container {
    width: 100%;
    max-width: 100%;
    height: 160px;
    flex: none;
}
#related-listings-container .listing-card-image-container img {
    width: 100%; height: 100%; object-fit: cover;
}

#related-listings-container .listing-card-info { padding: 10px; display: flex; flex-direction: column; gap: 5px; }
#related-listings-container .listing-card-title { font-size: 0.95rem; font-weight: 600; line-height: 1.3; height: 2.6em; overflow: hidden; margin-bottom: 2px; }
#related-listings-container .listing-card-price { font-size: 1.1rem; color: #d9534f; font-weight: bold; }
#related-listings-container .listing-card-description, 
#related-listings-container .listing-card-type-row { display: none; }

#related-listings-container .listing-card-footer-date {
    display: flex; align-items: center; gap: 5px;
    font-size: 0.75rem; color: #888; margin-top: auto; padding-top: 5px;
}

#related-listings-container .listing-card-details { margin-top: auto; gap: 5px; }
#related-listings-container .listing-card-details span { font-size: 0.8rem; padding: 2px 6px; background: #f1f1f1; border: none; color: #555; }

.related-nav-btn {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 40px; height: 40px; border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.9); border: 1px solid #ddd;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15); color: #333; font-size: 1.2rem;
    cursor: pointer; z-index: 10; display: flex; align-items: center; justify-content: center; transition: all 0.2s;
}
.related-nav-btn:hover { background-color: #fff; color: #007bff; box-shadow: 0 4px 10px rgba(0,0,0,0.2); }
#related-prev-btn { left: -10px; }
#related-next-btn { right: -10px; }

#related-listings-container .listing-card-actions,       
#related-listings-container .item-actions-admin,         
#related-listings-container .listing-card-new-badge-inline, 
#related-listings-container .listing-card-verified-badge-inline { display: none; }

/* =========================================
   8. STYLE CHO GOOGLE MAP & ADDRESS ACTION
   ========================================= */
.listing-address-row {
    cursor: pointer; transition: color 0.2s, background 0.2s;
    border-radius: 4px; padding: 5px; display: inline-flex; align-items: center; gap: 8px;
}
.listing-address-row:hover { background-color: #f0f8ff; color: #007bff; }

.map-marker-icon { color: #d9534f; font-size: 1.2rem; animation: bounce 2s infinite; }

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {transform: translateY(0);}
    40% {transform: translateY(-5px);}
    60% {transform: translateY(-3px);}
}

.map-section { margin-bottom: 30px; border-top: 1px solid #eee; padding-top: 20px; }
.map-container {
    width: 100%; height: 400px; border-radius: 8px; overflow: hidden;
    border: 1px solid #ddd; box-shadow: 0 4px 10px rgba(0,0,0,0.05); background: #f9f9f9; position: relative;
}
.map-container iframe { width: 100%; height: 100%; border: 0; }

.map-header { font-size: 1.3rem; color: #333; border-left: 4px solid #28a745; padding-left: 10px; margin-bottom: 15px; font-weight: 700; }
.map-utilities-container { margin-top: 15px; }
.map-utilities-label { font-size: 0.95rem; color: #333; margin-bottom: 10px; font-weight: 600; }
.utility-chips-wrapper { display: flex; flex-wrap: wrap; gap: 10px; }

.utility-chip {
    display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px;
    border-radius: 20px; border: 1px solid #e0e0e0; background-color: #fff;
    color: #555; font-size: 0.9rem; cursor: pointer; transition: all 0.2s ease; user-select: none;
}
.utility-chip i { font-size: 1rem; color: #777; }
.utility-chip:hover { background-color: #f5f5f5; border-color: #d0d0d0; }
.utility-chip.active { background-color: #e3f2fd; color: #0d47a1; border-color: #2196f3; font-weight: 500; }
.utility-chip.active i { color: #0d47a1; }

.map-modal-overlay {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.85); z-index: 99999;
    justify-content: center; align-items: center; padding: 20px; animation: fadeIn 0.3s ease;
}
.map-modal-content {
    position: relative; width: 95%; height: 90%; max-width: 1200px;
    background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 5px 25px rgba(0,0,0,0.5);
}
.map-modal-content iframe { width: 100%; height: 100%; border: none; }

.close-map-btn {
    position: absolute; top: 15px; right: 15px; background: #fff; color: #333;
    border: none; border-radius: 50%; width: 40px; height: 40px; font-size: 24px;
    cursor: pointer; box-shadow: 0 2px 10px rgba(0,0,0,0.2); display: flex; justify-content: center; align-items: center; transition: all 0.2s;
}
.close-map-btn:hover { background: #ff5252; color: white; transform: rotate(90deg); }

.expand-map-btn {
    position: absolute; bottom: 15px; right: 15px; background: #fff;
    border: 1px solid #ddd; padding: 8px 15px; border-radius: 20px; font-weight: 600;
    cursor: pointer; box-shadow: 0 2px 5px rgba(0,0,0,0.1); transition: 0.2s; z-index: 10;
    display: flex; align-items: center; gap: 5px;
}
.expand-map-btn:hover { background: #007bff; color: white; border-color: #007bff; }

/* =========================================
   9. ANIMATIONS & HOTLINE STYLES
   ========================================= */
@keyframes scroll-text { 0% { transform: translateX(0); } 100% { transform: translateX(-100%); } }
@keyframes fadeInDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes phone-ring-shake {
    0% { transform: rotate(0deg); }
    10% { transform: rotate(15deg); }
    20% { transform: rotate(-15deg); }
    30% { transform: rotate(15deg); }
    40% { transform: rotate(-15deg); }
    50% { transform: rotate(0deg); }
    100% { transform: rotate(0deg); }
}

.show-info-button.hotline-mode {
    background-color: #007bff; 
    color: #fff;
    border: none;
    font-weight: bold;
    font-size: 1.2rem;
}
.show-info-button.hotline-mode i {
    animation: phone-ring-shake 1.5s infinite ease-in-out;
    display: inline-block;
}

.desktop-guest-note { text-align: center; margin-top: 10px; font-size: 0.9rem; color: #666; }
.desktop-guest-note a { color: #007bff; text-decoration: none; }
.desktop-guest-note a:hover { text-decoration: underline; }

/* =========================================
   10. LAYOUT 3 CỘT DESKTOP & SIDEBAR VIP
   ========================================= */
.homepage-layout-3col {
    display: flex; gap: 20px; max-width: 1300px; margin: 20px auto; padding: 0 15px; align-items: flex-start;
}

.sticky-ads-wrapper { position: sticky; top: 80px; display: flex; flex-direction: column; gap: 15px; }

/* Cột quảng cáo bên trái dành cho Desktop */
.sidebar-left-ads {
    flex: 0 0 260px;
    width: 260px;
    max-width: 260px;
    box-sizing: border-box;
    position: sticky;
    top: 80px;
}

.ad-banner-item {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 10px;
    overflow: hidden;
}

.ad-banner-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.ad-banner-item img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    border-radius: 10px;
}
.main-content-center { flex: 1; min-width: 0; }

.sidebar-right-vip {
    flex: 0 0 350px; width: 350px; position: sticky; top: 80px;
}
.vip-widget-container {
    background: #fff; border: 1px solid #ffe0b2; border-radius: 10px; padding: 12px; box-shadow: 0 4px 12px rgba(255, 152, 0, 0.08);
}
.vip-widget-header {
    font-size: 1.05rem; font-weight: 700; color: #d84315; margin: 0 0 12px 0; padding-bottom: 8px;
    border-bottom: 2px solid #ffe0b2; display: flex; align-items: center; gap: 8px;
}

.vip-scroll-viewport { height: calc(100vh - 150px); overflow: hidden; position: relative; }
.vip-scroll-track { display: flex; flex-direction: column; gap: 12px; transition: transform 0.5s ease-in-out; }

.vip-card-mini {
    background: #fffdf5; border: 1px solid #ffe58f; border-left: 4px solid #ff9800;
    border-radius: 8px; padding: 12px; display: flex; gap: 12px; text-decoration: none; color: #333;
}
.vip-card-mini:hover { transform: translateY(-2px); box-shadow: 0 4px 8px rgba(0,0,0,0.1); }
.vip-card-mini .vip-img-box { width: 110px; height: 90px; flex-shrink: 0; border-radius: 6px; overflow: hidden; position: relative; }
.vip-card-mini .vip-img-box img { width: 100%; height: 100%; object-fit: cover; }
.vip-card-mini .vip-info-box { flex: 1; min-width: 0; }
.vip-card-mini .vip-title { font-size: 0.95rem; font-weight: 700; color: #222; line-height: 1.35; margin: 0 0 4px 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.vip-card-mini .vip-price { font-size: 1.05rem; color: #d32f2f; font-weight: bold; }
.vip-card-mini .vip-location { font-size: 0.75rem; color: #777; }

/* =========================================
   11. RESPONSIVE / MOBILE STYLES (MAX-WIDTH: 768PX)
   ========================================= */
.mobile-bottom-bar {
    position: fixed; bottom: 0; left: 0; width: 100%; height: 70px;
    background: #fff; box-shadow: 0 -2px 10px rgba(0,0,0,0.1); z-index: 9999;
    display: none; padding: 10px 15px; justify-content: space-between; align-items: center; box-sizing: border-box;
}
.mobile-bar-left { display: flex; gap: 20px; }
.mobile-action-btn { background: none; border: none; display: flex; flex-direction: column; align-items: center; font-size: 0.75rem; color: #555; gap: 4px; }
.mobile-action-btn i { font-size: 1.2rem; color: #333; }
.mobile-action-btn.saved i, .mobile-action-btn.saved span { color: #ff5252; font-weight: 900; }
.mobile-bar-right { flex: 1; display: flex; justify-content: flex-end; padding-left: 20px; align-items: center; flex-direction: column; }
.mobile-contact-btn {
    background: #007bff; color: white; border: none; border-radius: 8px;
    padding: 10px 20px; font-size: 1rem; font-weight: bold; width: 100%; max-width: 300px;
    display: flex; align-items: center; justify-content: center; gap: 8px; box-shadow: 0 4px 6px rgba(0, 123, 255, 0.3);
}
.mobile-contact-btn.is-calling { background: #28a745; text-decoration: none; }

.close-ad-btn { display: none; }

@media (max-width: 1024px) {
    .sidebar-left-ads { display: none; }
}

@media (max-width: 768px) {
    body { padding-top: 155px; padding-bottom: 80px; }

    /* Site Header Mobile */
    .site-header { height: auto; min-height: 70px; display: flex; flex-direction: column; }
    .site-header.header-hidden { transform: translateY(-100%); }
    .header-container { height: 60px; border-bottom: 1px solid #f1f1f1; display: flex; justify-content: space-between; align-items: center; width: 100%; padding: 0 15px; position: relative; }
    .header-nav.desktop-nav, .header-search-wrapper, .desktop-only-header { display: none; }
    
    .mobile-menu-toggle { display: flex; z-index: 20; flex: 0 0 auto; }
    #mobile-menu-button { background: #fff; border: 1px solid #ccc; border-radius: 4px; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; color: #333; font-size: 1.2rem; cursor: pointer; }
    
    .header-logo {
        position: absolute;
        left: 40%;
        top: 50%;
        transform: translate(-50%, -50%);
        z-index: 10;
        margin: 0;
        width: auto;
        display: flex;
        align-items: center;
        gap: 18px;
    }
    .header-logo img { height: 40px; width: auto; display: block; gap: 15px; }
    
    #hero-btn-all1 {
        display: inline-flex;
        align-items: center;
        gap: 5px;
        padding: 5px 10px;
        font-size: 0.75rem;
        border-radius: 20px;
        white-space: nowrap;
        background-color: #e8f5e9;
        color: #2e7d32;
        font-weight: 600;
        border: 1px solid #c8e6c9;
        text-decoration: none;
    }
    #hero-btn-all1 i { font-size: 0.7rem; }

    .mobile-header-actions {
        display: flex;
        align-items: center;
        gap: 10px;
        position: relative;
        z-index: 2010;
        flex: 0 0 auto;
    }

    .mobile-user-avatar {
        position: relative;
        width: 34px;
        height: 34px;
        border-radius: 50%;
        background-color: #007bff;
        color: white;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: bold;
        cursor: pointer;
        z-index: 2011;
    }

    /* DROPDOWN MENU AVATAR MOBILE */
    .mobile-user-avatar .dropdown-menu,
    .mobile-user-dropdown {
        display: none;
        position: absolute;
        top: 42px;
        right: 0;
        width: 180px;
        background: #ffffff;
        border: 1px solid #e0e0e0;
        border-radius: 8px;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
        padding: 6px 0;
        z-index: 99999;
    }

    .mobile-user-avatar.active .dropdown-menu,
    .mobile-user-avatar.active .mobile-user-dropdown,
    .mobile-user-dropdown.active {
        display: block;
        animation: fadeInDown 0.2s ease;
    }

    .mobile-user-dropdown a, 
    .mobile-user-avatar .dropdown-menu a {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 10px 15px;
        color: #333;
        font-size: 0.85rem;
        text-decoration: none;
        border-bottom: 1px solid #f5f5f5;
    }

    .mobile-user-dropdown a:hover { background-color: #f0f7ff; color: #007bff; }
    
    /* Header layout 3 dòng */
    .mobile-header-layout {
        display: flex;
        flex-direction: column;
        width: 100%;
        padding: 6px 12px 8px 12px;
        gap: 6px;
    }

    .mobile-header-row.row-1 {
        display: flex;
        align-items: center;
        justify-content: space-between;
        height: 44px;
        width: 100%;
    }

    .mobile-logo-box img { height: 32px; width: auto; display: block; }

    #mobile-hero-post-btn {
        display: inline-flex;
        align-items: center;
        gap: 4px;
        padding: 5px 10px;
        font-size: 0.75rem;
        border-radius: 20px;
        white-space: nowrap;
        background-color: #e8f5e9;
        color: #2e7d32;
        font-weight: bold;
        border: 1px solid #c8e6c9;
        text-decoration: none;
    }

    .mobile-header-row.row-2 {
        border-top: 1px dashed #eee;
        border-bottom: 1px dashed #eee;
        padding: 6px 0;
        margin: 2px 0;
    }

    .mobile-shortcut-bar {
        display: flex;
        align-items: center;
        justify-content: space-around;
        width: 100%;
        overflow-x: auto;
        white-space: nowrap;
    }

    .shortcut-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-decoration: none;
        color: #444;
        font-size: 0.7rem;
        gap: 3px;
        cursor: pointer;
        padding: 2px 8px;
    }

    .shortcut-item i { font-size: 1.1rem; }
    .shortcut-item .icon-heart { color: #ff5252; }
    .shortcut-item .icon-bell { color: #f59e0b; }
    .shortcut-item .icon-tasks { color: #0284c7; }

    .mobile-header-row.row-3 { width: 100%; }

    .mobile-user-top-right .mobile-user-avatar,
    .mobile-user-top-right .auth-required,
    .mobile-user-avatar { display: none; }

    .mobile-user-top-right .mobile-login-link,
    .mobile-user-top-right .auth-guest { display: inline-flex; }

    body.logged-in .mobile-user-top-right .mobile-user-avatar,
    body.logged-in .mobile-user-top-right .auth-required,
    body.logged-in .mobile-user-avatar { display: flex; }

    body.logged-in .mobile-user-top-right .mobile-login-link,
    body.logged-in .mobile-user-top-right .auth-guest { display: none; }

    .mobile-user-top-right {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        min-width: 65px;
        height: 100%;
    }

    .mobile-hero-search { display: block; width: 100%; padding: 0; background-color: #fff; position: static; transform: none; }
    .mobile-search-box { display: flex; align-items: center; width: 100%; height: 38px; background: #f5f5f5; border: 1px solid #ddd; border-radius: 6px; overflow: hidden; }
    #mobile-back-btn { background: transparent; border: none; padding: 0 12px; color: #666; font-size: 1.2rem; display: flex; align-items: center; }
    #mobile-keyword-input { flex: 1; background: transparent; border: none; height: 100%; font-size: 0.88rem; padding-left: 5px; outline: none; }
    #mobile-search-action-btn { width: 50px; height: 100%; background: #007bff; color: #fff; border: none; border-radius: 0; font-size: 1.2rem; display: flex; align-items: center; justify-content: center; margin: 0; }
    
    /* Menu Drawer Mobile */
    #mobile-menu { position: fixed; top: 0; left: -280px; width: 250px; height: 100%; background: #fff; z-index: 10002; transition: left 0.3s ease; padding: 60px 20px 20px; box-shadow: 2px 0 10px rgba(0,0,0,0.2); }
    #mobile-menu.is-open { left: 0; }
    #mobile-menu-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 1001; opacity: 0; visibility: hidden; transition: 0.3s; }
    #mobile-menu-overlay.is-open { opacity: 1; visibility: visible; }
    #mobile-menu-close-button { position: absolute; top: 10px; right: 15px; font-size: 2em; background: none; border: none; }

    /* Filter & Trans bar Mobile */
    .filter-grid { grid-template-columns: 1fr; }
    .transaction-type-bar { padding: 10px 0; overflow-x: hidden; width: 100%; background: #fff; }
    .trans-container { display: flex; width: 100%; justify-content: space-between; align-items: center; padding: 0 15px; gap: 10px; }
    .trans-btn { flex: 1; display: flex; align-items: center; justify-content: center; padding: 8px 5px; font-size: 0.9rem; white-space: nowrap; border-radius: 30px; gap: 5px; }
    .trans-btn i { font-size: 1rem; }
    
    /* Listing Cards trên Mobile */
    .listing-card {
        display: flex;
        flex-direction: column;
        padding: 10px;
        gap: 8px;
        background: #fff;
        border: 1px solid #e0e0e0;
        border-radius: 8px;
    }

    .mobile-row-top {
        display: flex;
        flex-direction: row;
        align-items: stretch;
        gap: 10px;
        width: 100%;
    }

    .card-image-wrapper, .listing-card-image-container {
        width: 105px;
        height: 105px;
        flex: 0 0 105px;
        max-width: 105px;
        position: relative;
        border-radius: 6px;
        overflow: hidden;
        background: transparent;
    }

    .card-image-wrapper img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

    .mobile-right-info {
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        min-width: 0;
    }

    .mobile-right-info .card-price {
        font-size: 1.05rem;
        font-weight: bold;
        color: #d9534f;
        line-height: 1.2;
        margin: 0;
    }

    .mobile-right-info .card-meta {
        font-size: 0.72rem;
        color: #777;
        display: flex;
        gap: 8px;
        align-items: center;
        margin: 2px 0;
    }

    .mobile-right-info .card-details {
        display: flex;
        flex-wrap: wrap;
        gap: 4px;
        margin: 0;
    }

    .mobile-right-info .card-details span {
        background: #f0f7ff;
        color: #007bff;
        padding: 2px 5px;
        border-radius: 4px;
        border: 1px solid #d0e5ff;
        font-size: 0.72rem;
        white-space: nowrap;
    }

    .mobile-row-bottom {
        width: 100%;
        border-top: 1px dashed #eee;
        padding-top: 6px;
        margin-top: 2px;
    }

    .mobile-row-bottom .card-title {
        font-size: 0.88rem;
        line-height: 1.3;
        margin: 0 0 3px 0;
        font-weight: 600;
    }

    .mobile-row-bottom .card-title a { color: #007bff; text-decoration: none; }
    .mobile-row-bottom .card-address { font-size: 0.75rem; color: #666; margin: 0; line-height: 1.25; }

    .card-badges { position: absolute; top: 4px; left: 4px; z-index: 2; }
    .badge-chip { white-space: nowrap; font-size: 0.65rem; padding: 2px 5px; border-radius: 3px; font-weight: bold; display: inline-block; line-height: 1; }
    .badge-vip { background: #ffc107; color: #000; }
    .badge-normal { background: rgba(0, 0, 0, 0.6); color: #fff; }

    .card-title, .listing-card-title { font-size: 0.9rem; }
    .card-price, .listing-card-price { font-size: 0.95rem; }
    .card-details, .listing-card-details { font-size: 0.78rem; gap: 5px; }
    .listing-card-info { padding: 0; }
    .listing-card-actions { top: 5px; right: 5px; }

    /* Trang chi tiết Mobile */
    .detail-layout-grid { grid-template-columns: 1fr; display: block; }
    .detail-right-column { position: static; margin-top: 20px; }
    .detail-container .listing-header-main h1 { font-size: 0.9rem; word-wrap: break-word; }
    .detail-container .listing-address-row { color: #666; font-size: 0.65rem; margin-bottom: 20px; border-bottom: 1px solid #eee; padding-bottom: 15px; }
    .detail-section h3 { font-size: 0.9rem; color: #333; border-left: 4px solid #007bff; padding-left: 10px; margin-bottom: 20px; font-weight: 700; }
    .detail-container .description-content { font-size: 0.9rem; line-height: 1.1; color: #444; text-align: justify; }
    .detail-container #main-image { width: 100%; height: 100%; object-fit: contain; background-color: #000; }

    .detail-container .main-image-wrapper { aspect-ratio: 4/3; border-radius: 0; margin-left: -20px; margin-right: -20px; width: calc(100% + 40px); border: none; max-height: 200px; }
    .detail-container .specs-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .detail-container .spec-item { padding: 8px; }
    .detail-container .price-action-bar { display: flex; justify-content: space-between; align-items: center; padding: 0; background: #fff; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.05); border: 1px solid #eee; }
    .detail-container .price-box .price-value { font-size: 1rem; font-weight: 800; color: #d9534f; }
    .detail-container .contact-box { display: none; }
    
    .mobile-bottom-bar { display: flex; }

    .homepage-layout-3col { flex-direction: column; padding: 0 10px; }
    .sidebar-right-vip { display: none; }
    .main-content-center { width: 100%; }

    #related-listings-section { padding: 0 5px; }
    #related-listings-container { gap: 10px; }
    #related-listings-container .listing-card { flex: 0 0 calc(50% - 5px); max-width: none; }
    #related-listings-container .listing-card-image-container { height: 120px; }
    #related-listings-container .listing-card-title { font-size: 0.85rem; }
    #related-listings-container .listing-card-price { font-size: 0.95rem; }
    .related-nav-btn, #detail-save-button, #share-listing-btn { display: none; }

    /* Sticky Footer Banner Ads trên Mobile - GHI ĐÈ BẮT BUỘC ĐỂ KHÔNG BỊ ĂN THEO DESKTOP */
    .sidebar-left-ads {
        display: block !important;
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        top: auto !important;
        flex: none !important;
        width: 100% !important;
        max-width: 100% !important;
        height: 140px !important;
        max-height: 140px !important;
        z-index: 9998 !important;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(5px);
        box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.15);
        border-top: 2px solid #007bff;
        padding: 6px 0 !important;
        box-sizing: border-box;
        transition: transform 0.3s ease-in-out;
        transform: translateY(100%);
        overflow: hidden;
    }

    .sidebar-left-ads.is-visible { transform: translateY(0) !important; }

    .sticky-ads-wrapper {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: flex-start !important;
        height: 100% !important;
        width: 100% !important;
        gap: 0 !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
    }

    .sticky-ads-wrapper::-webkit-scrollbar { display: none; }

    .ad-banner-item.landscape-item { flex: 0 0 100%; width: 100%; scroll-snap-align: start; }
    .ad-banner-item.portrait-item { flex: 0 0 auto; height: 100%; scroll-snap-align: center; }

    .ad-banner-item {
        flex: 0 0 100% !important;
        width: 100% !important;
        min-width: 100% !important;
        height: 100% !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        position: relative !important;
        border-radius: 0 !important;
        overflow: hidden !important;
        scroll-snap-align: start !important;
    }

    .ad-banner-item img, 
    .ad-banner-item video {
        max-height: 125px !important;
        height: auto !important;
        width: 100% !important;
        object-fit: contain !important;
        border-radius: 6px;
        display: block;
        position: relative;
        z-index: 2;
    }

    .portrait-item .blur-bg {
        position: absolute;
        top: 0; left: 0; width: 100%; height: 100%;
        object-fit: cover;
        filter: blur(12px) brightness(0.7);
        transform: scale(1.2);
        z-index: 1;
    }

    #back-to-top-btn { bottom: 155px; z-index: 9999; }

    .close-ad-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        position: absolute;
        top: -12px;
        right: 10px;
        width: 26px;
        height: 26px;
        background: #333;
        color: #fff;
        border: 2px solid #fff;
        border-radius: 50%;
        font-size: 16px;
        line-height: 1;
        cursor: pointer;
        z-index: 9999;
        box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    }
}

@media (max-width: 375px) {
    .detail-container .specs-grid { grid-template-columns: 1fr; }
}

.chat-badge {
    position: absolute;
    top: -5px;
    right: -8px;
    background-color: #ef4444;
    color: white;
    font-size: 11px;
    font-weight: bold;
    padding: 2px 5px;
    border-radius: 10px;
    min-width: 16px;
    text-align: center;
    line-height: 1;
}