/* Listings Page Specific Styles */

/* Listings Hero Section */
.listings-hero {
    background: linear-gradient(to right, var(--ocean-color), var(--light-color));
    padding: 40px 0;
    text-align: center;
}

.listings-hero h2 {
    font-family: 'Helvetica', sans-serif;
    font-size: 2.2rem;
    margin-bottom: 10px;
    color: var(--dark-color);
}

.listings-hero p {
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
    color: var(--text-color);
}

/* Advanced Filters Section */
.advanced-filters {
    background-color: white;
    padding: 1rem 0 1rem 0;
    box-shadow: var(--shadow);
}

.search-row {
    /* margin-bottom: 20px; */
}

.search-row .search-container {
    width: 100%;
}

.filters-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
}

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

.filter-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: var(--dark-color);
}

.filter-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 0;
    background-color: white;
    font-family: 'Poppins', sans-serif;
}

.active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.filter-tag {
    display: inline-flex;
    align-items: center;
    background-color: var(--sand-color);
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.9rem;
    gap: 5px;
}

.filter-tag button {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-color);
}

.clear-filters-btn {
    background-color: transparent;
    border: 1px solid #ddd;
    color: var(--text-color);
    padding: 8px 15px;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s ease;
}

.clear-filters-btn:hover {
    background-color: #f5f5f5;
    border-color: #ccc;
}

/* Listings Container */
.listings-container {
    padding: 30px 0 60px;
    background: linear-gradient(to right, var(--ocean-color), var(--light-color));

}

.listings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.listings-header h3 {
    font-weight: 500;
    color: var(--text-color);
}

.view-toggle {
    display: flex;
    gap: 10px;
}

.view-btn {
    background: none;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    padding: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #777;
    transition: all 0.3s ease;
}

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

.view-btn:hover:not(.active) {
    background-color: #f5f5f5;
}

/* List View Styles */
.items-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.item-list-card {
    display: flex;
    background-color: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.item-list-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.item-list-image {
    width: 200px;
    height: 150px;
    flex-shrink: 0;
}

.item-list-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.item-list-details {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.item-list-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.item-list-title {
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--dark-color);
}

.item-list-price {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--coral-color);
}

.item-list-description {
    margin-bottom: 15px;
    color: var(--text-color);
    flex-grow: 1;
}

.item-list-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: #777;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 40px;
    gap: 5px;
}

.pagination button {
    min-width: 40px;
    height: 40px;
    border: 1px solid #ddd;
    background-color: white;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

.pagination button:hover:not(.active) {
    background-color: #f5f5f5;
}

.pagination .page-nav {
    font-size: 1.2rem;
}

/* Loading and Error States */
.loading, .error, .no-results {
    text-align: center;
    padding: 40px 0;
    color: var(--text-color);
}

.error {
    color: var(--accent-color);
}

/* Responsive Adjustments */
@media (max-width: 768px) {

    .container {
        width: 98%;
        padding: 0 8px;
    }
    .filters-row {
        /* flex-direction: column; */
        gap: 15px;
    }

    .search-row {
        justify-content: flex-start !important;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .items-grid {
        display:flex;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 6px;
    }
    .job-list-card {
        /* flex: 0 0 45%; */
        max-width: 49%;
        margin-bottom: 15px;
    }
    .item-list-image {
        width: 100%;
        height: 200px;
    }
    .hide-on-mobile {
        display: none !important;
    }

}

@media (max-width: 480px) {
    .listings-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    .item-list-card {
        flex: 0 0 100%;
        max-width: 100%;
    }
    .pagination {
        flex-wrap: wrap;
    }
}