.brandgift-catalog-filter .lw_action {
    display: flex;
    align-items: center;
    margin-top: 16px;
}

.brandgift-catalog-filter .lwcm_bar._open > .lwmb_title {
    position: relative;
    cursor: pointer;
    user-select: none;
}

.brandgift-catalog-filter .lwcm_bar._open > .lwmb_title:after {
    display: block;
}

.brandgift-catalog-filter .lwcm_bar:not(._active) .lw_filter_price,
.brandgift-catalog-filter .lwcm_bar:not(._active) .lw_filter_stock,
.brandgift-catalog-filter .lwcm_bar:not(._active) .lw_filter_checkboxes {
    display: none;
}

.brandgift-catalog-filter .lw_filter_price,
.brandgift-catalog-filter .lw_filter_stock {
    overflow: visible;
    max-height: none;
}

.brandgift-catalog-filter .lw_filter_checkboxes {
    max-height: 240px;
    overflow-y: auto;
    overflow-x: hidden;
    margin-top: 10px;
    margin-bottom: 20px;
}

.brandgift-catalog-filter .lw_filter_checkboxes > article {
    margin-top: 5px;
}

.brandgift-catalog-filter .lw_filter_checkboxes > article:first-of-type {
    margin-top: 8px;
}

.brandgift-catalog-filter .lw_filter_checkboxes > article._passive {
    pointer-events: none;
}

.brandgift-catalog-filter .lw_filter_checkboxes > article._passive > label {
    cursor: default;
}

.brandgift-catalog-filter .lw_filter_checkboxes > article._search-hidden {
    display: none;
}

.brandgift-catalog-filter .lw_filter_toolbar {
    position: sticky;
    top: 0;
    z-index: 3;
    background: #fff;
    margin: 0 -14px;
    padding: 12px 14px 0;
}

.brandgift-catalog-filter .lw_filter_search {
    display: block;
    margin: 0;
}

.brandgift-catalog-filter .lw_filter_search-input {
    width: 100%;
    height: 34px;
    box-sizing: border-box;
    padding: 6px 10px;
    border: 1px solid #d2d6d9;
    border-radius: 2px;
    background: #fff;
    color: #0a1015;
    font-size: 14px;
    line-height: 20px;
}

.brandgift-catalog-filter .lw_filter_search-input::-webkit-search-decoration,
.brandgift-catalog-filter .lw_filter_search-input::-webkit-search-cancel-button {
    -webkit-appearance: none;
}

.brandgift-catalog-filter .lw_filter_search-input:focus {
    outline: none;
    border-color: #c4000c;
}

.brandgift-catalog-filter .lw_filter_selected {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    max-height: 72px;
    margin-top: 8px;
    overflow-y: auto;
}

.brandgift-catalog-filter .lw_filter_selected[hidden] {
    display: none;
}

.brandgift-catalog-filter .lw_filter_bullet {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    max-width: 100%;
    margin: 0;
    padding: 3px 6px 3px 8px;
    border: 1px solid #c4000c;
    border-radius: 12px;
    background: #fff5f5;
    color: #c4000c;
    font-family: inherit;
    font-size: 12px;
    line-height: 16px;
    text-align: left;
    appearance: none;
    cursor: pointer;
}

.brandgift-catalog-filter .lw_filter_bullet-text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.brandgift-catalog-filter .lw_filter_bullet-remove {
    flex-shrink: 0;
    font-size: 14px;
    line-height: 1;
}

.brandgift-catalog-filter .lw_filter_empty {
    margin: 4px 0 8px;
    color: #78838e;
    font-size: 13px;
    line-height: 18px;
}

.brandgift-catalog-filter .lw_filter_empty[hidden] {
    display: none;
}

.brandgift-catalog-filter ins {
    text-decoration: none;
}

.brandgift-catalog-filter ._p_range {
    position: relative;
    display: block;
    height: 28px;
    margin: 4px 8px 14px;
}

.brandgift-catalog-filter ._p_range::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 6px;
    transform: translateY(-50%);
    background: #e6e8ea;
    border-radius: 999px;
    display: block;
}

.brandgift-catalog-filter ._p_range > abbr {
    position: absolute;
    top: 50%;
    height: 6px;
    transform: translateY(-50%);
    background: #c4000c;
    border-radius: 999px;
    z-index: 2;
}

.brandgift-catalog-filter ._r_left,
.brandgift-catalog-filter ._r_right {
    position: absolute;
    top: 50%;
    z-index: 3;
    width: 18px;
    height: 18px;
    margin: 0;
    border: 2px solid #c4000c;
    border-radius: 50%;
    background: #fff;
    box-sizing: border-box;
    box-shadow: 0 1px 4px rgba(10, 16, 21, 0.16);
    transform: translate(-50%, -50%);
    cursor: grab;
    touch-action: none;
}

.brandgift-catalog-filter ._r_left::before,
.brandgift-catalog-filter ._r_right::before {
    content: "";
    position: absolute;
    inset: -10px;
}

.brandgift-catalog-filter ._r_left:hover,
.brandgift-catalog-filter ._r_right:hover {
    box-shadow: 0 2px 8px rgba(196, 0, 12, 0.25);
}

.brandgift-catalog-filter ._r_left:active,
.brandgift-catalog-filter ._r_right:active {
    cursor: grabbing;
    transform: translate(-50%, -50%) scale(1.08);
    box-shadow: 0 2px 10px rgba(196, 0, 12, 0.3);
}

.brandgift-catalog-filter ._p_values input {
    width: 100%;
    border: 1px solid #d2d6d9;
    border-radius: 2px;
    text-align: center;
    padding: 6px 4px;
    color: inherit;
    background: #fff;
    box-sizing: border-box;
}

.brandgift-catalog-filter ._p_values input:focus {
    outline: none;
    border-color: #c4000c;
}

.brandgift-catalog-filter ._p_values input::placeholder {
    color: #9aa3ab;
    opacity: 1;
}

.brandgift-catalog-filter .lw_filter_price-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.brandgift-catalog-filter .lw_filter_price-presets .lw_filter_bullet {
    border-color: #d2d6d9;
    background: #fff;
    color: #0a1015;
    padding: 4px 10px;
}

.brandgift-catalog-filter .lw_filter_price-presets .lw_filter_bullet.is-active,
.brandgift-catalog-filter .lw_filter_price-presets .lw_filter_bullet:hover {
    border-color: #c4000c;
    background: #fff5f5;
    color: #c4000c;
}

.brandgift-catalog-filter .lw_filter_stock ._p_values {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.brandgift-catalog-filter .lw_filter_stock ._p_values > span {
    flex-shrink: 0;
    font-size: 14px;
    color: #0a1015;
}

.brandgift-catalog-filter .lw_filter_stock ._v_left {
    flex: 1 1 auto;
    min-width: 0;
}

.brandgift-catalog-filter .lw_filter_stock del {
    flex-shrink: 0;
    text-decoration: none;
    color: #78838e;
}

.brandgift-catalog-filter-wrap {
    width: 100%;
    max-width: none;
    margin: 16px 0 0;
}

.brandgift-catalog-filter-toggle {
    display: none;
}

.brandgift-catalog-filter-panel {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: inherit;
    width: 100%;
}

.brandgift-catalog-filter--toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 8px;
    position: relative;
    z-index: 5;
    width: 100%;
    box-sizing: border-box;
    padding: 4px 0;
}

.brandgift-catalog-filter--toolbar .lwcm_bar {
    position: relative;
    margin: 0;
}

.brandgift-catalog-filter--toolbar .lwmb_title {
    margin: 0;
    padding: 7px 30px 7px 12px;
    border: 1px solid #d2d6d9;
    border-radius: 4px;
    background: #fff;
    font-size: 14px;
    line-height: 20px;
    font-weight: 500;
    white-space: nowrap;
}

.brandgift-catalog-filter--toolbar .lwcm_bar.has-selection .lwmb_title,
.brandgift-catalog-filter--toolbar .lwcm_bar._active .lwmb_title {
    border-color: #c4000c;
    color: #c4000c;
}

.brandgift-catalog-filter--toolbar .lwcm_bar._open > .lwmb_title:after {
    right: 8px;
}

.brandgift-catalog-filter--toolbar .bg-filter-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 16px;
    height: 16px;
    margin-left: 6px;
    padding: 0 4px;
    border-radius: 8px;
    background: #c4000c;
    color: #fff;
    font-size: 11px;
    font-style: normal;
    line-height: 16px;
}

.brandgift-catalog-filter--toolbar .lw_filter_price,
.brandgift-catalog-filter--toolbar .lw_filter_stock,
.brandgift-catalog-filter--toolbar .lw_filter_checkboxes,
.brandgift-catalog-filter--toolbar .lwcm_bar._active > .lw_filter_checkboxes {
    position: absolute;
    left: 0;
    top: calc(100% + 6px);
    z-index: 8;
    width: 280px;
    max-height: 360px;
    margin: 0;
    padding: 12px 14px;
    background: #fff;
    border: 1px solid #e6e8ea;
    box-shadow: 0 10px 28px rgba(10, 16, 21, 0.12);
}

.brandgift-catalog-filter--toolbar .lw_filter_checkboxes,
.brandgift-catalog-filter--toolbar .lwcm_bar._active > .lw_filter_checkboxes {
    padding: 0 14px 12px;
}

.brandgift-catalog-filter--toolbar .lw_action {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    margin: 0 0 0 auto;
    padding: 0;
    border: 0;
    gap: 8px;
    white-space: nowrap;
}

.brandgift-catalog-filter-panel.is-actions-wrapped .lw_action {
    flex: 1 1 100%;
    margin-left: 0;
    justify-content: flex-start;
}

.brandgift-catalog-filter--toolbar .bf_submit {
    padding: 7px 18px;
    line-height: 20px;
    height: 36px;
    box-sizing: border-box;
}

.brandgift-catalog-filter--toolbar .bf_reset {
    margin-left: 0;
    padding: 0 8px;
}

@media (max-width: 767px) {
    .brandgift-catalog-filter-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        height: 40px;
        margin: 0 0 8px;
        padding: 0 18px;
        border: 2px solid #d2d6d9;
        box-sizing: border-box;
        background: #fff;
        font-weight: 600;
        font-size: 14px;
        color: #0a1015;
        cursor: pointer;
    }

    .brandgift-catalog-filter-toggle svg {
        margin-right: 7px;
        flex-shrink: 0;
    }

    .brandgift-catalog-filter-toggle.has-selection {
        border-color: #c4000c;
        color: #c4000c;
    }

    .brandgift-catalog-filter-toggle .bg-filter-count {
        margin-left: 8px;
    }

    .brandgift-catalog-filter-panel {
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .brandgift-catalog-filter-wrap.is-open .brandgift-catalog-filter-panel {
        display: flex;
        margin-top: 8px;
    }

    .brandgift-catalog-filter--toolbar .lw_filter_price,
    .brandgift-catalog-filter--toolbar .lw_filter_stock,
    .brandgift-catalog-filter--toolbar .lw_filter_checkboxes {
        position: static;
        width: 100%;
        box-shadow: none;
        margin-top: 8px;
    }

    .brandgift-catalog-filter--toolbar .lwcm_bar {
        flex: 1 1 100%;
        width: 100%;
    }

    .brandgift-catalog-filter--toolbar .lw_action,
    .brandgift-catalog-filter-panel.is-actions-wrapped .lw_action {
        margin: 8px 0 0;
        width: 100%;
        flex: 1 1 100%;
        justify-content: flex-start;
    }

    .brandgift-catalog-filter--toolbar .bf_submit {
        height: 40px;
        padding: 9px 18px;
    }
}
