.subcategories--listing {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 2.1875rem;
    justify-content: center;
}

.subcategories--listing a {
    color: #282828;
    width: 100%;
    display: flex;
}

.subcategory--nav-item {
    display: flex;
    border-left: 1px solid #dadada;
    border-top: 1px solid #dadada;
    margin-top: 0.8125rem;
    width: 100%;
    container-type: inline-size;
}

.subcategory--nav-title {
    padding: 0.5rem 0.75rem;
    flex: 1;
    display: flex;
    align-items: center;
    font-weight: bold;
    font-size: 1.0625rem;
    line-height: 1.0625rem;
    border-bottom: solid 1px #ededed;
    overflow: hidden;
    position: relative;
}

.subcategory--nav-arrow {
    background: #5c8671;
    width: 1.875rem;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin-top: -1px;
}

.subcategory--nav-image {
    width: 32%;
    min-height: 3.875rem;
    position: relative;
    border-bottom: solid 1px #ededed;
}

.subcategory--nav-image img {
    position: absolute;
    margin: auto;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.4375rem
}

.subcategory--nav-button {
    display: none;
}

.subcategory--nav-item .icon--arrow-right {
    font-size: 0.9375rem
}

.is--ctl-listing .color-variants.subcategory li,
.is--ctl-search.color-variants.subcategory li{
    width: 1.375rem;
    height: 1.375rem;
}

.category-table-scroll {
    max-width: 100%;
    margin-bottom: 1.875rem;
    position: relative;
    overflow: visible;
}

.category-table-scroll table td,
.category-table-scroll table th{
    background: none;
    padding: 0.5rem 0.625rem 0.5rem 0.625rem;
    text-align: left;
    line-height: 125%;
    border-color: #867f7f;
    color: #fff;
}

.category-table-scroll table th{
    vertical-align: bottom;
    color: white;
    font-size: 1.0625rem;
    white-space: nowrap;
    background: #343333;
    padding: 10px
}

.category-table-scroll table tr:nth-child(even) td {
    background: #626262;
}

.category-table-scroll::before,
.category-table-scroll::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 14px;
    pointer-events: none;
    transition: opacity 0.3s ease;
    opacity: 0;
    z-index: 10;
}

.category-table-scroll::before {
    left: 0;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0) 100%);
}

.category-table-scroll::after {
    right: 0;
    background: linear-gradient(to left, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0) 100%);
}

.category-table-scroll .table-scroll-wrapper {
    overflow-y: hidden;
    overflow-x: scroll;
    padding-bottom: 15px;
}

.category-table-scroll:not(.is-scrolling-left):not(.is-scrolling-right):not(.is-scrolling-both) .table-scroll-wrapper {
    overflow: hidden;
}

.category-table-scroll.is-scrolling-left::before,
.category-table-scroll.is-scrolling-both::before {
    opacity: 1;
}

.category-table-scroll.is-scrolling-right::after,
.category-table-scroll.is-scrolling-both::after {
    opacity: 1;
}

.category-table-scroll.is-scrolling-right,
.category-table-scroll.is-scrolling-left,
.category-table-scroll.is-scrolling-both {
    margin-bottom: 1.875rem;
}

.table-modal-button {
    display: none;
}

.category-table-scroll.is-scrolling-left .table-modal-button,
.category-table-scroll.is-scrolling-right .table-modal-button,
.category-table-scroll.is-scrolling-both .table-modal-button {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    bottom: 0;
    right: 0;
    z-index: 11;
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    border: none;
    background: #d3d2d2;
    color: #4f4f4f;
    cursor: pointer;
    transition: background 0.2s ease;
}

.category-table-scroll.is-scrolling-left .table-modal-button:hover,
.category-table-scroll.is-scrolling-right .table-modal-button:hover,
.category-table-scroll.is-scrolling-both .table-modal-button:hover {
    background: #959595;
    color: #fff;
}

.teaser--text-offcanvas .category-table-scroll table td,
.js--modal .category-table-scroll table td{
    color: inherit
}

.teaser--text-offcanvas .category-table-scroll table tr:nth-child(even) td,
.js--modal .category-table-scroll table tr:nth-child(even) td{
    background: #e1e1e1;
}

.js--modal .category-table-scroll{
    margin-top: 35px;
}

/* Breite wird in JS aus der Tabellenbreite gesetzt; hier nur der Cap.
   Strikt auf .table-modal gescopt – beeinflusst keine anderen Modals. */
.js--modal.table-modal {
    max-width: 90vw;
}


@media only screen and (min-width: 30em) {
    .subcategories--listing {
        margin-left: -2%
    }

    .subcategory--nav-item {
        width: 48%;
        margin-left: 2%;
        padding-bottom: 0.5rem;
        border: 1px solid #dadada;
        border-top: solid 5px #e8e8e8;
        flex-wrap: wrap;
        align-content: flex-start;
        position: relative;
        overflow: hidden;
        margin-top: 2%;
        hyphens: auto;
        hyphenate-limit-chars: auto 6;
        -webkit-hyphens: auto;
        -moz-hyphens: auto;
        -webkit-hyphenate-limit-chars: auto 6;
        -webkit-hyphenate-limit-before: 6; /* For Safari */
        -webkit-hyphenate-limit-after: 6; /* For Safari */
        background: repeat-x url("../img/category-listing-product-box-rotate_bk.gif") 0 10.75rem;
    }

    .subcategories--listing a {
        display: block;
    }

    .subcategory--nav-title {
        font-size: 1.1875rem;
        line-height: 1.1875rem;
        width: 100%;
        background: none;
        display: block;
        text-align: center;
        padding-top: 1.0625rem;
        border-bottom: none;
    }

    .subcategory--nav-arrow {
        display: none
    }

    .subcategory--nav-image {
        width: 100%;
        height: 10.625rem;
        padding-bottom: 0;
        border-bottom: none;
        max-width: none;
    }

    .subcategory--nav-image img {
        transform: scale(0.93);
        padding: 0.9375rem;
        transition: all 300ms ease;
    }

    .subcategory--nav-item:hover .subcategory--nav-image img {
        transform: scale(0.99) rotate(0.2deg);
    }
}

@media only screen and (min-width: 38.3125em) {
    .subcategory--nav-item {
        width: 31.33%;
        margin-left: 2%;
        margin-top: 2%;
    }
}

@media screen and (min-width: 48em) { /* 768px */
    .subcategory--nav-title {
        font-size: 1.0625rem;
        line-height: 1.0625rem;
        padding: 0.625rem 0.5rem 0.25rem 0.5rem
    }
    .subcategory--nav-item {
        background-position: 0 17vw;
    }

    .subcategory--nav-image{
        max-height: 17vw
    }

    .subcategories--listing {
        justify-content: left;
    }

    .category-table {
        margin: auto;
    }
}

@media only screen and (min-width: 55em) {  /* 880px */
    .subcategory--nav-item {
        width: 31.33%;
    }

    .subcategories--listing {
        margin-left: -2%;
    }

    .subcategory--nav-title{
        font-size: 1.1875rem;
        line-height: 1.25rem;
        padding: 0.9375rem 0.75rem 0.5625rem 0.75rem
    }

    .category-table {
        margin: 0;
    }
}

@media only screen and (min-width: 62.5em) { /* 1000 */
    .subcategory--nav-item {
        background-position: 0 10.625rem;
    }
}

@media only screen and (min-width: 64em) {
    .subcategory--nav-item {
        width: 24%;
        margin-left: 1%;
        margin-top: 1%;
        background-position: 0 10.625rem;
        flex: none
    }

    .subcategories--listing {
        margin-left: -1%;
    }
}

@media only screen and (min-width: 78.75em) {
    .subcategory--nav-item {
        width: 24%;
        hyphens: none;
        -webkit-hyphens: none;
        -moz-hyphens: none;
    }
}

@media only screen and (min-device-width: 78.75em) and (min-width: 64em) {
    .subcategory--nav-item {
        padding-bottom: 0
    }

    .subcategory--nav-item:hover .subcategory--nav-button {
        bottom: 0.625rem;
        color: white;
    }

    .subcategory--nav-item .nav-title{
        margin-top: 0.4rem;
        margin-bottom: 1.8rem;
        transition: margin 300ms ease;
    }

    .subcategory--nav-button:hover {
        background: #4f7763;
    }

    .subcategory--nav-item:hover .nav-title {
        margin-top: 0;
        margin-bottom: 2.2rem
    }

    .subcategory--nav-button {
        display: block;
        width: 75%;
        position: absolute;
        bottom: -1.6875rem;
        left: 0;
        right: 0;
        background: #5c8671;
        color: transparent;
        font-weight: normal;
        letter-spacing: 0.03rem;
        text-align: center;
        padding: 0.3125rem 0.4375rem;
        font-size: 0.8125rem;
        border-radius: 1rem;
        margin: 1.6875rem auto 0 auto;
        -webkit-font-smoothing: auto;
        -moz-osx-font-smoothing: auto;
        transition: bottom 500ms ease;
    }

    .subcategory--nav-button .icon--arrow-right {
        font-size: 0.75rem;
        position: absolute;
        top: 0;
        bottom: 0;
        right: 0.625rem;
        height: 0.8125rem;
        margin: auto;
    }
}


@container (max-width: 11.875em) {
    .is--ctl-listing .color-variants.subcategory li,
    .is--ctl-search.color-variants.subcategory li{
        width: 1.25rem !important;
        height: 1.25rem !important;
    }

    @media (min-width: 48em) and (max-width: 55.625em) {
        .is--ctl-listing .color-variants.subcategory,
        .is--ctl-search.color-variants.subcategory{
            top: min(70cqi, 7.25rem);
        }
    }
}

/* MIN-DEVICE-WIDTH ! */
@media screen and (min-device-width: 1260px) {
    .is--ctl-listing .color-variants.subcategory li,
    .is--ctl-search .color-variants.subcategory li{
        width: 1.25rem;
        height: 1.25rem;
    }
}
