/** CSS für Artikelübersicht **/
body {
    font-family: Arial, sans-serif;
    margin: 0;
    background: radial-gradient(circle at center,
    rgba(240, 240, 255, 1) 0%,
    rgba(230, 230, 245, 1) 50%,
    rgba(220, 220, 235, 1) 100%);
}

.btn {
    margin: 5px;
    padding: 10px 20px;
    border: none;
    cursor: pointer;
    font-size: 16px;
    background-color: #fff;
    transition: background 0.2s ease;
    text-decoration: none;
    color: #000;
}

.grid {
    display: grid;
    gap: 20px;
    padding: 20px;
    color: #3f4c58;
    background-color: #e6e6e6;
    margin-top: 105px;
}

header {
    background: #fff;
    padding: 5px 20px;
    color: #3f4c58;
    width: calc(100% - 40px);
    height: 90px;
    position: fixed;
    top: 0;
    display: flex;
    z-index: 100;
    border: none;
    box-shadow: 0 3px 2px 0 rgba(51, 51, 51, 0.7);
    align-items: center;
}

a#logo {
    position: absolute;
}

#logo img {
    width: 30vw;
    max-width: 300px;
}

a#logo:after {
    content: '';
    display: block;
    clear: both;
}

#legal {
    text-decoration: none;
    color: #000;
    position: absolute;
    right: 20px;
}

#user-interaction {
    display: flex;
    margin: auto;
    align-items: center;
    flex-direction: column;
}

#type-switcher {
    width: 120px;
}

a#type-switcher #door,
a#type-switcher[data-type=d] #doubledoor {
    fill: #58a42b;
}

a#type-switcher:not([data-type=d]) #doubledoor,
a#type-switcher[data-type=d] #door {
    fill: #b5b5b4;
}

a#type-switcher:not([data-type=d]) #left,
a#type-switcher[data-type=d] #right {
    fill: #858584;
}

a#type-switcher:not([data-type=d]) #right,
a#type-switcher[data-type=d] #left {
    fill: #ff1d25;
}

#column-range {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

input[type="range"] {
    outline: none;
    height: 10px;
    -webkit-appearance: none;
    appearance: none;
    position: relative;
    background-color: #58a42b;
    border: 2px solid #d7d7d7;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    border-radius: 0;
    margin-top: 0;
    background-image: linear-gradient(to bottom, #fff 0%, #e6e6e6 100%);
    position: relative;
    border: 2px solid #d7d7d7;
    cursor: pointer;
    height: 20px;
    width: 20px;
}

input[type="range"]::-webkit-slider-thumb:hover {
    border-color: #58a42b;
}

.card {
    background: #fff;
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    animation: fadeIn 0.4s ease;
    border: 2px solid #d7d7d7;
    overflow: hidden;
}

h2 {
    font-size: 22px;
    width: fit-content;
    border-top: 15px solid #58a42b;
    border-bottom: 15px solid #87c42b;
    margin: 20px auto;
    padding: 5px 0;
    font-weight: 900;
    letter-spacing: 2px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card h2 {
    margin: 0 0 30px 0;
    font-size: 20px;
}

.card h2 a {
    text-decoration: none;
    color: #333;
}

.usp {
    font-size: 14px;
    color: #666;
    margin-bottom: 12px;
}

.image {
    transition: 1s;
    transform-style: preserve-3d;
    display: flex;
    margin: auto;
    flex-wrap: nowrap;
    flex-direction: column;
    width: 100%;
    align-items: center;
    height: 100%;
    justify-content: flex-end;
    z-index: 1;
}

.image-box {
    text-align: center;
    /* position: absolute; */
    height: 400px;
    display: flex;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 30px;
    top: 20px;
    left: 5%;
    align-items: flex-end;
    align-content: flex-start;
    flex-direction: column;
    flex-wrap: nowrap;
    justify-content: center;
}

.image-box.hover .image {
    transform: rotateY(180deg);
    transform-origin: center;
}

.image-front, .image-back {
    position: absolute;
    bottom: 0;
    backface-visibility: hidden;
    height: 100%;
    filter: drop-shadow(0 .2rem .25rem rgba(0, 0, 0, 0.2));
    box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 3px 1px -2px rgba(0, 0, 0, 0.12), 0 1px 5px 0 rgba(0, 0, 0, 0.2);
}

.image-front {
    transform: rotateY(0deg);
}

.image-back {
    transform: rotateY(180deg);
}

.shadow {
    width: 100%;
    height: 20px;
    background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0) 80%);
    filter: blur(8px);
    z-index: 0;
    position: sticky;
    bottom: 0;
}

.activ-color {
    margin: 8px auto 0;
    font-size: 12px;
    font-weight: 700;
}

.toggle-btn {
    float: right;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    cursor: pointer;
    font-size: 18px;
    line-height: 38px;
    z-index: 1;
    position: relative;

}
.toggle-btn svg {
    transition: transform .3s;
}
.toggle-btn:not(:disabled):hover svg {
    transform: rotate(180deg);
}
.toggle-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.colors {
    margin-bottom: 80px;
    display: grid;
    grid-template-columns: repeat(7, minmax(auto, 24px));
    gap: 5px;
}

.color-option {
    width: 22px;
    cursor: pointer;
    overflow: hidden;
}
.color-option:has(img) {
    border: 1px solid;
}

.color-option img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.color-option.active {
    border-color: #4a6fa5;
}

.deeplink.btn {
    background: #58a42b;
    position: absolute;
    bottom: 10px;
    color: #ffffff;
    font-weight: 700;
    padding: 10px;
    margin: 0;
    border-radius: 0px;
    font-size: 20px;
    text-transform: uppercase;
    max-width: 90%;
}


div#infos {
    position: absolute;
    display: none;
}

#loader, #more {
    text-align: center;
    margin: 20px;
    color: #444;
    font-size: 14px;
}

.spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-top: 4px solid #4a6fa5;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 10px auto;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}


@media screen and (min-width: 768px) {
    #user-interaction {
        flex-direction: unset;
    }
}


.card {
    container-type: inline-size;
    container-name: card;
}

@container card (width < 250px) {
    .colors {
        grid-template-columns: repeat(7, minmax(auto, 24px));
        gap: 3px;
    }
    .deeplink.btn {
        max-width: 80%;
        font-size: 16px;
    }
}
@container card (width > 250px) {
    .colors {
        grid-template-columns: repeat(9, minmax(auto, 24px));
        gap: 3px;
    }

}
@container card (width > 350px) {

    .colors {
        grid-template-columns: repeat(11, minmax(auto, 24px));
    }
}
@container card (width > 450px) {

    .colors {
        grid-template-columns: repeat(15, minmax(auto, 24px));
    }
}
@container card (width > 650px) {

    .colors {
        grid-template-columns: repeat(15, minmax(auto, 24px));
    }
}