.wpr-home-search {
    max-width: 1100px;
    margin: 40px auto;
    text-align: center;
    font-family: "Inter", sans-serif;
}

/* ==============================
   Tabs: Mua bán / Cho thuê / Dự án
============================== */
.wpr-tabs {
    margin-bottom: 10px;
}

.wpr-tabs button {
    background: #f2f2f2;
    border: none;
    padding: 5px 18px;
    font-weight: 600;
    margin: 0 3px;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.2s;
}

.wpr-tabs button.active {
    background: #ff9800;
    color: #fff;
}

/* ==============================
   THANH TÌM KIẾM
============================== */
.wpr-search-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    border: none;
    border-radius: 12px;
    padding: 20px; /* ✅ cân đều trên dưới 20px */
    overflow: visible;
    position: relative;
    z-index: 1;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    gap: 10px;
}

/* ==============================
   NÚT DROPDOWN (Khu vực / Loại hình)
============================== */
.wpr-search-bar .dropdown {
    position: relative;
    flex-shrink: 0;
}

.wpr-search-bar .dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 8px 16px;
    cursor: pointer;
    font-weight: 500;
    color: #333;
    transition: 0.2s;
    min-width: 120px;
    height: 42px;
}

.wpr-search-bar .dropdown-toggle:hover {
    background: #f0f0f0;
}

/* icon trong nút */
.wpr-search-bar .dropdown-toggle i {
    font-size: 16px;
    color: #666;
}

/* ==============================
   DROPDOWN NỘI DUNG
============================== */
.wpr-search-bar .dropdown-content {
    display: none;
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    background: #fff;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    border-radius: 10px;
    padding: 12px 16px;
    min-width: 260px;
    z-index: 1000;
    text-align: left;
}

/* Hiển thị khi hover/focus */
.wpr-search-bar .dropdown:hover .dropdown-content,
.wpr-search-bar .dropdown:focus-within .dropdown-content,
.wpr-search-bar .dropdown-content:hover {
    display: block;
}

/* ==============================
   Ô TÌM KIẾM (ẩn khung text)
============================== */
.wpr-search-bar .search-box {
    display: flex;
    align-items: center;
    flex: 1;
    padding-left: 10px;
    height: 42px; /* ✅ chiều cao đồng nhất */
}

.wpr-search-bar .search-box .icon {
    font-size: 18px;
    margin-right: 8px;
    color: #666;
}

/* ✅ không có khung, vẫn gõ được */
.wpr-search-bar input[type="text"] {
    width: 100%;
    border: none;
    outline: none;
    font-size: 15px;
    background: transparent;
    color: #333;
    height: 100%;
}

/* ==============================
   NÚT TÌM NHÀ
============================== */
.wpr-search-bar .search-btn {
    background: #ff9800;
    border: none;
    color: #fff;
    font-weight: 600;
    padding: 0 25px; /* ✅ bỏ padding dọc */
    border-radius: 8px;
    cursor: pointer;
    transition: 0.2s;
    flex-shrink: 0;
    height: 42px;
    line-height: 42px; /* ✅ thêm dòng này để chữ căn giữa */
}


.wpr-search-bar .search-btn:hover {
    background: #e68900;
}

/* ==============================
   RESPONSIVE (Mobile)
============================== */
@media(max-width: 768px) {
    .wpr-search-bar {
        flex-direction: column;
        align-items: stretch;
        border-radius: 10px;
        gap: 8px;
        padding: 12px;
    }

    .wpr-search-bar .dropdown-toggle,
    .wpr-search-bar .search-btn {
        width: 100%;
    }

    .wpr-search-bar .dropdown-content {
        position: static;
        box-shadow: none;
        border: 1px solid #ddd;
        margin-top: 5px;
    }

    .wpr-search-bar .search-box {
        order: 3;
        width: 100%;
        padding: 0;
    }

    .wpr-search-bar .search-btn {
        order: 4;
    }
}

/* --- FIX hover vùng đệm --- */
.wpr-search-bar .dropdown::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 8px;
    background: transparent;
}
