:root {
    --selected-color: #333;
}

main {
    min-height: 500px;
}

.detail__container {
    display: flex;
    flex-direction: row;
    margin: 0 15px;
    padding: 0;
    min-height: 200px;
}

.detail__gallery {
    display: flex;
    padding: 0 4px;
    min-width: calc(50% - 30px);
    margin: 0 15px 50px;
}

.detail__gallery_item {
    position: relative;
    max-width: 100%;
    height: auto;
    border: 0;
    overflow: hidden;
    padding: 4px 0;
}

.detail__gallery_column {
    flex: 50%;
    padding: 0 4px;
}

.detail__gallery_item img {
    object-fit: contain;
    object-position: center center;
    vertical-align: middle;
}

.detail__gallery_item .image_loader {
    margin-top: 4px;
    height: calc(100% - 8px);
}

.detail__info {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    min-width: calc(50% - 30px);
    margin: 0 15px 50px;
}

.detail__title {
    margin-top: 0;
    font-size: 21px;
    font-weight: 700;
    width: 90%;
}

.detail__price {
    font-size: 20px;
    font-weight: 600;
}

.detail__sku {
    color: var(--text-color);
    font-size: 14px;
    font-weight: 400;
}

.detail__sku > span:last-child {
    color: var(--text-color-accent-invert);
}

.detail__info > *,
.detail_info__wrapper > * {
    margin-bottom: 18px;
}

.detail_info__wrapper {
    position: sticky;
    top: 85px;
    display: flex;
    flex-direction: column;
}

.detail__colors, 
.detail__sizes {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.colors__title,
.sizes__title {
    font-weight: 700;
    text-transform: uppercase;
    font-size: 14px;
    margin: 0;
}

.colors__switchers, 
.sizes__switchers {
    display: flex;
    width: 100%;
    margin-left: -5px;
    flex-wrap: wrap;
}

.sizes__switchers > a,
.colors__switchers > a {
    text-decoration: none;
    height: 54px;
}

.colors__switcher, 
.sizes__switcher {
    position: relative;
    touch-action: manipulation;
    display: inline-block;
    font-size: 0;
    width: 44px;
    height: auto;
    padding: 6px 16px 7px;
    text-align: center;
    border: 1px solid var(--border-color);
    border-radius: 3px;
    vertical-align: middle;
    cursor: pointer;
    margin: 5px;
    box-shadow: inset 0 0 0 2px var(--border-color-accent);
    transition: color .25s ease, background-color .25s ease, border-color .15s ease, box-shadow .25s ease, opacity .25s ease;
}

.colors__switcher--current {
    border: 2px solid #333;
}

.sizes__switcher {
    display: flex;
    position: relative;
    justify-content: center;
    align-items: center;
    font-size: 100%;
    text-transform: uppercase;
    width: auto;
    color: var(--text-color);
    font-size: 14px;
    box-shadow: none;
    padding: 12px 16px 12px;
    user-select: none;
}

.sizes__switcher:hover {
    border-color: var(--border-color-accent-invert);
}

.colors__switcher--sold-out::before {
    content: "";
    width: 90%;
    height: 2px;
    background: var(--sold-out-color);
    display: block;
    position: absolute;
    z-index: 2;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(135deg);
}

.sizes__switcher--sold-out {
    text-decoration: line-through;
    text-decoration-color: currentColor;
}

.sizes__switcher--current {
    border-color: var(--selected-color);
    background: var(--selected-color);
    color: var(--text-color-accent);
}

.detail__description {
    font-size: 14px;
    line-height: 23px;
    color: var(--text-color);
    width: 95%;
}

.detail__description figure {
    margin: auto 0;
}

.detail__gallery--mobile {
    display: none;
}

.img_zoom {
    display: none;
    position: fixed;
    top: 0;
    left: calc(50% + 10px);
    height: 520px;
    width: 100%;
    max-width: 520px;
    background: grey;
    z-index: calc(var(--header-z-index) - 1);
}

.img_lens {
    display: none;
    position: absolute;
    border: 1px solid #d4d4d4;
    width: 140px;
    height: 140px;
    pointer-events: none;
    background: rgba(255,255,255, 0.2);
}

@media only screen and (max-width: 1337px) { 
    .img_lens {
        width: 70px;
        height: 70px;
    }
}

@media only screen and (max-width: 931px) { 
    .detail__container {
        flex-direction: column;
    }

    .detail__gallery {
        display: none;
    }

    .detail__gallery--mobile {
        display: flex;
        justify-content: center;
        align-items: center;
        position: relative;
        width: 100%;
        background-color: #333; 
        padding-top: 100%;
        margin-bottom: 30px;
    }

    .detail__gallery--mobile img {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: contain;
        object-position: center center;
        vertical-align: middle;
        z-index: 1;
    }

    .detail__gallery--mobile span {
        position: absolute;
        top: calc(50% - 10px);
        color: var(--text-color);
    }

    .detail_gallery__btn {
        position: absolute;
        top: calc(50% - 25px);
        width: 50px;
        height: 50px;
        border-radius: 50%;
        background: transparent;
        z-index: 1;
        border: 1px solid var(--border-color-accent-invert);
        color: var(--text-color-accent-invert);
    }

    .detail_gallery__btn:hover {
        background: var(--bg-dark);
        color: var(--text-color-accent);
        border: 1px solid var(--text-color-accent);
    }

    .detail_gallery__btn--left::before {
        content: "\2039";
        font-size: 36px;
        line-height: 20px;
    }

    .detail_gallery__btn--left {
        left: 0;   
    }

    .detail_gallery__btn--right::before {
        content: "\203A";
        font-size: 36px;
        line-height: 20px;
    }

    .detail_gallery__btn--right {
        right: 0;    
    }
}