/* assets/css/product-filters.css */
/* Filter Container */
.archive-filters {
    background: var(--color-white);
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 20px;
}

/* Filter Sections */
.filter-section {
    margin-bottom: 25px;
}

.filter-section:last-child {
    margin-bottom: 0;
}

.filter-section h3 {
    font-size: 16px;
    color: var(--color-heading);
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #e5e5e5;
}

/* Search Input */
.search-input {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.2s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--color-light-blue);
}

/* Category Filters */
.category-filters {
    display: flex;
    flex-direction: column;
    gap: 10px;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.category-filter {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    cursor: pointer;
}

.category-filter input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
}

/* Active Filter States */
.category-filter input[type="checkbox"]:checked + span {
    color: var(--color-light-blue);
    font-weight: 500;
}

/* Mobile/Desktop Display Helpers */
.mobile-only {
    display: none;
}

.desktop-only {
    display: block;
}

/* Mobile Action Buttons */
.mobile-action-buttons {
    display: none;
}

/* Mobile Styles */
@media (max-width: 992px) {
    /* Show/Hide Elements */
    .mobile-only {
        display: flex;
    }

    .desktop-only {
        display: none;
    }

    /* Mobile Action Buttons */
    .mobile-action-buttons {
        display: flex;
        gap: 12px;
        margin-bottom: 20px;
        width: 100%;
    }

    /* Equal width columns fix */
    .mobile-action-buttons .filter-toggle,
    .mobile-action-buttons .woocommerce-ordering {
        flex: 1 1 calc(50% - 6px); /* 50% minus half the gap */
        min-width: 0; /* Override min-width */
        max-width: 50%; /* Ensure it never exceeds 50% */
    }

    .mobile-action-buttons .filter-toggle {
        margin-bottom: 0;
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 10px 16px;
        background: var(--color-medium-blue);
        color: white;
        border: none;
        border-radius: 8px;
        font-size: 14px;
        font-weight: 500;
        cursor: pointer;
    }

    .mobile-action-buttons .filter-toggle svg {
        width: 18px;
        height: 18px;
        transition: transform 0.3s ease;
    }

    .mobile-action-buttons .woocommerce-ordering select {
        width: 100%;
        height: 100%;
        padding: 10px 16px;
        background-color: white;
        border: 1px solid var(--color-medium-blue);
        color: var(--color-medium-blue);
        border-radius: 8px;
    }

    /* Filter Modal */
    .product-filters {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1000;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease;
        display: flex;
        align-items: flex-end;
    }

    .product-filters.is-open {
        opacity: 1;
        pointer-events: auto;
    }

    .archive-filters {
        position: relative;
        width: 100%;
        max-height: 70vh;
        background: white;
        border-radius: 16px 16px 0 0;
        padding: 20px;
        transform: translateY(100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        margin: 0;
        overflow-y: auto;
    }

    .is-open .archive-filters {
        transform: translateY(0);
    }

    /* Filter Header */
    .filter-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 20px;
    }

    .filter-header h2 {
        font-size: 18px;
        margin: 0;
    }

    .close-filters {
        padding: 8px;
        background: none;
        border: none;
        cursor: pointer;
        color: #666;
    }

    /* Show Results Button */
    .filter-actions {
        position: sticky;
        bottom: 0;
        left: 0;
        width: 100%;
        padding: 16px 0 0;
        background: white;
        border-top: 1px solid #eee;
        margin-top: 20px;
    }

    .show-results-button {
        width: 100%;
        padding: 14px;
        background: var(--color-medium-blue);
        color: white;
        border: none;
        border-radius: 8px;
        font-size: 16px;
        font-weight: 500;
        cursor: pointer;
    }

    /* Scrollbar Styling */
    .archive-filters::-webkit-scrollbar {
        width: 8px;
    }

    .archive-filters::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 4px;
    }

    .archive-filters::-webkit-scrollbar-thumb {
        background: #888;
        border-radius: 4px;
    }

    .archive-filters::-webkit-scrollbar-thumb:hover {
        background: #666;
    }
}

/* Additional Mobile Adjustments */
@media (max-width: 768px) {
    .filter-section h3 {
        font-size: 15px;
        margin-bottom: 12px;
    }
}