.category-button-wrapper {
    position: fixed;
    width: 100%;
    padding: 0px 5%;
    top: 0;
    color: #cb000e;
    z-index: 1;
    height: 50px;
    left: 0;
    cursor: pointer;
    text-align: right;
    font-weight: bold;
    padding-top: 8px;
    display: none;
    opacity: 0;
    transition: .3s;
}

.category-button-wrapper.visible {
    display: block;
    opacity: 1;
}

div#categoryButton {
    background: white;
    font-size: 12px;
    width: 80px;
    text-align: center;
    border: solid 2px #cb000e;
    padding: 5px;
    border-radius: 3px;
    left: calc(100% - 80px);
    position: relative;
    transition: .3s;
}

div#categoryButton:hover {
    color: white;
    background: #cb000e;
}

@keyframes darkenBackground {
    from {
        background: rgba(0, 0, 0, 0);
    }
    to {
        background: rgba(0, 0, 0, .7);
    }
}

@keyframes lightenBackground {
    from {
        background: rgba(0, 0, 0, .7);
    }
    to {
        background: rgba(0, 0, 0, 0);
    }
}

.categories-container .categories-bg-darken {
    display: none;
    position: absolute;
    left: 0;
    height: 100vh;
    width: 100%;
    top: 0;
}


.categories-container.open .categories-bg-darken {
    display: block;
    z-index: 1;
    background: rgba(0, 0, 0, 0.7);
    animation: darkenBackground;
    animation-duration: .2s;
}

.categories-container.close .categories-bg-darken {
    display: block;
    z-index: 1;
    background: rgba(0, 0, 0, 0);
    animation: lightenBackground;
    animation-duration: .2s;
}

@keyframes slideIn {
    from {
        left: -300px;
        opacity: 0;
    }
    to {
        left: 0;
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        left: 0;
        opacity: 1;
    }
    to {
        left: -300px;
        opacity: 0;
    }
}

.categories {
    position: fixed;
    background: white;
    color: white;
    left: -300px;
    height: 100vh;
    top: 0;
    width: 300px;
    z-index: 1;
    padding: 30px 100px;
}

.categories-container.open .categories {
    left: 0;
    animation: slideIn;
    animation-duration: .2s;
    box-shadow: 1px 0 3px #212121;
}

.categories-container.close .categories {
    left: -300px;
    animation: slideOut;
    animation-duration: .2s;
}

.categories ul {
    padding: 0;
}

.categories li {
    list-style: none;
    margin: 4px 0px;
}

.categories-title {
    color: #cb000e;
    font-size: 20px;
}

@media (min-width: 768px) {
    div#categoryButton {
        width: 130px;
        left: calc(100% - 130px);
        font-size: 16px;
    }
    .category-button-wrapper {
        background-color: #f7f7f7;
    }
}

@media (min-width: 992px) {
    .categories {
        position: relative;
    }
    .category-button-wrapper, .category-button-wrapper.visible, .categories-container.open .categories-bg-darken {
        display: none;
    }
    .categories-container.open .categories {
        left: initial;
        animation: slideIn;
        box-shadow: none;
    }
    .categories-container {
        position: absolute;
        width: 190px;
        background: #f7f7f7;
        margin-left: 0;
        padding: 15px;
        top: initial;
        height: initial;
        left: initial;
        margin-top: 10px;
    }
    .categories {
        background: initial;
        color: initial;
        left: initial;
        height: initial;
        top: initial;
        width: initial;
        z-index: 1;
        box-shadow: initial;
        padding: initial;
    }
    .categories-title {
        color: #cb000e;
        margin: 10px 0 0 0;
        font-size: 20px;
    }
}
