/* Premium Filter Styles */

.filter-group {
    transition: all 0.3s ease;
}

.filter-content {
    max-height: 500px;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease, margin 0.3s ease;
}

.filter-group.collapsed .filter-content {
    max-height: 0;
    opacity: 0;
    margin-top: 0 !important;
}

.filter-group.collapsed svg {
    transform: rotate(0deg);
}

.filter-group:not(.collapsed) svg {
    transform: rotate(180deg);
}

/* Custom Checkbox Style */
input[type="checkbox"],
input[type="radio"] {
    position: relative;
    width: 1.25rem;
    height: 1.25rem;
    cursor: pointer;
    appearance: none;
    background-color: #fff;
    margin: 0;
    border: 2px solid #e5e7eb;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
}

input[type="radio"] {
    border-radius: 50%;
}

input[type="checkbox"]:checked,
input[type="radio"]:checked {
    background-color: #db2777;
    /* pink-600 */
    border-color: #db2777;
}

input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    left: 4.5px;
    top: 4.5px;
    width: 7px;
    height: 7px;
    background-color: white;
    border-radius: 50%;
}

input[type="checkbox"]:hover,
input[type="radio"]:hover {
    border-color: #db2777;
    background-color: #fdf2f8;
}

/* Mobile Filter Panel */
#mobile-filter-panel.active {
    transform: translateX(0);
}

#mobile-filter-panel.active .absolute.inset-0 {
    pointer-events: auto;
}

/* Animation for products grid */
#products-grid {
    transition: opacity 0.3s ease;
}

#products-grid.loading {
    opacity: 0.5;
    pointer-events: none;
}

/* Skeleton loader or spinner could be added here */

/* Active filter tags animation */
#active-filters-container>div {
    animation: fadeInScale 0.2s ease-out;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Premium Price Slider Styling */
.noUi-target {
    background: #f3f4f6;
    border-radius: 999px;
    border: none;
    box-shadow: none;
    height: 6px;
    margin: 0 10px;
}

.noUi-connect {
    background: #db2777;
    /* Tailwind pink-600 */
}

.noUi-horizontal .noUi-handle {
    width: 20px;
    height: 20px;
    right: -10px;
    top: -7px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #db2777;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    outline: none !important;
}

.noUi-handle:before,
.noUi-handle:after {
    display: none;
}

.noUi-handle:hover {
    transform: scale(1.1);
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1);
}

.noUi-handle:active {
    transform: scale(0.95);
}

/* Hide arrow on number inputs */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
}

input[type=number] {
    -moz-appearance: textfield;
    appearance: textfield;
}

.filter-group .filter-content {
    transition: all 0.3s ease-in-out;
}