/* ===== PRODUCT FILTER OFFCANVAS STYLES ===== */

/* Filter Button Container */
.mf-filter-button-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 50px;
}

/* Filter Toggle Button */
.mf-filter-toggle-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    border: none;
    border-radius: 4px;
    font-size: 22px;
    font-weight: 500;
    cursor: pointer;
    min-height: unset;
    margin: 0;
    padding: 0;
    line-height: normal;
    letter-spacing: 0.1em;
}

.mf-filter-toggle-btn svg {
    width: 24px;
    height: auto;
}

/* Product Count Text */
.mf-product-count {
    font-size: 22px;
    font-weight: 400;
    line-height: normal;
    letter-spacing: 0.1em;
}

/* Offcanvas Container */
#mf-filter-offcanvas {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 650px;
    height: 100svh;
    background: white;
    z-index: 1050;
    transition: right 0.3s ease;
    overflow-y: auto;
}
.admin-bar #mf-filter-offcanvas {
    height: calc( 100svh - 32px );
    top: 32px;
}

#mf-filter-offcanvas.active {
    right: 0;
}

body.offcanvas-open {
    overflow: hidden;
}

/* Offcanvas Header */
.mf-filter-header {
    padding: 30px 40px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    border-bottom: none;
}

.mf-filter-header h3 {
    font-size: 30px;
    font-weight: 500;
    margin: 0;
    color: #333;
    letter-spacing: 0.1em;
    line-height: 1;
}

#mf-filter-close {
background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
    margin: 0;
    min-height: unset;
    line-height: unset;
    height: auto;
}
#mf-filter-close svg {
    width: 24px;
    height: auto;
    display: block;
}

/* Filter Sections */
.mf-filter-section {
    padding: 40px;
    border-bottom: 1px solid #ccc;
}

.mf-filter-section h4 {
    font-size: 18px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    line-height: 1;
}

/* Filter Header Section with Expand Icon */
.mf-filter-header-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}
.mf-filter-header-section h4 {
    margin: 0;
    font-size: 18px;
}

.mf-expand-icon {
    transition: transform 0.3s ease;
}
.mf-expand-icon svg {
    display: block;
    width: 18px;
    height: auto;
}

.mf-filter-section.collapsed .mf-expand-icon {
    transform: rotate(90deg);
}

.mf-filter-section.collapsed .mf-filter-options {
    display: none;
}

/* Toggle Switch */
.mf-filter-toggle {
    display: flex;
    gap: 16px;
    align-items: center;
}

.mf-toggle-label {
    font-size: 21px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.mf-switch {
    position: relative;
    display: inline-block;
    width: 74px;
    height: 34px;
    margin: 0;
}

.mf-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.mf-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #e0e0e0;
    transition: .4s;
    border-radius: 24px;
}

.mf-slider:before {
    position: absolute;
    content: "";
    height: 30px;
    width: 30px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .mf-slider {
    background-color: #4CAF50;
}

input:checked + .mf-slider:before {
    transform: translateX(40px);
}

/* Filter Options */
.mf-filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 40px;
}

/* Size Options */
.mf-size-grid,
.mf-metal-grid,
.mf-skin-grid {
    gap: 30px;
}
.mf-size-option,
.mf-metal-option,
.mf-skin-option {
    min-width: 45px;
    height: 43px;
    min-height: unset;
    padding: 0 12px;
    margin: 0;
    border: none;
    cursor: pointer;
    font-size: 16px;
    background: var(--bg-color);
    color: #4b4948;
    text-align: center;
    font-weight: 500;
    letter-spacing: 0.1em;
}

.mf-size-option:hover,
.mf-size-option.active,
.mf-metal-option:hover,
.mf-metal-option.active,
.mf-skin-option:hover,
.mf-skin-option.active {
    background: #ecded2;
}

/* Color Grid */
.mf-color-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    column-gap: 34px;
    justify-content: center;
    row-gap: 30px;
    text-align: center;
}

.mf-color-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    width: 45px;
    margin-inline: auto;
}

.mf-color-swatch {
    width: 45px;
    height: 45px;
    border: 1px solid #89847b;
    margin-bottom: 4px;
    transition: all 0.3s ease;
}

/* Multi-colored swatch styling */
.mf-color-option[data-color="multi-colored"] .mf-color-swatch,
.mf-color-option[data-color="multicolored"] .mf-color-swatch {
    background: linear-gradient(90deg, 
        #ff0000 0%, 
        #ff8000 14.28%, 
        #ffff00 28.56%, 
        #80ff00 42.84%, 
        #00ff00 57.12%, 
        #00ffff 71.4%, 
        #0080ff 85.68%, 
        #8000ff 100%) !important;
    background-size: 200% 200%;
    animation: rainbow-shift 3s ease-in-out infinite;
}

@keyframes rainbow-shift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.mf-color-option.active .mf-color-name {
    text-decoration: underline;
}

.mf-color-name {
    font-size: 12px;
    text-align: center;
    line-height: normal;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

/* Price Range with noUiSlider */
.mf-price-range {
    width: 100%;
}

.mf-price-range .noUi-handle {
    border: none;
    border-radius: 20px;
    background: #000;
    box-shadow: none;
}
.mf-price-range .noUi-horizontal .noUi-handle {
    width: 8px;
    height: 8px;
    right: -4px;
    top: -3px;
}

.mf-price-range .noUi-horizontal .noUi-handle:after,
.mf-price-range .noUi-horizontal .noUi-handle:before {
    display: none;
}

.mf-price-slider-nouislider .noUi-base {
    background: #909090;
    border-radius: 0;
    height: 2px;
}
.mf-price-range .noUi-target {
    border-radius: 0;
    border: none;
    box-shadow: none;
    height: 2px;
    padding-inline: 20px;
    background: transparent;
}
.mf-price-slider-nouislider .noUi-connect {
    background: #000;
    height: 2px;
}
/* 
.mf-price-slider-nouislider {
    margin: 25px 0;
}

.mf-price-slider-nouislider .noUi-base {
    background: #ddd;
    border-radius: 0;
    height: 2px;
}

.mf-price-slider-nouislider .noUi-connect {
    background: #333;
    height: 2px;
}

.mf-price-slider-nouislider .noUi-horizontal {
    height: 2px;
}

.mf-price-slider-nouislider .noUi-horizontal .noUi-handle {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #333;
    border: none;
    box-shadow: none;
    cursor: pointer;
    top: -7px;
    right: -8px;
}

.mf-price-slider-nouislider .noUi-horizontal .noUi-handle:before,
.mf-price-slider-nouislider .noUi-horizontal .noUi-handle:after {
    display: none;
}

.mf-price-slider-nouislider .noUi-handle:focus {
    outline: none;
} */

.mf-price-values {
display: flex;
    justify-content: space-between;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 6px;
}

.mf-price-inputs {
    display: flex;
    gap: 10px;
    align-items: center;
}

.mf-price-inputs input {
    flex: 1;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Action Buttons */
.mf-filter-actions {
    padding: 40px;
    display: flex;
    gap: 40px;
    background: white;
    margin-top: auto;
}

.mf-filter-clear,
.mf-filter-apply {
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    flex: 1;
    letter-spacing: 0.1em;
    transition: all 0.3s ease;
    text-transform: uppercase;
    background: var(--bg-color);
    margin: 0;
    font-size: 18px;
    padding: 20px;
    line-height: 1;
}

.mf-filter-clear:hover,
.mf-filter-apply:hover {
    background: #ecded2;
}

.mf-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    flex: 1;
    transition: background-color 0.3s ease;
}

.mf-btn-primary {
    background: #333;
    color: white;
}

.mf-btn-primary:hover {
    background: #555;
}

.mf-btn-secondary {
    background: #f8f9fa;
    color: #333;
    border: 1px solid #ddd;
}

.mf-btn-secondary:hover {
    background: #e9ecef;
}

/* Overlay */
#mf-filter-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1040;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

#mf-filter-overlay.active {
    opacity: 1;
    visibility: visible;
}
@media (max-width: 849px) {
    .mf-product-count,
    .mf-filter-toggle-btn {
        font-size: 18px;
    }
    #mf-filter-offcanvas,
    .admin-bar #mf-filter-offcanvas {
        max-width: 100%;
        height: calc( 100svh - 67px );
        top: 67px;
    }
    #mf-filter-overlay {
        display: none !important;
    }
    .mf-filter-header {
        padding: 24px;
        background: var(--bg-color);
    }
    .mf-filter-section {
        padding: 24px;
    }
    .mf-toggle-label {
        font-size: 18px;
    }
    .mf-filter-options {
        margin-top: 24px;
    }
    .mf-size-grid, .mf-metal-grid, .mf-skin-grid {
        gap: 24px;
    }
    .mf-filter-header h3 {
        font-size: 24px;
    }
    .mf-filter-actions {
        padding: 24px;
        gap: 24px;
    }
}

@media (max-width: 549px) {
    .mf-size-grid, .mf-metal-grid, .mf-skin-grid {
        gap: 16px;
    }
    .mf-color-grid {
        grid-template-columns: repeat(5, 1fr);
    }
    .mf-switch {
        width: 58px;
        height: 28px;
    }
    .mf-slider:before {
        height: 24px;
        width: 24px;
    }
    input:checked + .mf-slider:before {
        transform: translateX(30px);
    }
}
@media (max-width: 424px) {
    .mf-color-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}