/* ================= GENERAL ================= */
.filters {
    text-align: center;
    margin-bottom: 25px;
}

/* Button styling */
button,
.filters button,
.search-btn {
    padding: 8px 15px;
    font-size: 14px;
    background: #0a7c2f;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

button:hover,
.filters button:hover,
.search-btn:hover {
    background: #086324;
    transform: translateY(-2px);
}

/* ================= INPUTS ================= */
#city,
#citySearch:focus {
    padding: 8px;
    font-size: 14px;
    border-color: #0a7c2f;
}

.input-wrapper {
    position: relative;
    flex: 3;
    min-width: 220px;
}

.input-wrapper input {
    width: 100%;
    height: 48px;
    padding: 12px 40px 12px 16px;
    border-radius: 50px;
    border: 1px solid #ddd;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    font-size: 0.95em;
    margin-bottom: 0px;
}

.input-wrapper .input-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #888;
    font-size: 1.1em;
}

/* ================= CUSTOM SELECT ================= */
.custom-select-wrapper {
    flex: 2;
    min-width: 180px;
    position: relative;
}

.custom-select {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 50px;
    padding: 0 16px;
    display: flex;
    align-items: center;
    height: 48px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    font-size: 0.95em;
    position: relative;
}

.custom-select .selected {
    flex: 1;
}

.custom-select .options {
    display: none;
    position: absolute;
    top: 110%;
    left: 0;
    width: 100%;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    max-height: 200px;
    overflow-y: auto;
    z-index: 10;
}

.custom-select .options div {
    padding: 10px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.custom-select .options div:hover {
    background: rgba(0, 123, 255, 0.1);
}

.custom-select.active .options {
    display: block;
}

/* ================= LISTINGS ================= */
#listings {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    align-items: flex-start;
    position: relative;
}

.card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s;
    flex: 1 1 300px;
    display: flex;
    flex-direction: column;
    margin: 0px 10px 0px 10px;
}

.card:hover {
    transform: translateY(-5px);
}

.card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.info {
    padding: 12px;
}

.price {
    font-size: 20px;
    font-weight: bold;
    color: #0a7c2f;
    margin-bottom: 5px;
}

.address {
    font-size: 14px;
    margin-bottom: 6px;
}

.details {
    color: #555;
    font-size: 13px;
}

.mls {
    color: #999;
    font-size: 12px;
    margin-top: 5px;
}

/* Suggestions dropdown */
.suggestions {
    position: absolute;
    background: white;
    border: 1px solid #ccc;
    width: 400px;
    max-height: 200px;
    overflow-y: auto;
    margin-top: 2px;
    display: none;
    z-index: 999;
}

.suggestions div {
    padding: 8px 12px;
    cursor: pointer;
}

.suggestions div:hover {
    background-color: #f5f5f5;
}

/* Dropdown inside forms */
#priceRange {
    padding: 0 10px;
    border-radius: 20px;
    border: 1px solid #ccc;
}

/* ================= LOADER ================= */
#loader {
    display: flex;
    justify-content: center;
    width: 100%;
    margin: 20px 0;
}

#loader img {
    width: 60px;
    height: 60px;
}

/* ================= SEARCH BAR ================= */
.search-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    align-items: stretch;
    width: 50%;
    max-width: 1200px;
    margin: 30px auto;
}

.search-btn {
    flex: 1;
    min-width: 150px;
    height: 48px;
    border-radius: 50px;
    border: none;
    font-weight: bold;
    color: #fff;
    background: rgb(100, 163, 10);
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-btn:hover {
    background: linear-gradient(135deg, #0056d2, #003e9e);
    transform: translateY(-2px);
}

.card {
    position: relative;  /* needed for badge positioning */
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
    margin: 10px;
}

.card img {
    width: 100%;
    display: block;
}

.card .badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: #ff5a5f; /* red-ish badge */
    color: #fff;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: bold;
    border-radius: 4px;
    z-index: 10;
    text-transform: uppercase;
}

.no-listings-card {
    text-align: center;
    padding: 50px 20px;
    background-color: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 12px;
    max-width: 400px;
    margin: 30px auto;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.no-listings-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.no-listings-card i {
    font-size: 60px;
    background: linear-gradient(45deg, #ff6b6b, #ff9f43);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 15px;
    display: inline-block;
    transition: transform 0.3s ease;
}

.no-listings-card i:hover {
    transform: scale(1.2) rotate(-10deg);
}

.no-listings-card h3 {
    font-size: 22px;
    margin: 10px 0;
    color: #333;
}

.no-listings-card p {
    font-size: 15px;
    color: #666;
    margin-bottom: 20px;
}

.no-listings-card button {
    padding: 10px 25px;
    font-size: 14px;
    border: none;
    background-color: #007bff;
    color: white;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.no-listings-card button:hover {
    background-color: #0056b3;
    transform: scale(1.05);
}




/* ================= RESPONSIVE ================= */
@media (max-width: 700px) {
    .search-bar {
        align-items: stretch;
    }

    .input-wrapper,
    .custom-select-wrapper,
    .search-btn {
        width: 100%;
    }
}