/*
Theme Name: Căn hộ Phú Mỹ Hưng
Theme URI: https://chothuecanhoquan7.com
Author: ARop Le
Author URI: https://chothuecanhoquan7.com
Description: Giao diện dành cho dự án BĐS Quận 7.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: Căn hộ Phú Mỹ Hưng
Template: flatsome
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* ==========================================================================
   1. GLOBAL VARIABLES (HỆ THỐNG BIẾN TOÀN CỤC)
   ========================================================================== */
:root {
    /* Typography */
    --font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

    /* Brand Colors */
    --brand-50: #eff6ff;
    --brand-100: #dbeafe;
    --brand-200: #bfdbfe;
    --brand-400: #60a5fa;
    --brand-500: #3b82f6;
    --brand-600: #2563eb;
    --brand-700: #1d4ed8;
    --brand-900: #1e3a8a;
    --brand-main: #2563eb;
    --brand-hover: #1d4ed8;
    --brand-light: #eff6ff;

    /* Semantic & Functional Colors */
    --primary: #1e3a8a;
    --primary-hover: #1e40af;
    --accent: #ea580c;
    --accent-light: #fff7ed;
    --danger: #ef4444;
    --success: #10b981;
    --warning: #f59e0b;
    --color-sale: #ef4444;
    --color-rent: #10b981;
    --color-star: #f59e0b;

    /* Emerald */
    --emerald-50: #ecfdf5;
    --emerald-100: #d1fae5;
    --emerald-200: #a7f3d0;
    --emerald-500: #10b981;
    --emerald-600: #059669;

    /* Red */
    --red-50: #fef2f2;
    --red-100: #fee2e2;
    --red-400: #f87171;
    --red-500: #ef4444;
    --red-600: #dc2626;

    /* Yellow */
    --yellow-50: #fefce8;
    --yellow-100: #fef9c3;
    --yellow-200: #fef08a;
    --yellow-300: #fde047;
    --yellow-400: #facc15;
    --yellow-600: #ca8a04;
    --yellow-700: #a16207;

    /* Purple */
    --purple-100: #f3e8ff;
    --purple-600: #9333ea;

    /* Grayscale */
    --white: #ffffff;
    --gray-50: #f8fafc;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;

    /* UI & Layout Colors */
    --bg-page: #f8fafc;
    --surface: #ffffff;
    --text-dark: #0f172a;
    --text-body: #334155;
    --text-muted: #64748b;
    --text-main: #1f2937;
    --bg-body: #f8fafc;
    --bg-white: #ffffff;
    --border-color: #e5e7eb;
    --border-light: #e2e8f0;
    --ft-bg: #0f172a;

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-2xl: 24px;
    --border-radius-lg: 0.75rem;
    --border-radius-xl: 1rem;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-soft: 0 10px 40px -10px rgba(0, 0, 0, 0.05);

    --primary: #1d4ed8;
    --primary-light: #eff6ff;
    --secondary: #0f172a;
    --accent: #f59e0b;
    --text-main: #334155;
    --text-muted: #64748b;
    --bg-gray: #f8fafc;
    --border-color: #e2e8f0;
    --radius: 12px;
    --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);   

    /* Animation */
    --transition: all 0.3s ease;
}
/* ==========================================================================
   2. CSS BASE & RESET
   ========================================================================== */
* { 
    box-sizing: border-box; 
}

body {
    background-color: var(--gray-50);
    color: var(--gray-800);
    font-family: var(--font-sans);
    margin: 0;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

a { 
    text-decoration: none; 
    color: inherit;
}

ul { 
    list-style: none; 
    padding: 0; 
    margin: 0; 
}

/* Utility classes */
.hide-scrollbar::-webkit-scrollbar { display: none; }
.hide-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }


/* ==========================================================================
   3. CSS HEADER (Chuyển đổi từ Tailwind)
   ========================================================================== */
.top-bar {
    display: none;
    background-color: var(--brand-900);
    color: var(--white);
    font-size: 13px;
    padding: 0.5rem 0;
}
@media (min-width: 768px) {
    .top-bar { display: block; }
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

.top-bar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar-left, .top-bar-right {
    display: flex;
    align-items: center;
}

.top-bar-left { gap: 1.5rem; opacity: 0.9; font-weight: 500; }
.top-bar-right { gap: 1rem; font-weight: 600; color: var(--brand-100); }
.top-bar i { margin-right: 0.5rem; }
.text-brand-400 { color: var(--brand-400); }

/* Main Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--gray-100);
    box-shadow: var(--shadow-sm);
}
body.admin-bar .site-header { top: 32px; }
@media screen and (max-width: 782px) { body.admin-bar .site-header { top: 46px; } }

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}
@media (min-width: 768px) { .header-inner { height: 80px; } }

/* Logo */
.logo-wrapper { flex-shrink: 0; }
.logo-link {
    display: flex;
    flex-direction: column;
    margin-top: 0.25rem;
}
.logo-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--brand-700);
    margin: 0;
    line-height: 1;
    letter-spacing: -0.025em;
    transition: color 0.2s;
}
@media (min-width: 768px) { .logo-title { font-size: 1.5rem; } }
.logo-link:hover .logo-title { color: var(--brand-600); }
.logo-subtitle {
    font-size: 9px;
    color: var(--gray-500);
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-top: 0.375rem;
}
@media (min-width: 768px) { .logo-subtitle { font-size: 11px; } }

/* Desktop Navigation */
.desktop-nav {
    display: none;
    align-items: center;
    gap: 2rem;
    font-weight: 700;
    font-size: 15px;
    color: var(--gray-700);
    height: 100%;
}
@media (min-width: 1024px) { .desktop-nav { display: flex; } }

.nav-main-link {
    position: relative;
    padding: 1.5rem 0;
    color: inherit;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    transition: color 0.2s;
}
.nav-main-link:hover { color: var(--brand-600); }
.nav-main-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2.5px;
    bottom: 0;
    left: 0;
    background-color: var(--brand-600);
    transition: width 0.3s ease;
}
.nav-main-link:hover::after, .nav-item-group:hover .nav-main-link::after { width: 100%; }
.nav-main-link i { font-size: 10px; opacity: 0.6; }

.nav-manage-tab {
    color: var(--brand-600);
    border-bottom: 2px solid transparent;
}
.nav-manage-tab:hover { color: var(--brand-700); border-bottom-color: var(--brand-600); }

/* Mega Menu */
.nav-item-group {
    height: 100%;
    display: flex;
    align-items: center;
    position: relative;
}
.mega-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(0.5rem);
    width: 600px;
    background-color: var(--white);
    border-radius: 0.75rem;
    box-shadow: 0 20px 50px rgba(0,0,0,0.1);
    border: 1px solid var(--gray-100);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 1.5rem;
    z-index: 50;
    display: flex;
    gap: 1.5rem;
}
.nav-item-group:hover .mega-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}
.mega-menu-col { flex: 1; }
.mega-menu-col.border-right { border-right: 1px solid var(--gray-100); padding-right: 1rem; }
.mega-menu-title {
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 0;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.mega-menu-title i { color: var(--brand-500); }
.mega-menu-title i.text-red-500 { color: var(--red-500); }

.mega-menu-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-600);
}
.mega-menu-link {
    color: inherit;
    display: block;
    transition: all 0.2s ease;
    position: relative;
}
.mega-menu-link:hover { padding-left: 6px; color: var(--brand-600); font-weight: 600; }
.mega-menu-link.text-brand-600 { color: var(--brand-600); font-style: italic; }
.mega-menu-link.text-red-600 { color: var(--red-600); font-style: italic; }

/* Header Actions */
.header-actions { display: flex; align-items: center; gap: 0.75rem; }
@media (min-width: 768px) { .header-actions { gap: 1rem; } }

.desktop-actions { display: none; align-items: center; gap: 1rem; }
@media (min-width: 768px) { .desktop-actions { display: flex; } }

.btn-zalo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gray-700);
    font-weight: 800;
    font-size: 15px;
    transition: color 0.2s;
}
.btn-zalo:hover { color: var(--brand-600); }

.btn-zalo-icon {
    width: 2rem;
    height: 2rem;
    border-radius: 9999px;
    background-color: var(--brand-50);
    color: var(--brand-600);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--brand-100);
    box-shadow: var(--shadow-sm);
}

@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .5; } }
.animate-pulse { animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; }

/* Nút đăng tin trên Desktop */
.btn-dang-tin {
    /* Thêm mã màu dự phòng #f97316 và #ea580c, kèm !important để chống ghi đè */
    background: linear-gradient(to right, var(--accent-500, #f97316), var(--accent-600, #ea580c)) !important;
    color: var(--white, #ffffff) !important;
    font-weight: 700;
    padding: 0.5rem 1.25rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    box-shadow: 0 4px 15px rgba(249,115,22,0.3);
    transition: all 0.2s;
    border: 1px solid var(--accent-500, #f97316) !important;
    display: inline-flex;
    align-items: center;
}

.btn-dang-tin:hover {
    background: linear-gradient(to right, var(--accent-600, #ea580c), var(--accent-500, #f97316)) !important;
    transform: translateY(-2px);
}

.btn-dang-tin i { margin-right: 0.25rem; }

/* Nút đăng tin trên Mobile */
.mobile-btn-dang-tin {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    /* Thêm fallback và !important tương tự */
    background-color: var(--accent-500, #f97316) !important;
    color: var(--white, #ffffff) !important;
    font-weight: 700;
    padding: 0.625rem;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}
.mobile-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px; /* Cố định chiều rộng và cao để nút vuông vức */
    height: 40px;
    padding: 0; /* Xóa padding mặc định để căn giữa icon chuẩn hơn */
    color: var(--gray-700, #374151);
    background-color: var(--gray-50, #f9fafb);
    border: 1px solid var(--gray-200, #e5e7eb);
    border-radius: 0.5rem; /* Bo góc mềm mại */
    cursor: pointer;
    font-size: 1.25rem;
    outline: none; /* Xóa viền focus mặc định của trình duyệt */
    transition: all 0.2s ease;
}

@media (min-width: 1024px) { 
    .mobile-menu-btn { display: none; } 
}

.mobile-menu-btn:hover { 
    color: var(--brand-600, #2563eb); 
    background-color: var(--brand-50, #eff6ff);
    border-color: var(--brand-200, #bfdbfe);
}

/* Mobile Menu Drawer */
.mobile-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(17, 24, 39, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 100;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}
.mobile-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    height: 100%;
    background-color: var(--white);
    z-index: 110;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow-y: auto;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.drawer-open .mobile-drawer { transform: translateX(0); }
.drawer-open .mobile-overlay { opacity: 1; visibility: visible; }
.drawer-closed .mobile-drawer { transform: translateX(100%); }
.drawer-closed .mobile-overlay { opacity: 0; visibility: hidden; pointer-events: none; }

.mobile-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem;
    border-bottom: 1px solid var(--gray-100);
    background-color: var(--gray-50);
}
.mobile-drawer-title { font-weight: 800; color: var(--brand-700); font-size: 1.125rem; margin: 0; }
.mobile-close-btn {
    color: var(--gray-400);
    width: 2rem;
    height: 2rem;
    border-radius: 9999px;
    background-color: var(--white);
    border: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: color 0.2s;
}
.mobile-close-btn:hover { color: var(--red-500); }

.mobile-nav {
    display: flex;
    flex-direction: column;
    padding: 1rem;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 15px;
    color: var(--gray-700);
    flex-grow: 1;
}
.mobile-nav-link {
    display: flex;
    align-items: center;
    padding: 0.5rem;
    border-radius: 0.5rem;
    color: inherit;
    transition: all 0.2s;
}
.mobile-nav-link:hover { background-color: var(--gray-50); color: var(--brand-600); }
.mobile-nav-link i, .accordion-btn i.fa-key, .accordion-btn i.fa-handshake, .accordion-btn i.fa-newspaper {
    width: 1.5rem;
    text-align: center;
    margin-right: 0.5rem;
}
.mobile-nav-link i.fa-home, .mobile-nav-link i.fa-newspaper { color: var(--gray-400); }

.mobile-accordion-wrapper {
    border: 1px solid var(--gray-100);
    border-radius: 0.5rem;
    overflow: hidden;
    background-color: var(--white);
}
.accordion-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    background: none;
    border: none;
    font-family: inherit;
    font-weight: inherit;
    font-size: inherit;
    color: inherit;
    cursor: pointer;
    transition: background-color 0.2s;
}
.accordion-btn:hover { background-color: var(--brand-50); }
.accordion-btn.hover-red:hover { background-color: var(--red-50); }
.accordion-btn .left-part { display: flex; align-items: center; }
.accordion-btn .left-part i.fa-key { color: var(--brand-500); }
.accordion-btn .left-part i.fa-handshake { color: var(--red-500); }
.accordion-btn .fa-chevron-down {
    font-size: 0.75rem;
    color: var(--gray-400);
    transition: transform 0.3s;
}

.mobile-submenu {
    padding: 0.5rem 1rem 0.75rem;
    background-color: var(--gray-50);
    border-top: 1px solid var(--gray-100);
    font-size: 13.5px;
    font-weight: 600;
    color: var(--gray-600);
    display: none;
    flex-direction: column;
    gap: 0.5rem;
}
.mobile-submenu.open { display: flex; }
.mobile-submenu.bg-red { background-color: rgba(254, 242, 242, 0.5); border-top-color: var(--red-50); }
.mobile-submenu a { color: inherit; padding: 0.25rem 0; display: block; transition: color 0.2s; }
.mobile-submenu a:hover { color: var(--brand-600); }
.mobile-submenu.bg-red a:hover { color: var(--red-600); }
.mobile-submenu a.text-brand-600 { color: var(--brand-600); }
.mobile-submenu a.text-red-600 { color: var(--red-600); }
.mobile-submenu i { margin-right: 0.375rem; opacity: 0.5; }

.nav-manage-btn {
    display: flex;
    align-items: center;
    padding: 0.5rem;
    border-radius: 0.5rem;
    background-color: var(--brand-50);
    border: 1px solid var(--brand-100);
    color: var(--brand-700);
    margin-top: 0.5rem;
    transition: background-color 0.2s;
}
.nav-manage-btn:hover { background-color: var(--brand-100); }
.nav-manage-btn i { color: var(--brand-500); width: 1.5rem; text-align: center; margin-right: 0.5rem; }

.mobile-drawer-footer {
    padding: 1.25rem;
    background-color: var(--brand-50);
    margin-top: auto;
    border-top: 1px solid var(--brand-100);
}
.mobile-btn-zalo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background-color: var(--white);
    border: 1px solid var(--brand-200);
    color: var(--brand-700);
    font-weight: 800;
    padding: 0.625rem;
    border-radius: 0.75rem;
    margin-bottom: 0.75rem;
    box-shadow: var(--shadow-sm);
    transition: background-color 0.2s;
}
.mobile-btn-zalo:hover { background-color: var(--brand-100); }
.mobile-btn-zalo i { color: var(--brand-500); }

.mobile-btn-dang-tin {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background-color: var(--accent-500);
    color: var(--white);
    font-weight: 700;
    padding: 0.625rem;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}


/* ==========================================================================
   4. CSS TRANG CHỦ (Home & Components)
   ========================================================================== */
.tw-wrapper {
    background-color: var(--gray-50);
    padding-bottom: 5rem;
}

.tw-wrapper img {
    display: block;
    max-width: 100%;
    height: auto;
}

/* Hero Banner */
.hero-banner {
    position: relative;
    background-image: linear-gradient(to bottom right, var(--brand-900), var(--brand-600));
    padding: 4rem 1rem 7rem;
    border-bottom-left-radius: 35px;
    border-bottom-right-radius: 35px;
    box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    opacity: 0.15;
    background-image: url('https://images.unsplash.com/photo-1560518883-ce09059eeffa?auto=format&fit=crop&w=1920&q=80');
    background-size: cover;
    background-position: center;
    mix-blend-mode: overlay;
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 64rem;
    margin: 0 auto;
    text-align: center;
}

.hero-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    background-color: rgba(255, 255, 255, 0.2);
    color: var(--white);
    font-size: 0.75rem;
    line-height: 1rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(4px);
}

.hero-badge i { color: var(--yellow-300); margin-right: 0.25rem; }

.hero-title {
    font-size: 1.5rem;
    line-height: 1.25;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 1rem;
    filter: drop-shadow(0 10px 8px rgb(0 0 0 / 0.04)) drop-shadow(0 4px 3px rgb(0 0 0 / 0.1));
}

.hero-title span { color: var(--yellow-400); }

.hero-desc {
    color: var(--brand-100);
    font-size: 0.875rem;
    line-height: 1.25rem;
    max-width: 42rem;
    margin: 0 auto;
    opacity: 0.9;
}

/* Search Form - Mobile First */
.search-container {
    max-width: 56rem;
    /* Mobile: Chỉ kéo nhẹ lên -1.5rem để không bị đè vào nội dung Hero banner */
    margin: -1.5rem auto 0; 
    padding: 0 1rem;
    position: relative;
    z-index: 20;
}

.search-form {
    background-color: var(--white);
    border-radius: 1rem;
    /* Mobile: Bóng đổ nhẹ nhàng hơn (shadow-md) để tránh cảm giác nặng nề */
    box-shadow: 0 4px 6px -1px rgba(30, 58, 138, 0.1), 0 2px 4px -1px rgba(30, 58, 138, 0.06);
    padding: 0.75rem; /* Giảm padding một chút để tiết kiệm không gian ngang */
    display: grid;
    grid-template-columns: 1fr; /* Mobile: 1 cột xếp dọc */
    gap: 0.75rem;
    border: 1px solid var(--gray-100);
}

.search-box {
    position: relative;
    background-color: var(--gray-50);
    border-radius: 0.75rem;
    padding: 0.625rem 1rem; /* Giảm padding dọc trên mobile cho thon gọn */
    display: flex;
    align-items: center;
    border: 1px solid transparent;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-box:focus-within {
    border-color: var(--brand-500);
    background-color: var(--white);
}

.search-icon {
    width: 2rem;
    height: 2rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.75rem;
    flex-shrink: 0;
}

.search-icon.blue { background-color: var(--brand-100); color: var(--brand-600); }
.search-icon.purple { background-color: var(--purple-100); color: var(--purple-600); }

.search-input-wrap { flex: 1; }

.search-label {
    display: block;
    font-size: 10px;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--gray-400);
    letter-spacing: 0.05em;
}

.search-select {
    width: 100%;
    color: var(--gray-800);
    font-weight: 700;
    outline: none;
    cursor: pointer;
    padding-right: 1.25rem;
    padding-top: 0.125rem;
    background: transparent;
    border: none;
    appearance: none;
    -webkit-appearance: none;
}

.search-chevron {
    position: absolute;
    right: 1rem;
    color: var(--gray-400);
    font-size: 0.75rem;
    pointer-events: none;
}

/* Nút tìm kiếm */
.search-action-wrapper { display: flex; height: 100%; }

.tw-wrapper .search-btn {
    flex: 1;
    width: 100%;
    height: 100%;
    background-color: var(--brand-600) !important;
    color: var(--white) !important;
    font-weight: 700;
    font-size: 1rem;
    padding: 0.75rem 1rem; /* Chỉnh lại cho vừa với form dọc của mobile */
    border-radius: 0.75rem;
    border: none;
    box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.2); /* Shadow của nút nhẹ lại */
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    cursor: pointer;
}

.tw-wrapper .search-btn:hover { background-color: var(--brand-700) !important; }


/* RESET & BIẾN CSS CHUẨN HIỆN ĐẠI */

.re-pillar-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--text-main);
    line-height: 1.7;
    max-width: 1100px;
    margin: 0 auto;
    background: #ffffff;
}

.re-pillar-wrapper * { box-sizing: border-box; }

/* MỤC LỤC (TABLE OF CONTENTS) */
.re-toc {
    background: var(--bg-gray);
    border: 1px solid var(--border-color);
    border-left: 5px solid var(--primary);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 2rem 0;
}
.re-toc-title {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--secondary);
    margin-top: 0;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}
.re-toc ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}
.re-toc ul li { margin-bottom: 0.75rem; }
.re-toc ul li a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
}
.re-toc ul li a:hover { text-decoration: underline; color: #1e3a8a; }
.re-toc ul ul { padding-left: 1.5rem; margin-top: 0.5rem; }
.re-toc ul ul a { font-weight: 400; color: var(--text-main); }

/* TYPOGRAPHY - HEADING */
.re-h2 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--secondary);
    margin: 3rem 0 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
    position: relative;
}
.re-h2::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 80px;
    height: 2px;
    background: var(--primary);
}
.re-h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary);
    margin: 2.5rem 0 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}
.re-h3 i { color: var(--accent); }

/* TEXT VÀ ĐOẠN VĂN */
.re-pillar-wrapper p { margin-bottom: 1.25rem; font-size: 1.05rem; }
.re-keyword { font-weight: 700; color: var(--primary); }

/* BOX LƯU Ý - CALLOUT */
.re-callout {
    background: var(--primary-light);
    border-left: 4px solid var(--primary);
    padding: 1.5rem;
    border-radius: 0 var(--radius) var(--radius) 0;
    margin: 2rem 0;
}
.re-callout strong { color: var(--primary); display: block; margin-bottom: 0.5rem; font-size: 1.1rem;}

/* GRID & CARDS */
.re-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}
.re-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
    transition: transform 0.3s;
}
.re-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: #cbd5e1; }
.re-card-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* BẢNG GIÁ CHI TIẾT */
.re-table-container {
    overflow-x: auto;
    margin: 2rem 0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border-radius: var(--radius);
}
.re-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    background: #fff;
}
.re-table th, .re-table td {
    padding: 1rem;
    border: 1px solid var(--border-color);
}
.re-table th { background: var(--secondary); color: #fff; font-weight: 600; white-space: nowrap; }
.re-table tbody tr:nth-child(even) { background: var(--bg-gray); }
.re-table tbody tr:hover { background: var(--primary-light); }
.tag-rent { background: #dcfce7; color: #166534; padding: 4px 8px; border-radius: 4px; font-weight: bold; font-size: 0.9rem;}
.tag-sale { background: #fee2e2; color: #991b1b; padding: 4px 8px; border-radius: 4px; font-weight: bold; font-size: 0.9rem;}

/* FAQ ACCORDION TÙY CHỈNH BẰNG DETAILS/SUMMARY */
.re-faq details {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 1rem;
    overflow: hidden;
}
.re-faq summary {
    padding: 1.25rem;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--secondary);
    cursor: pointer;
    background: var(--bg-gray);
    list-style: none; /* Ẩn mủi tên mặc định */
    position: relative;
}
.re-faq summary::-webkit-details-marker { display: none; }
.re-faq summary::after {
    content: '+';
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    color: var(--primary);
}
.re-faq details[open] summary::after { content: '-'; }
.re-faq details p { padding: 1.25rem; margin: 0; border-top: 1px solid var(--border-color); }

/* CTA FOOTER */
.re-cta {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%);
    padding: 3rem 2rem;
    border-radius: 16px;
    text-align: center;
    color: #fff;
    margin-top: 4rem;
    box-shadow: var(--shadow);
}
.re-cta h4 { font-size: 1.8rem; font-weight: 800; margin: 0 0 1rem 0; }
.re-cta p { color: #cbd5e1; font-size: 1.1rem; margin-bottom: 2rem; max-width: 700px; margin-left: auto; margin-right: auto;}
.btn-hotline {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #f59e0b;
    color: #fff !important;
    padding: 15px 30px;
    font-size: 1.2rem;
    font-weight: bold;
    border-radius: 50px;
    text-decoration: none;
    transition: transform 0.3s, background 0.3s;
}
.btn-hotline:hover { background: #d97706; transform: scale(1.05); }

/* DANH SÁCH CHECKLIST */
.re-checklist { list-style: none; padding: 0; }
.re-checklist li {
    position: relative;
    padding-left: 2rem;
    margin-bottom: 0.75rem;
    font-size: 1.05rem;
}
.re-checklist li::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 0;
    color: #10b981;
    font-weight: bold;
    font-size: 1.2rem;
}

/* =========================================
   MEDIA QUERY CHO MÀN HÌNH LỚN (TABLET / PC)
   ========================================= */
@media (min-width: 768px) {
    .search-container {
        margin-top: -3.5rem; /* PC: Trả lại margin âm sâu hơn */
    }
    
    .search-form {
        grid-template-columns: repeat(3, 1fr); /* PC: Dàn ngang thành 3 cột */
        padding: 0.875rem;
        box-shadow: 0 25px 50px -12px rgba(30, 58, 138, 0.1); /* PC: Trả lại bóng đổ to như cũ */
    }
    
    .search-box {
        padding: 0.75rem 1rem;
    }
    
    .tw-wrapper .search-btn {
        padding: 0.875rem 1rem;
        box-shadow: 0 10px 15px -3px rgba(59, 130, 246, 0.3), 0 4px 6px -4px rgba(59, 130, 246, 0.1);
    }
}

/* Chỉ tác động vào Search Form nằm trong trang chủ */
@media (max-width: 767px) {
    .tw-wrapper .search-form {
        display: flex !important;
        flex-direction: column !important;
        padding: 1rem !important;
        gap: 0.75rem !important;
    }

    .tw-wrapper .search-box {
        width: 100% !important;
        box-sizing: border-box !important;
        padding: 0.875rem 1rem !important;
    }

    .tw-wrapper .search-action-wrapper {
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }

    .tw-wrapper .search-btn {
        width: 100% !important;
        padding: 1rem !important;
        font-size: 1rem !important;
        box-sizing: border-box !important;
    }
}

/* Main Content & Grid */
.main-container {
    max-width: 1240px;
    margin: 3rem auto 0;
    padding: 0 1rem;
}

.section-block { margin-bottom: 4rem; }

.section-head {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    margin-bottom: 1.5rem;
}

.section-head-icon {
    width: 2rem;
    height: 2rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
}

.section-head-icon.emerald { background-color: var(--emerald-50); color: var(--emerald-600); }
.section-head-icon.red { background-color: var(--red-50); color: var(--red-600); }

.section-head-title {
    font-size: 1.25rem;
    line-height: 1.75rem;
    font-weight: 800;
    color: var(--gray-900);
    letter-spacing: -0.025em;
}

.card-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.card {
    background-color: var(--white);
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid var(--gray-100);
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
    transform: translateY(-0.375rem);
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

.card-img-box {
    position: relative;
    aspect-ratio: 4 / 3;
    background-color: var(--gray-100);
    overflow: hidden;
}

.card-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover .card-img-box img { transform: scale(1.1); }

.card-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    color: var(--white);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.25rem 0.625rem;
    border-radius: 0.375rem;
    z-index: 10;
    box-shadow: var(--shadow-sm);
}

.card-badge.emerald { background-color: var(--emerald-500); }
.card-badge.red { background-color: var(--red-500); }

.card-body {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-title {
    font-size: 0.875rem;
    line-height: 1.375;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
    height: 2.8rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.card.thue:hover .card-title { color: var(--brand-600); }
.card.ban:hover .card-title { color: var(--red-600); }

.card-price {
    font-size: 1.125rem;
    line-height: 1.75rem;
    font-weight: 800;
    color: var(--red-600);
    margin-bottom: 0.75rem;
}

.card-price i { font-size: 0.75rem; margin-right: 0.25rem; opacity: 0.7; }

.card-specs {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px dashed var(--gray-100);
    padding-top: 0.75rem;
    margin-bottom: 1rem;
    font-size: 0.75rem;
    line-height: 1rem;
    font-weight: 600;
    color: var(--gray-500);
}

.spec-tag {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    background-color: var(--gray-50);
    padding: 0.25rem 0.625rem;
    border-radius: 0.375rem;
}

.spec-tag i.emerald { color: var(--emerald-500); }
.spec-tag i.red { color: var(--red-400); }

.card-btn {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    font-weight: 700;
    padding: 0.625rem 0;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-btn.emerald {
    background-color: var(--emerald-50);
    color: var(--emerald-600);
    border: 1px solid var(--emerald-100);
}

.card.thue:hover .card-btn.emerald {
    background-color: var(--emerald-600);
    color: var(--white);
}

.card-btn.red {
    background-color: var(--red-50);
    color: var(--red-600);
    border: 1px solid var(--red-100);
}

.card.ban:hover .card-btn.red {
    background-color: var(--red-600);
    color: var(--white);
}

/* SEO Section */
.seo-box-wrap {
    background-color: var(--white);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 20px 25px -5px rgb(243 244 246), 0 8px 10px -6px rgb(243 244 246);
    border: 1px solid var(--gray-100);
    margin-top: 2.5rem;
    position: relative;
    overflow: hidden;
    color: var(--gray-700);
    line-height: 1.625;
}

.seo-main-head {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--brand-900);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.seo-main-head i { color: var(--brand-500); }

.seo-sub-head {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--gray-900);
    margin: 1.5rem 0 0.75rem;
}

.seo-list-ul {
    padding-left: 1.25rem;
    margin-bottom: 1rem;
    list-style-type: disc;
}

.seo-list-ul li { margin-bottom: 0.5rem; }

.seo-grid-wrap {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.seo-inner-box {
    background-color: var(--gray-50);
    padding: 1rem;
    border-radius: 0.75rem;
}

.seo-inner-title {
    font-weight: 700;
    color: var(--brand-700);
    margin-bottom: 0.5rem;
}

.seo-inner-box p { font-size: 0.875rem; }

.seo-footer-note {
    margin-top: 1rem;
    font-size: 0.875rem;
    color: var(--gray-500);
    font-style: italic;
}

/* Home Media Queries */
@media (min-width: 640px) {
    .card-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 768px) {
    .hero-banner {
        padding: 5rem 1rem 8rem;
        border-bottom-left-radius: 50px;
        border-bottom-right-radius: 50px;
    }
    .hero-badge { font-size: 0.875rem; line-height: 1.25rem; }
    .hero-title { font-size: 3rem; line-height: 1; }
    .hero-desc { font-size: 1.125rem; line-height: 1.75rem; }
    
    .search-container { margin-top: -4rem; }
    .search-form {
        grid-template-columns: repeat(3, 1fr);
        border-radius: 0.75rem;
        padding: 0.75rem;
    }
    
    .main-container { margin-top: 5rem; }
    .section-head-title { font-size: 1.5rem; line-height: 2rem; }
    .card-title { font-size: 1rem; line-height: 1.5rem; }
    
    .seo-box-wrap { padding: 2.5rem; }
    .seo-main-head { font-size: 1.5rem; }
    .seo-grid-wrap { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
    .card-grid { grid-template-columns: repeat(4, 1fr); }
} /* <--- ĐÃ FIX LỖI THIẾU DẤU ĐÓNG NGOẶC Ở ĐÂY */

@media (max-width: 768px) {
    .property-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }

    .property-card .card-content {
        padding: 8px !important;
    }

    .property-card .card-title {
        font-size: 13px !important;
        margin-bottom: 5px !important;
        line-height: 1.4 !important;
    }

    .property-card .card-price {
        font-size: 12px !important;
        margin-bottom: 6px !important;
    }

    .property-card .card-meta {
        gap: 4px !important;
        display: flex;
        flex-wrap: wrap;
    }

    .property-card .card-meta span {
        font-size: 11px !important;
    }
}

/* --- CSS CHO NÚT XEM THÊM --- */
.view-more-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 30px;
    margin-bottom: 10px;
    grid-column: 1 / -1;
    /* Đảm bảo luôn nằm dưới cùng của grid */
}

.btn-view-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 32px;
    font-size: 15px;
    font-weight: 600;
    color: #ffffff !important;
    border-radius: 50px;
    text-decoration: none !important;
    transition: all 0.3s ease;
}

/* Nút cho thuê (Tông màu xanh ngọc bích tiệp với icon Emerald) */
.btn-view-more.btn-rent {
    background-color: #10b981;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.btn-view-more.btn-rent:hover {
    background-color: #059669;
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
    transform: translateY(-2px);
}

/* Nút bán (Tông màu đỏ tiệp với icon Red) */
.btn-view-more.btn-sale {
    background-color: #ef4444;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.btn-view-more.btn-sale:hover {
    background-color: #dc2626;
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
    transform: translateY(-2px);
}

.btn-view-more i {
    margin-left: 8px;
    font-size: 13px;
    transition: transform 0.3s ease;
}

.btn-view-more:hover i {
    transform: translateX(5px);
    /* Hiệu ứng mũi tên trượt nhẹ */
}

/* Responsive cho Mobile */
@media (max-width: 768px) {
    .view-more-wrapper {
        margin-top: 20px;
    }

    .btn-view-more {
        width: 85%;
        /* Trải dài hơn trên mobile để dễ bấm */
        padding: 10px 20px;
        font-size: 14px;
    }
}

/* ==========================================================================
   5. CSS CHI TIẾT BẤT ĐỘNG SẢN (PRODUCT DETAIL)
   ========================================================================== */
.detail-page-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 1rem;
    box-sizing: border-box;
}

@media (min-width: 768px) {
    .detail-page-container { padding: 2.5rem 1rem; }
}

/* Breadcrumb Nav */
.breadcrumb-nav {
    display: flex;
    align-items: center;
    background-color: var(--white);
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    border: 1px solid var(--gray-100);
    box-shadow: var(--shadow-sm);
    overflow-x: auto;
    white-space: nowrap;
    margin-bottom: 1.5rem;
}
.breadcrumb-list {
    display: flex;
    align-items: center;
    list-style: none;
    padding: 0; margin: 0;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--gray-500);
}
.breadcrumb-list a {
    color: inherit;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    transition: color 0.2s;
}
.breadcrumb-list a:hover { color: var(--brand-600); }
.breadcrumb-separator { color: var(--gray-300); font-size: 10px; }
.breadcrumb-current { color: var(--gray-900); font-weight: 600; }

/* Banner Quảng cáo */
.ads-banner-horizontal {
    width: 100%;
    min-height: 90px;
    margin-bottom: 1.5rem;
    background-color: var(--gray-50);
    border: 1px dashed var(--gray-300);
    border-radius: 0.75rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    color: var(--gray-400);
}
.ads-banner-horizontal .ads-label,
.ads-banner-sidebar .ads-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.25rem;
}

/* Bố cục 2 cột chính */
.detail-layout {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    align-items: flex-start;
}
@media (min-width: 1024px) { .detail-layout { flex-direction: row; } }

.main-content { width: 100%; min-width: 0; }
@media (min-width: 1024px) { .main-content { width: 68%; } }

.sidebar-content { width: 100%; margin-bottom: 2.5rem; }
@media (min-width: 1024px) { .sidebar-content { width: 32%; position: sticky; top: 6rem; } }

/* Tiêu đề Product */
.product-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--gray-900);
    margin: 0 0 1.5rem 0;
    line-height: 1.3;
    letter-spacing: -0.02em;
}
@media (min-width: 768px) { .product-title { font-size: 1.875rem; } }
@media (min-width: 1024px) { .product-title { font-size: 2.1rem; } }

/* Khung Slider ảnh chính */
.gallery-main {
    position: relative;
    width: 100%;
    height: 350px;
    background-color: var(--gray-100);
    border-radius: 0.75rem;
    overflow: hidden;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--gray-200);
}
@media (min-width: 768px) { .gallery-main { height: 500px; } }

.slider-bg-blur {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    filter: blur(24px);
    opacity: 0.6;
    transform: scale(1.1);
    transition: opacity 0.3s;
}
.slider-main-img {
    position: relative;
    z-index: 10;
    width: 100%; height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.1));
    transition: opacity 0.3s;
}
.slider-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0);
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
}
.gallery-main:hover .slider-overlay { background-color: rgba(0, 0, 0, 0.1); }

.expand-icon-box {
    background-color: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(6px);
    width: 3rem; height: 3rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    box-shadow: var(--shadow-md);
    opacity: 0;
    transition: opacity 0.3s;
}
.gallery-main:hover .expand-icon-box { opacity: 1; }

.slider-counter-badge {
    position: absolute;
    bottom: 1rem; right: 1rem;
    background-color: rgba(0, 0, 0, 0.7);
    color: var(--white);
    padding: 0.375rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    backdrop-filter: blur(6px);
    z-index: 30;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    box-shadow: var(--shadow-md);
}

/* Thumbnails */
.gallery-thumbs-track {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    overflow-x: auto;
    scroll-smooth: scroll-smooth;
    padding: 0.25rem 0;
}
.thumb-item {
    position: relative;
    flex: none;
    width: 70px; height: 55px;
    border-radius: 0.5rem;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    opacity: 0.6;
    transition: all 0.3s ease;
}
@media (min-width: 768px) { .thumb-item { width: 100px; height: 75px; } }

.thumb-item img {
    position: absolute;
    inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.thumb-item:hover { opacity: 1; }
.thumb-item:hover img { transform: scale(1.1); }
.thumb-item.active {
    border-color: var(--brand-500);
    opacity: 1;
    box-shadow: var(--shadow-sm);
}

/* Nội dung / Mô tả */
.content-section {
    background-color: var(--white);
    border-radius: 1rem;
    padding: 1.5rem;
    border: 1px solid var(--gray-100);
    box-shadow: var(--shadow-sm);
    margin-bottom: 2rem;
}
@media (min-width: 768px) { .content-section { padding: 2rem; } }

.section-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gray-900);
    margin: 0 0 1.25rem 0;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--gray-100);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.section-title i { color: var(--brand-500); }

.description-body { color: var(--gray-700); line-height: 1.7; font-size: 1.05rem; }
.description-body p { margin-bottom: 1.25rem; }
.description-body p:last-child { margin-bottom: 0; }

/* Tags */
.tags-container {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-100);
}
.tags-title { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.75rem; }
.tags-title i { color: var(--gray-400); }
.tags-title h3 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0;
}
.tags-list { display: flex; flex-wrap: wrap; gap: 0.625rem; }
.tag-link {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.875rem;
    background-color: var(--gray-50);
    color: var(--gray-600);
    border: 1px solid var(--gray-200);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s;
}
.tag-link span { color: var(--gray-400); margin-right: 0.25rem; }
.tag-link:hover {
    background-color: var(--brand-50);
    color: var(--brand-600);
    border-color: var(--brand-200);
    box-shadow: var(--shadow-sm);
}

/* Category CTA Box */
.category-cta-box {
    margin-top: 2rem;
    padding: 1.25rem;
    background-color: var(--emerald-50);
    border-left: 4px solid var(--emerald-500);
    border-radius: 0 0.75rem 0.75rem 0;
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
}
@media (min-width: 768px) { .category-cta-box { padding: 1.5rem; } }

.cta-icon-wrap {
    width: 2rem; height: 2rem;
    border-radius: 50%;
    background-color: var(--emerald-100);
    color: var(--emerald-600);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 0.125rem;
}
.category-cta-box .cta-text-wrap span {
    display: block;
    color: #065f46;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
}
@media (min-width: 768px) { .category-cta-box .cta-text-wrap span { font-size: 1rem; } }

.category-cta-box .cta-link {
    display: inline-block;
    color: #047857;
    font-weight: 700;
    font-size: 1rem;
    border-bottom: 2px dashed #34d399;
    padding-bottom: 0.125rem;
    transition: all 0.2s;
}
@media (min-width: 768px) { .category-cta-box .cta-link { font-size: 1.125rem; } }
.category-cta-box .cta-link i { font-size: 12px; margin-left: 0.25rem; }
.category-cta-box .cta-link:hover { color: var(--emerald-600); border-bottom-style: solid; }

/* Khối dự án (Project Banner Card) */
.project-card {
    background-color: var(--white);
    border-radius: 1.5rem;
    padding: 0.75rem;
    border: 1px solid var(--gray-100);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    align-items: center;
    margin-bottom: 2rem;
    transition: box-shadow 0.3s;
}
@media (min-width: 768px) { 
    .project-card { flex-direction: row; padding: 1rem; gap: 1.25rem; } 
}
.project-card:hover { box-shadow: var(--shadow-md); }

.project-img-wrap {
    width: 100%; height: 220px;
    border-radius: 1rem;
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
}
@media (min-width: 768px) { .project-img-wrap { width: 280px; height: 190px; } }
@media (min-width: 1024px) { .project-img-wrap { width: 320px; } }

.project-img-wrap img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.7s;
}
.project-card:hover .project-img-wrap img { transform: scale(1.05); }
.project-img-wrap .img-overlay-border {
    position: absolute;
    inset: 0;
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 1rem;
    z-index: 10;
}

.project-body {
    flex: 1;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0 !important; /* Đã sửa lỗi cú pháp */
}
@media (min-width: 768px) { .project-body { padding-left: 0.25rem; padding-right: 0.5rem; } }

.project-header-row {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}
@media (min-width: 640px) {
    .project-header-row { flex-direction: row; justify-content: space-between; align-items: flex-start; }
}
.project-meta-tag {
    color: var(--brand-600);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.375rem;
}
.project-title-link {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--gray-900);
    line-height: 1.25;
    margin: 0;
}
@media (min-width: 768px) { .project-title-link { font-size: 1.5rem; } }
.project-title-link a:hover { color: var(--brand-600); }

.btn-project-view {
    display: none;
    align-items: center;
    justify-content: center;
    background-color: var(--gray-900);
    color: var(--white);
    font-weight: 600;
    padding: 0.5rem 1.25rem;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    transition: background-color 0.2s;
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
}
@media (min-width: 640px) { .btn-project-view { display: inline-flex; } }
.btn-project-view:hover { background-color: var(--brand-500); }
.btn-project-view i { font-size: 10px; margin-left: 0.375rem; }

.project-features-list { display: flex; flex-wrap: wrap; gap: 0.625rem; margin-bottom: 0.75rem; }
.project-feature-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background-color: var(--gray-50);
    padding: 0.375rem 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid var(--gray-100);
    max-width: 100%;
}
.feature-icon-box {
    width: 1.5rem; height: 1.5rem;
    border-radius: 0.375rem;
    background-color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
}
.feature-icon-box .fa-building { color: var(--brand-500); font-size: 11px; }
.feature-icon-box .fa-key { color: var(--accent-500); font-size: 11px; }
.feature-icon-box .fa-map-marker-alt { color: var(--red-500); font-size: 11px; }

.project-feature-item .feature-text {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--gray-700);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.btn-project-view-mobile {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--gray-900);
    color: var(--white);
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    width: 100%;
    margin-top: 1.25rem;
}
@media (min-width: 640px) { .btn-project-view-mobile { display: none; } }
.btn-project-view-mobile:hover { background-color: var(--brand-500); }
.btn-project-view-mobile i { font-size: 10px; margin-left: 0.5rem; }

/* Sidebar */
.sidebar-widget {
    background-color: var(--white);
    padding: 1.5rem;
    border-radius: 1rem;
    border: 1px solid var(--gray-100);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    position: relative;
}
.widget-bg-icon {
    position: absolute;
    right: -1.5rem; top: -1.5rem;
    color: var(--brand-50);
    opacity: 0.5;
    font-size: 6rem;
    z-index: 0;
    pointer-events: none;
}
.widget-content-wrap { position: relative; z-index: 10; }

.price-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}
.price-value {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--red-600);
    margin-bottom: 1.5rem;
    line-height: 1;
}
.price-unit { font-size: 1.125rem; font-weight: 500; color: var(--gray-500); }

.spec-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 0.5rem;
}
.spec-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    background-color: var(--gray-50);
    border-radius: 0.75rem;
}
.spec-label-wrap { display: flex; align-items: center; gap: 0.625rem; color: var(--gray-500); font-weight: 500; }
.spec-icon {
    width: 2rem; height: 2rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.spec-item:nth-child(1) .spec-icon { background-color: var(--brand-100); color: var(--brand-600); }
.spec-item:nth-child(2) .spec-icon { background-color: var(--purple-100); color: var(--purple-600); }
.spec-value { font-weight: 700; color: var(--gray-900); font-size: 1.125rem; }

/* Thông tin người đăng (Author Card) */
.author-divider {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-100);
    margin-bottom: 1.5rem;
}
.author-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.75rem;
}
.author-box {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    background-color: var(--gray-50);
    padding: 0.75rem;
    border-radius: 0.75rem;
    border: 1px solid var(--gray-100);
    transition: border-color 0.2s;
}
.author-box:hover { border-color: var(--brand-200); }

.author-avatar {
    width: 3rem; height: 3rem;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--white);
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
    position: relative;
    display: block;
}
.author-avatar img { width: 100%; height: 100%; object-fit: cover; }
.author-avatar .avatar-fallback {
    width: 100%; height: 100%;
    background-color: var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-400);
}

.author-info { flex: 1; min-width: 0; }
.author-name-row {
    font-size: 15px;
    font-weight: 700;
    color: var(--gray-900);
    margin: 0 0 0.125rem 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.author-box:hover .author-name-row a { color: var(--brand-600); }
.author-name-row i { color: var(--brand-500); font-size: 11px; margin-left: 0.125rem; }

.author-count-link {
    font-size: 12px;
    color: var(--gray-500);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    transition: color 0.2s;
}
.author-count-link:hover { color: var(--brand-600); }

/* Khối nút liên hệ Call / Zalo */
.contact-actions-wrap {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}
.btn-action-call {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.875rem 1rem;
    background-color: var(--brand-500);
    color: var(--white);
    font-size: 1.125rem;
    font-weight: 700;
    border-radius: 0.75rem;
    transition: all 0.2s;
    box-shadow: 0 10px 15px -3px rgba(59, 130, 246, 0.3);
}
.btn-action-call:hover { background-color: var(--brand-700); }
.btn-action-call:hover i { animation: bounce 1s infinite; }

.btn-action-zalo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.875rem 1rem;
    background-color: var(--white);
    color: #0068ff;
    border: 2px solid #0068ff;
    font-size: 1.125rem;
    font-weight: 700;
    border-radius: 0.75rem;
    transition: all 0.2s;
}
.btn-action-zalo:hover { background-color: var(--gray-100); }
.btn-action-zalo img { width: 1.5rem; height: 1.5rem; }

/* Banner Quảng cáo Sidebar dọc */
.ads-banner-sidebar {
    width: 100%;
    background-color: var(--gray-50);
    border: 1px dashed var(--gray-300);
    border-radius: 0.75rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    color: var(--gray-400);
    min-height: 250px;
    aspect-ratio: 1 / 1;
}

/* Bài viết cùng khu vực (Related Section) */
.related-section {
    margin-top: 2rem;
    padding-top: 2.5rem;
    border-top: 1px solid var(--gray-200);
}
.related-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}
.related-section-header h3 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--gray-900);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.related-section-header h3 i { color: var(--brand-500); }

.related-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}
@media (min-width: 640px) { .related-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .related-grid { grid-template-columns: repeat(4, 1fr); } }

.related-card {
    background-color: var(--white);
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid var(--gray-100);
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.related-card:hover { transform: translateY(-0.375rem); box-shadow: var(--shadow-xl); }

.related-card-thumb {
    position: relative;
    aspect-ratio: 4 / 3;
    background-color: var(--gray-100);
    overflow: hidden;
}
.related-card-thumb a { display: block; width: 100%; height: 100%; }
.related-card-thumb img {
    position: absolute;
    inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}
.related-card:hover .related-card-thumb img { transform: scale(1.05); }
.related-card-thumb .no-img-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-400);
}
.related-card-thumb .no-img-placeholder i { font-size: 1.875rem; }

.related-card-body { padding: 1rem; display: flex; flex-direction: column; flex-grow: 1; }
.related-card-title {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1.4;
    margin: 0 0 0.5rem 0;
    height: 2.8rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s;
}
@media (min-width: 768px) { .related-card-title { font-size: 1rem; } }
.related-card:hover .related-card-title { color: var(--brand-500); }

.related-card-price {
    font-size: 1.125rem;
    font-weight: 800;
    color: var(--red-600);
    margin-bottom: 0.75rem;
}
.related-card-price i { font-size: 12px; margin-right: 0.25rem; opacity: 0.7; }

.related-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px dashed var(--gray-100);
    padding-top: 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gray-500);
    margin-top: auto;
}
.related-card-footer span { display: flex; align-items: center; gap: 0.375rem; }
.related-card-footer i { color: var(--brand-500); }


/* ==========================================================================
   6. CSS FOOTER (SÀN GIAO DỊCH QUẬN 7)
   ========================================================================== */
.site-footer {
    background-color: var(--ft-bg);
    color: var(--gray-400);
    position: relative;
    margin-top: 3rem;
}

/* Đường viền gradient phía trên */
.footer-top-border {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 4px;
    background: linear-gradient(to right, var(--brand-600), var(--brand-400), var(--brand-600));
    opacity: 0.8;
}

.footer-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 4rem 1.25rem 2rem;
}

/* Lưới (Grid) 4 cột responsive */
.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    margin-bottom: 3rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid var(--gray-800);
}

@media (min-width: 768px) {
    .site-footer { margin-top: 5rem; }
    .footer-grid { grid-template-columns: repeat(2, 1fr); gap: 2rem; }
    .col-brand { grid-column: span 2; }
}

@media (min-width: 1024px) {
    .footer-grid { grid-template-columns: repeat(4, 1fr); gap: 3rem; }
    .col-brand { grid-column: span 1; }
}

/* Cột Thông tin thương hiệu */
.footer-logo {
    display: inline-block;
    margin-bottom: 1.25rem;
}
.footer-logo h2 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--white);
    margin: 0;
    line-height: 1;
    letter-spacing: -0.025em;
}
.footer-logo span {
    font-size: 11px;
    color: var(--brand-400);
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-top: 0.375rem;
    display: block;
}
.footer-desc {
    font-size: 0.875rem;
    line-height: 1.625;
    margin-bottom: 1.5rem;
}
.footer-contact-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    font-size: 0.875rem;
}
.footer-contact-list li { display: flex; align-items: flex-start; gap: 0.75rem; }
.footer-contact-list i { color: var(--brand-500); margin-top: 0.25rem; }
.footer-contact-list a { transition: color 0.2s; }
.footer-contact-list a:hover { color: var(--white); }
.footer-phone { color: var(--white) !important; font-weight: 700; }
.footer-phone:hover { color: var(--brand-400) !important; }

/* Tiêu đề và Menu liên kết */
.footer-heading {
    color: var(--white);
    font-weight: 700;
    font-size: 1.125rem;
    margin: 0 0 1.25rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}
.footer-subheading {
    color: var(--white);
    font-weight: 700;
    font-size: 1rem;
    margin: 0 0 1rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}
.footer-nav {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin: 0 0 2rem;
    font-size: 14px;
}
.footer-nav li a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.25s ease;
}
.footer-nav li a i { font-size: 10px; }
.footer-nav li a .fa-link { color: var(--gray-500); }
.footer-nav li a:hover { color: var(--brand-400); padding-left: 0.5rem; }

/* Cột Hỗ trợ & Ký gửi */
.support-box p { font-size: 0.875rem; margin: 0 0 1rem; }
.btn-ky-gui {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background-color: var(--brand-600);
    color: var(--white);
    font-weight: 700;
    padding: 0.625rem 1.5rem;
    border-radius: 0.5rem;
    width: 100%;
    transition: background-color 0.2s;
    box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.2);
    margin-bottom: 1.5rem;
}
.btn-ky-gui:hover { background-color: var(--brand-500); color: var(--white); }

/* Mạng xã hội */
.social-links { display: flex; gap: 0.75rem; }
.btn-social {
    width: 2.5rem; height: 2.5rem;
    border-radius: 9999px;
    background-color: var(--gray-800);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-400);
    transition: all 0.2s ease;
}
.btn-social.fb:hover { background-color: #2563eb; color: var(--white); }
.btn-social.zl span { font-weight: 700; font-size: 10px; }
.btn-social.zl:hover { background-color: #0068ff; color: var(--white); }
.btn-social.yt:hover { background-color: #dc2626; color: var(--white); }

/* Thanh Copyright */
.footer-bottom {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    font-size: 0.75rem;
    color: var(--gray-500);
}
.footer-bottom p { margin: 0; }
.legal-links { display: flex; gap: 1rem; align-items: center; }
.legal-links a { transition: color 0.2s; }
.legal-links a:hover { color: var(--white); }
.legal-links .separator { color: var(--gray-700); }

@media (min-width: 768px) { .footer-bottom { flex-direction: row; } }


/* ==========================================================================
   7. CSS CHO LIGHTBOX (PHÓNG TO ẢNH)
   ========================================================================== */
.lightbox-overlay {
    display: none;
    position: fixed;
    z-index: 999999;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.lightbox-overlay.active { display: flex; opacity: 1; }

.lightbox-content {
    max-width: 95%;
    max-height: 85vh;
    border-radius: 8px;
    object-fit: contain;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    user-select: none;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 25px;
    color: var(--white);
    font-size: 35px;
    width: 45px; height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 100000;
}
.lightbox-close:hover { background: var(--red-500); transform: rotate(90deg); }

.lightbox-nav {
    position: absolute;
    top: 50%;
    color: var(--white);
    width: 50px; height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 100000;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    backdrop-filter: blur(4px);
    transform: translateY(-50%);
}
.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.1); 
}
.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

/* Bộ đếm ảnh (1 / 5) */
.lightbox-counter-wrap {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.7);
    color: var(--white);
    font-weight: bold;
    padding: 0.375rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    backdrop-filter: blur(6px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

@media (max-width: 768px) {
    .lightbox-nav { width: 40px; height: 40px; font-size: 18px; }
    .lightbox-prev { left: 10px; }
    .lightbox-next { right: 10px; }
    .lightbox-close { top: 15px; right: 15px; width: 35px; height: 35px; font-size: 24px; }
}

/* ==========================================================
   CSS THUẦN CHO TAXONOMY BẤT ĐỘNG SẢN
========================================================== */

body {
    background-color: var(--gray-50);
    font-family: Arial, sans-serif;
    color: var(--gray-800);
    margin: 0;
}

.bds-page-wrapper {
    padding-bottom: 5rem;
}

.bds-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 12px;
}

/* Tiện ích (Utilities) */
.text-center { text-align: center; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.hidden { display: none !important; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Component: Thanh Lọc (Sticky Filter) */
.bds-sticky-filter {
    position: sticky;
    z-index: 40;
    background-color: #ffffff;
    box-shadow: var(--shadow-sm);
    border-bottom: 1px solid var(--gray-200);
    padding: 10px 0;
    margin-bottom: 20px;
    transition: all 0.3s;
}
.bds-filter-form {
    display: grid;
    grid-template-columns: 1fr 1fr 42px;
    gap: 8px;
    width: 100%;
}
.bds-filter-label-group {
    display: none;
    align-items: center;
    color: var(--brand-600);
    font-weight: 800;
    margin-right: 8px;
}
.bds-filter-field {
    position: relative;
    background: #fff;
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius-lg);
    padding: 6px 12px;
    height: 42px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: border-color 0.3s;
}
.bds-filter-field:focus-within {
    border-color: var(--brand-500);
}
.bds-filter-field label {
    display: block;
    font-size: 10px;
    text-transform: uppercase;
    font-weight: bold;
    color: var(--gray-400);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.bds-filter-field select {
    width: 100%;
    background: transparent;
    color: var(--gray-900);
    font-weight: bold;
    font-size: 12px;
    border: none;
    outline: none;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    padding-right: 15px;
}
.bds-filter-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    color: var(--gray-400);
    pointer-events: none;
    margin-top: 5px;
}
.bds-filter-btn {
    background-color: var(--brand-600);
    color: #fff;
    border: none;
    border-radius: var(--border-radius-lg);
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s;
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.3);
}
.bds-filter-btn:hover { background-color: var(--brand-700); }
.bds-filter-btn span { display: none; margin-left: 6px; font-weight: bold; font-size: 14px;}

/* Component: Header & Breadcrumb */
.bds-header { margin-bottom: 24px; text-align: center; }
.bds-breadcrumb {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 12px;
    color: var(--gray-500);
    margin-bottom: 12px;
    overflow-x: auto;
    white-space: nowrap;
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.bds-breadcrumb::-webkit-scrollbar { display: none; }
.bds-breadcrumb a { color: var(--gray-500); text-decoration: none; display: flex; align-items: center; gap: 4px; }
.bds-breadcrumb a:hover { color: var(--brand-600); }
.bds-breadcrumb .current { color: var(--gray-900); font-weight: bold; }
.bds-page-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--gray-900);
    margin: 0 0 8px;
    line-height: 1.3;
}
.bds-page-desc { font-size: 13px; color: var(--gray-500); margin: 0; line-height: 1.5;}

/* Component: Ads Box */
.bds-ads-box {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 90px;
    padding: 4px;
    margin-bottom: 20px;
    position: relative;
    box-shadow: var(--shadow-sm);
}
.bds-ads-label {
    position: absolute;
    top: 4px;
    right: 8px;
    font-size: 9px;
    color: var(--gray-300);
    user-select: none;
    z-index: 10;
}

/* Component: Danh sách dự án (Grid) */
.bds-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}
.bds-card {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
    height: 100%;
}
.bds-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--gray-300);
}
.bds-card-thumb {
    position: relative;
    width: 100%;
    padding-top: 75%; /* Aspect ratio 4:3 */
    background-color: var(--gray-100);
    overflow: hidden;
}
.bds-card-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    font-size: 10px;
    font-weight: bold;
    text-transform: uppercase;
    padding: 4px 8px;
    border-radius: 4px;
    color: #fff;
    z-index: 10;
    box-shadow: var(--shadow-sm);
}
.badge-rental { background-color: var(--success); }
.badge-sale { background-color: var(--danger); }
.bds-card-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}
.bds-card:hover .bds-card-img { transform: scale(1.05); }
.bds-card-content {
    padding: 12px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.bds-card-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-900);
    margin: 0 0 8px;
    line-height: 1.4;
    height: 2.8em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.bds-card-title a { color: inherit; text-decoration: none; transition: color 0.2s;}
.bds-card:hover .bds-card-title { color: var(--brand-600); }
.bds-card-price {
    font-size: 15px;
    font-weight: 800;
    color: var(--danger);
    margin-bottom: 12px;
}
.bds-card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: var(--gray-600);
    font-weight: 500;
    margin-top: auto;
    border-top: 1px solid var(--gray-100);
    padding-top: 10px;
}
.bds-card-meta span { display: flex; align-items: center; gap: 6px; }
.bds-card-meta i { color: var(--brand-500); opacity: 0.8; }

.bds-empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
    background: var(--gray-50);
    border: 2px dashed var(--gray-200);
    border-radius: var(--border-radius-xl);
}
.bds-empty-state i { font-size: 36px; color: var(--gray-300); margin-bottom: 12px; display: block; }
.bds-empty-state h3 { font-size: 18px; color: var(--gray-900); margin: 0 0 8px; }
.bds-empty-state p { font-size: 14px; color: var(--gray-500); margin: 0; line-height: 1.5; }

/* Component: Pagination */
.bds-pagination { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin: 32px 0; }
.bds-pagination .page-numbers {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 36px; height: 36px; padding: 0 10px;
    border-radius: 8px; font-weight: 600; font-size: 14px;
    text-decoration: none; transition: all 0.3s;
    background: #fff; color: var(--gray-600); border: 1px solid var(--gray-200);
}
.bds-pagination .page-numbers:hover { background: var(--brand-50); border-color: var(--brand-600); color: var(--brand-600); }
.bds-pagination .current { background: var(--brand-600); color: #fff; border-color: var(--brand-600); pointer-events: none; }

/* Component: Box SEO */
.bds-section-box {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius-xl);
    padding: 20px;
    margin-bottom: 40px;
    box-shadow: var(--shadow-sm);
}
.bds-seo-wrapper { position: relative; margin-bottom: 48px; }
.bds-seo-content {
    max-height: 220px;
    overflow: hidden;
    transition: max-height 0.8s ease;
    position: relative;
}
.bds-seo-content.expanded { max-height: 5000px; transition: max-height 1s ease; }
.seo-fade {
    position: absolute; bottom: 0; left: 0; width: 100%; height: 80px;
    background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,1));
    transition: opacity 0.3s; pointer-events: none;
}
.bds-seo-content.expanded .seo-fade { opacity: 0; }
.bds-seo-toggle {
    display: flex; justify-content: center;
    margin-top: -20px; position: relative; z-index: 10;
}
.bds-seo-btn {
    background: #fff; border: 2px solid var(--brand-500);
    color: var(--brand-700); font-weight: bold;
    padding: 8px 24px; border-radius: 50px;
    font-size: 13px; cursor: pointer; transition: all 0.3s;
    box-shadow: var(--shadow-md);
    display: inline-flex; align-items: center; gap: 8px;
}
.bds-seo-btn:hover { background: var(--brand-600); color: #fff; border-color: var(--brand-600); }

.seo-format h2 { font-size: 20px; font-weight: 800; color: #1e3a8a; margin: 1.5em 0 0.5em; line-height: 1.4; }
.seo-format h3 { font-size: 18px; font-weight: 700; color: var(--gray-900); margin: 1.2em 0 0.5em; line-height: 1.4; }
.seo-format p { margin-bottom: 1em; line-height: 1.7; color: var(--gray-600); }
.seo-format ul { list-style-type: none; padding-left: 0; margin-bottom: 1.2em; color: var(--gray-600); }
.seo-format li { margin-bottom: 0.8em; position: relative; padding-left: 1.5em; line-height: 1.5;}
.seo-format li::before { content: "✓"; color: var(--brand-600); position: absolute; left: 0; font-weight: bold; }
.seo-format strong, .seo-format b { font-weight: 700; color: var(--gray-900); }

/* Component: Khám phá dự án */
.bds-section-title {
    font-size: 18px; font-weight: 800; color: var(--gray-900);
    margin: 0 0 20px; display: flex; align-items: center; gap: 10px;
    border-bottom: 1px solid var(--gray-100); padding-bottom: 16px;
}
.bds-section-title i { color: var(--brand-600); }
.bds-project-list { display: grid; grid-template-columns: 1fr; gap: 12px; }
.bds-project-item {
    display: flex; align-items: center; padding: 12px;
    background: var(--gray-50); border: 1px solid var(--gray-200);
    border-radius: var(--border-radius-lg); text-decoration: none;
    transition: all 0.3s; cursor: pointer;
}
.bds-project-item:hover { background: #fff; border-color: var(--brand-500); box-shadow: var(--shadow-sm); }
.bds-project-icon {
    width: 40px; height: 40px; border-radius: 50%;
    background: #fff; border: 1px solid var(--gray-200);
    display: flex; align-items: center; justify-content: center;
    color: var(--gray-400); margin-right: 12px; flex-shrink: 0;
    transition: all 0.3s;
}
.bds-project-item:hover .bds-project-icon { border-color: var(--brand-500); color: var(--brand-600); }
.bds-project-name { font-size: 14px; font-weight: bold; color: var(--gray-800); margin: 0; transition: color 0.3s; }
.bds-project-item:hover .bds-project-name { color: var(--brand-600); }
.bds-project-arrow { margin-left: auto; color: var(--gray-300); transition: color 0.3s; }
.bds-project-item:hover .bds-project-arrow { color: var(--brand-600); }

/* Component: Đánh giá (Reviews) */
.bds-review-layout { display: grid; grid-template-columns: 1fr; gap: 24px; }
.bds-rating-summary {
    background: var(--gray-50); border: 1px solid var(--gray-100);
    border-radius: var(--border-radius-lg); padding: 24px;
    text-align: center; display: flex; flex-direction: column;
    align-items: center; justify-content: center;
}
.bds-rating-score { font-size: 48px; font-weight: 800; color: var(--gray-900); margin-bottom: 8px; line-height: 1; }
.bds-rating-score span { font-size: 20px; color: var(--gray-500); font-weight: normal; }
.bds-rating-stars { color: var(--warning); font-size: 18px; margin-bottom: 8px; }
.bds-rating-text { font-size: 14px; color: var(--gray-500); }

.bds-form-group { margin-bottom: 16px; }
.bds-form-label { display: block; font-size: 14px; font-weight: bold; color: var(--gray-700); margin-bottom: 8px; }
.bds-form-control {
    width: 100%; padding: 12px 16px; font-size: 14px;
    border: 1px solid var(--gray-300); border-radius: var(--border-radius-lg);
    background: #fff; transition: all 0.3s; box-sizing: border-box;
}
.bds-form-control:focus { outline: none; border-color: var(--brand-500); box-shadow: 0 0 0 3px var(--brand-100); }
.bds-form-row { display: grid; grid-template-columns: 1fr; gap: 16px; }
.bds-btn-submit {
    background: var(--brand-600); color: #fff; font-weight: bold;
    border: none; border-radius: var(--border-radius-lg);
    padding: 12px 24px; font-size: 14px; cursor: pointer;
    display: inline-flex; align-items: center; gap: 8px;
    transition: background 0.3s; box-shadow: var(--shadow-sm);
}
.bds-btn-submit:hover { background: var(--brand-700); }

.bds-alert-success {
    background: #ecfdf5; border: 1px solid #a7f3d0; color: #047857;
    padding: 12px 16px; border-radius: var(--border-radius-lg);
    margin-bottom: 16px; display: flex; align-items: center; gap: 8px; font-size: 14px;
}

.rating-stars-input { display: flex; flex-direction: row-reverse; justify-content: flex-end; }
.rating-stars-input input { display: none; }
.rating-stars-input label { cursor: pointer; color: var(--gray-300); font-size: 28px; transition: color 0.2s; margin-right: 4px; }
.rating-stars-input input:checked ~ label,
.rating-stars-input label:hover,
.rating-stars-input label:hover ~ label { color: var(--warning); }

.bds-comment-list { margin-top: 32px; border-top: 1px solid var(--gray-100); padding-top: 24px; }
.bds-comment-title { font-size: 18px; font-weight: bold; color: var(--gray-800); margin: 0 0 20px; }
.bds-comment-item {
    background: var(--gray-50); border: 1px solid var(--gray-100);
    border-radius: var(--border-radius-lg); padding: 16px; margin-bottom: 16px;
}
.bds-comment-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 12px; }
.bds-comment-user { display: flex; align-items: center; gap: 12px; }
.bds-comment-avatar {
    width: 40px; height: 40px; border-radius: 50%;
    background: var(--brand-100); color: var(--brand-600);
    display: flex; align-items: center; justify-content: center;
    font-weight: bold; font-size: 18px; flex-shrink: 0;
}
.bds-comment-name { font-weight: bold; color: var(--gray-900); font-size: 14px; margin-bottom: 2px; }
.bds-comment-meta { font-size: 11px; color: var(--gray-500); display: flex; align-items: center; gap: 4px; }
.bds-comment-verified { color: var(--success); background: #ecfdf5; padding: 2px 6px; border-radius: 4px; font-weight: bold; font-size: 10px; margin-left: 8px;}
.bds-comment-text { color: var(--gray-600); font-size: 14px; line-height: 1.6; margin: 0; }

.bds-btn-outline {
    background: #fff; border: 2px solid var(--brand-500); color: var(--brand-600);
    font-weight: bold; padding: 10px 24px; border-radius: 50px; font-size: 14px;
    cursor: pointer; transition: all 0.3s; display: inline-flex; align-items: center; gap: 8px;
}
.bds-btn-outline:hover { background: var(--brand-600); color: #fff; }

/* ==========================================================
   MEDIA QUERIES - RESPONSIVE (MÀN HÌNH LỚN)
========================================================== */
@media (min-width: 768px) {
    .bds-filter-form { grid-template-columns: auto 200px 240px auto; justify-content: center; }
    .bds-filter-label-group { display: flex; }
    .bds-filter-field { height: 50px; padding: 8px 16px; }
    .bds-filter-field label { font-size: 11px; }
    .bds-filter-field select { font-size: 14px; }
    .bds-filter-btn { height: 50px; padding: 0 24px; width: auto; }
    .bds-filter-btn span { display: inline; }
    
    .bds-header { text-align: left; }
    .bds-breadcrumb { justify-content: flex-start; font-size: 14px; }
    .bds-page-title { font-size: 1.875rem; margin-bottom: 12px; }
    .bds-page-desc { font-size: 16px; }

    .bds-grid { grid-template-columns: repeat(3, 1fr); gap: 24px; }
    .bds-card-badge { top: 12px; left: 12px; padding: 6px 10px; font-size: 11px; }
    .bds-card-content { padding: 16px; }
    .bds-card-title { font-size: 16px; }
    .bds-card-price { font-size: 20px; }
    .bds-card-meta { font-size: 13px; padding-top: 14px; }

    .bds-pagination .page-numbers { min-width: 42px; height: 42px; font-size: 16px; border-radius: 10px; }

    .bds-section-box { padding: 40px; }
    .bds-section-title { font-size: 24px; margin-bottom: 24px; }
    
    .bds-project-list { grid-template-columns: repeat(2, 1fr); gap: 16px; }
    .bds-project-item { padding: 16px; }
    .bds-project-icon { width: 48px; height: 48px; font-size: 18px; margin-right: 16px; }
    .bds-project-name { font-size: 16px; }

    .bds-review-layout { grid-template-columns: 1fr 2fr; gap: 32px; }
    .bds-form-row { grid-template-columns: repeat(2, 1fr); }
    .bds-comment-item { padding: 20px; }
}

@media (min-width: 1280px) {
    .bds-grid { grid-template-columns: repeat(4, 1fr); }
    .bds-project-list { grid-template-columns: repeat(3, 1fr); }
}

/* =========================================================================
   CSS THUẦN CHO DANH MỤC BẤT ĐỘNG SẢN (bds-category.css)
========================================================================= */
body {
    background-color: var(--bg-body);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--text-main);
    margin: 0;
}

.bds-wrapper { padding-bottom: 60px; }
.max-container { max-width: 1280px; margin: 0 auto; padding: 0 15px; }
.hidden { display: none !important; }

/* --------------------------------------------------------
   1. STICKY FILTER
-------------------------------------------------------- */
.sticky-filter {
    position: sticky;
    z-index: 40;
    background-color: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    padding: 10px 0;
    margin-bottom: 24px;
    transition: top 0.3s;
}
.filter-inner { display: flex; justify-content: center; }
.search-form { display: grid; grid-template-columns: 1fr 1fr 45px; gap: 8px; width: 100%; }
.filter-label { display: none; align-items: center; font-weight: 800; color: var(--brand-main); margin-right: 12px; }

.form-control-wrap {
    position: relative;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 6px 12px;
    height: 45px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: var(--bg-white);
    transition: var(--transition);
}
.form-control-wrap:focus-within { border-color: var(--brand-main); box-shadow: 0 0 0 2px var(--brand-light); }
.form-control-wrap label { font-size: 10px; text-transform: uppercase; font-weight: 700; color: #9ca3af; margin-bottom: 2px; }
.form-control-wrap select {
    width: 100%; border: none; background: transparent; font-size: 13px; font-weight: 700; color: var(--text-main);
    outline: none; cursor: pointer; appearance: none; -webkit-appearance: none; padding-right: 20px;
}
.icon-chevron { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-size: 10px; color: #9ca3af; pointer-events: none; margin-top: 5px; }

.btn-search {
    background: var(--brand-main); color: #fff; border: none; border-radius: var(--radius-md);
    height: 45px; display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: var(--transition);
}
.btn-search:hover { background: var(--brand-hover); }
.btn-search span { display: none; font-weight: 700; margin-left: 8px; }

/* --------------------------------------------------------
   2. HEADER & BREADCRUMB
-------------------------------------------------------- */
.page-header { margin-bottom: 24px; text-align: center; }
.breadcrumb-nav {
    display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 12px;
    color: var(--text-muted); margin-bottom: 12px; overflow-x: auto; white-space: nowrap; scrollbar-width: none;
}
.breadcrumb-nav::-webkit-scrollbar { display: none; }
.breadcrumb-nav a { color: var(--text-muted); text-decoration: none; transition: var(--transition); }
.breadcrumb-nav a:hover { color: var(--brand-main); }
.breadcrumb-nav .separator { font-size: 10px; color: #d1d5db; }
.breadcrumb-nav .current { font-weight: 700; color: var(--text-main); }
.page-title { font-size: 24px; font-weight: 800; margin: 0 0 8px; line-height: 1.3; text-transform: capitalize; }
.page-desc { font-size: 14px; color: var(--text-muted); margin: 0; }

/* --------------------------------------------------------
   3. QUẢNG CÁO
-------------------------------------------------------- */
.ads-margin { margin-bottom: 24px; }
.ads-margin-y { margin: 40px 0; }
.ads-wrapper {
    background: var(--bg-white); border: 1px solid var(--border-color); border-radius: var(--radius-md);
    padding: 4px; position: relative; text-align: center; overflow: hidden; box-shadow: var(--shadow-sm);
}
.ads-label { position: absolute; top: 4px; right: 8px; font-size: 9px; color: #d1d5db; z-index: 10; }
.ads-container { min-height: 90px; display: flex; align-items: center; justify-content: center; }

/* --------------------------------------------------------
   4. LƯỚI SẢN PHẨM (PROPERTY GRID)
-------------------------------------------------------- */
.property-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 30px; }
.property-card {
    background: var(--bg-white); border: 1px solid var(--border-color); border-radius: var(--radius-lg);
    overflow: hidden; display: flex; flex-direction: column; transition: var(--transition); height: 100%;
}
.property-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); border-color: #cbd5e1; }

.card-img-wrap { position: relative; width: 100%; padding-top: 75%; background: var(--bg-body); overflow: hidden; }
.card-img-link img, .card-img-empty { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.property-card:hover .card-img-link img { transform: scale(1.05); }
.card-img-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; color: #9ca3af; font-size: 12px; }
.card-img-empty i { font-size: 28px; opacity: 0.3; margin-bottom: 8px; }

.card-badge {
    position: absolute; top: 8px; left: 8px; padding: 4px 8px; font-size: 10px; font-weight: 700;
    text-transform: uppercase; color: #fff; border-radius: 4px; z-index: 10; box-shadow: var(--shadow-sm);
}
.card-badge.rent { background: var(--color-rent); }
.card-badge.sale { background: var(--color-sale); }

.card-content { padding: 12px; display: flex; flex-direction: column; flex-grow: 1; }
.card-title { font-size: 14px; font-weight: 700; margin: 0 0 8px; line-height: 1.4; height: 2.8em; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.card-title a { color: inherit; text-decoration: none; transition: var(--transition); }
.property-card:hover .card-title { color: var(--brand-main); }
.card-price { font-size: 16px; font-weight: 800; color: var(--color-sale); margin-bottom: 12px; }
.card-meta { display: flex; align-items: center; gap: 12px; font-size: 12px; color: var(--text-muted); font-weight: 500; margin-top: auto; border-top: 1px solid var(--bg-body); padding-top: 10px; }
.card-meta span { display: flex; align-items: center; gap: 6px; }
.card-meta i { color: var(--brand-main); opacity: 0.7; }

.empty-data { grid-column: 1 / -1; text-align: center; padding: 40px 20px; background: var(--bg-white); border: 2px dashed var(--border-color); border-radius: var(--radius-xl); }
.empty-data i { font-size: 40px; color: #d1d5db; margin-bottom: 16px; }
.empty-data h3 { font-size: 18px; margin: 0 0 8px; }

/* --------------------------------------------------------
   5. PHÂN TRANG
-------------------------------------------------------- */
.bds-pagination { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-bottom: 40px; }
.bds-pagination .page-numbers {
    display: flex; align-items: center; justify-content: center; min-width: 38px; height: 38px; padding: 0 10px;
    background: var(--bg-white); border: 1px solid var(--border-color); border-radius: var(--radius-md);
    font-weight: 600; font-size: 14px; color: var(--text-muted); text-decoration: none; transition: var(--transition);
}
.bds-pagination .page-numbers:hover { background: var(--brand-light); border-color: var(--brand-main); color: var(--brand-main); }
.bds-pagination .current { background: var(--brand-main); border-color: var(--brand-main); color: #fff; pointer-events: none; }

/* --------------------------------------------------------
   6. SEO BOX, NỘI DUNG BÀI VIẾT & SIDEBAR
-------------------------------------------------------- */
.seo-section { margin-bottom: 40px; }
.seo-grid { display: grid; grid-template-columns: 1fr; gap: 24px; }

/* Box bao bọc nội dung SEO */
.seo-main { position: relative; }
.seo-content-box {
    background: var(--bg-white); 
    border: 1px solid var(--border-color); 
    border-radius: var(--radius-xl);
    padding: 24px; 
    max-height: 250px; 
    overflow: hidden; 
    position: relative; 
    transition: max-height 0.8s ease; 
    box-shadow: var(--shadow-sm);
}
.seo-content-box.expanded { max-height: 5000px; transition: max-height 1s ease; }

/* Hiệu ứng mờ dần (Fade-out) ở dưới cùng */
.seo-fade { 
    position: absolute; 
    bottom: 0; left: 0; 
    width: 100%; height: 100px; 
    background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,1)); 
    transition: opacity 0.3s; 
    pointer-events: none; 
}
.seo-content-box.expanded .seo-fade { opacity: 0; }

/* Nút Xem thêm / Thu gọn */
.btn-toggle-wrapper { display: flex; justify-content: center; margin-top: -20px; position: relative; z-index: 10; }
.btn-toggle {
    background: var(--bg-white); border: 2px solid var(--brand-main); color: var(--brand-hover);
    padding: 8px 24px; border-radius: 50px; font-weight: 700; font-size: 14px; cursor: pointer;
    box-shadow: var(--shadow-md); display: inline-flex; align-items: center; gap: 8px; transition: var(--transition);
}
.btn-toggle:hover { background: var(--brand-main); color: #fff; }

/* ========================================================
   BIỂU ĐỒ GIÁ BẤT ĐỘNG SẢN
======================================================== */

.trend-chart-wrapper { background: #fff; padding: 30px; border-radius: 12px; box-shadow: 0 4px 15px rgba(0,0,0,0.04); margin-bottom: 30px; width: 100%; }
.trend-chart-title { font-size: 22px; font-weight: 600; margin-bottom: 25px; color: #2c3e50; text-align: center; text-transform: capitalize; }
.trend-chart-title i { color: #e74c3c; margin-right: 8px; }
.chart-canvas-container { position: relative; height: 400px; width: 100%; }
@media (max-width: 768px) {
    .trend-chart-wrapper { padding: 20px 10px; }
    .trend-chart-title { font-size: 18px; margin-bottom: 20px; }
    .chart-canvas-container { height: 320px; }
}

/* ========================================================
   ĐỊNH DẠNG CHI TIẾT NỘI DUNG BÀI VIẾT (.seo-format)
======================================================== */
.seo-format {
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-main);
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.seo-format > *:first-child { margin-top: 0; }
.seo-format > *:last-child { margin-bottom: 0; }

/* Tiêu đề */
.seo-format h2, .seo-format h3, .seo-format h4, .seo-format h5, .seo-format h6 {
    color: var(--text-main); font-weight: 800; line-height: 1.4; margin-top: 1.8em; margin-bottom: 0.8em;
}
.seo-format h2 { font-size: 1.6em; color: #1e3a8a; border-bottom: 2px solid var(--brand-light); padding-bottom: 8px; }
.seo-format h3 { font-size: 1.35em; color: var(--brand-hover); }
.seo-format h4 { font-size: 1.2em; }

/* Đoạn văn & Liên kết */
.seo-format p { margin-bottom: 1.2em; }
.seo-format a { color: var(--brand-main); text-decoration: none; font-weight: 600; border-bottom: 1px solid transparent; transition: var(--transition); }
.seo-format a:hover { color: var(--brand-hover); border-bottom-color: var(--brand-hover); }
.seo-format strong, .seo-format b { font-weight: 700; color: #111827; }

/* Danh sách */
.seo-format ul, .seo-format ol { margin-bottom: 1.5em; padding-left: 24px; color: var(--text-muted); }
.seo-format ul { list-style-type: disc; }
.seo-format ol { list-style-type: decimal; }
.seo-format li { margin-bottom: 0.6em; line-height: 1.6; }
.seo-format li::marker { color: var(--brand-main); font-weight: bold; }
.seo-format li > ul, .seo-format li > ol { margin-top: 0.6em; margin-bottom: 0; }

/* Hình ảnh & Video */
.seo-format img { max-width: 100%; height: auto !important; border-radius: var(--radius-md); display: block; margin: 1.5em auto; box-shadow: var(--shadow-sm); }
.seo-format figure { margin: 1.5em 0; }
.seo-format figure img { margin-bottom: 0.5em; }
.seo-format figcaption { text-align: center; font-size: 0.85em; color: var(--text-muted); font-style: italic; }
.seo-format iframe { max-width: 100%; border-radius: var(--radius-md); margin: 1.5em auto; display: block; }

/* Trích dẫn (Blockquote) */
.seo-format blockquote { border-left: 4px solid var(--brand-main); background-color: var(--brand-light); padding: 16px 20px; margin: 1.5em 0; font-style: italic; color: #374151; border-radius: 0 var(--radius-md) var(--radius-md) 0; }
.seo-format blockquote p:last-child { margin-bottom: 0; }

/* Bảng biểu (Tự động có thanh cuộn trên Mobile) */
.seo-format table { width: 100%; border-collapse: collapse; margin: 1.5em 0; font-size: 0.9em; display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.seo-format th, .seo-format td { border: 1px solid var(--border-color); padding: 12px 16px; text-align: left; min-width: 120px; }
.seo-format th { background-color: var(--bg-body); font-weight: 700; color: var(--text-main); white-space: nowrap; }
.seo-format tr:nth-child(even) { background-color: #f8fafc; }

/* Dòng kẻ ngang */
.seo-format hr { border: 0; height: 1px; background: var(--border-color); margin: 2.5em 0; }


/* ========================================================
   SIDEBAR BÊN PHẢI (Danh sách dự án khác)
======================================================== */
.sidebar-box { 
    background: var(--bg-white); 
    border: 1px solid var(--border-color); 
    border-radius: var(--radius-xl); 
    padding: 24px; 
    box-shadow: var(--shadow-sm); 
    height: 100%;
}
.sidebar-title { 
    font-size: 18px; 
    font-weight: 800; 
    margin: 0 0 20px; 
    display: flex; 
    align-items: center; 
    gap: 10px; 
    border-bottom: 1px solid var(--bg-body); 
    padding-bottom: 16px; 
}
.sidebar-title i { color: var(--brand-main); }
.sidebar-list { list-style: none; padding: 0; margin: 0; max-height: 400px; overflow-y: auto; }
.sidebar-link { 
    display: flex; align-items: center; gap: 10px; padding: 12px; text-decoration: none; 
    color: var(--text-main); font-weight: 600; border-radius: var(--radius-md); 
    transition: var(--transition); border-bottom: 1px solid var(--bg-body); 
}
.sidebar-link:hover { background: var(--brand-light); color: var(--brand-main); padding-left: 16px; }
.sidebar-link i { color: #cbd5e1; transition: var(--transition); }
.sidebar-link:hover i { color: var(--brand-main); }
.sidebar-empty { padding: 12px; color: var(--text-muted); font-style: italic; }

/* Custom Scrollbar cho Sidebar */
.custom-scrollbar::-webkit-scrollbar { width: 6px; }
.custom-scrollbar::-webkit-scrollbar-track { background: var(--bg-body); border-radius: 4px; }
.custom-scrollbar::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }


/* ========================================================
   MEDIA QUERY: RESPONSIVE BÀI VIẾT CHO MÀN HÌNH LỚN
======================================================== */
@media (min-width: 768px) {
    .seo-format { 
        font-size: 16px; 
    }
    .seo-format table {
        display: table; /* Trả table về dạng nguyên bản, bỏ cuộn ngang trên PC */
        width: 100%;
    }
    .seo-format th, .seo-format td {
        min-width: auto;
    }
}

/* --------------------------------------------------------
   7. ĐÁNH GIÁ (REVIEWS)
-------------------------------------------------------- */
.review-section { background: var(--bg-white); border: 1px solid var(--border-color); border-radius: var(--radius-xl); padding: 24px; box-shadow: var(--shadow-sm); }
.review-heading { font-size: 20px; font-weight: 800; margin: 0 0 24px; text-transform: capitalize; }
.alert-success { background: #ecfdf5; border: 1px solid #a7f3d0; color: #047857; padding: 16px; border-radius: var(--radius-md); margin-bottom: 24px; display: flex; align-items: center; gap: 10px; font-weight: 600; }

.review-stats-container { display: grid; grid-template-columns: 1fr; gap: 24px; margin-bottom: 30px; background: var(--bg-body); padding: 24px; border-radius: var(--radius-lg); }
.stats-score { text-align: center; }
.stats-number { font-size: 48px; font-weight: 800; color: var(--text-main); line-height: 1; margin-bottom: 8px; }
.stats-number span { font-size: 20px; color: var(--text-muted); font-weight: normal; }
.stats-stars { color: var(--color-star); font-size: 20px; margin-bottom: 8px; }
.stats-count { font-size: 14px; color: var(--text-muted); }

.stats-bars { display: flex; flex-direction: column; gap: 8px; }
.bar-row { display: flex; align-items: center; gap: 12px; font-size: 13px; font-weight: 600; color: var(--text-muted); }
.bar-label { min-width: 40px; display: flex; align-items: center; gap: 4px; }
.bar-label i { color: var(--color-star); font-size: 11px; }
.bar-track { flex-grow: 1; height: 8px; background: #e2e8f0; border-radius: 4px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--color-star); border-radius: 4px; }
.bar-count { min-width: 20px; text-align: right; }

.stats-action { display: flex; align-items: center; justify-content: center; }
.btn-write-review { background: var(--brand-main); color: #fff; font-weight: 700; border: none; padding: 12px 24px; border-radius: var(--radius-md); cursor: pointer; transition: var(--transition); width: 100%; }
.btn-write-review:hover { background: var(--brand-hover); box-shadow: var(--shadow-sm); }

/* Form Đánh giá */
.review-form-wrapper { background: var(--bg-white); border: 1px solid var(--brand-light); border-radius: var(--radius-lg); padding: 24px; margin-bottom: 30px; box-shadow: var(--shadow-md); }
.review-form-wrapper h3 { margin: 0 0 20px; font-size: 18px; }
.form-group { margin-bottom: 16px; }
.form-grid { display: grid; grid-template-columns: 1fr; gap: 16px; margin-bottom: 16px; }
.form-label { display: block; font-size: 14px; font-weight: 700; margin-bottom: 8px; }
.form-input, .form-textarea { width: 100%; padding: 12px 16px; border: 1px solid var(--border-color); border-radius: var(--radius-md); font-family: inherit; font-size: 14px; transition: var(--transition); box-sizing: border-box;}
.form-input:focus, .form-textarea:focus { outline: none; border-color: var(--brand-main); box-shadow: 0 0 0 3px var(--brand-light); }
.btn-submit-review { background: var(--text-main); color: #fff; font-weight: 700; border: none; padding: 12px 30px; border-radius: var(--radius-md); cursor: pointer; transition: var(--transition); }
.btn-submit-review:hover { background: #000; }

.review-stars-input { display: flex; flex-direction: row-reverse; justify-content: flex-end; }
.review-stars-input input { display: none; }
.review-stars-input label { cursor: pointer; color: #d1d5db; font-size: 28px; transition: color 0.2s; margin-right: 4px; }
.review-stars-input input:checked ~ label, .review-stars-input label:hover, .review-stars-input label:hover ~ label { color: var(--color-star); }

/* Danh sách Comment */
.review-list { border-top: 1px solid var(--border-color); padding-top: 24px; }
.review-empty { text-align: center; color: var(--text-muted); font-style: italic; padding: 20px; }
.review-item { background: var(--bg-body); border-radius: var(--radius-lg); padding: 20px; margin-bottom: 16px; }
.review-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 12px; }
.review-user { display: flex; align-items: center; gap: 12px; }
.user-avatar { width: 42px; height: 42px; border-radius: 50%; background: var(--brand-light); color: var(--brand-main); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 18px; }
.user-name { font-weight: 700; color: var(--text-main); margin-bottom: 4px; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.badge-verified { background: #ecfdf5; color: #047857; font-size: 10px; padding: 2px 6px; border-radius: 4px; }
.user-time { font-size: 12px; color: var(--text-muted); }
.review-rating { color: var(--color-star); font-size: 12px; }
.review-content { font-size: 14px; color: var(--text-main); line-height: 1.6; }
.btn-toggle-reviews-wrap { text-align: center; margin-top: 20px; }

/* --------------------------------------------------------
   8. RESPONSIVE QUERIES
-------------------------------------------------------- */
@media (min-width: 768px) {
    .search-form { grid-template-columns: auto 220px 260px auto; justify-content: center; }
    .filter-label { display: flex; }
    .form-control-wrap { height: 50px; padding: 8px 16px; }
    .btn-search { height: 50px; padding: 0 30px; width: auto; }
    .btn-search span { display: inline; }
    
    .page-header { text-align: left; margin: 30px 0; }
    .breadcrumb-nav { justify-content: flex-start; font-size: 13px; }
    .page-title { font-size: 32px; }
    
    .property-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; }
    .card-badge { top: 12px; left: 12px; font-size: 11px; padding: 6px 10px; }
    .card-content { padding: 16px; }
    .card-title { font-size: 16px; }
    .card-price { font-size: 20px; }
    
    .seo-section { padding: 30px; background: var(--bg-white); border: 1px solid var(--border-color); border-radius: var(--radius-xl); box-shadow: var(--shadow-sm); }
    .seo-content-box { border: none; padding: 0; box-shadow: none; border-radius: 0; }
    .sidebar-box { border: none; padding: 0; box-shadow: none; border-radius: 0; }
    .seo-grid { grid-template-columns: 2fr 1fr; gap: 40px; }
    
    .review-stats-container { grid-template-columns: 1fr 2fr 1fr; align-items: center; }
    .btn-write-review { width: auto; }
    .form-grid { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 1024px) {
    .property-grid { grid-template-columns: repeat(4, 1fr); gap: 24px; }
}

/* =========================================================================
   CSS THUẦN CHO TRANG TAG SẢN PHẨM (bds-tag.css)
========================================================================= */

body {
    background-color: var(--bg-body);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--text-main);
    margin: 0;
}

/* Container chính */
.tag-wrapper { max-width: 1200px; margin: 0 auto; padding: 24px 16px 60px; }

/* --------------------------------------------------------
   1. BREADCRUMB
-------------------------------------------------------- */
.tag-breadcrumb-box {
    display: flex; align-items: center; background: var(--bg-white); padding: 12px 16px;
    border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); border: 1px solid var(--border-color);
    margin-bottom: 24px; overflow-x: auto; white-space: nowrap;
    -ms-overflow-style: none; scrollbar-width: none;
}
.tag-breadcrumb-box::-webkit-scrollbar { display: none; }
.tag-breadcrumb-list { display: flex; align-items: center; gap: 8px; list-style: none; padding: 0; margin: 0; width: 100%; font-size: 14px; color: var(--text-muted); }
.tag-breadcrumb-item { display: flex; align-items: center; gap: 8px; }
.tag-breadcrumb-link { color: var(--text-muted); text-decoration: none; transition: var(--transition); display: flex; align-items: center; gap: 6px; }
.tag-breadcrumb-link:hover { color: var(--brand-main); }
.tag-breadcrumb-separator { font-size: 10px; color: #d1d5db; }
.tag-breadcrumb-current { font-weight: 600; color: var(--text-main); text-transform: capitalize; }

/* --------------------------------------------------------
   2. HEADER TAG PAGE
-------------------------------------------------------- */
.tag-header-box {
    display: flex; align-items: center; gap: 24px; background: var(--bg-white);
    padding: 32px; border-radius: var(--radius-xl); box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color); margin-bottom: 32px; position: relative; overflow: hidden;
}
.tag-header-bg-icon { position: absolute; right: -20px; bottom: -20px; font-size: 120px; color: var(--brand-light); opacity: 0.6; pointer-events: none; }
.tag-header-icon {
    width: 64px; height: 64px; background: var(--brand-light); color: var(--brand-main);
    border-radius: var(--radius-xl); display: flex; align-items: center; justify-content: center;
    font-size: 24px; flex-shrink: 0; z-index: 10; position: relative;
}
.tag-header-content { position: relative; z-index: 10; flex: 1; }
.tag-header-title { font-size: 28px; font-weight: 800; color: var(--text-main); margin: 0 0 8px; line-height: 1.3; }
.tag-header-highlight { color: var(--brand-main); text-transform: capitalize; }
.tag-header-desc { font-size: 15px; color: var(--text-muted); margin: 0; }

/* --------------------------------------------------------
   3. KHUNG QUẢNG CÁO
-------------------------------------------------------- */
.ads-wrapper {
    position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center;
    background: #fafafa; border: 1px dashed #cbd5e1; border-radius: var(--radius-xl);
    padding: 24px 16px; text-align: center; overflow: hidden; width: 100%; min-height: 120px;
    margin-bottom: 32px; transition: border-color 0.3s ease;
}
.ads-wrapper:hover { border-color: #94a3b8; }
.ads-label {
    position: absolute; top: 0; right: 0; background: #e2e8f0; color: #64748b;
    font-size: 10px; font-weight: 700; text-transform: uppercase; padding: 4px 12px;
    border-bottom-left-radius: 12px; letter-spacing: 0.5px; z-index: 10;
}
.ads-in-feed { background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 100%); border: 1px dashed #93c5fd; }

/* --------------------------------------------------------
   4. KẾT QUẢ TÌM KIẾM & LƯỚI SẢN PHẨM
-------------------------------------------------------- */
.tag-results-info { font-size: 16px; font-weight: 700; color: var(--text-muted); margin-bottom: 24px; display: flex; align-items: center; gap: 8px; }
.tag-results-info i { color: var(--brand-main); }
.tag-results-count { color: var(--brand-main); background: var(--brand-light); padding: 2px 8px; border-radius: 6px; }

.tag-grid { display: grid; grid-template-columns: repeat(1, 1fr); gap: 16px; margin-bottom: 32px; }
.tag-card {
    background: var(--bg-white); border: 1px solid var(--border-color); border-radius: var(--radius-lg);
    overflow: hidden; display: flex; flex-direction: column; height: 100%; transition: var(--transition);
}
.tag-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); border-color: #cbd5e1; }

.tag-card-thumb { position: relative; width: 100%; padding-top: 75%; background: var(--bg-body); overflow: hidden; }
.tag-card-img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.tag-card:hover .tag-card-img { transform: scale(1.05); }
.tag-card-empty-img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: #9ca3af; font-size: 32px; background: #f3f4f6; }

.tag-badge {
    position: absolute; top: 12px; left: 12px; padding: 4px 10px; font-size: 10px; font-weight: 700;
    text-transform: uppercase; color: #fff; border-radius: 6px; z-index: 10; box-shadow: var(--shadow-sm);
}
.tag-badge.sale { background: var(--color-sale); }
.tag-badge.rent { background: var(--color-rent); }

.tag-card-content { padding: 16px; display: flex; flex-direction: column; flex-grow: 1; }
.tag-card-title {
    font-size: 15px; font-weight: 700; color: var(--text-main); margin: 0 0 12px; line-height: 1.4;
    height: 2.8em; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.tag-card-title a { color: inherit; text-decoration: none; transition: var(--transition); }
.tag-card:hover .tag-card-title { color: var(--brand-main); }

.tag-card-price { font-size: 18px; font-weight: 800; color: var(--color-sale); margin-bottom: 12px; display: flex; align-items: center; gap: 6px; }
.tag-card-price i { font-size: 12px; opacity: 0.7; color: var(--text-muted); }

.tag-card-meta {
    display: flex; justify-content: space-between; align-items: center; border-top: 1px dashed var(--border-color);
    padding-top: 12px; font-size: 12px; font-weight: 600; color: var(--text-muted); margin-top: auto;
}
.tag-card-meta span { display: flex; align-items: center; gap: 6px; }
.tag-card-meta i { color: var(--brand-main); font-size: 14px; }

/* --------------------------------------------------------
   5. TRẠNG THÁI TRỐNG (EMPTY STATE)
-------------------------------------------------------- */
.tag-empty-state {
    background: var(--bg-white); border: 1px solid var(--border-color); border-radius: var(--radius-xl);
    padding: 48px 20px; text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.tag-empty-icon { width: 80px; height: 80px; border-radius: 50%; background: var(--bg-body); display: flex; align-items: center; justify-content: center; color: #cbd5e1; font-size: 36px; margin-bottom: 20px; }
.tag-empty-title { font-size: 20px; font-weight: 700; color: var(--text-main); margin: 0 0 12px; }
.tag-empty-desc { font-size: 15px; color: var(--text-muted); max-width: 400px; margin: 0 auto 24px; line-height: 1.5; }
.btn-back-home {
    display: inline-flex; align-items: center; gap: 8px; background: var(--brand-main); color: #fff;
    font-weight: 600; padding: 12px 24px; border-radius: var(--radius-lg); text-decoration: none;
    transition: var(--transition); box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3);
}
.btn-back-home:hover { background: var(--brand-hover); transform: translateY(-2px); }

/* --------------------------------------------------------
   6. PHÂN TRANG (PAGINATION)
-------------------------------------------------------- */
.wp-pagination { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 40px; margin-bottom: 20px; }
.wp-pagination .page-numbers {
    display: flex; justify-content: center; align-items: center; min-width: 42px; height: 42px; border-radius: 50%;
    background-color: var(--bg-white); border: 1px solid var(--border-color); color: var(--text-muted); font-weight: 600; font-size: 16px;
    transition: var(--transition); box-shadow: var(--shadow-sm); text-decoration: none; padding: 0 10px;
}
.wp-pagination .page-numbers:hover { background-color: var(--brand-light); border-color: var(--brand-main); color: var(--brand-main); transform: translateY(-3px); box-shadow: var(--shadow-md); }
.wp-pagination .page-numbers.current { background-color: var(--brand-main); border-color: var(--brand-main); color: #fff; pointer-events: none; transform: scale(1.05); }
.wp-pagination .page-numbers.prev, .wp-pagination .page-numbers.next { border-radius: 50px; padding: 0 20px; width: auto; gap: 8px; }
.wp-pagination .page-numbers.dots { background-color: transparent; border: none; box-shadow: none; color: #9ca3af; letter-spacing: 2px; min-width: auto; padding: 0; pointer-events: none; }

/* --------------------------------------------------------
   7. SEO SECTION & BÀI VIẾT RICH TEXT
-------------------------------------------------------- */
.tag-seo-section { background: var(--bg-white); border-radius: var(--radius-xl); box-shadow: var(--shadow-sm); border: 1px solid var(--border-color); overflow: hidden; margin: 40px 0; }
.tag-seo-header { background: #f8fafc80; border-bottom: 1px solid var(--border-color); padding: 20px 32px; display: flex; align-items: center; gap: 12px; }
.tag-seo-header i { color: var(--brand-main); font-size: 20px; }
.tag-seo-header h2 { font-size: 20px; font-weight: 700; color: var(--text-main); margin: 0; }
.tag-seo-header span { color: var(--brand-main); text-transform: capitalize;}
.tag-seo-body { padding: 32px; }

/* Chuẩn bài viết SEO cho class .seo-content */
.seo-content { font-size: 15px; line-height: 1.7; color: var(--text-main); word-wrap: break-word; overflow-wrap: break-word; }
.seo-content > *:first-child { margin-top: 0; }
.seo-content > *:last-child { margin-bottom: 0; }

.seo-content h2, .seo-content h3, .seo-content h4, .seo-content h5, .seo-content h6 { color: var(--text-main); font-weight: 800; line-height: 1.4; margin-top: 1.8em; margin-bottom: 0.8em; }
.seo-content h2 { font-size: 1.6em; color: #1e3a8a; border-bottom: 2px solid var(--brand-light); padding-bottom: 8px; }
.seo-content h3 { font-size: 1.35em; color: var(--brand-hover); }
.seo-content h4 { font-size: 1.2em; }

.seo-content p { margin-bottom: 1.2em; }
.seo-content a { color: var(--brand-main); text-decoration: none; font-weight: 600; border-bottom: 1px solid transparent; transition: var(--transition); }
.seo-content a:hover { color: var(--brand-hover); border-bottom-color: var(--brand-hover); }
.seo-content strong, .seo-content b { font-weight: 700; color: #111827; }

.seo-content ul, .seo-content ol { margin-bottom: 1.5em; padding-left: 24px; color: var(--text-muted); }
.seo-content ul { list-style-type: disc; }
.seo-content ol { list-style-type: decimal; }
.seo-content li { margin-bottom: 0.6em; line-height: 1.6; }
.seo-content li::marker { color: var(--brand-main); font-weight: bold; }

.seo-content img { max-width: 100%; height: auto !important; border-radius: var(--radius-md); display: block; margin: 1.5em auto; box-shadow: var(--shadow-sm); }
.seo-content figure { margin: 1.5em 0; }
.seo-content figcaption { text-align: center; font-size: 0.85em; color: var(--text-muted); font-style: italic; margin-top: 0.5em; }
.seo-content iframe, .seo-content video { max-width: 100%; border-radius: var(--radius-md); margin: 1.5em auto; display: block; aspect-ratio: 16 / 9; }

.seo-content blockquote { border-left: 4px solid var(--brand-main); background-color: var(--brand-light); padding: 16px 20px; margin: 1.5em 0; font-style: italic; color: #374151; border-radius: 0 var(--radius-md) var(--radius-md) 0; }
.seo-content blockquote p:last-child { margin-bottom: 0; }

.seo-content table { width: 100%; border-collapse: collapse; margin: 1.5em 0; font-size: 0.9em; display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.seo-content th, .seo-content td { border: 1px solid var(--border-color); padding: 12px 16px; text-align: left; min-width: 120px; }
.seo-content th { background-color: var(--bg-body); font-weight: 700; color: var(--text-main); white-space: nowrap; }
.seo-content tr:nth-child(even) { background-color: #f8fafc; }
.seo-content hr { border: 0; height: 1px; background: var(--border-color); margin: 2.5em 0; }

/* --------------------------------------------------------
   8. RESPONSIVE
-------------------------------------------------------- */
@media (min-width: 640px) {
    .tag-grid { grid-template-columns: repeat(2, 1fr); }
    .seo-content { font-size: 16px; }
}

@media (min-width: 1024px) {
    .tag-grid { grid-template-columns: repeat(4, 1fr); }
    .tag-header-box { padding: 40px; }
    .tag-header-title { font-size: 32px; }
    .seo-content table { display: table; width: 100%; }
    .seo-content th, .seo-content td { min-width: auto; }
}

@media (max-width: 639px) {
    .tag-header-box { padding: 20px; flex-direction: column; align-items: flex-start; gap: 16px; }
    .tag-header-icon { width: 48px; height: 48px; font-size: 20px; }
    .tag-header-title { font-size: 22px; }
    .tag-seo-header { padding: 16px 20px; }
    .tag-seo-body { padding: 20px; }
    
    .wp-pagination { gap: 6px; }
    .wp-pagination .page-numbers { min-width: 36px; height: 36px; font-size: 14px; padding: 0 5px; }
    .wp-pagination .page-numbers.prev, .wp-pagination .page-numbers.next { padding: 0 16px; }
}

/* =========================================================================
   CSS THUẦN CHO TRANG TIN TỨC (bds-news.css)
========================================================================= */

body {
    background-color: var(--bg-body);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--text-main);
    margin: 0;
}

.news-wrapper { padding: 24px 0 80px; }
.max-container { max-width: 1280px; margin: 0 auto; padding: 0 16px; }

/* --------------------------------------------------------
   1. HEADER & BREADCRUMB
-------------------------------------------------------- */
.news-header {
    margin-bottom: 40px; text-align: center; border-bottom: 1px solid var(--border-color); padding-bottom: 32px;
}
.news-breadcrumb {
    display: flex; justify-content: center; align-items: center; gap: 8px; font-size: 12px;
    color: var(--text-muted); margin-bottom: 16px; overflow-x: auto; white-space: nowrap;
    -ms-overflow-style: none; scrollbar-width: none;
}
.news-breadcrumb::-webkit-scrollbar { display: none; }
.news-breadcrumb a { color: var(--text-muted); text-decoration: none; display: flex; align-items: center; gap: 4px; transition: var(--transition); }
.news-breadcrumb a:hover { color: var(--brand-main); }
.news-breadcrumb span.separator { font-size: 10px; color: #d1d5db; }
.news-breadcrumb span.current { font-weight: 700; color: var(--text-main); }

.news-title { font-size: 24px; font-weight: 800; color: var(--text-main); margin: 0 0 12px; line-height: 1.2; letter-spacing: -0.025em; }
.news-desc { font-size: 14px; color: var(--text-muted); max-width: 768px; margin: 0 auto; line-height: 1.6; }

/* --------------------------------------------------------
   2. LƯỚI TIN TỨC & THẺ BÀI VIẾT (CARDS)
-------------------------------------------------------- */
.news-grid { display: grid; grid-template-columns: 1fr; gap: 32px; }

.news-card {
    background: var(--bg-white); border: 1px solid var(--border-color); border-radius: var(--radius-xl);
    overflow: hidden; display: flex; flex-direction: column; height: 100%; text-decoration: none;
    box-shadow: var(--shadow-sm); transition: var(--transition);
}
.news-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: #cbd5e1; }

.news-card-thumb { position: relative; width: 100%; padding-top: 62.5%; /* Khung hình 16:10 */ background: #f3f4f6; overflow: hidden; }
.news-card-img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s ease; }
.news-card:hover .news-card-img { transform: scale(1.08); }

.news-card-badge {
    position: absolute; top: 16px; left: 16px; background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(4px); color: var(--brand-main); font-size: 10px; font-weight: 800;
    text-transform: uppercase; letter-spacing: 0.05em; padding: 6px 12px; border-radius: var(--radius-md);
    z-index: 10; box-shadow: var(--shadow-sm); transition: var(--transition); text-decoration: none;
}
.news-card-badge:hover { background: var(--brand-main); color: #fff; }

.news-card-content { padding: 20px; display: flex; flex-direction: column; flex-grow: 1; }

.news-card-meta { display: flex; align-items: center; gap: 16px; font-size: 12px; color: var(--text-muted); font-weight: 500; margin-bottom: 12px; }
.news-card-meta span { display: flex; align-items: center; gap: 6px; }
.news-card-meta i { color: #60a5fa; }

.news-card-title {
    font-size: 18px; font-weight: 700; color: var(--text-main); margin: 0 0 12px; line-height: 1.4;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.news-card-title a { color: inherit; text-decoration: none; transition: var(--transition); }
.news-card:hover .news-card-title a { color: var(--brand-main); }

.news-card-excerpt {
    font-size: 14px; color: var(--text-muted); line-height: 1.6; margin: 0 0 20px;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

.news-card-readmore {
    margin-top: auto; display: inline-flex; align-items: center; font-size: 14px; font-weight: 700;
    color: var(--brand-main); text-decoration: none; transition: var(--transition);
}
.news-card-readmore i { margin-left: 8px; font-size: 10px; transition: transform 0.3s; }
.news-card:hover .news-card-readmore { color: var(--brand-hover); }
.news-card:hover .news-card-readmore i { transform: translateX(4px); }

/* --------------------------------------------------------
   3. TRẠNG THÁI TRỐNG (EMPTY STATE)
-------------------------------------------------------- */
.news-empty {
    grid-column: 1 / -1; text-align: center; padding: 80px 20px; background: var(--bg-white);
    border: 2px dashed var(--border-color); border-radius: var(--radius-xl);
}
.news-empty-icon {
    width: 80px; height: 80px; background: var(--bg-body); border-radius: 50%;
    display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; color: #cbd5e1; font-size: 32px;
}
.news-empty h3 { font-size: 20px; font-weight: 700; margin: 0 0 8px; color: var(--text-main); }
.news-empty p { font-size: 16px; color: var(--text-muted); margin: 0; }

/* --------------------------------------------------------
   4. PHÂN TRANG (PAGINATION)
-------------------------------------------------------- */
.news-pagination { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--border-color); }
.news-pagination .page-numbers {
    display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; padding: 0 12px;
    border-radius: 10px; font-weight: 600; font-size: 15px; text-decoration: none; transition: var(--transition);
    background: var(--bg-white); color: var(--text-muted); border: 1px solid var(--border-color);
}
.news-pagination .page-numbers:hover { background: var(--brand-light); border-color: var(--brand-main); color: var(--brand-main); transform: translateY(-2px); box-shadow: 0 4px 10px rgba(37,99,235,0.1); }
.news-pagination .current { background: var(--brand-main); color: #fff; border-color: var(--brand-main); pointer-events: none; }
.news-pagination .page-numbers i { font-size: 12px; }
.news-pagination .prev i { margin-right: 4px; }
.news-pagination .next i { margin-left: 4px; }

/* --------------------------------------------------------
   5. RESPONSIVE QUERIES
-------------------------------------------------------- */
@media (min-width: 768px) {
    .news-wrapper { padding-top: 40px; }
    .news-header { text-align: left; }
    .news-breadcrumb { justify-content: flex-start; font-size: 14px; }
    .news-title { font-size: 36px; }
    .news-desc { font-size: 16px; margin: 0; }
    
    .news-grid { grid-template-columns: repeat(2, 1fr); gap: 32px; }
    .news-card-content { padding: 24px; }
    .news-card-title { font-size: 20px; }
}

@media (min-width: 1024px) {
    .news-grid { grid-template-columns: repeat(3, 1fr); }
}

/* =========================================================================
   PREMIUM CSS CHO TRANG CHI TIẾT BÀI VIẾT BẤT ĐỘNG SẢN (FIXED MOBILE)
========================================================================= */

html { scroll-behavior: smooth; }
body { 
    background-color: var(--bg-page); 
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; 
    color: var(--text-body); 
    margin: 0; 
    line-height: 1.6; 
    overflow-x: hidden; /* Cầu chì cuối cùng chống tràn ngang cho toàn bộ web */
}

/* --------------------------------------------------------
   LAYOUT TỔNG THỂ
-------------------------------------------------------- */
.sp-wrapper { padding: 30px 0 80px; }
.sp-container { max-width: 1200px; margin: 0 auto; padding: 0 16px; } /* Giảm nhẹ padding container ở mobile */
.sp-layout { display: grid; grid-template-columns: 1fr; gap: 30px; margin-top: 20px; }
@media (min-width: 1024px) {
    .sp-layout { grid-template-columns: minmax(0, 7fr) minmax(0, 3fr); gap: 40px; }
}

/* --------------------------------------------------------
   1. BREADCRUMB (Điều hướng)
-------------------------------------------------------- */
.sp-breadcrumb {
    display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text-muted);
    overflow-x: auto; white-space: nowrap; padding-bottom: 10px; border-bottom: 1px solid var(--border-light);
    margin-bottom: 30px; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.sp-breadcrumb::-webkit-scrollbar { display: none; }
.sp-breadcrumb a { color: var(--text-muted); text-decoration: none; display: flex; align-items: center; gap: 5px; font-weight: 500; transition: var(--transition); }
.sp-breadcrumb a:hover { color: var(--primary); }
.sp-breadcrumb .sep { color: #cbd5e1; font-size: 10px; }
.sp-breadcrumb .current { color: var(--text-dark); font-weight: 700; }

/* --------------------------------------------------------
   2. HEADER BÀI VIẾT
-------------------------------------------------------- */
.sp-header { margin-bottom: 30px; max-width: 100%; }
.sp-title { 
    font-size: 26px; font-weight: 800; color: var(--text-dark); line-height: 1.3; 
    margin: 0 0 16px; letter-spacing: -0.5px; 
    overflow-wrap: break-word; word-wrap: break-word; word-break: break-word;
}
@media (min-width: 768px) { .sp-title { font-size: 40px; margin-bottom: 20px; } }

.sp-meta { display: flex; flex-wrap: wrap; gap: 12px; font-size: 14px; }
.sp-meta-item { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--border-light); padding: 6px 16px; border-radius: 50px; color: var(--text-muted); text-decoration: none; transition: var(--transition); }
.sp-meta-item i { color: var(--primary); }
.sp-meta-item strong { color: var(--text-dark); font-weight: 600; }
a.sp-meta-item:hover { border-color: var(--primary); background: #f0fdfa; color: var(--primary); }

.sp-cover { 
    margin-bottom: 30px; border-radius: var(--radius-lg); overflow: hidden; 
    box-shadow: var(--shadow-soft); background: #f1f5f9; aspect-ratio: 16/9; 
    width: 100%; max-width: 100%; 
}
@media (min-width: 768px) { .sp-cover { margin-bottom: 40px; } }
.sp-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* --------------------------------------------------------
   3. NỘI DUNG BÀI VIẾT
-------------------------------------------------------- */
.sp-content-card {
    background: var(--surface, #ffffff);
    padding: 16px;
    border-radius: var(--radius-lg, 12px);
    box-shadow: var(--shadow-soft, 0 4px 20px rgba(0, 0, 0, 0.05));
    border: 1px solid rgba(226, 232, 240, 0.6);
}

@media (min-width: 768px) {
    .sp-content-card {
        padding: 40px;
    }
}

.sp-content {
    font-size: 17px;
    line-height: 1.8;
    color: var(--text-body, #334155);
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
}

.sp-content > *:first-child { margin-top: 0; }
.sp-content > *:last-child { margin-bottom: 0; }

.sp-content h2,
.sp-content h3,
.sp-content h4 {
    color: var(--text-dark, #0f172a);
    font-weight: 800;
    line-height: 1.4;
    margin: 2em 0 1em;
}

.sp-content h2 {
    font-size: 24px;
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 10px;
}

.sp-content h3 {
    font-size: 20px;
    color: var(--primary, #f97316);
}

.sp-content p { margin-bottom: 1.5em; }

.sp-content ul,
.sp-content ol {
    margin-bottom: 1.5em;
    padding-left: 20px;
}

.sp-content li { margin-bottom: 0.5em; }

.sp-content strong {
    color: var(--text-dark, #0f172a);
    font-weight: 700;
}

/* Tối ưu hiệu ứng Link: Kiểu Highlight bút dạ */
.sp-content p a,
.sp-content li a,
.sp-content td a {
    color: var(--accent, #ea580c);
    font-weight: 600;
    text-decoration: none;
    box-shadow: inset 0 -2px 0 0 rgba(234, 88, 12, 0.4); /* Thay viền bằng shadow */
    transition: all 0.3s ease;
    padding: 0 2px;
}

.sp-content p a:hover,
.sp-content li a:hover,
.sp-content td a:hover {
    color: #c2410c;
    box-shadow: inset 0 -20px 0 0 #ffedd5; /* Hiệu ứng tô sáng khi hover */
    border-radius: 2px;
}

/* --- PHẦN FIX ẢNH & CAPTION --- */
.sp-content img {
    max-width: 100% !important;
    height: auto !important;
    border-radius: var(--radius-md, 8px);
    margin: 2em auto;
    display: block;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.sp-content figure,
.sp-content .wp-caption,
.sp-content .wp-block-image {
    max-width: 100% !important;
    margin: 2em auto;
    display: block;
    clear: both;
}

/* Tránh nhân đôi margin khi img nằm trong figure */
.sp-content figure img,
.sp-content .wp-caption img {
    margin: 0 auto !important; 
}

.sp-content figcaption,
.sp-content .wp-caption-text {
    font-size: 14px;
    color: var(--text-muted, #64748b);
    font-style: italic;
    margin-top: 12px;
    display: block;
    text-align: center;
}

@media (max-width: 767px) {
    .sp-content .wp-caption,
    .sp-content figure,
    .sp-content .wp-block-image {
        width: 100% !important;
        box-sizing: border-box !important;
        float: none !important;
        padding: 0 !important;
    }
}

/* ----------------------------------------------------------------- */

.sp-content iframe {
    width: 100%;
    max-width: 100%;
    border-radius: var(--radius-md, 8px);
    margin: 2em auto;
    display: block;
    aspect-ratio: 16/9;
}

.sp-content blockquote {
    background: #f8fafc;
    border-left: 4px solid var(--primary, #f97316);
    padding: 16px;
    margin: 2em 0;
    border-radius: 0 var(--radius-md, 8px) var(--radius-md, 8px) 0;
    font-style: italic;
    font-size: 16px;
    color: var(--primary, #f97316);
}

@media (min-width: 768px) {
    .sp-content blockquote {
        padding: 24px;
        font-size: 18px;
    }
}

.sp-content blockquote p { margin: 0; }

/* Scrollbar tuỳ chỉnh cho bảng mượt mà hơn */
.sp-table-wrapper {
    width: 100%;
    overflow-x: auto;
    margin: 2em 0;
    border-radius: var(--radius-md, 8px);
    border: 1px solid var(--border-light, #e2e8f0);
    background: var(--surface, #ffffff);
    -webkit-overflow-scrolling: touch; /* Giúp vuốt mượt trên iOS */
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

/* Tùy chỉnh thanh cuộn đẹp hơn */
.sp-table-wrapper::-webkit-scrollbar { 
    height: 6px; 
}
.sp-table-wrapper::-webkit-scrollbar-thumb { 
    background-color: #cbd5e1; 
    border-radius: 10px; 
}

.sp-content table {
    width: 100%;
    /* Ép bảng tối thiểu 650px. Nếu màn hình nhỏ hơn 650px -> tự động tạo thanh cuộn ngang */
    min-width: 650px; 
    border-collapse: collapse;
    text-align: left;
    font-size: 15px;
    margin: 0;
}

.sp-content th {
    background: #f8fafc;
    padding: 14px 16px;
    font-weight: 700;
    color: var(--text-dark, #0f172a);
    border-bottom: 2px solid var(--border-light, #e2e8f0);
    white-space: nowrap; /* CHỐNG RỚT DÒNG cho tiêu đề cột */
}

.sp-content td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-light, #e2e8f0);
    line-height: 1.5;
    vertical-align: middle;
}

.sp-content tr:last-child td { 
    border-bottom: none; 
}

.sp-content tr:hover td { 
    background: #f8fafc; 
}

@media (min-width: 768px) {
    .sp-content th,
    .sp-content td {
        padding: 16px;
    }
}

.sp-content tr:last-child td { border-bottom: none; }
.sp-content tr:hover td { background: #fcfcfc; }

/* --------------------------------------------------------
   4. MỤC LỤC & QUẢNG CÁO
-------------------------------------------------------- */
.sp-toc { 
    background: var(--surface, #ffffff); 
    border: 1px solid var(--border-light, #e2e8f0); 
    border-radius: var(--radius-md, 8px); 
    padding: 16px;
    margin-bottom: 40px; 
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}

@media (min-width: 768px) { .sp-toc { padding: 24px; } }

.sp-toc-header { display: flex; align-items: center; justify-content: space-between; cursor: pointer; user-select: none; }
.sp-toc-title { font-size: 18px; font-weight: 800; color: var(--primary, #f97316); margin: 0; display: flex; align-items: center; gap: 10px; }
.sp-toc-title i { color: var(--primary, #f97316); }

.sp-toc-toggle { 
    background: transparent; border: 1.5px solid var(--primary, #f97316); width: 28px; height: 28px; 
    border-radius: 50%; display: flex; align-items: center; justify-content: center; 
    color: var(--primary, #f97316); transition: all 0.3s ease; 
}
.sp-toc-header:hover .sp-toc-toggle { background: var(--primary, #f97316); color: #fff; }

.sp-toc-body { overflow: hidden; transition: max-height 0.4s ease, margin-top 0.4s ease; }
.sp-toc-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; }
.sp-toc-list li { margin: 0; }

.sp-toc-link-h2, .sp-toc-link-h3 { 
    display: flex; align-items: flex-start; background: transparent !important; color: var(--text-body, #334155); 
    text-decoration: none; padding: 14px 4px; transition: all 0.3s ease; line-height: 1.4;
    border-bottom: 1px solid var(--border-light, #e2e8f0) !important; 
    word-break: break-word;
}
.sp-toc-list li:last-child a { border-bottom: none !important; }
.sp-toc-link-h2 { font-size: 15px; font-weight: 600; color: var(--text-dark, #0f172a); gap: 10px; }
.sp-toc-link-h2 i { color: #9ca3af; font-size: 13px; margin-top: 4px; flex-shrink: 0; }
.sp-toc-link-h3 { font-size: 14px; font-weight: 500; color: var(--text-muted, #64748b); gap: 10px; margin-left: 20px; }
.sp-toc-link-h3::before { content: ""; width: 4px; height: 4px; background: #cbd5e1; border-radius: 50%; flex-shrink: 0; margin-top: 8px;}
.sp-toc-list a:hover { color: var(--primary, #f97316) !important; transform: translateX(4px); }

.scroll-mt-24 { scroll-margin-top: 100px; }

.sp-ad-inarticle { 
    margin: 30px 0; padding: 10px; background: #f8fafc; border: 1px dashed #cbd5e1; 
    border-radius: var(--radius-sm, 4px); text-align: center; max-width: 100%; overflow: hidden; 
}
.sp-ad-label { display: block; font-size: 10px; color: #94a3b8; text-transform: uppercase; font-weight: 700; margin-bottom: 5px; letter-spacing: 1px; }

/* --------------------------------------------------------
   5. TAGS & RELATED POSTS
-------------------------------------------------------- */
.sp-tags { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 40px; padding-top: 30px; border-top: 1px solid var(--border-light, #e2e8f0); }
.sp-tags span { font-weight: 700; color: var(--text-dark, #0f172a); display: flex; align-items: center; gap: 5px; margin-right: 5px; }
.sp-tags a { background: #f1f5f9; color: var(--text-muted, #64748b); font-size: 13px; font-weight: 600; padding: 6px 14px; border-radius: 6px; text-decoration: none; transition: all 0.3s ease; }
.sp-tags a:hover { background: var(--primary, #f97316); color: #fff; }

.sp-related { margin-top: 50px; }
.sp-section-title { font-size: 20px; font-weight: 800; color: var(--text-dark, #0f172a); margin: 0 0 20px; display: flex; align-items: center; gap: 10px; }
@media (min-width: 768px) { .sp-section-title { font-size: 22px; } }
.sp-section-title i { color: var(--primary, #f97316); }

.sp-related-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 640px) { .sp-related-grid { grid-template-columns: 1fr 1fr; gap: 20px; } }

.sp-related-card { 
    display: flex; gap: 15px; background: var(--surface, #ffffff); padding: 12px; 
    border-radius: var(--radius-md, 8px); border: 1px solid var(--border-light, #e2e8f0); 
    text-decoration: none; transition: all 0.3s ease; align-items: center; 
}
@media (min-width: 768px) { .sp-related-card { padding: 15px; } }
.sp-related-card:hover { border-color: var(--primary, #f97316); box-shadow: var(--shadow-soft, 0 4px 20px rgba(0, 0, 0, 0.05)); transform: translateY(-3px); }

.sp-related-thumb { width: 80px; height: 80px; border-radius: var(--radius-sm, 4px); overflow: hidden; flex-shrink: 0; background: #f1f5f9; }
@media (min-width: 768px) { .sp-related-thumb { width: 90px; height: 90px; } }
.sp-related-thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 0; margin: 0 !important; box-shadow: none; }

.sp-related-info { 
    display: flex; flex-direction: column; justify-content: center; 
    min-width: 0; 
    flex-grow: 1;
}
.sp-related-title { 
    font-size: 14px; font-weight: 700; color: var(--text-dark, #0f172a); margin: 0 0 6px; 
    line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; 
    overflow: hidden; transition: all 0.3s ease; 
}
@media (min-width: 768px) { .sp-related-title { font-size: 15px; margin-bottom: 8px; } }
.sp-related-card:hover .sp-related-title { color: var(--primary, #f97316); }
.sp-related-date { font-size: 12px; color: var(--text-muted, #64748b); }

/* --------------------------------------------------------
   6. KHU VỰC REVIEW (ĐÁNH GIÁ)
-------------------------------------------------------- */
.sp-reviews { background: var(--surface); padding: 16px; border-radius: var(--radius-lg); box-shadow: var(--shadow-soft); border: 1px solid rgba(226, 232, 240, 0.6); margin-top: 40px; }
@media (min-width: 768px) { .sp-reviews { padding: 40px; margin-top: 50px; } }

.sp-review-summary { display: flex; flex-direction: column; gap: 20px; background: #f8fafc; padding: 20px; border-radius: var(--radius-md); margin-bottom: 30px; }
@media (min-width: 768px) { .sp-review-summary { flex-direction: row; align-items: center; gap: 30px; padding: 30px; margin-bottom: 40px; } }
.sp-score-box { text-align: center; min-width: 150px; border-bottom: 1px solid var(--border-light); padding-bottom: 20px; }
@media (min-width: 768px) { .sp-score-box { border-bottom: none; border-right: 1px solid var(--border-light); padding-bottom: 0; padding-right: 30px; } }
.sp-score-num { font-size: 48px; font-weight: 900; color: var(--text-dark); line-height: 1; margin-bottom: 5px; }
.sp-score-stars { color: #f59e0b; font-size: 18px; margin-bottom: 5px; }
.sp-score-text { font-size: 13px; color: var(--text-muted); }

.sp-progress-box { flex: 1; display: flex; flex-direction: column; gap: 10px; }
.sp-progress-row { display: flex; align-items: center; gap: 15px; font-size: 13px; color: var(--text-muted); }
.sp-progress-label { display: flex; align-items: center; gap: 5px; width: 30px; font-weight: 600; flex-shrink: 0; }
.sp-progress-label i { color: #f59e0b; font-size: 11px; }
.sp-progress-bar { flex: 1; height: 6px; background: var(--border-light); border-radius: 10px; overflow: hidden; }
.sp-progress-fill { height: 100%; background: #f59e0b; border-radius: 10px; }
.sp-progress-count { width: 30px; text-align: right; flex-shrink: 0; }

.sp-comment-list { max-height: 500px; overflow-y: auto; padding-right: 10px; margin-bottom: 40px; }
.sp-comment-item { padding: 15px 0; border-bottom: 1px solid var(--border-light); }
.sp-comment-item:last-child { border-bottom: none; }
.sp-comment-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 10px; flex-wrap: wrap; gap: 5px; }
.sp-comment-author { font-weight: 700; color: var(--text-dark); font-size: 15px; display: block; }
.sp-comment-date { font-size: 12px; color: var(--text-muted); }
.sp-comment-rating { color: #f59e0b; font-size: 12px; }
.sp-comment-text { 
    font-size: 14px; color: var(--text-body); background: #f8fafc; padding: 15px; border-radius: var(--radius-sm); margin: 0; line-height: 1.6; 
    word-break: break-word; /* FIX TRÀN: Tránh link hoặc từ dài phá khung bình luận */
}

.sp-review-form { background: #f8fafc; padding: 16px; border-radius: var(--radius-md); border: 1px solid var(--border-light); }
@media (min-width: 768px) { .sp-review-form { padding: 30px; } }
.sp-form-title { font-size: 18px; font-weight: 800; color: var(--text-dark); margin: 0 0 20px; }
.sp-form-group { margin-bottom: 20px; }
.sp-form-label { display: block; font-size: 13px; font-weight: 700; color: var(--text-dark); margin-bottom: 8px; }
.sp-star-select { display: flex; gap: 5px; flex-wrap: wrap; }
.sp-star-btn { background: none; border: none; color: #cbd5e1; font-size: 28px; cursor: pointer; transition: transform 0.2s; padding: 0; outline: none; }
.sp-star-btn:hover, .sp-star-btn.active { color: #f59e0b; transform: scale(1.1); }
.sp-input { width: 100%; padding: 12px 16px; border: 1px solid #cbd5e1; border-radius: var(--radius-sm); font-family: inherit; font-size: 15px; color: var(--text-dark); box-sizing: border-box; transition: var(--transition); }
.sp-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px #dbeafe; }
.sp-form-row { display: grid; grid-template-columns: 1fr; gap: 15px; }
@media (min-width: 640px) { .sp-form-row { grid-template-columns: 1fr 1fr; gap: 20px; } }
.sp-submit-btn { background: var(--primary); color: #fff; border: none; font-weight: 700; font-size: 15px; padding: 14px 30px; border-radius: var(--radius-sm); cursor: pointer; transition: var(--transition); display: inline-flex; align-items: center; gap: 10px; width: 100%; justify-content: center; }
@media (min-width: 640px) { .sp-submit-btn { width: auto; justify-content: flex-start; } }
.sp-submit-btn:hover { background: var(--primary-hover, #1e3a8a); transform: translateY(-2px); box-shadow: 0 10px 20px rgba(30, 58, 138, 0.2); }

/* --------------------------------------------------------
   7. SIDEBAR CHUYÊN NGHIỆP
-------------------------------------------------------- */
.sp-sidebar { position: sticky; top: 100px; display: flex; flex-direction: column; gap: 30px; }

.sp-widget-contact { background: linear-gradient(135deg, #1e3a8a, #3b82f6); border-radius: var(--radius-lg); padding: 20px; color: #fff; text-align: center; box-shadow: 0 15px 30px -5px rgba(30, 58, 138, 0.3); position: relative; overflow: hidden; }
@media (min-width: 768px) { .sp-widget-contact { padding: 30px; } }
.sp-widget-contact::before { content: '\f095'; font-family: 'Font Awesome 5 Free'; font-weight: 900; position: absolute; top: -10px; left: -10px; font-size: 120px; opacity: 0.1; transform: rotate(-15deg); }
.sp-widget-contact-inner { position: relative; z-index: 10; }
.sp-widget-badge { background: #10b981; color: #fff; font-size: 11px; font-weight: 800; text-transform: uppercase; padding: 4px 12px; border-radius: 50px; display: inline-block; margin-bottom: 15px; }
.sp-widget-title { font-size: 20px; font-weight: 800; margin: 0 0 10px; }
.sp-widget-desc { font-size: 14px; color: #bfdbfe; margin: 0 0 20px; line-height: 1.5; }
.sp-btn-phone, .sp-btn-zalo { 
    display: flex; align-items: center; justify-content: center; gap: 10px; 
    font-weight: 800; font-size: 15px; padding: 14px; border-radius: var(--radius-sm); 
    text-decoration: none; margin-bottom: 15px; transition: var(--transition); 
    word-break: break-word; /* FIX: Tránh số điện thoại quá dài vỡ nút */
}
.sp-btn-phone { background: #fff; color: var(--primary); }
.sp-btn-phone:hover { transform: translateY(-3px); box-shadow: 0 10px 20px rgba(0,0,0,0.1); }
.sp-btn-phone i { animation: pulse 2s infinite; }
.sp-btn-zalo { background: #0068ff; color: #fff; margin-bottom: 0; }
.sp-btn-zalo:hover { background: #0055d4; transform: translateY(-3px); box-shadow: 0 10px 20px rgba(0, 104, 255, 0.3); }

.sp-widget-box { background: var(--surface); border: 1px solid var(--border-light); border-radius: var(--radius-lg); padding: 20px; text-align: center; box-shadow: var(--shadow-soft); }
@media (min-width: 768px) { .sp-widget-box { padding: 30px; } }
.sp-widget-icon { width: 60px; height: 60px; background: var(--accent-light); color: var(--accent); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 24px; margin: 0 auto 15px; }
.sp-widget-box h3 { font-size: 18px; font-weight: 800; color: var(--text-dark); margin: 0 0 10px; }
.sp-widget-box p { font-size: 14px; color: var(--text-muted); margin: 0 0 20px; line-height: 1.5; }
.sp-btn-action { display: flex; align-items: center; justify-content: center; gap: 8px; background: var(--accent); color: #fff; font-weight: 700; padding: 12px; border-radius: var(--radius-sm); text-decoration: none; transition: var(--transition); }
.sp-btn-action:hover { background: #c2410c; }

@keyframes pulse { 0% { transform: scale(1); } 50% { transform: scale(1.1); } 100% { transform: scale(1); } }

/* CSS BỔ SUNG CHO DANH SÁCH BẤT ĐỘNG SẢN TẠI SIDEBAR (ĐẢM BẢO KHÔNG TRÀN MOBILE) */
.sb-bds-widget {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    box-sizing: border-box;
}

.sb-bds-title {
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f1f5f9;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sb-bds-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.sb-bds-item {
    display: flex;
    gap: 12px;
    text-decoration: none !important;
    transition: all 0.2s;
    align-items: stretch;
    width: 100%;
    box-sizing: border-box;
}

.sb-bds-item:hover .sb-info h4 {
    color: #2563eb;
}

.sb-thumb {
    width: 90px;
    min-width: 90px;
    max-width: 90px;
    aspect-ratio: 1/1;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background: #f1f5f9;
}

.sb-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.sb-bds-item:hover .sb-thumb img {
    transform: scale(1.05);
}

.sb-badge {
    position: absolute;
    top: 4px;
    left: 4px;
    font-size: 9px;
    font-weight: 700;
    color: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    z-index: 2;
    text-transform: uppercase;
}

.sb-badge.rent {
    background: #10b981;
}

.sb-badge.sale {
    background: #ef4444;
}

.sb-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    flex: 1;
}

.sb-info h4 {
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    margin: 0 0 4px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sb-price {
    font-size: 14px;
    font-weight: 700;
    color: #dc2626;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sb-meta {
    display: flex;
    gap: 10px;
    font-size: 11px;
    color: #64748b;
    font-weight: 500;
    flex-wrap: wrap;
}

.sb-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* =========================================================================
   CSS THUẦN CHO TRANG QUẢN LÝ TIN ĐĂNG (bds-quan-ly-tin-dang.css)
========================================================================= */

body {
    background-color: var(--gray-50);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--gray-800);
    margin: 0;
}

.ql-wrapper {
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 16px;
}
@media (min-width: 768px) {
    .ql-wrapper { padding: 64px 16px; }
}

/* --------------------------------------------------------
   1. HEADER QUẢN LÝ
-------------------------------------------------------- */
.ql-header {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    background: #fff;
    padding: 20px;
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-100);
    margin-bottom: 32px;
}
@media (min-width: 768px) {
    .ql-header {
        flex-direction: row;
        align-items: center;
    }
}

.ql-user-info { display: flex; align-items: center; gap: 16px; }
.ql-user-avatar {
    width: 56px; height: 56px;
    background: var(--brand-100); color: var(--brand-600);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 24px; font-weight: bold;
    box-shadow: var(--shadow-sm); flex-shrink: 0;
}
.ql-user-title { font-size: 24px; font-weight: 800; color: var(--gray-900); margin: 0 0 4px; }
.ql-user-acc { font-size: 14px; color: var(--gray-500); font-weight: 500; }
.ql-user-acc span { color: var(--brand-600); }

.ql-actions { display: flex; flex-wrap: wrap; gap: 12px; width: 100%; }
@media (min-width: 768px) { .ql-actions { width: auto; } }

.btn-post {
    flex: 1; justify-content: center;
    padding: 10px 20px; background: var(--brand-600); color: #fff;
    font-weight: 700; border-radius: var(--radius-xl); text-decoration: none;
    display: flex; align-items: center; gap: 8px; transition: var(--transition);
    box-shadow: var(--shadow-md); border: none;
}
.btn-post:hover { background: var(--brand-700); }
@media (min-width: 768px) { .btn-post { flex: none; } }

.btn-logout {
    padding: 10px 20px; background: var(--red-50); color: var(--red-600);
    font-weight: 700; border-radius: var(--radius-xl); text-decoration: none;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    transition: var(--transition); border: 1px solid var(--red-100);
}
.btn-logout:hover { background: var(--red-100); }

/* --------------------------------------------------------
   2. KHUNG CHỨA DANH SÁCH TIN ĐĂNG
-------------------------------------------------------- */
.ql-content-box { background: transparent; }
@media (min-width: 768px) {
    .ql-content-box {
        background: #fff; border-radius: 24px;
        box-shadow: var(--shadow-sm); border: 1px solid var(--gray-100);
        padding: 16px;
    }
}

/* --------------------------------------------------------
   3. TABLE HEADER (CHỈ HIỆN TRÊN DESKTOP)
-------------------------------------------------------- */
.ql-table-header { display: none; }
@media (min-width: 768px) {
    .ql-table-header {
        display: grid;
        grid-template-columns: 6.5rem minmax(0, 1fr) 8.5rem 7rem 12rem;
        gap: 16px; align-items: center;
        background: var(--gray-50); padding: 16px; border-radius: var(--radius-xl);
        color: var(--gray-500); font-size: 14px; font-weight: 700;
        text-transform: uppercase; letter-spacing: 0.05em;
        margin-bottom: 16px; border: 1px solid var(--gray-100);
    }
    .th-center { text-align: center; }
}

/* --------------------------------------------------------
   4. DANH SÁCH BÀI VIẾT (ITEM)
-------------------------------------------------------- */
.ql-list { display: flex; flex-direction: column; gap: 20px; }
@media (min-width: 768px) { .ql-list { gap: 12px; } }

.ql-item {
    display: flex; flex-direction: column;
    background: #fff; border-radius: var(--radius-2xl); border: 1px solid var(--gray-100);
    overflow: hidden; box-shadow: var(--shadow-sm); transition: var(--transition);
    position: relative;
}
@media (min-width: 768px) {
    .ql-item {
        display: grid; grid-template-columns: 6.5rem minmax(0, 1fr) 8.5rem 7rem 12rem;
        gap: 16px; align-items: center; padding: 12px; border-radius: var(--radius-xl);
        box-shadow: none;
    }
    .ql-item:hover { border-color: var(--brand-200); box-shadow: var(--shadow-md); }
}

/* Cột Ảnh */
.ql-item-thumb {
    width: 100%; position: relative; background: var(--gray-100);
    aspect-ratio: 16 / 9; overflow: hidden; flex-shrink: 0;
}
.ql-item-img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.ql-item-link { display: block; width: 100%; height: 100%; }
.ql-item:hover .ql-item-img { transform: scale(1.05); }
.ql-item-img.draft-img { opacity: 0.8; filter: grayscale(20%); }

@media (min-width: 768px) {
    .ql-item-thumb { width: 6.5rem; aspect-ratio: 1 / 1; border-radius: var(--radius-md); }
}

/* Badge Mobile (Nằm đè lên ảnh trên mobile) */
.badge-mobile { position: absolute; top: 12px; left: 12px; box-shadow: var(--shadow-sm); }
@media (min-width: 768px) { .badge-mobile { display: none; } }

/* Cột Thông tin */
.ql-item-info { padding: 16px; display: flex; flex-direction: column; justify-content: center; min-width: 0; width: 100%; box-sizing: border-box; }
@media (min-width: 768px) { .ql-item-info { padding: 0; } }

.ql-item-title {
    font-weight: 700; font-size: 17.6px; color: var(--gray-900);
    line-height: 1.4; margin: 0 0 8px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
@media (min-width: 768px) { .ql-item-title { font-size: 15px; margin-bottom: 6px; } }
.ql-item-title a { color: inherit; text-decoration: none; transition: var(--transition); }
.ql-item-title a:hover { color: var(--brand-600); }

.ql-item-meta { display: flex; flex-wrap: wrap; items-center: center; gap: 12px; font-size: 12.8px; color: var(--gray-500); }
.ql-item-id { font-family: monospace; background: var(--gray-50); padding: 2px 8px; border-radius: 4px; border: 1px solid var(--gray-100); }
.ql-item-price { color: var(--red-500); font-weight: 700; display: flex; items-center: center; gap: 4px; }
.ql-item-price i { font-size: 12px; }

/* Cột Status (Chỉ hiện trên Desktop) */
.ql-item-status { display: none; justify-content: center; items-center: center; }
@media (min-width: 768px) { .ql-item-status { display: flex; } }

/* CSS Badge Chung */
.ql-badge {
    padding: 6px 12px; border-radius: var(--radius-md); font-size: 12px; font-weight: 700;
    white-space: nowrap; display: inline-flex; align-items: center; gap: 6px;
}
.badge-publish { background: var(--emerald-50); color: var(--emerald-600); border: 1px solid var(--emerald-200); }
.badge-pending { background: var(--yellow-50); color: var(--yellow-600); border: 1px solid var(--yellow-200); }
.badge-draft { background: var(--gray-100); color: var(--gray-600); border: 1px solid var(--gray-200); }

/* Cột Date */
.ql-item-date {
    width: 100%; padding: 12px 16px; display: flex; justify-content: space-between; align-items: center;
    border-top: 1px solid var(--gray-100); box-sizing: border-box;
}
.ql-date-label { font-size: 14px; color: var(--gray-500); font-weight: 500; }
.ql-date-value { font-size: 14px; color: var(--gray-600); font-weight: 500; }
@media (min-width: 768px) {
    .ql-item-date { width: auto; padding: 0; border-top: none; justify-content: center; }
    .ql-date-label { display: none; }
}

/* Cột Actions (Nút bấm) */
.ql-item-actions {
    width: 100%; padding: 16px; display: flex; align-items: center; justify-content: space-between;
    gap: 10px; border-top: 1px solid var(--gray-100); background: var(--gray-50); box-sizing: border-box;
}
@media (min-width: 768px) {
    .ql-item-actions {
        width: auto; padding: 0; border-top: none; background: transparent;
        justify-content: center;
    }
}

.btn-action {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    font-weight: 700; font-size: 14px; text-decoration: none; transition: var(--transition);
}
.btn-edit {
    padding: 10px 20px; background: #fff; color: var(--gray-700);
    border: 1px solid var(--gray-200); border-radius: var(--radius-xl);
}
.btn-edit:hover { border-color: var(--brand-200); background: var(--brand-50); color: var(--brand-600); }

.btn-pay {
    flex: 1; padding: 10px 16px; background: var(--brand-600); color: #fff;
    border-radius: var(--radius-xl); box-shadow: var(--shadow-md); white-space: nowrap; border: none;
}
.btn-pay:hover { background: var(--brand-700); }

.btn-approved {
    flex: 1; padding: 10px 12px; background: var(--emerald-50); color: var(--emerald-600);
    border: 1px solid var(--emerald-100); border-radius: var(--radius-xl); white-space: nowrap; pointer-events: none;
}

@media (min-width: 768px) {
    .btn-edit { padding: 8px 12px; border-radius: var(--radius-md); box-shadow: none; border-color: transparent; background: var(--gray-100);}
    .btn-edit span { display: none; } /* Ẩn chữ "Sửa tin" trên PC, chỉ hiện icon */
    .btn-pay, .btn-approved { width: 100%; padding: 8px 16px; border-radius: var(--radius-md); box-shadow: var(--shadow-sm); }
}

/* --------------------------------------------------------
   5. TRẠNG THÁI TRỐNG (EMPTY STATE)
-------------------------------------------------------- */
.ql-empty { padding: 64px 16px; text-align: center; }
.ql-empty-icon {
    width: 96px; height: 96px; margin: 0 auto 16px; background: var(--gray-50);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    color: var(--gray-300); font-size: 36px; border: 1px solid var(--gray-100);
}
.ql-empty h3 { font-size: 20px; font-weight: 700; color: var(--gray-900); margin: 0 0 8px; }
.ql-empty p { color: var(--gray-500); margin: 0 0 24px; }
.btn-publish-first {
    display: inline-flex; align-items: center; gap: 8px; padding: 14px 32px;
    background: var(--brand-600); color: #fff; font-weight: 700;
    border-radius: var(--radius-xl); text-decoration: none; transition: var(--transition);
    box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.3);
}
.btn-publish-first:hover { background: var(--brand-700); transform: translateY(-2px); }

/* --------------------------------------------------------
   6. PHÂN TRANG (PAGINATION)
-------------------------------------------------------- */
.ql-pagination { margin-top: 32px; }
.ql-pagination ul { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; list-style: none; padding: 0; margin: 0; }
.ql-pagination a, .ql-pagination span.current {
    display: flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; padding: 0 10px;
    border-radius: var(--radius-md); font-weight: 600; transition: var(--transition); font-size: 14px; text-decoration: none;
}
.ql-pagination a { background: #fff; color: var(--gray-600); border: 1px solid var(--gray-200); box-shadow: var(--shadow-sm); }
.ql-pagination a:hover { background: var(--gray-50); color: var(--gray-800); border-color: var(--gray-300); }
.ql-pagination span.current { background: var(--brand-600); color: #fff; border: 1px solid var(--brand-600); box-shadow: 0 1px 2px rgba(37,99,235,0.2); pointer-events: none; }

/* =========================================================================
   CSS THUẦN CHO TRANG ĐĂNG TIN & THANH TOÁN (bds-dang-tin.css)
========================================================================= */

body { background-color: var(--gray-50); font-family: 'Inter', sans-serif; color: var(--gray-800); margin: 0; }
.dt-wrapper { max-width: 1000px; margin: 0 auto; padding: 40px 16px; }
@media (min-width: 768px) { .dt-wrapper { padding: 64px 16px; } }

/* --------------------------------------------------------
   1. THÔNG BÁO LỖI (ALERT)
-------------------------------------------------------- */
.dt-alert { display: flex; align-items: center; justify-content: center; gap: 12px; font-weight: 600; padding: 16px; border-radius: var(--radius-xl); margin: 0 auto 32px; max-width: 500px; }
.dt-alert-error { background: var(--red-50); color: var(--red-600); border: 1px solid var(--red-100); }

/* --------------------------------------------------------
   2. KHU VỰC THANH TOÁN
-------------------------------------------------------- */
.dt-payment-box { background: #fff; border-radius: var(--radius-2xl); box-shadow: 0 20px 25px -5px rgba(37,99,235,0.1); border: 1px solid var(--brand-100); overflow: hidden; max-width: 900px; margin: 0 auto; }
.dt-payment-header { background: var(--emerald-500); padding: 32px 24px; text-align: center; color: #fff; }
.dt-payment-icon { width: 64px; height: 64px; background: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--emerald-500); font-size: 32px; margin: 0 auto 16px; box-shadow: var(--shadow-lg); }
.dt-payment-header h2 { font-size: 24px; font-weight: 800; margin: 0 0 8px; }
.dt-payment-header p { margin: 0; opacity: 0.9; }

.dt-payment-body { padding: 32px; }
.dt-payment-title { text-align: center; font-size: 20px; font-weight: 800; color: var(--gray-800); margin: 0 0 32px; text-transform: uppercase; letter-spacing: 0.5px; }
.dt-payment-grid { display: grid; grid-template-columns: 1fr; gap: 32px; }
@media (min-width: 768px) { .dt-payment-grid { grid-template-columns: 1fr 1fr; } }

/* Quét QR */
.dt-qr-col { background: rgba(239, 246, 255, 0.5); border: 1px solid var(--brand-100); border-radius: var(--radius-2xl); padding: 24px; display: flex; flex-direction: column; items-center: center; position: relative; overflow: hidden; text-align: center; }
.dt-qr-badge { position: absolute; top: 0; right: 0; background: var(--brand-500); color: #fff; font-size: 11px; font-weight: 800; padding: 6px 12px; border-bottom-left-radius: 12px; text-transform: uppercase; }
.dt-qr-col h4, .dt-manual-col h4 { font-weight: 800; color: var(--gray-800); font-size: 18px; margin: 0 0 8px; }
.dt-qr-col p, .dt-manual-col p { font-size: 14px; color: var(--gray-500); margin: 0 0 24px; line-height: 1.5; }
.dt-qr-img-box { background: #fff; padding: 12px; border-radius: var(--radius-2xl); box-shadow: var(--shadow-sm); border: 1px solid var(--gray-100); position: relative; display: inline-block; margin: 0 auto; }
.dt-qr-img-box img { width: 220px; height: 220px; object-fit: cover; border-radius: var(--radius-xl); }

/* Chuyển khoản thủ công */
.dt-manual-col { background: var(--gray-50); border: 1px solid var(--gray-200); border-radius: var(--radius-2xl); padding: 24px; }
.dt-manual-list { list-style: none; padding: 0; margin: 0; }
.dt-manual-list li { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--gray-200); padding-bottom: 12px; margin-bottom: 12px; }
.dt-manual-list li span:first-child { color: var(--gray-500); font-size: 14px; }
.dt-manual-list li span:last-child { font-weight: 800; color: var(--gray-900); }
.dt-highlight-box { display: flex; flex-direction: column; gap: 8px; background: var(--yellow-50); padding: 16px; border-radius: var(--radius-xl); border: 1px solid var(--yellow-100); margin-top: 8px; text-align: center; }
.dt-highlight-box .lbl { color: var(--yellow-700); font-size: 14px; font-weight: 600; }
.dt-highlight-box .val { font-weight: 900; color: var(--gray-900); font-size: 20px; background: #fff; padding: 8px; border-radius: var(--radius-md); border: 1px solid var(--yellow-200); text-transform: uppercase; letter-spacing: 2px; color: var(--red-600); }

/* Trạng thái thanh toán */
.dt-status-indicator { margin: 24px auto 0; display: inline-flex; align-items: center; gap: 12px; color: var(--brand-600); font-weight: 600; background: #fff; padding: 10px 24px; border-radius: 50px; box-shadow: var(--shadow-sm); border: 1px solid var(--brand-100); }
.spinner-border { border: 3px solid rgba(0,0,0,0.1); border-left-color: var(--brand-500); border-radius: 50%; width: 20px; height: 20px; animation: spin 1s linear infinite; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
.dt-overlay-success { position: absolute; inset: 0; background: rgba(255,255,255,0.9); backdrop-filter: blur(4px); border-radius: var(--radius-2xl); display: flex; flex-direction: column; align-items: center; justify-content: center; z-index: 10; }
.dt-overlay-success.hidden { display: none; }
.dt-overlay-icon { width: 60px; height: 60px; background: var(--emerald-100); color: var(--emerald-500); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 28px; margin-bottom: 12px; }

/* --------------------------------------------------------
   3. KHU VỰC ĐĂNG NHẬP / ĐĂNG KÝ
-------------------------------------------------------- */
.dt-auth-header { text-align: center; margin-bottom: 32px; }
.dt-auth-header h1 { font-size: 28px; font-weight: 800; color: var(--gray-900); margin: 0 0 12px; }
.dt-auth-header p { color: var(--gray-500); margin: 0; }

.dt-auth-box { max-width: 450px; margin: 0 auto; background: #fff; border-radius: var(--radius-2xl); box-shadow: 0 20px 25px -5px rgba(37,99,235,0.1); border: 1px solid var(--gray-100); overflow: hidden; }
.dt-auth-tabs { display: flex; border-bottom: 1px solid var(--gray-100); }
.dt-tab-btn { flex: 1; padding: 16px; text-align: center; font-weight: 700; background: #fff; color: var(--gray-500); border: none; border-bottom: 2px solid transparent; cursor: pointer; transition: var(--transition); font-size: 16px; outline: none; }
.dt-tab-btn:hover { background: var(--gray-50); }
.dt-tab-btn.active { color: var(--brand-600); border-bottom-color: var(--brand-600); background: var(--brand-50); }

.dt-auth-body { padding: 32px; }
.dt-auth-content { display: none; }
.dt-auth-content.active { display: block; }
.dt-form-group { position: relative; margin-bottom: 16px; }
.dt-input-icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--gray-400); }
.dt-input { width: 100%; padding: 14px 16px 14px 44px; border: 1px solid var(--gray-200); border-radius: var(--radius-xl); font-size: 15px; font-family: inherit; color: var(--gray-900); transition: var(--transition); box-sizing: border-box; }
.dt-input:focus, .dt-textarea:focus, .dt-select:focus { outline: none; border-color: var(--brand-500); box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15); }
.dt-btn-submit { width: 100%; padding: 14px; background: var(--brand-600); color: #fff; font-weight: 800; font-size: 16px; border: none; border-radius: var(--radius-xl); cursor: pointer; transition: var(--transition); box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.3); display: flex; align-items: center; justify-content: center; gap: 8px;}
.dt-btn-submit:hover { background: var(--brand-700); transform: translateY(-2px); }
.dt-btn-register { background: var(--emerald-600); box-shadow: 0 10px 15px -3px rgba(16, 185, 129, 0.3); }
.dt-btn-register:hover { background: var(--emerald-700); }

/* --------------------------------------------------------
   4. FORM ĐĂNG TIN
-------------------------------------------------------- */
.dt-user-bar { display: flex; flex-direction: column; gap: 16px; background: #fff; padding: 20px; border-radius: var(--radius-2xl); box-shadow: var(--shadow-sm); border: 1px solid var(--gray-100); margin-bottom: 24px; align-items: flex-start; }
@media (min-width: 768px) { .dt-user-bar { flex-direction: row; justify-content: space-between; align-items: center; } }
.dt-user-info { display: flex; align-items: center; gap: 12px; }
.dt-user-avt { width: 48px; height: 48px; background: var(--brand-100); color: var(--brand-600); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: bold; }
.dt-user-name { font-size: 18px; font-weight: 800; color: var(--gray-900); margin: 0; }
.dt-btn-logout { background: var(--red-50); color: var(--red-500); padding: 8px 16px; border-radius: var(--radius-md); text-decoration: none; font-weight: 600; font-size: 14px; transition: var(--transition); display: flex; align-items: center; gap: 6px; }
.dt-btn-logout:hover { background: var(--red-100); color: var(--red-600); }

.dt-form-box { background: #fff; padding: 24px; border-radius: var(--radius-2xl); box-shadow: var(--shadow-sm); border: 1px solid var(--gray-100); position: relative; overflow: hidden; }
@media (min-width: 768px) { .dt-form-box { padding: 40px; } }
.dt-price-badge { position: absolute; top: 0; right: 0; background: var(--red-500); color: #fff; padding: 8px 24px; border-bottom-left-radius: 16px; font-weight: 800; font-size: 14px; box-shadow: var(--shadow-md); z-index: 10; }

.dt-form-header { margin-bottom: 32px; border-bottom: 1px solid var(--gray-100); padding-bottom: 20px; }
.dt-form-header h1 { font-size: 24px; font-weight: 800; color: var(--gray-900); margin: 0 0 8px; display: flex; align-items: center; gap: 12px; }
@media (min-width: 768px) { .dt-form-header h1 { font-size: 32px; } }
.dt-form-header p { color: var(--gray-500); margin: 0; }

.dt-form-grid { display: grid; grid-template-columns: 1fr; gap: 24px; margin-bottom: 24px; }
@media (min-width: 768px) { .dt-form-grid-2 { grid-template-columns: 1fr 1fr; } .dt-form-grid-3 { grid-template-columns: 1fr 2fr; } }
.dt-form-col { display: flex; flex-direction: column; }
.dt-label { font-size: 14px; font-weight: 700; color: var(--gray-700); margin-bottom: 10px; display: block; }
.dt-label span { color: var(--red-500); }
.dt-label-hint { color: var(--gray-400); font-weight: 400; }

/* Radio Cards (Nhu cầu) */
.dt-radio-group { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.dt-radio-input { display: none; }
.dt-radio-content { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid var(--gray-200); border-radius: var(--radius-xl); cursor: pointer; transition: var(--transition); background: #fff; }
.dt-radio-content i { font-size: 20px; color: var(--gray-400); transition: var(--transition); }
.dt-radio-content span { font-weight: 700; color: var(--gray-700); font-size: 15px; }
.dt-radio-input:checked + .dt-radio-content { border-color: var(--brand-500); background: var(--brand-50); box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1); }
.dt-radio-input:checked + .dt-radio-content i { color: var(--brand-600); }
.dt-radio-input:checked + .dt-radio-content span { color: var(--brand-600); }

/* Inputs & Selects */
.dt-select { width: 100%; padding: 14px 16px; border: 1px solid var(--gray-200); border-radius: var(--radius-xl); font-size: 15px; font-family: inherit; color: var(--gray-900); font-weight: 600; cursor: pointer; appearance: none; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%239ca3af'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E") no-repeat right 16px center/16px; transition: var(--transition); box-sizing: border-box;}
.dt-select-highlight { background-color: var(--brand-50); border-color: var(--brand-200); color: var(--brand-700); }
.dt-input-has-icon { padding-left: 44px; font-weight: 600; }
.dt-input-price { color: var(--red-600); font-size: 16px; }
.dt-input-phone { color: var(--brand-600); letter-spacing: 1px;}
.dt-textarea { width: 100%; padding: 16px; border: 1px solid var(--gray-200); border-radius: var(--radius-xl); font-size: 15px; font-family: inherit; color: var(--gray-900); transition: var(--transition); resize: vertical; min-height: 120px; box-sizing: border-box; }

.dt-price-preview { margin-top: 8px; font-size: 14px; font-weight: 700; color: var(--brand-600); margin-left: 4px; }
.hidden { display: none !important; }

/* Khu vực Upload Ảnh */
.dt-upload-box { background: var(--brand-50); border: 1px solid var(--brand-100); padding: 24px; border-radius: var(--radius-2xl); margin-bottom: 24px; }
.dt-upload-title { font-size: 15px; font-weight: 800; color: var(--brand-800); margin: 0 0 4px; }
.dt-upload-desc { font-size: 13px; color: var(--gray-500); margin: 0 0 16px; }
.dt-file-input { width: 100%; padding: 16px; border: 1px dashed var(--brand-300); border-radius: var(--radius-xl); background: #fff; color: var(--gray-600); cursor: pointer; transition: var(--transition); outline: none; box-sizing: border-box;}
.dt-file-input:focus { border-color: var(--brand-500); }
.dt-file-input::file-selector-button { margin-right: 16px; padding: 8px 20px; border-radius: var(--radius-lg); border: none; background: var(--brand-600); color: #fff; font-weight: 700; font-size: 14px; cursor: pointer; transition: var(--transition); }
.dt-file-input::file-selector-button:hover { background: var(--brand-700); }

/* Lưới Preview Ảnh (Giữ nguyên khung lưới của bạn) */
.dt-preview-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 16px; }
@media (min-width: 640px) { .dt-preview-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .dt-preview-grid { grid-template-columns: repeat(5, 1fr); } }
.dt-preview-item { position: relative; width: 100%; aspect-ratio: 1; border-radius: var(--radius-lg, 8px); overflow: hidden; box-shadow: var(--shadow-sm); border: 1px solid var(--gray-200, #e5e7eb); }
.dt-preview-item img { width: 100%; height: 100%; object-fit: cover; }

/* Icon đánh dấu Ảnh đại diện */
.dt-badge-main { 
    position: absolute; 
    top: 6px; /* Đặt sát mép hơn một chút */
    left: 6px; 
    background: var(--red-500, #ef4444); 
    color: #fff; 
    width: 16px; /* Thu nhỏ vòng tròn từ 28px xuống 22px */
    height: 16px; 
    border-radius: 50%; 
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px; /* Thu nhỏ cỡ icon ngôi sao bên trong */
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
    z-index: 10;
}
/* Không cần class .dt-badge-album nữa vì chúng ta sẽ không dùng nó */

/* Nút Submit cuối form */
.dt-form-footer { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--gray-100); display: flex; flex-direction: column; gap: 16px; }
@media (min-width: 768px) { .dt-form-footer { flex-direction: row; align-items: center; justify-content: space-between; } }
.dt-fee-notice { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; color: var(--gray-600); background: var(--gray-50); padding: 10px 16px; border-radius: var(--radius-lg); border: 1px solid var(--gray-200); }
.dt-fee-notice i { color: var(--red-500); }
.dt-btn-next { padding: 16px 32px; background: var(--brand-600); color: #fff; font-size: 18px; font-weight: 800; border: none; border-radius: var(--radius-xl); cursor: pointer; transition: var(--transition); box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.3); display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; }
@media (min-width: 768px) { .dt-btn-next { width: auto; } }
.dt-btn-next:hover { background: var(--brand-700); transform: translateY(-2px); }

/* Recaptcha margin */
.g-recaptcha { margin: 16px 0; }

/* --- BIẾN CẤU HÌNH HỆ THỐNG MÀU SẮC & PHÔNG CHỮ --- */
:root {
    --brand-color: #2563eb;
    --brand-hover: #1d4ed8;
    --brand-light: #f0f7ff;
    --brand-border: #e1effe;
    --emerald-color: #10b981;
    --emerald-hover: #059669;
    --emerald-light: #ecfdf5;
    --emerald-border: #d1fae5;
    --red-color: #ef4444;
    --red-dark: #dc2626;
    --text-main: #1f2937;
    --text-dark: #111827;
    --text-muted: #4b5563;
    --text-light: #6b7280;
    --bg-body: #f8fafc;
    --bg-card: #ffffff;
    --bg-light: #f9fafb;
    --border-color: #e5e7eb;
    --border-light: #f3f4f6;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* --- CẤU HÌNH CHUNG --- */
.author-profile-page {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--text-main);
    background-color: var(--bg-body);
    padding-top: 1.5rem;
    padding-bottom: 5rem;
}

.author-main-wrap {
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

@media (min-width: 768px) {
    .author-profile-page {
        padding-top: 2.5rem;
    }

    .author-main-wrap {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* --- ẨN THANH CUỘN CHO TRÌNH DUYỆT --- */
.hide-scrollbar::-webkit-scrollbar {
    display: none;
}

.hide-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* --- BREADCRUMB --- */
.broker-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 10px;
    color: var(--text-light);
    margin-bottom: 1.5rem;
    background: var(--bg-card);
    padding: 0.625rem 1rem;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    overflow-x: auto;
    white-space: nowrap;
}

.broker-breadcrumb a {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.3s;
}

.broker-breadcrumb a:hover {
    color: var(--brand-color);
}

.broker-breadcrumb .current {
    color: var(--text-dark);
    font-weight: 700;
}

.broker-breadcrumb .separator {
    color: #d1d5db;
    font-size: 10px;
}

@media (min-width: 768px) {
    .broker-breadcrumb {
        font-size: 14px;
        border-radius: 12px;
    }
}

/* --- KHỐI THÔNG TIN CHUYÊN VIÊN (BROKER CARD) --- */
.broker-profile-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.broker-card-decor {
    position: absolute;
    top: 0;
    right: 0;
    width: 16rem;
    height: 16rem;
    background: linear-gradient(to bottom left, var(--brand-light), transparent);
    border-bottom-left-radius: 9999px;
    z-index: 0;
    pointer-events: none;
}

.broker-avatar-wrap {
    position: relative;
    z-index: 10;
    width: 6rem;
    height: 6rem;
    flex-shrink: 0;
    border-radius: 9999px;
    border: 4px solid #fff;
    box-shadow: var(--shadow-md);
    overflow: hidden;
    background: var(--bg-light);
}

.broker-avatar-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.broker-avatar-empty {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    font-size: 1.875rem;
}

.broker-profile-info {
    position: relative;
    z-index: 10;
    flex: 1;
    text-align: center;
    width: 100%;
}

.broker-meta-row {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1rem;
}

.broker-name {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    margin-top: 0;
}

.broker-name i {
    color: var(--brand-color);
    font-size: 1.125rem;
}

.broker-badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.badge-item {
    inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 700;
    border: 1px solid;
}

.badge-item.brand {
    background-color: var(--brand-light);
    color: #1d4ed8;
    border-color: var(--brand-border);
}

.badge-item.emerald {
    background-color: var(--emerald-light);
    color: #047857;
    border-color: var(--emerald-border);
}

.broker-contact-actions {
    display: flex;
    justify-content: center;
    gap: 0.625rem;
}

.btn-contact {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 700;
    padding: 0.625rem 1.25rem;
    border-radius: 12px;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.btn-contact:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-contact.call {
    background-color: var(--brand-color);
    color: #fff;
}

.btn-contact.call:hover {
    background-color: var(--brand-hover);
}

.btn-contact.zalo {
    background-color: #3b82f6;
    color: #fff;
}

.btn-contact.zalo:hover {
    background-color: #2563eb;
}

.broker-desc {
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.625;
    border-top: 1px solid var(--border-light);
    pt-4;
    padding-top: 1rem;
    margin-top: 0;
    text-align: left;
}

@media (min-width: 768px) {
    .broker-profile-card {
        flex-direction: row;
        align-items: flex-start;
        padding: 2rem;
        gap: 2rem;
    }

    .broker-avatar-wrap {
        width: 8rem;
        height: 8rem;
    }

    .broker-profile-info {
        text-align: left;
    }

    .broker-name {
        font-size: 1.875rem;
        justify-content: flex-start;
    }

    .broker-badges {
        justify-content: flex-start;
    }

    .badge-item {
        font-size: 14px;
    }

    .broker-contact-actions {
        justify-content: flex-start;
    }

    .broker-desc {
        font-size: 15px;
    }
}

@media (min-width: 1200px) {
    .broker-meta-row {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
    }
}

/* --- TIÊU ĐỀ KHỐI CHUYÊN MỤC --- */
.section-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-top: 0;
    margin-bottom: 1.25rem;
    border-left: 4px solid;
    padding-left: 0.75rem;
}

.section-title.title-brand {
    border-left-color: var(--brand-color);
}

.section-title.title-emerald {
    border-left-color: var(--emerald-color);
}

@media (min-width: 768px) {
    .section-title {
        font-size: 1.5rem;
    }
}

/* --- HỆ THỐNG CẤU TRÚC CARD BẤT ĐỘNG SẢN --- */
.property-grid-container {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

@media (min-width: 768px) {
    .property-grid-container {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 1.5rem;
    }
}

@media (min-width: 1200px) {
    .property-grid-container {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.property-item-card {
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    h-full: 100%;
    transition: all 0.3s duration;
    height: 100%;
    text-decoration: none;
}

.property-item-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: #d1d5db;
}

.card-img-container {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    background-color: var(--bg-light);
}

.card-badge-status {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    text-transform: uppercase;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
    z-index: 10;
    box-shadow: var(--shadow-sm);
    tracking-wide: 0.05em;
}

.card-badge-status.badge-sale {
    background-color: var(--red-color);
}

.card-badge-status.badge-rent {
    background-color: var(--emerald-color);
}

.card-img-container img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.property-item-card:hover .card-img-container img {
    transform: scale(1.05);
}

.card-img-empty {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    font-size: 12px;
    background-color: var(--border-light);
}

.card-img-empty i {
    font-size: 1.25rem;
    opacity: 0.3;
    margin-bottom: 0.25rem;
}

.card-info {
    padding: 0.625rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dark);
    line-height: 1.4;
    margin-top: 0;
    margin-bottom: 0.375rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.5rem;
    transition: color 0.3s;
}

.card-title a {
    color: var(--text-dark);
    text-decoration: none;
}

.property-item-card:hover .card-title a,
.property-item-card:hover .card-title {
    color: var(--brand-color);
}

.card-price {
    font-size: 14px;
    font-weight: 800;
    color: var(--red-dark);
    margin-bottom: 0.5rem;
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
    margin-top: auto;
    border-top: 1px solid var(--border-light);
    padding-top: 0.625rem;
}

.card-meta i {
    color: var(--brand-color);
    opacity: 0.8;
}

@media (min-width: 768px) {
    .property-item-card {
        border-radius: 16px;
    }

    .card-badge-status {
        top: 0.75rem;
        left: 0.75rem;
        font-size: 10px;
        padding: 0.25rem 0.625rem;
        border-radius: 6px;
    }

    .card-info {
        padding: 1rem;
    }

    .card-title {
        font-size: 16px;
        font-weight: 700;
        margin-bottom: 0.5rem;
        height: 2.8rem;
    }

    .card-price {
        font-size: 1.25rem;
        margin-bottom: 0.75rem;
    }

    .card-meta {
        font-size: 13px;
        padding-top: 0.875rem;
        gap: 1rem;
    }

    .card-img-empty {
        font-size: 14px;
    }

    .card-img-empty i {
        font-size: 1.875rem;
    }
}

/* --- TRẠNG THÁI TRỐNG DỮ LIỆU --- */
.grid-empty-state {
    grid-column: 1 / -1;
    padding: 3rem 0;
    background-color: var(--bg-light);
    border-radius: 16px;
    border: 2px dashed var(--border-color);
    text-align: center;
}

.grid-empty-state i {
    font-size: 1.875rem;
    color: #d1d5db;
    margin-bottom: 0.75rem;
    display: block;
}

.grid-empty-state h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.grid-empty-state p {
    font-size: 14px;
    color: var(--text-light);
    margin: 0;
}

@media (min-width: 768px) {
    .grid-empty-state {
        padding: 5rem 0;
    }

    .grid-empty-state i {
        font-size: 2.5rem;
    }

    .grid-empty-state h3 {
        font-size: 1.25rem;
    }
}

/* --- PHÂN TRANG (PAGINATION) --- */
.bds-pagination {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 2rem;
    margin-bottom: 3rem;
}

.bds-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.3s ease;
    background: #fff;
    color: #4b5563;
    border: 1px solid #e5e7eb;
}

.bds-pagination .page-numbers:hover {
    background: #eff6ff;
    border-color: var(--brand-color);
    color: var(--brand-color);
}

.bds-pagination .current {
    background: var(--brand-color);
    color: #fff;
    border-color: var(--brand-color);
    pointer-events: none;
}

@media (min-width: 768px) {
    .bds-pagination .page-numbers {
        min-width: 42px;
        height: 42px;
        font-size: 1rem;
        border-radius: 10px;
    }
}

/* --- HỆ THỐNG CẤU TRÚC CARD TIN TỨC (NEWS) --- */
.news-section-wrap {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.news-grid-container {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 1rem;
}

@media (min-width: 768px) {
    .news-section-wrap {
        margin-top: 4rem;
        padding-top: 2.5rem;
    }

    .news-grid-container {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .news-grid-container {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.news-item-card {
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: all 0.3s;
}

.news-item-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.news-img-container {
    position: relative;
    aspect-ratio: 16/9;
    background-color: var(--bg-light);
    overflow: hidden;
}

.news-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.news-item-card:hover .news-img-container img {
    transform: scale(1.05);
}

.news-img-empty {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    background-color: var(--border-light);
}

.news-img-empty i {
    font-size: 1.25rem;
    opacity: 0.3;
    margin-bottom: 0.25rem;
}

@media (min-width: 768px) {
    .news-item-card {
        border-radius: 16px;
    }

    .news-img-empty i {
        font-size: 1.875rem;
    }
}

.news-info {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.news-date {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.news-date i {
    color: var(--emerald-color);
}

.news-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.4;
    margin-top: 0;
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s;
}

.news-title a {
    color: var(--text-dark);
    text-decoration: none;
}

.news-item-card:hover .news-title a,
.news-item-card:hover .news-title {
    color: var(--emerald-color);
}

.news-excerpt {
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.5;
    margin-top: 0;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-link {
    margin-top: auto;
    inline-flex: inline-flex;
    align-items: center;
    color: var(--emerald-color);
    font-weight: 700;
    font-size: 13px;
    text-decoration: none;
    transition: color 0.3s;
}

.news-link:hover {
    color: var(--emerald-hover);
}

.news-link i {
    margin-left: 0.375rem;
    font-size: 10px;
}

@media (min-width: 768px) {
    .news-info {
        padding: 1.25rem;
    }

    .news-date {
        font-size: 12px;
    }

    .news-title {
        font-size: 16px;
    }

    .news-excerpt {
        font-size: 14px;
    }

    .news-link {
        font-size: 14px;
    }
}

/* --- NÚT XEM THÊM (LOAD MORE) --- */
.load-more-center {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}

.btn-load-more {
    background: #fff;
    border: 2px solid var(--emerald-color);
    color: var(--emerald-color);
    font-weight: 700;
    padding: 0.625rem 1.5rem;
    border-radius: 9999px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: var(--shadow-sm);
}

.btn-load-more:hover {
    background-color: var(--emerald-light);
}

.btn-load-more:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

@media (min-width: 768px) {
    .btn-load-more {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

/* Hiệu ứng load list bất động sản */
/* 1. Đảm bảo khung chứa có vị trí tương đối để phủ overlay */
.bds-grid-relative {
    position: relative !important;
    min-height: 300px;
}

/* 2. Hiệu ứng Kính mờ (Glassmorphism) che phủ danh sách cũ */
.bds-realtime-loader {
    position: absolute;
    inset: 0;
    z-index: 99;
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 15%; /* Giữ vòng xoay luôn ở tầm mắt người dùng */
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease-in-out;
    border-radius: 12px; /* Bo góc mềm mại */
}

/* Lớp kích hoạt hiển thị */
.bds-realtime-loader.show {
    opacity: 1;
    visibility: visible;
}

/* 3. Vòng xoay Spinner hiện đại */
.bds-loader-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #e2e8f0;
    border-top-color: #3182ce; /* Màu xanh Trust / Chuyên nghiệp */
    border-radius: 50%;
    animation: bds-spin 1s cubic-bezier(0.55, 0.15, 0.45, 0.85) infinite;
    margin-bottom: 16px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

/* 4. Text thông báo nhấp nháy nhẹ (Pulse effect) */
.bds-loader-text {
    color: #2d3748;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.3px;
    animation: bds-pulse 1.5s ease-in-out infinite;
}

/* Keyframes chuyển động */
@keyframes bds-spin {
    to { transform: rotate(360deg); }
}
@keyframes bds-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Bố cục cơ bản đảm bảo cho Layout ngang */
.detail-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    align-items: flex-start;
}
.main-content {
    flex: 1 1 65%;
    min-width: 0;
}
.sidebar-content {
    flex: 1 1 30%;
    position: sticky;
    top: 20px;
}

/* Các nút điều hướng ở trang ảnh */
.attachment-nav-buttons .btn-nav {
    display: inline-block;
    padding: 8px 15px;
    background: #f1f5f9;
    color: #334155;
    border-radius: 5px;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
    border: 1px solid #cbd5e1;
}
.attachment-nav-buttons .btn-nav:hover {
    background: #e2e8f0;
    color: #0f172a;
}
.attachment-nav-buttons a {
    text-decoration: none;
}
.btn-return-post {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
}
.btn-return-post:hover {
    background: #004494 !important;
    transform: translateY(-2px);
}

/* Responsive cho Điện thoại di động */
@media (max-width: 768px) {
    .detail-layout {
        flex-direction: column;
    }
    .main-content, .sidebar-content {
        flex: 1 1 100%;
        width: 100%;
    }
    .sidebar-content {
        position: static; /* Tắt sticky trên mobile để không lỗi cuộn */
    }
    .attachment-nav-buttons {
        flex-direction: column;
        text-align: center;
    }
    .prev-next-links {
        display: flex;
        justify-content: space-between;
        width: 100%;
    }
    .btn-return-post {
        width: 100%;
        display: block;
        box-sizing: border-box;
    }
}