/* ==================== LISTING PAGE: FILTER BAR ==================== */
.filter-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    align-items: flex-end;
    gap: 1.5rem;
    padding: 1.5rem;
    background-color: #ffffff;
    border-radius: 1rem;
    box-shadow: 0 8px 20px rgba(0,0,0,0.07);
    margin-bottom: 3rem;
    border: 1px solid var(--color-border);
}

.filter-group {
    min-width: 150px;
}

.filter-group label {
    display: block;
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    color: var(--color-dark);
}

.filter-group label i {
    color: var(--color-primary);
    margin-right: 0.25rem;
    width: 15px;
    text-align: center;
}

.filter-group select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: 0.5rem;
    font-family: inherit;
    font-size: 0.95rem;
    background-color: var(--color-light-gray);
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24' fill='%236B7280'%3E%3Cpath d='M7 10l5 5 5-5H7z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1.2em;
    cursor: pointer;
}

.filter-group select:focus {
    outline: none;
    border-color: var(--color-blue);
    box-shadow: 0 0 0 3px rgba(0, 163, 255, 0.2);
}

.view-toggle {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

.view-btn {
    padding: 0.75rem;
    font-size: 1.2rem;
    border: 1px solid var(--color-border);
    background-color: var(--color-light-gray);
    color: var(--color-mid-gray);
    border-radius: 0.5rem;
    cursor: pointer;
    line-height: 1;
    transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}

.view-btn:hover {
    background-color: var(--color-border);
}

.view-btn.active {
    background-color: var(--color-blue);
    color: white;
    border-color: var(--color-blue);
}

/* ==================== LISTING PAGE: GRID & LIST VIEW ==================== */
.properties-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

/* LIST VIEW STYLES */
.properties-grid.list-view {
    grid-template-columns: 1fr; /* Single column for list view */
    gap: 1.5rem;
}

.list-view .property-card {
    display: flex;
    align-items: center;
    overflow: visible; /* Allows shadow to show */
}

.list-view .property-card .property-image-wrapper {
    flex: 0 0 300px; /* Fixed width for the image */
    height: 220px;
    border-radius: 0.75rem;
    overflow: hidden;
}

.list-view .property-card .property-info {
    flex: 1;
    padding: 1.5rem 2rem;
    display: flex;
    flex-direction: column;
}

.list-view .property-card .property-name { order: 0; }
.list-view .property-card .property-location { order: 1; }
.list-view .property-card .property-features { order: 2; margin-bottom: 1rem; }
.list-view .property-card .btn-details { order: 3; margin-top: auto; max-width: 200px; }
.list-view .property-card .property-card-link { border-radius: 0.75rem; }

/* ==================== NO RESULTS & LOAD MORE ==================== */
.no-results-message {
    text-align: center;
    padding: 4rem 2rem;
    background-color: #fff;
    border-radius: 1rem;
    border: 1px dashed var(--color-border);
}
.no-results-message h3 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.load-more-container {
    text-align: center;
    margin-top: 3rem;
}

/* ==================== RESPONSIVE ADJUSTMENTS ==================== */
@media screen and (max-width: 1024px) {
    .properties-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 768px) {
    .filter-bar {
        grid-template-columns: 1fr 1fr; /* Two columns on tablet */
    }
    .view-toggle {
        grid-column: 2 / -1; /* Span the last column */
    }
    .list-view .property-card {
        flex-direction: column;
        align-items: stretch;
    }
    .list-view .property-card .property-image-wrapper {
        flex-basis: 200px; /* Smaller height on mobile */
        width: 100%;
    }
}

@media screen and (max-width: 640px) {
    .filter-bar {
        grid-template-columns: 1fr; /* Single column on mobile */
        gap: 1rem;
    }
    .view-toggle {
        grid-column: 1 / -1; /* Full width */
        justify-content: flex-start;
    }
    .properties-grid {
        grid-template-columns: 1fr;
    }
}