/* AJAX Listing Filter Styles */
.listing-filter-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    transition: opacity 0.3s ease;
}

.listing-filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: flex-start;
    position: relative;
}

.listing-filter-form.is-loading {
    opacity: 0.6;
    pointer-events: none;
}

.listing-filter-form.is-loading::after {
    content: "Loading...";
    position: absolute;
    top: -10px;
    right: 0;
    font-size: 0.85rem;
    font-weight: 600;
    color: #007cba;
    background: #e1f5fe;
    padding: 2px 8px;
    border-radius: 4px;
}

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

.filter-group label.filter-group-title {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #333;
    font-size: 0.95rem;
}

.filter-group input[type="search"],
.filter-group select,
.filter-group input[type="number"] {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 0.95rem;
    background-color: #fff;
}

.filter-group .range-inputs {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.filter-group .range-inputs input {
    flex: 1;
    min-width: 0;
}

.filter-checkbox-list {
    max-height: 160px;
    overflow-y: auto;
    border: 1px solid #ced4da;
    border-radius: 4px;
    padding: 0.5rem;
    background: #fff;
}

.filter-checkbox-list label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
    font-size: 0.9rem;
    cursor: pointer;
    color: #495057;
}

.filter-checkbox-list label:last-child {
    margin-bottom: 0;
}

.listing-results {
    display: grid;
    list-style: none;
    padding: 0;
    margin: 0 0 2.5rem 0;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 2.5rem;
    transition: opacity 0.3s ease;
}

.listing-results.is-loading {
    opacity: 0.5;
}

.listing-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem 1rem;
    background: #fdfdfd;
    border: 1px dashed #dee2e6;
    border-radius: 8px;
    color: #6c757d;
    font-size: 1.1rem;
}

.listing-pagination {
    text-align: center;
    margin: 2rem 0 4rem;
}

.load-more-btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    background-color: #2271b1;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.load-more-btn:hover {
    background-color: #135e96;
}

.load-more-btn:active {
    transform: scale(0.98);
}

.load-more-btn[hidden] {
    display: none !important;
}
/* Product Card Tweaks */
.listing-results li.product {
    list-style: none;
    margin: 0;
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1rem;
}
.listing-results li.product img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    margin-bottom: 1rem;
}
.listing-results li.product .price {
    font-weight: bold;
    color: #2271b1;
    margin: 0.5rem 0;
}
.listing-results li.product .button {
    margin-top: auto;
    text-align: center;
}

/* Additional Filter Actions */
.filter-actions {
    margin-top: 1rem;
}
.clear-filters-btn {
    background: #f0f0f1;
    border: 1px solid #c3c4c7;
    color: #3c434a;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
}
.clear-filters-btn:hover {
    background: #dcdcde;
}
.listing-error-notice {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    padding: 0.75rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}
.listing-filter-form.is-loading { opacity: 0.6; pointer-events: none; }
