nav.categories {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    margin-top: 20px;
    padding-bottom: 8px;
    margin-bottom: -8px;
    a {
        flex-shrink: 0;
        border-radius: 16px;
        border: 1px solid var(--brjyrb);
        color: var(--grey);
        font-weight: 600;
        padding: 15px 30px;
        letter-spacing: 0.48px;
        transition: color .2s linear, background-color .2s linear, border-color .2s linear;
    }
}
.catalog {
    margin-top: 40px;
    margin-bottom: 120px;
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 30px;
    > .left {
        overflow-y: auto;
        position: sticky;
        align-self: start;
        top: 10px;
        background: var(--blue);
        border-radius: 16px;
        padding: 10px 0 20px;
        border: none;
        > .heading,
        > .heading + button {
            color: var(--white);
            font-weight: 700;
            letter-spacing: 0.48px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
            margin-left: 20px;
            width: calc(100% - 40px);
            &::after {
                content: '\e927';
                font: 100 30px/1 icon;
                color: inherit;
            }
        }
        > .heading {
            margin-bottom: 11px;
            + button {
                display: none;
            }
        }
        > .window-modal {
            position: static;
            display: contents;
            pointer-events: all;
            max-height: 100dvh;
            opacity: 1;
            .window-body {
                display: contents;
                animation: none;
                > .close {
                    display: none;
                }
                form {
                    border: none;
                    .box {
                        position: relative;
                        max-height: calc(100dvh - 215px);
                        overflow-y: scroll;
                        border-radius: 16px;
                        background: var(--white);
                        padding: 20px;
                        display: flex;
                        flex-direction: column;
                        gap: 20px;
                        &::-webkit-scrollbar {
                            display: none;
                        }
                        .heading {
                            display: none;
                            text-align: left;
                            color: var(--blue);
                            margin-bottom: 10px;
                        }
                    }
                    .green-btn {
                        width: calc(100% - 40px);
                        margin: 0 auto;
                        &[type="submit"] {
                            background-color: var(--orange);
                            margin-top: 20px;
                        }
                        &[type="reset"] {
                            margin-top: 4px;
                            color: var(--grey);
                            background-color: var(--white);
                        }
                    }
                }
            }
        }
    }
    > .right {
        display: flex;
        flex-direction: column;
        gap: 30px;
        > .top {
            display: flex;
            justify-content: space-between;
            gap: 10px;
            border-radius: 16px;
            border: 1px solid var(--brjyrb);
            min-height: 50px;
            &:has(+ .bottom p.empty) {
                display: none;
            }
        }
        .spoiler-box {
            max-width: 282px;
            height: 100%;
            z-index: 4;
            .spoiler {
                border-radius: 16px;
                .toggle {
                    width: 100%;
                    justify-content: start;
                    &::before {
                        content: '\e926';
                        font: 100 24px/1 icon;
                        color: inherit;
                    }
                    &::after {
                        margin-left: auto;
                    }
                }
                &:has(input[value*="up"]:checked) .toggle::before {
                    transform: scaleY(-1);
                }
                &:has(input[value="default"]:checked) .toggle::before {
                    display: none;
                }
                .spoiler-body {
                    padding-bottom: 0;
                    border-bottom: none;
                }
                .list {
                    gap: 0;
                    label {
                        margin-bottom: 16px;
                        &:first-child {
                            margin-top: 0;
                        }
                        &:last-child {
                            min-height: 24px;
                            align-items: center;
                            justify-content: center;
                        }
                    }
                    &:has(input[value="default"]:checked) label:last-child {
                        display: none;
                    }
                }
                label {
                    position: relative;
                    display: flex;
                    align-items: center;
                    gap: 10px;
                    color: var(--grey);
                    font-weight: 500;
                    letter-spacing: 0.48px;
                    transition: color .2s linear;
                    cursor: pointer;
                    &::before {
                        transition: color .2s linear;
                    }
                    &:has(input[value*="up"])::before,
                    &:has(input[value*="down"])::before,
                    &:has(input[value*="popularity"])::before {
                        content: '\e926';
                        font: 100 24px/1 icon;
                        color: var(--brjyrb);
                    }
                    &:has(input[value*="up"])::before {
                        transform: scaleY(-1);
                    }
                    &:has(input:checked) {
                        display: none;
                    }
                    input {
                        position: absolute;
                        z-index: -10;
                        opacity: 0;
                        pointer-events: none;
                    }
                }
            }
        }
        .view-box {
            position: relative;
            display: flex;
            align-items: center;
            justify-content: center;
            width: 40px;
            aspect-ratio: 1;
            color: var(--grey);
            border-radius: 12px;
            background: var(--white);
            cursor: pointer;
            margin: 5px;
            transition: color .2s linear, background-color .2s linear;
            &::before {
                position: relative;
                z-index: 1;
                content: '\e936';
                font: 100 24px/1 icon;
                color: inherit;
                transition: transform .2s;
            }
            &:has(input:checked)::before {
                transform: rotate(90deg);
            }
            &:focus-within {
                box-shadow: 0 0 8px 3px var(--brjyrb);
            }
            input {
                position: absolute;
                opacity: 0;
            }
        }
        &:has(input[type="checkbox"]:checked) > .bottom .items {
            display: flex;
            flex-direction: column;
        }
        > .bottom .items {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 30px;
        }
    }
}
p.empty {
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: 20px;
    border: 1px solid var(--error);
    background: #efe0de;
    padding: 30px;
    color: var(--grey);
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 0.72px;
    &::before {
        content: '\e93a';
        color: var(--error);
        font: 100 31px/1 icon;
    }
}
@media screen and (max-width: 1860px) {
    .catalog {
        gap: 20px;
        > .right {
            gap: 20px;
            .bottom .items {
                gap: 20px;
            }
        }
    }
}
@media screen and (max-width: 1500px) {
    .catalog {
        margin-bottom: 100px;
        > .right .bottom .items {
            grid-template-columns: repeat(3, 1fr);
        }
    }
}
@media screen and (max-width: 1280px) {
    .catalog {
        margin-bottom: 80px;
        grid-template-columns: 300px 1fr;
        gap: 10px;
        > .right {
            gap: 10px;
            .bottom .items {
                gap: 10px;
            }
        }
    }
}
@media screen and (max-width: 992px) {
    .catalog {
        display: flex;
        flex-direction: column;
        > .left {
            width: 100%;
            position: static;
            padding: 10px;
            > .heading {
                display: none;
                + button {
                    display: flex;
                    margin-left: 0;
                    width: 100%;
                }
            }
            > .window-modal {
                position: fixed;
                display: flex;
                pointer-events: none;
                opacity: 0;
                &.active {
                    opacity: 1;
                    pointer-events: all;
                    .window-body {
                        animation: show-modal 0.5s forwards;
                    }
                }
                .window-body {
                    display: flex;
                    position: absolute;
                    top: 50%;
                    max-height: 100dvh;
                    transform: translateY(-120vh);
                    padding-inline: 20px;
                    > .close {
                        display: flex;
                    }
                    form {
                        background: var(--white);
                        .box {
                            border-radius: 0;
                            padding: 0 5px 0 0;
                            &::-webkit-scrollbar {
                                display: initial;
                            }
                            .heading {
                                display: block;
                            }
                        }
                        .green-btn {
                            width: 100%;
                            &[type="submit"] {
                                margin-top: 30px;
                            }
                            &[type="reset"] {
                                border: 1px solid var(--brjyrb);
                                color: var(--grey);
                            }
                        }
                    }
                }
            }
        }
        > .right .spoiler-box {
            max-width: 242px;
            .spoiler :where(.toggle, .list) {
                padding-inline: 10px;
            }
        }
    }
}
@media screen and (max-width: 768px) {
    p.empty {
        padding: 20px;
        font-size: 20px;
        letter-spacing: 0.6px;
    }
    .catalog {
        margin-bottom: 60px;
        > .right .bottom .items {
            grid-template-columns: repeat(2, 1fr);
        }
    }
}
@media screen and (max-width: 389px) {
    .catalog > .right .bottom .items {
        grid-template-columns: 1fr;
    }
}
@media (hover: none) and (pointer: coarse) {
    nav.categories::-webkit-scrollbar {
        display: none;
    }
}
@media (hover: none) and (pointer: coarse) and (max-width: 1280px) {
    nav.categories {
        width: 100%;
        a {
            &:first-child {
                margin-left: 10px;
            }
            &:last-child {
                margin-right: 10px;
            }
        }
    }
}
@media (hover: hover) {
    nav.categories a:hover {
        color: var(--white);
        background-color: var(--blue);
    }
    .catalog .right {
        .view-box:hover {
            background-color: var(--orange);
            border-color: var(--orange);
            color: var(--white);
        }
        .spoiler-box .spoiler {
            .toggle:hover {
                color: var(--blue);
            }
            label:hover {
                color: var(--orange);
                &::before {
                    color: var(--orange) !important;
                }
            }
        }
    }
}