/* Main Container */
.alx-woo-filter {
    margin-bottom: 30px;
    font-family: 'Inter', sans-serif;
}

/* Filter Form - Single Row Layout */
#alx-woo-filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: flex-start;
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* Filter Blocks */
.alx-attr-block {
    border: none;
    padding: 0;
    margin: 0;
    min-width: 150px;
}

.alx-attr-block legend {
    font-weight: 600;
    font-size: 14px;
    color: #333;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Terms List */
.alx-terms-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 200px;
    overflow-y: auto;
}

/* Scrollbar Styling */
.alx-terms-list::-webkit-scrollbar {
    width: 6px;
}

.alx-terms-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.alx-terms-list::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.alx-terms-list::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* Checkbox Styling */
.alx-term {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #555;
    cursor: pointer;
    transition: color 0.2s;
}

.alx-term:hover {
    color: #000;
}

.alx-term input[type="checkbox"] {
    margin-right: 8px;
    accent-color: #000;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.alx-term span {
    margin-left: 4px;
}

/* Year Range */
.alx-year-range {
    display: flex;
    gap: 10px;
    align-items: center;
}

.alx-year-range label {
    display: flex;
    flex-direction: column;
    font-size: 12px;
    color: #777;
}

.alx-year-range label span {
    margin-bottom: 4px;
    font-weight: 500;
}

.alx-year-range input[type="number"] {
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 6px 10px;
    width: 70px;
    font-size: 14px;
    margin-top: 4px;
    transition: border-color 0.2s;
}

.alx-year-range input[type="number"]:focus {
    border-color: #000;
    outline: none;
}

/* Actions */
.alx-filter-actions {
    display: flex;
    align-items: flex-end;
    margin-left: auto;
    padding-top: 24px;
}

#alx-filter-reset {
    background: #000;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s;
}

#alx-filter-reset:hover {
    background: #333;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Product Grid Improvements */
#alx-ajax-products {
    position: relative;
    min-height: 200px;
    margin-top: 30px;
}

#alx-ajax-products ul.products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 24px;
}

#alx-ajax-products ul.products::before,
#alx-ajax-products ul.products::after {
    display: none;
}

#alx-ajax-products li.product {
    float: none;
    width: 100%;
    margin: 0;
    background: #fff;
    border-radius: 12px;
    padding: 16px;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid #f0f0f0;
    animation: fadeInUp 0.6s ease-out forwards;
}

#alx-ajax-products li.product:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.12);
    border-color: transparent;
}

#alx-ajax-products li.product img {
    border-radius: 8px;
    margin-bottom: 12px;
    transition: transform 0.3s;
}

#alx-ajax-products li.product:hover img {
    transform: scale(1.05);
}

#alx-ajax-products li.product .woocommerce-loop-product__title {
    font-size: 16px;
    font-weight: 600;
    color: #222;
    margin-bottom: 8px;
}

#alx-ajax-products li.product .price {
    color: #000;
    font-weight: 700;
    font-size: 15px;
}

#alx-ajax-products li.product .button {
    width: 100%;
    text-align: center;
    margin-top: 12px;
    border-radius: 6px;
    background: #000;
    color: #fff;
    padding: 10px;
    font-weight: 500;
    transition: all 0.3s;
}

#alx-ajax-products li.product .button:hover {
    background: #333;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Loader */
.alx-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #000;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    z-index: 10;
}

@keyframes spin {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Fade In Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* No Results Message */
.alx-no-results {
    text-align: center;
    padding: 60px 20px;
    font-size: 16px;
    color: #666;
    background: #f9f9f9;
    border-radius: 12px;
}

/* Responsive Design */
@media (max-width: 768px) {
    #alx-woo-filter-form {
        flex-direction: column;
        gap: 16px;
    }

    .alx-filter-actions {
        margin-left: 0;
        padding-top: 0;
        width: 100%;
    }

    #alx-filter-reset {
        width: 100%;
    }

    .alx-attr-block {
        width: 100%;
    }

    #alx-ajax-products ul.products {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 16px;
    }
}