/* --- base.css --- */
/* CSS cài đặt màu sắc và định dạng cơ bản */
:root {
    --primary-red: #c0392b;
    /* Tone màu đỏ của logo ThoLand */
    --dark-gray: #333333;
    --light-bg: #f5f6fa;
}

html {
    scroll-behavior: smooth;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

body {
    color: var(--dark-gray);
    line-height: 1.6;
    scroll-behavior: smooth;

    /* CHỐNG BÔI ĐEN CHỮ TOÀN TRANG */
    -webkit-user-select: none;
    /* Dành cho Safari/Chrome */
    -ms-user-select: none;
    /* Dành cho trình duyệt cũ của Microsoft */
    user-select: none;
    /* Chuẩn chung */
}

/* =========================================
   BẢO MẬT: CHỐNG COPY VÀ TẢI ẢNH
   ========================================= */
img {
    -webkit-user-drag: none;
    /* Chặn kéo thả ảnh ra ngoài Desktop (Chrome, Safari) */
    -khtml-user-drag: none;
    -moz-user-drag: none;
    /* Chặn kéo thả trên Firefox */
    -o-user-drag: none;
    /* user-drag: none; */

    -webkit-touch-callout: none;
    /* Chặn menu "Lưu ảnh" khi nhấn giữ trên iPhone/iPad */
    user-select: none;
    /* Chặn bôi đen để copy */
    -webkit-user-select: none;
}

/* =========================================
   NGOẠI LỆ: VẪN CHO PHÉP BÔI ĐEN TRONG FORM
   ========================================= */
input,
textarea {
    -webkit-user-select: auto;
    -ms-user-select: auto;
    user-select: auto;
}

/* =========================================
   NÚT LIÊN HỆ MẠNG XÃ HỘI (ZALO, FACEBOOK)
   ========================================= */
.action-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
}

.btn-zalo,
.btn-fb {
    padding: 10px 18px;
    border-radius: 6px;
    color: white !important;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    /* Chống rớt dòng chữ */
}

.btn-zalo {
    background-color: #0068ff;
    /* Màu xanh chuẩn của Zalo */
}

.btn-zalo:hover {
    background-color: #0054cc;
}

.btn-fb {
    background-color: #1877f2;
    /* Màu xanh chuẩn của Facebook */
}

.btn-fb:hover {
    background-color: #145dbf;
}

/* Đảm bảo khung nút trong Popup không bị chật */
.modal-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    /* Tự động rớt xuống dòng nếu màn hình điện thoại quá hẹp */
    margin-top: 20px;
}

/* TỐI ƯU HIỂN THỊ CHO ĐIỆN THOẠI */
@media (max-width: 768px) {
    .action-buttons {
        gap: 5px;
    }

    /* Thu nhỏ chữ và lề để nhét vừa 3 nút trên màn hình nhỏ */
    .btn-zalo,
    .btn-fb,
    .btn-call {
        padding: 8px 10px;
        font-size: 13px;
    }
}

/* --- header.css --- */
/* Phần Header (Thanh điều hướng) */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 10%;
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo {
    font-size: 32px;
    font-weight: 800;
    color: var(--primary-red);
    text-decoration: none;
    line-height: 1.2;
}

.logo span {
    color: var(--dark-gray);
    font-size: 13px;
    display: block;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Căn chỉnh kích thước hình ảnh logo */
.logo img {
    max-height: 60px;
    width: auto;
    display: block;
    margin-bottom: 5px;
}

.nav-links a {
    margin: 0 15px;
    text-decoration: none;
    color: var(--dark-gray);
    font-weight: 600;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--primary-red);
}

.btn-call {
    background: var(--primary-red);
    color: white;
    padding: 10px 24px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background 0.3s;
}

.btn-call:hover {
    background: #992d22;
}

/* =========================================
   CẤU HÌNH NÚT HAMBURGER (MẶC ĐỊNH ẨN TRÊN PC)
   ========================================= */
.hamburger {
    display: none;
    /* Ẩn trên máy tính */
    flex-direction: column;
    cursor: pointer;
    gap: 6px;
    /* Khoảng cách giữa 3 thanh gạch ngang */
    padding: 5px;
    z-index: 100;
}

.hamburger span {
    display: block;
    width: 28px;
    height: 3px;
    background-color: #333;
    /* Màu đen thanh lịch cho 3 gạch */
    border-radius: 2px;
    transition: all 0.3s ease-in-out;
    /* Tạo chuyển động mượt mà */
}

/* =========================================
   XỬ LÝ ĐÁP ỨNG RESPONSIVE TRÊN MOBILE
   ========================================= */
@media (max-width: 900px) {
    header {
        justify-content: space-between;
        flex-wrap: wrap;
        /* Cho phép các phần tử con rớt dòng khi menu mở rộng */
        padding: 15px 20px;
        height: auto;
    }

    .logo {
        order: 1;
        /* Cố định vị trí Logo luôn ở hàng đầu bên trái */
    }

    .hamburger {
        display: flex;
        /* Hiện nút Hamburger ở hàng đầu bên phải */
        order: 2;
    }

    /* ẨN TOÀN BỘ MENU CHỮ VÀ NÚT LIÊN HỆ KHI CHƯA BẤM MỞ */
    .nav-links,
    .action-buttons {
        display: none !important;
        width: 100%;
    }

    /* =========================================
       GIAO DIỆN KHI MENU ĐƯỢC BẤM KÍCH HOẠT (.menu-active)
       ========================================= */

    /* 1. Đổ menu chữ thành hàng dọc thông thoáng */
    header.menu-active .nav-links {
        display: flex !important;
        flex-direction: column;
        align-items: center;
        gap: 18px;
        margin-top: 25px;
        order: 3;
        /* Nằm ở dòng thứ 2 */
    }

    header.menu-active .nav-links a {
        font-size: 16px;
        font-weight: 600;
        width: 100%;
        text-align: center;
        padding: 8px 0;
    }

    /* 2. Đổ khối 3 nút liên hệ thành hàng dọc nằm dưới cùng */
    header.menu-active .action-buttons {
        display: flex !important;
        flex-direction: column;
        gap: 12px;
        margin-top: 15px;
        margin-bottom: 10px;
        order: 4;
        /* Nằm ở dòng thứ 3 dưới cùng */
    }

    header.menu-active .action-buttons a {
        width: 100%;
        max-width: 300px;
        /* Khống chế bề rộng nút nằm giữa màn hình mobile */
        margin: 0 auto;
        padding: 12px !important;
        font-size: 14px !important;
        text-align: center;
        box-sizing: border-box;
    }

    /* =========================================
       HIỆU ỨNG BIẾN ĐỔI NÚT HAMBURGER THÀNH DẤU X
       ========================================= */
    /* Thanh gạch số 1 xoay chéo xuống */
    header.menu-active .hamburger span:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
        background-color: var(--primary-red);
        /* Đổi sang màu đỏ tạo điểm nhấn biệt lập */
    }

    /* Thanh gạch số 2 ở giữa ẩn biến mất */
    header.menu-active .hamburger span:nth-child(2) {
        opacity: 0;
        transform: translateX(-10px);
    }

    /* Thanh gạch số 3 dưới cùng xoay chéo ngược lên */
    header.menu-active .hamburger span:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
        background-color: var(--primary-red);
    }
}

/* --- hero.css --- */
/* Phần Hero (Màn hình chính diện) */
.hero {
    background:
        linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.7)),
        url("https://images.unsplash.com/photo-1600596542815-ffad4c1539a9?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80") center/cover;
    color: white;
    text-align: center;
    padding: 150px 20px;
}

.hero h1 {
    font-size: 48px;
    margin-bottom: 20px;
    font-weight: 800;
}

.hero p {
    font-size: 20px;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    color: #ddd;
}

.btn-main {
    background: var(--primary-red);
    color: white;
    padding: 16px 36px;
    font-size: 18px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    font-weight: bold;
    transition: transform 0.2s;
}

.btn-main:hover {
    transform: scale(1.05);
}

/* --- projects.css --- */
/* Phần Danh sách Bất động sản nổi bật */
.section {
    padding: 80px 10%;
    background: var(--light-bg);
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    font-size: 36px;
    color: var(--primary-red);
    margin-bottom: 10px;
    text-transform: uppercase;
}

.section-header p {
    color: #666;
    font-size: 16px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition:
        transform 0.3s,
        box-shadow 0.3s;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.card img {
    width: 100%;
    height: 240px;
    object-fit: cover;
}

.card-content {
    padding: 25px;
}

.card-price {
    color: var(--primary-red);
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 10px;
}

.card-title {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 15px;
    color: var(--dark-gray);
}

.card-info {
    font-size: 15px;
    color: #555;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    padding: 10px 0;
}

.btn-outline {
    display: block;
    text-align: center;
    border: 2px solid var(--primary-red);
    color: var(--primary-red);
    padding: 10px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s;
}

.btn-outline:hover {
    background: var(--primary-red);
    color: white;
}

/* Giao diện mô tả ngắn trên thẻ Card */
.card-desc {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
    line-height: 1.6;

    /* Hiệu ứng giới hạn văn bản tối đa 3 dòng và thêm dấu 3 chấm */
    display: -webkit-box;
    line-clamp: 3;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* =========================================
   HUY HIỆU NGÔI SAO NỔI BẬT (FEATURED BADGE)
   ========================================= */

/* Đảm bảo thẻ card làm gốc tọa độ cho ngôi sao */
.card {
    position: relative; 
}

.featured-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background-color: #f39c12; /* Màu vàng cam sang trọng */
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    z-index: 5; /* Đảm bảo ngôi sao luôn nằm đè lên trên ảnh */
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    
    /* Hiệu ứng đập nhẹ nhàng thu hút sự chú ý */
    animation: pulseStar 2s infinite;
}

@keyframes pulseStar {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); }
}

/* --- about.css --- */
/* PHẦN GIỚI THIỆU (ABOUT SECTION) */
.about-section {
    background: var(--light-bg);
}

.about-container {
    max-width: 800px;
    margin: 0 auto;
    text-align: justify;
}

.about-text {
    margin-bottom: 20px;
    font-size: 16px;
    color: #444;
    line-height: 1.8;
}

.about-stats {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #eee;
    text-align: center;
}

.stat-item {
    flex: 1;
    min-width: 120px;
}

.stat-number {
    display: block;
    font-size: 36px;
    font-weight: 800;
    color: var(--primary-red);
    margin-bottom: 5px;
}

.stat-label {
    font-size: 14px;
    color: #666;
    font-weight: 600;
    text-transform: uppercase;
}

.about-content {
    display: flex;
    /* Bố cục cột ngầm bằng Flexbox */
    align-items: center;
    /* Căn giữa ảnh và văn bản theo chiều dọc */
    gap: 50px;
    /* Khoảng cách giữa ảnh và văn bản */
    margin-bottom: 50px;
    /* Khoảng cách với phần thống kê bên dưới */
}

.about-image-col {
    flex: 0 0 35%;
    /* Đặt chiều rộng cột ảnh cố định là 35% */
    text-align: center;
    /* Căn giữa ảnh và caption */
}

.about-image-col img {
    width: 100%;
    /* Lấp đầy chiều rộng cột */
    height: auto;
    /* Giữ tỷ lệ ảnh */
    border-radius: 5px;
    /* Bo góc ảnh một chút cho mềm mại */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    /* Tạo bóng đổ nhẹ để ảnh nổi bật */
}

.image-caption {
    margin-top: 15px;
    font-size: 15px;
    color: #666;
    font-weight: 600;
}

.about-text-col {
    flex: 1;
    /* Cột văn bản tự động lấp đầy không gian còn lại */
}

/* Thêm lề dưới cho thẻ p cuối cùng trong cột văn bản */
.about-text-col .about-text:last-child {
    margin-bottom: 0;
}

/* CSS cho thiết bị di động (Responsive) */
@media (max-width: 768px) {
    .about-content {
        flex-direction: column;
        /* Chuyển thành bố cục hàng dọc trên điện thoại */
        gap: 30px;
        /* Giảm khoảng cách */
    }

    .about-image-col {
        flex: 0 0 100%;
        /* Cột ảnh lấp đầy chiều rộng màn hình */
        max-width: 300px;
        /* Giới hạn chiều rộng ảnh không quá to */
        margin: 0 auto;
        /* Căn giữa */
    }
}

/* --- contact.css --- */
/* Phần Form Liên Hệ */
.contact {
    padding: 80px 10%;
    background: white;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 40px;
}

.contact-info {
    flex: 1;
    min-width: 300px;
}

.contact-info h2 {
    font-size: 36px;
    color: var(--primary-red);
    margin-bottom: 20px;
}

.contact-info p {
    margin-bottom: 15px;
    font-size: 16px;
}

.contact-form {
    flex: 1;
    min-width: 300px;
    background: var(--light-bg);
    padding: 40px;
    border-radius: 8px;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

.contact-form button {
    width: 100%;
    background: var(--primary-red);
    color: white;
    padding: 15px;
    border: none;
    border-radius: 5px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
}

.contact-form button:hover {
    background: #992d22;
}

/* --- floating-contact.css --- */
/* --- NÚT LIÊN HỆ NỔI (FLOATING CONTACT) --- */
.floating-contact {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 1000;
    /* Đảm bảo luôn nằm trên các thành phần khác */
}

.contact-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background-color: white;
}

.contact-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

.contact-btn img {
    width: 30px;
    height: 30px;
    object-fit: contain;
}

/* Định dạng riêng cho từng nút */
.btn-phone {
    background-color: #27c93f;
    /* Màu xanh lá cây cho nút gọi */
    color: white;
    font-size: 22px;
}

.btn-zalo {
    /* Hình nền của Zalo icon đã đủ che nên có thể để trắng */
}

.btn-messenger {
    /* Hình nền của Messenger icon đã đủ che nên có thể để trắng */
}

/* --- HIỆU ỨNG RUNG (PULSE ANIMATION) --- */
/* Thêm hiệu ứng rung nhẹ cho nút điện thoại để gây chú ý */
.btn-phone {
    animation: pulseEffect 2s infinite;
}

@keyframes pulseEffect {
    0% {
        box-shadow: 0 0 0 0 rgba(39, 201, 63, 0.7);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(39, 201, 63, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(39, 201, 63, 0);
    }
}

/* --- ĐIỀU CHỈNH RESPONSIVE CHO MOBILE --- */
@media (max-width: 768px) {
    .floating-contact {
        bottom: 20px;
        right: 20px;
        gap: 12px;
        /* Thu hẹp khoảng cách trên mobile */
    }

    .contact-btn {
        width: 45px;
        height: 45px;
    }

    .contact-btn img {
        width: 26px;
        height: 26px;
    }

    .btn-phone {
        font-size: 20px;
    }
}

/* --- footer.css --- */
/* Footer */
footer {
    background: var(--dark-gray);
    color: white;
    text-align: center;
    padding: 25px;
    font-size: 15px;
}

/* --- properties-page.css --- */
/* =========================================
   GIAO DIỆN RIÊNG CHO TRANG SẢN PHẨM
   ========================================= */

.page-banner {
    background: var(--dark-gray);
    color: white;
    text-align: center;
    padding: 60px 20px;
    margin-bottom: 40px;
}

.page-banner h1 {
    font-size: 36px;
    color: var(--primary-red);
    margin-bottom: 10px;
}

.back-home {
    display: inline-block;
    margin-top: 20px;
    color: white;
    text-decoration: none;
    border: 1px solid white;
    padding: 8px 20px;
    border-radius: 5px;
    transition: 0.3s;
}

.back-home:hover {
    background: white;
    color: var(--dark-gray);
}

/* =========================================
   GIAO DIỆN POPUP (MODAL) CHI TIẾT SẢN PHẨM
   ========================================= */
.modal {
    display: none;
    /* Ẩn hoàn toàn khi mới vào web */
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.75);
    /* Nền đen mờ */
    align-items: center;
    justify-content: center;
    opacity: 0;
    animation: fadeIn 0.3s forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

.modal-content {
    background-color: #fff;
    border-radius: 12px;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    /* Không cao quá màn hình */
    overflow-y: auto;
    /* Tạo thanh cuộn nếu nội dung quá dài */
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    animation: slideUp 0.4s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Nút X tắt Popup ở góc phải */
.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    color: #999;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10;
    transition: 0.3s;
}

.close-btn:hover {
    color: var(--primary-red);
}

/* Bố cục chia 2 cột: Ảnh và Thông tin */
.modal-body {
    display: flex;
    flex-wrap: wrap;
}

.modal-image {
    flex: 1;
    min-width: 300px;
}

.modal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
}

.modal-info {
    flex: 1;
    min-width: 300px;
    padding: 40px;
    display: flex;
    flex-direction: column;
}

.modal-info h2 {
    color: var(--dark-gray);
    font-size: 28px;
    margin-bottom: 10px;
    line-height: 1.3;
}

.modal-price {
    color: var(--primary-red);
    font-size: 26px;
    font-weight: 800;
    margin-bottom: 20px;
}

/* Sao chép style từ khung info của thẻ card */
.modal-specs {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    padding: 15px 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    color: #555;
    font-weight: bold;
}

.modal-desc {
    color: #555;
    line-height: 1.8;
    margin-bottom: 30px;
    flex-grow: 1;
    text-align: justify;
}

.btn-call-popup {
    background: var(--primary-red);
    color: white;
    padding: 15px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    text-align: center;
    flex: 2;
    /* Nút gọi to hơn */
    transition: background 0.3s;
}

.btn-call-popup:hover {
    background: #992d22;
}

/* =========================================
   HIỆU ỨNG SLIDE ẢNH TRONG POPUP
   ========================================= */
.slider-container {
    position: relative;
    overflow: hidden;
    /* Giấu các ảnh bị tràn ra ngoài khung */
    display: flex;
    align-items: center;
    background-color: #f1f2f6;
    /* Màu nền chờ khi ảnh đang tải */
}

.slider-wrapper {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.4s ease-in-out;
    /* Hiệu ứng trượt mượt mà 0.4s */
}

.slider-wrapper img {
    width: 100%;
    flex-shrink: 0;
    /* Ép ảnh không bị co nhỏ lại */
    object-fit: cover;
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
}

/* Nút bấm chuyển ảnh trái phải */
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.4);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    cursor: pointer;
    font-size: 18px;
    border-radius: 50%;
    z-index: 10;
    transition: background 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.prev-btn {
    left: 10px;
}

.next-btn {
    right: 10px;
}

.slider-btn:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

/* Đảm bảo ảnh bo góc đúng trên điện thoại */
@media (max-width: 768px) {
    .slider-wrapper img {
        border-bottom-left-radius: 0;
        border-top-right-radius: 12px;
        max-height: 250px;
    }
}

/* =========================================
   ĐỒNG BỘ NÚT XEM THÊM SẢN PHẨM CAO CẤP
   ========================================= */
#load-more-container {
    text-align: center;
    margin: 50px 0 20px 0;
    /* Tạo khoảng cách thông thoáng trên dưới */
}

#btn-load-more {
    /* 1. Xóa bỏ hoàn toàn định dạng thô mặc định của trình duyệt */
    border: none;
    outline: none;
    font-family: inherit;
    /* Ép dùng chung phông chữ Segoe UI của hệ thống */

    /* 2. Thiết lập màu sắc và kích thước theo chuẩn ThoLand */
    background-color: var(--primary-red);
    /* Lấy màu đỏ thương hiệu */
    color: white;
    padding: 14px 35px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 6px;
    cursor: pointer;

    /* 3. Hiệu ứng đổ bóng đổ mịn màng */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease-in-out;
}

/* Hiệu ứng tương tác mượt mà khi di chuột vào nút */
#btn-load-more:hover {
    background-color: #992d22;
    /* Đỏ sậm hơn chút giống nút gọi điện */
    transform: translateY(-3px);
    /* Nút nhấc nhẹ lên tạo cảm giác nổi nổi */
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
    /* Bóng đổ đậm hơn khi nổi lên */
}

/* Hiệu ứng khi khách click chuột bấm vào nút */
#btn-load-more:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

/* =========================================
   CẤU TRÚC LƯỚI 2 DÒNG CHO 4 NÚT TRONG POPUP
   ========================================= */
.modal-actions {
    display: grid;
    /* Chia chính xác thành 2 cột bằng nhau, tự động tạo thành 2 dòng */
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    /* Khoảng cách thông thoáng giữa các nút */
    margin-top: 25px;
    width: 100%;
}

/* Đồng bộ kích thước cho tất cả các nút nằm trong Popup */
.modal-actions .btn-zalo,
.modal-actions .btn-fb,
.modal-actions .btn-call-popup,
.modal-actions .btn-close-popup {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 8px;
    /* Khoảng đệm vừa vặn */
    font-size: 15px;
    font-weight: bold;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    margin: 0;
    /* Xóa khoảng cách thừa */
    white-space: nowrap;
}

/* Đảm bảo nút Đóng (Close) có giao diện hài hòa */
.btn-close-popup {
    background-color: #e0e0e0;
    color: #333;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-close-popup:hover {
    background: #dfe4ea;
}

/* Dành cho màn hình điện thoại */
@media (max-width: 768px) {
    .modal-image img {
        border-bottom-left-radius: 0;
        border-top-right-radius: 12px;
        max-height: 250px;
    }

    .modal-info {
        padding: 25px 20px;
    }

    .modal-actions {
        flex-direction: column;
    }
}

/* =========================================
   THANH SẮP XẾP VÀ LỌC KÉP ĐỒNG BỘ CẤU TRÚC
   ========================================= */
.filter-container {
    display: flex;
    justify-content: flex-end;
    /* Đẩy toàn bộ bộ lọc sang góc phải */
    align-items: center;
    margin: 10px 0 35px 0;
    gap: 25px;
    /* Khoảng cách giữa bộ lọc Vị Trí và Giá */
    flex-wrap: wrap;
    /* Tự động xuống hàng nếu màn hình nhỏ */
}

.filter-item {
    display: flex;
    align-items: center;
}

.filter-item label {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #666;
    font-weight: 600;
    margin-right: 10px;
    white-space: nowrap;
}

.filter-item select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-color: #ffffff;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23333333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 15px;
    border: 1.5px solid #e2e8f0;
    border-radius: 6px;
    padding: 10px 42px 10px 16px;
    font-size: 14px;
    font-weight: 500;
    color: #2d3748;
    cursor: pointer;
    outline: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
    transition: all 0.2s ease-in-out;
}

.filter-item select:hover {
    border-color: var(--primary-red);
    background-color: #fafafa;
}

.filter-item select:focus {
    border-color: var(--primary-red);
    box-shadow: 0 0 0 3px rgba(186, 45, 33, 0.15);
}

/* =========================================
   THIẾT KẾ Ô TÌM KIẾM TEXT (CÓ NÚT X XÓA NHANH)
   ========================================= */
.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.filter-item input[type="text"] {
    border: 1.5px solid #e2e8f0;
    border-radius: 6px;
    /* Tăng padding bên phải (35px) để chừa chỗ trống cho nút X */
    padding: 10px 35px 10px 15px;
    font-size: 14px;
    font-family: inherit;
    color: #2d3748;
    outline: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
    transition: all 0.2s ease-in-out;
    width: 220px;
    box-sizing: border-box;
    /* Ép kích thước chuẩn không bị phình to */
}

.filter-item input[type="text"]:focus,
.filter-item input[type="text"]:hover {
    border-color: var(--primary-red);
}

.filter-item input[type="text"]:focus {
    box-shadow: 0 0 0 3px rgba(186, 45, 33, 0.15);
}

/* CSS Định vị và làm đẹp cho nút X */
#btn-clear-search {
    position: absolute;
    right: 12px;
    color: #a0aec0;
    font-size: 16px;
    cursor: pointer;
    display: none;
    /* Mặc định ẩn đi khi ô nhập đang trống */
    transition: color 0.2s;
}

#btn-clear-search:hover {
    color: var(--primary-red);
    /* Bấm vào X sẽ sáng màu đỏ */
}

/* TỐI ƯU TRÊN MOBILE */
@media (max-width: 768px) {
    .filter-container {
        justify-content: center;
        gap: 15px;
        padding: 0 15px;
    }

    .filter-item {
        width: 100%;
        /* Trên điện thoại, mỗi bộ lọc chiếm 1 hàng toàn màn hình */
        justify-content: space-between;
    }

    .filter-item select {
        flex: 1;
        max-width: 70%;
        padding: 8px 35px 8px 12px;
        font-size: 13px;
    }

    .search-box {
        flex: 1;
        max-width: 70%;
    }

    .filter-item input[type="text"] {
        width: 100%;
        max-width: 100%;
        padding: 8px 32px 8px 12px;
        font-size: 13px;
    }
}

/* =========================================
   THIẾT KẾ BỘ LỌC KHOẢNG GIÁ (TỪ X ĐẾN Y)
   ========================================= */
.price-range .range-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
    /* Khoảng cách giữa ô nhập và dấu gạch nối */
}

.range-separator {
    color: #666;
    font-weight: bold;
}

/* Định dạng riêng cho ô nhập Số (Number) */
.price-range input[type="number"] {
    border: 1.5px solid #e2e8f0;
    border-radius: 6px;
    padding: 10px;
    font-size: 14px;
    font-family: inherit;
    color: #2d3748;
    outline: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
    transition: all 0.2s ease-in-out;
    width: 85px;
    /* Giới hạn độ rộng để thanh công cụ không bị quá dài */
}

.price-range input[type="number"]:focus,
.price-range input[type="number"]:hover {
    border-color: var(--primary-red);
}

.price-range input[type="number"]:focus {
    box-shadow: 0 0 0 3px rgba(186, 45, 33, 0.15);
}

/* Ẩn mũi tên tăng/giảm số mặc định thô kệch của trình duyệt */
.price-range input[type="number"]::-webkit-outer-spin-button,
.price-range input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.price-range input[type="number"] {
    appearance: textfield;
    -moz-appearance: textfield;
}

/* Tối ưu khi xem trên điện thoại di động */
@media (max-width: 768px) {
    .price-range {
        justify-content: space-between;
        width: 100%;
    }

    .price-range .range-inputs {
        flex: 1;
        max-width: 70%;
        justify-content: space-between;
        /* Đẩy 2 ô giá ra 2 bên */
    }

    .price-range input[type="number"] {
        width: 45%;
        /* Chia đôi không gian cho 2 ô trên mobile */
        padding: 8px 5px;
        font-size: 13px;
        text-align: center;
    }
}


/* --- NEWS CUSTOM STYLES --- */
.news-card .card-content {
    display: flex;
    flex-direction: column;
}
.news-date {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 8px;
    font-style: italic;
}
.news-title {
    font-size: 1.1rem;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.news-desc {
    font-size: 0.95rem;
    color: #555;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}
.news-readmore {
    align-self: flex-start;
    margin-top: auto;
    font-size: 0.9rem;
    padding: 8px 15px;
}
