.fflf {
    --fflf-text: #5d6f60;
    --fflf-accent: #7b8c7c;
    --fflf-panel-width: 100%;
    --fflf-bg: #ffffff;
    --fflf-border: #d8ddd8;
    --fflf-mobile-top-offset: 0px;
    --fflf-mobile-panel-height: 100vh;
    position: relative;
}

html.fflf-scroll-locked,
body.fflf-scroll-locked {
    overflow: hidden;
}

body.fflf-scroll-locked {
    position: fixed;
    left: 0;
    right: 0;
    width: 100%;
}

.fflf * {
    box-sizing: border-box;
}

.fflf-mobile-trigger {
    display: none;
    margin-bottom: 5px;
}

.fflf-open-btn, .fflf-btn {
    font-size: 15px;
    font-weight: 500;
    line-height: 1;
    padding: 0px 10px;
    border: 1px solid var(--fflf-accent);
    border-radius: 0px;
    background: #fff;
    color: #7e8e7e;
    cursor: pointer;
}
.fflf .fflf-open-btn:hover,
.fflf .fflf-open-btn:focus,
.fflf .fflf-open-btn:active {
    background-color: #fff !important;
    color: var(--fflf-text) !important;
    text-decoration: none;
}

.fflf-mobile-trigger .fflf-open-btn {
border: 0px solid var(--fflf-accent) !important;
}

.fflf-backdrop {
    display: none;
}

.fflf-panel {
    background: transparent;
    border: 0;
}

.fflf-panel-head {
    display: none;
}

.fflf-close-btn {
    background: transparent;
    border: 0;
    width: 20px;
    height: 20px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
    cursor: pointer;
}

.fflf-close-icon {
    width: 20px;
    height: 20px;
    display: block;
}

.fflf-section {
    border-bottom: 1px solid #e0e0e0;
}

.fflf-section-toggle {
    width: 100%;
    border: 0;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--fflf-text);
    font-size: 20px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    padding: 20px 22px;
    cursor: pointer;
}

.fflf .fflf-section-toggle:hover,
.fflf .fflf-section-toggle:focus,
.fflf .fflf-section-toggle:active {
    background-color: transparent !important;
    color: var(--fflf-text) !important;
    text-decoration: none;
}

.fflf-chevron {
    border-right: 1px solid #222;
    border-bottom: 1px solid #222;
    width: 14px;
    height: 14px;
    transform: rotate(-45deg);
    transition: transform 0.2s ease;
}

.fflf-section.is-open .fflf-chevron {
    transform: rotate(45deg);
}

.fflf-section-body {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    padding: 0 0 0;
    transition: max-height 0.28s ease, opacity 0.2s ease, padding-bottom 0.28s ease;
    will-change: max-height;
}

.fflf-section.is-open .fflf-section-body {
    opacity: 1;
    padding: 0 0 22px;
}

.fflf-content {
    min-height: 0;
}

.fflf-price-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 12px;
}

.fflf-price-inputs input {
    width: 100%;
    border: 1px solid #bfc4bf;
    background: #fff;
    font-size: 18px;
    text-align: center;
    padding: 9px 10px;
}

.fflf-range-wrap {
    position: relative;
    height: 16px;
}

.fflf-range-wrap::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 7px;
    height: 2px;
    background: #bfc4bf;
    pointer-events: none;
}

.fflf-range-wrap input[type="range"] {
    position: absolute;
    left: 0;
    top: 7px;
    width: 100%;
    height: 2px;
    pointer-events: none;
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    margin: 0;
    z-index: 2;
}

.fflf-range-wrap input[type="range"]::-webkit-slider-thumb {
    pointer-events: auto;
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 1px solid #90a18f;
    background: #8ca08f;
    margin-top: -7px;
    cursor: pointer;
}

.fflf-range-wrap input[type="range"]::-webkit-slider-runnable-track {
    height: 2px;
    background: transparent;
}

.fflf-range-wrap input[type="range"]::-moz-range-track {
    height: 2px;
    background: transparent;
    border: 0;
}

.fflf-range-wrap input[type="range"]::-moz-range-progress {
    height: 2px;
    background: transparent;
}

.fflf-range-wrap input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 1px solid #90a18f;
    background: #8ca08f;
    cursor: pointer;
}

.fflf-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.fflf-item {
    margin: 0 0 10px;
}

.fflf-item label {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #3f4240;
    font-size: 16px;
    line-height: 1.25;
}

.fflf-item input[type="checkbox"],
.fflf-stock-label input[type="checkbox"] {
    -webkit-appearance: none;
    appearance: none;
    position: relative;
    width: 16px;
    height: 16px;
    border: 1px solid #7d8e7d;
    border-radius: 0px;
    background: #fff;
    margin: 0;
    flex: 0 0 auto;
    cursor: pointer;
}

.fflf-item input[type="checkbox"]::before,
.fflf-stock-label input[type="checkbox"]::before {
    content: none !important;
}

.fflf-item input[type="checkbox"]::after,
.fflf-stock-label input[type="checkbox"]::after {
    content: '' !important;
    position: absolute;
    opacity: 0 !important;
    display: block !important;
    left: 3px !important;
    top: 3px !important;
    width: 8px !important;
    height: 8px !important;
    background: #7d8e7d !important;
    border: 0 !important;
    transform: none !important;
    border-radius: 0 !important;
    box-sizing: content-box !important;
}

.fflf-item input[type="checkbox"]:checked::after,
.fflf-stock-label input[type="checkbox"]:checked::after {
    opacity: 1 !important;
}

.fflf-item input[type="checkbox"]:focus-visible,
.fflf-stock-label input[type="checkbox"]:focus-visible {
    outline: 2px solid rgba(125, 142, 125, 0.35);
    outline-offset: 1px;
}

.fflf-item.is-disabled input[type="checkbox"],
.fflf-item input[type="checkbox"]:disabled,
.fflf-stock-label input[type="checkbox"]:disabled {
    border-color: #c4cbc4;
    background: #f7f7f7;
    cursor: default;
}

.fflf-item.is-disabled input[type="checkbox"]:checked::after,
.fflf-item input[type="checkbox"]:disabled:checked::after,
.fflf-stock-label input[type="checkbox"]:disabled:checked::after {
    background: #c4cbc4;
}

.fflf-item .fflf-count {
    margin-left: auto;
    color: #8f8f8f;
    font-size: 12px;
}

.fflf-item.is-disabled {
    opacity: 0.42;
}

.fflf-color-chip {
    width: 24px;
    height: 24px;
    border: 1px solid #d2d2d2;
    background: #efefef;
    display: inline-block;
    flex: 0 0 auto;
}

.fflf-section[data-fflf-section="color"] .fflf-item input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    margin: 0;
    pointer-events: none;
}

.fflf-section[data-fflf-section="color"] .fflf-item label {
    gap: 14px;
}

.fflf-section[data-fflf-section="color"] .fflf-color-chip {
    position: relative;
    border-color: #d5dad5;
}

.fflf-section[data-fflf-section="color"] .fflf-item input[type="checkbox"]:checked + .fflf-color-chip::after {
    content: '';
    position: absolute;
    left: -3px;
    right: 0;
    bottom: -8px;
    height: 1px;
    width: 24px;
    background: #7e8e7e;
}

.fflf-stock-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    color: #3f4240;
}

.fflf-footer {
    display: flex;
    gap: 15px;
    padding: 18px 0;
}

.fflf-btn {
    flex: 1;
    min-height: 40px;
}

.fflf-btn-primary {
    background: var(--fflf-accent);
    color: #fff;
}

.fflf-btn-secondary {
    border-color: #c5c5c5;
    color: #444;
    background: #fff;
}

.fflf .fflf-btn-primary:hover,
.fflf .fflf-btn-primary:focus,
.fflf .fflf-btn-primary:active {
    background-color: var(--fflf-accent) !important;
    color: #fff !important;
    text-decoration: none;
}

.fflf .fflf-btn-secondary:hover,
.fflf .fflf-btn-secondary:focus,
.fflf .fflf-btn-secondary:active,
.fflf .fflf-btn:not(.fflf-btn-primary):hover,
.fflf .fflf-btn:not(.fflf-btn-primary):focus,
.fflf .fflf-btn:not(.fflf-btn-primary):active {
    background-color: #fff !important;
    color: var(--fflf-text) !important;
    text-decoration: none;
}

@media (min-width: 1024px) {
    .fflf-panel {
        position: sticky;
        top: 90px;
        width: var(--fflf-panel-width);
    }

    .fflf-section-toggle {
        font-size: 18px;
        padding: 12px 0;
    }
}

@media (max-width: 1023px) {
    .fflf-mobile-trigger {
        display: block;
    }

    .fflf input[type="number"] {
        display: block;
        min-height: 45px !important;
    }

    .fflf-panel {
        position: fixed;
        left: 0;
        right: 0;
        top: var(--fflf-mobile-top-offset);
        bottom: auto;
        height: var(--fflf-mobile-panel-height);
        max-height: var(--fflf-mobile-panel-height);
        z-index: 100001;
        background: var(--fflf-bg);
        border: 0;
        transform: translateX(-102%);
        transition: transform 0.25s ease;
        overflow: hidden;
        display: flex;
        flex-direction: column;
        padding-bottom: 0;
    }

    .fflf-content {
        flex: 1 1 auto;
        min-height: 0;
        overflow-y: auto;
        overflow-x: hidden;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
    }

    .fflf.is-open .fflf-panel {
        transform: translateX(0);
    }

    .fflf-backdrop {
        display: block;
        position: fixed;
        left: 0;
        right: 0;
        top: var(--fflf-mobile-top-offset);
        bottom: 0;
        z-index: 100000;
        background: rgb(245 245 245 / 64%);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.2s ease;
    }

    .fflf.is-open .fflf-backdrop,
    .fflf.is-closing .fflf-backdrop {
        opacity: 1;
        pointer-events: auto;
    }

    .fflf-panel-head {
        display: flex;
        position: sticky;
        top: 0;
        z-index: 3;
        justify-content: flex-end;
        align-items: center;
        min-height: 50px;
        background: var(--fflf-bg);
        border-bottom: 1px solid var(--fflf-border);
        padding: 5px 15px;
    }

    .fflf-section-toggle {
        font-size: 16px;
        letter-spacing: 0.01em;
        padding: 16px 20px;
    }

    .fflf-section-body {
        padding: 0 22px 0;
    }

    .fflf-section.is-open .fflf-section-body {
        padding: 10px 22px 20px;
        margin-top: 10px;
    }

    .fflf-item {
        margin: 0 0 22px;
    }

    .fflf-item label {
        font-size: 14px;
        gap: 12px;
        line-height: 1.4;
    }

    .fflf-item .fflf-count {
        font-size: 15px;
    }

    .fflf-item input[type="checkbox"],
    .fflf-stock-label input[type="checkbox"] {
        width: 16px;
        height: 16px;
    }

    .fflf-color-chip {
        width: 20px;
        height: 20px;
    }

    .fflf-price-inputs input {
        font-size: 20px;
        min-height: 64px;
    }

    .fflf-footer {
        position: relative;
        z-index: 100002;
        margin-top: auto;
        flex: 0 0 auto;
        background: var(--fflf-bg);
        border-top: 1px solid var(--fflf-border);
        padding: 16px 20px calc(16px + env(safe-area-inset-bottom));
        gap: 18px;
    }

    .fflf-btn {
        min-height: 40px;
        font-size: 15px;
        margin: 0;
    }

    .fflf-btn-primary,
    .fflf-btn-secondary {
        min-height: 37px;
        border: 1px solid #7d8e7d;
        font-size: 17px;
        border-radius: 0px;
    }

    .fflf-btn-secondary {
        border-color: #9aa39b;
        background: #f8f8f8;
    }
}
