.section-ingredients {
    background-color: #ddd;
    width: 100%;

    @media screen and (max-width: 1279px) {
        position: fixed;
        top: 0;
        left: 0;
        height: 100%;
        z-index: 9999;

        overflow-y: auto;
        max-height: 100vh;

    }
}

.ingredients-heading {
    display: flex;
    align-items: center;
    background-color: #CCC;
}

.ingredients-heading .product-name {
    flex-grow: 1;
}

.ingredients-close {
    padding: 0.5em 1em;
    align-self: flex-start;

    @media screen and (min-width: 1280px) {
        align-self: center;
        display: flex;
    }
}

.ingredients-close svg {
    width: 2em;
    height: 2em;
    cursor: pointer;
}

.ingredients-tabs {
    font-weight: bold;
    display: flex;
    flex-wrap: wrap;
}

.ingredients-tabs>div {
    width: 100%;
    display: flex;
}

.ingredients-tabs>* {
    margin: 0;
    padding: 0.5em 1em;
    align-content: center;
    text-align: end;
    cursor: pointer;
    position: relative;
}

.ingredients-tabs>*:first-child::before,
.ingredients-tabs>*:nth-child(2)::before,
.ingredients-tabs>*:nth-child(3)::before,
.ingredients-tabs>*:nth-child(4)::before {
    content: "";
    position: absolute;
    width: 0%;
    height: 3px;
    bottom: 0;
    background-color: #2356a7;
    transition: width 0.125s ease-out;
}

.ingredients-tabs>*:first-child::before {
    right: 0;
}

.ingredients-tabs>*:nth-child(2)::before,
.ingredients-tabs>*:nth-child(3)::before,
.ingredients-tabs>*:nth-child(4)::before {
    left: 0;
}

.ingredients-tabs>span {
    padding: 2em;
}

.ingredients-tabs .selected {
    color: #2356a7;
}

.ingredients-tabs .selected:first-child::before,
.ingredients-tabs .selected:nth-child(2)::before,
.ingredients-tabs .selected:nth-child(3)::before,
.ingredients-tabs .selected:nth-child(4)::before {
    width: 100%;
}

.ingredients {
    margin: 2em;
    padding-bottom: 2em;
}

.ingredients.facts .ingredient table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0.5em;
}

.ingredients.facts .ingredient table tbody tr:first-child td {
    border-bottom: 1px solid black;
}

.ingredients.facts {
    display: flex;
    flex-wrap: wrap;
    gap: 1em;
}

.ingredients.facts>* {
    flex: 0 0 calc(20% - 1em * 4 / 5);
    background-color: #ddd;
}

@media screen and (max-width: 991px) {
    .ingredients.facts>* {
        flex: 0 0 calc(33% - 1em * 2 / 3);
    }
}

@media screen and (max-width: 639px) {
    .ingredients.facts>* {
        flex: 0 0 100%;
    }
}

.ingredients.facts h3 {
    margin: 0 0 1em 0;
}


@media screen and (min-width: 1280px) {
    .ingredients-heading .product-name {
        display: none;
    }
}

.ingredients-wrapper {
    display:inline-block; 
    width: 100%; 
    margin: 0; 
    padding: 0;
}

.triangle {
    width: 25%;
    margin-top: -1em;
    margin-right: 0%;
    margin-bottom: 0em;
    transition: margin-left 0.25s ease-out;
}

.triangle[data-position="0"] {
    margin-left: 0%;
}

.triangle[data-position="1"] {
    margin-left: 25%;
}

.triangle[data-position="2"] {
    margin-left: 50%;
}

.triangle[data-position="3"] {
    margin-left: 75%;
}

.triangle::before {
    content: "";
    display: block;
    width: 0;
    height: 0;
    margin: auto;
    border-left: 1em solid transparent;
    border-right: 1em solid transparent;
    border-bottom: 2em solid #CCC;
}