/* Listings Page Styles */

.listings-page {
    padding: 2rem 0;
    min-height: 60vh;
}

.page-header {
    text-align: center;
    margin-bottom: 2rem;
}

.page-header h1 {
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

#resultsCount {
    color: #6b7280;
    font-size: 1.125rem;
}

.listings-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
}

/* Filters Sidebar */
.filters-sidebar {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    height: fit-content;
    position: sticky;
    top: 80px;
}

.filters-sidebar h2 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    color: var(--dark-color);
}

.filter-group {
    margin-bottom: 1.5rem;
}

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

.filter-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    background: white;
}

.filter-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.filter-actions button {
    width: 100%;
}

/* Listings Main */
.listings-main {
    width: 100%;
}

.listings-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    gap: 1rem;
}

.search-box {
    flex: 1;
    display: flex;
    gap: 0.5rem;
}

.search-box input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
}

.search-box button {
    padding: 0.75rem 1.5rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.view-controls {
    display: flex;
    gap: 0.5rem;
}

.view-btn {
    padding: 0.75rem 1rem;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
}

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

/* List View */
.listing-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.listing-list .listing-card {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 1.5rem;
}

.listing-list .listing-image {
    height: 150px;
}

/* Listing Detail Page */
.listing-detail-page {
    padding: 2rem 0;
}

.listing-detail {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.listing-header {
    position: relative;
}

.listing-cover {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

.listing-header-content {
    padding: 2rem;
}

.listing-header-content h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.listing-body {
    padding: 2rem;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

.listing-description h2,
.listing-contact h2,
.listing-social h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.listing-contact p,
.listing-social a {
    margin-bottom: 0.75rem;
    color: var(--text-color);
}

.listing-contact a,
.listing-social a {
    color: var(--primary-color);
    text-decoration: none;
}

.listing-contact a:hover,
.listing-social a:hover {
    text-decoration: underline;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.pagination button {
    padding: 0.5rem 1rem;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
}

.pagination button:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination button.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.no-results h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.no-results p {
    color: #6b7280;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .listings-layout {
        grid-template-columns: 1fr;
    }

    .filters-sidebar {
        position: static;
    }
}

@media (max-width: 768px) {
    .listings-toolbar {
        flex-direction: column;
    }

    .search-box {
        width: 100%;
    }

    .listing-list .listing-card {
        grid-template-columns: 1fr;
    }

    .listing-body {
        grid-template-columns: 1fr;
    }

    .listing-cover {
        height: 250px;
    }
}