/* Listing Pages Styles (New & Used) */

.listing-main {
    background: #f8fafc;
    padding-bottom: 3rem;
}

.page-container {
    max-width: 98%;
    margin: 0 auto;
    padding: 1.5rem 1rem;
    display: block;
    /* Remove grid layout for sidebar */
}

/* Horizontal Filter Bar */
.filter-bar-container {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 0.75rem 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.filter-bar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.filter-by-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    color: #1e293b;
    font-size: 0.95rem;
}

.filter-by-label i,
.filter-by-label svg {
    font-size: 1.1rem;
}

.filter-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.apply-filter-btn {
    background: #003366;
    /* Navy Blue from image */
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 6px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    font-size: 0.85rem;
    text-transform: uppercase;
    transition: background 0.2s;
}

.apply-filter-btn:hover {
    background: #002244;
}

.reset-link {
    color: #ff6b6b;
    /* Brighter red for visibility */
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    margin-left: 0.5rem;
}

.reset-link:hover {
    text-decoration: underline;
}

.reset-link {
    color: #ffb09c;
    /* Pinkish/Red from image */
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
}

.reset-link:hover {
    text-decoration: underline;
}

/* Dropdowns Row */
.filter-dropdowns {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.5rem;
    overflow-x: auto;
    /* Allow horizontal scroll if needed on small screens */
    padding-bottom: 5px;
    /* Space for scrollbar */
    align-items: center;
}

/* Hide Scrollbar */
.filter-dropdowns::-webkit-scrollbar {
    height: 4px;
}

.filter-dropdowns::-webkit-scrollbar-thumb {
    background: #e2e8f0;
    border-radius: 4px;
}

.filter-dropdown-wrapper {
    position: relative;
    flex: 0 0 auto;
    /* Allow items to keep their width, no grow/shrink weirdly */
    min-width: auto;
}

.filter-select {
    width: 100%;
    padding: 0.4rem 0.6rem;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.75rem;
    /* Reduced Font */
    color: #1e293b;
    font-weight: 500;
    appearance: none;
    white-space: nowrap;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1rem;
    cursor: pointer;
    background-color: white;
}

.filter-select:focus {
    outline: none;
    border-color: #cbd5e1;
}

/* Product Grid */
.product-grid {
    display: grid;
    gap: 0.75rem;
    grid-template-rows: auto;
    align-content: start;
    min-height: 200px;
}

@media (min-width: 900px) {
    .product-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 0.75rem;
    }
}

@media (max-width: 899px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 800px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .filter-dropdown-wrapper {
        flex: 1 1 calc(50% - 0.5rem);
    }
}

@media (max-width: 500px) {
    .product-grid {
        grid-template-columns: 1fr;
    }

    .filter-dropdown-wrapper {
        flex: 1 1 100%;
    }
}

/* Compact Card Overrides Removed - Using Global Standards in components.css */