.gallery,
.big_gallery {
    position: relative;
}

.gallery img,
.big_gallery img {
    cursor: zoom-in;
    min-width: 1px;
}

.gallery-view_switch {
    position: absolute;
    right: 0;
    top: 0;
    display: block;
    background: #fff;
    background: var(--black_bg_black);
}

.gallery-view_switch__count-wrapper {
    display: flex;
    flex-direction: row;
}

.gallery-view_switch__count-value {
    padding-right: 3px;
    padding-left: 3px;
}

.gallery-view_switch__count-separate {
    color: #cecece;
    padding: 0 15px;
}

.gallery-view_switch__icons {
    transition: opacity .3s ease;
}

.gallery-view_switch__icons path {
    fill: var(--white_text_black);
}

.gallery-view_switch__icons.gallery-view_switch__icons--big {
    margin-right: 6px;
}

.gallery-view_switch__icons:not(.active) {
    opacity: .35;
    cursor: pointer;
}

.gallery-view_switch .gallery-view_switch__icons:hover {
    opacity: 1;
}

.gallery-big {
    position: relative;
}

.gallery-small .grid-list {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

@media (max-width:620px) {
    #main .gallery-small .grid-list:not(.mobile-scrolled) {
        grid-template-columns: 1fr 1fr
    }
}

.gallery-small .item {
    padding-top: 67%;
    transition: opacity .3s ease;
    overflow: hidden;
    position: relative;
}

.gallery-small .item:hover {
    opacity: .7;
}

.gallery-small .item>a {
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0;
    left: 0;
    display: flex;
    align-items: center;
    cursor: zoom-in;
    text-align: center;
}

.gallery-detail {
    --items: 5;
    display: grid;
    grid-template-columns: repeat(var(--items), 1fr);
    gap: var(--gap);
}

.gallery-detail::after {
    background-color: color-mix(in oklab, #222228 24%, transparent);
    border-radius: var(--theme-button-border-radius);
    color: #fff;
    pointer-events: none;
    font-size: calc(1em - 1px);
    line-height: calc(1em + 7px);
    align-items: center;
    display: flex;
    justify-content: center;
    grid-column-start: var(--items);
    --offset: clamp(4px, 3vw, 16px);
    position: absolute;
    bottom: var(--offset);
    right: var(--offset);
    padding-block: 5px;
    padding-inline: 12px;
}

.gallery-detail[data-breakpoint_768]::after {
    content: "+" attr(data-breakpoint_768);
}

@media screen and (max-width:767px) {
    .gallery-detail {
        --items: 4
    }

    .gallery-detail[data-breakpoint_600]::after {
        content: "+" attr(data-breakpoint_600)
    }

    .gallery-detail[data-breakpoint_600] .item:nth-child(n + 5) {
        display: none
    }
}

@media screen and (max-width:601px) {
    .gallery-detail {
        --items: 3
    }

    .gallery-detail[data-breakpoint_375]::after {
        content: "+" attr(data-breakpoint_375)
    }

    .gallery-detail[data-breakpoint_375] .item:nth-child(n + 4) {
        display: none
    }
}

@media screen and (max-width:374px) {
    .gallery-detail {
        --items: 2
    }

    .gallery-detail[data-breakpoint_320]::after {
        content: "+" attr(data-breakpoint_320)
    }

    .gallery-detail[data-breakpoint_320] .item:nth-child(n + 3) {
        display: none
    }
}

.detail-gallery-big-wrapper {
    position: relative;
    width: 100%;
}

.gallery-wrapper--hide-thumbs:not(.detail-gallery-big--with-video) .detail-gallery-big-slider-thumbs {
    display: none;
}

.gallery-wrapper__aspect-ratio-container {
    bottom: 0;
    display: flex;
    gap: 24px;
    height: 100%;
    justify-content: space-between;
    left: 0;
    position: absolute;
    position: relative;
    right: 0;
    top: 0;
    width: 100%;
}

.detail-gallery-big-aspect-wrapper {
    --gallery-aspect-ratio: 1;
    height: 350px;
    position: relative;
    width: 100%;
    aspect-ratio: var(--gallery-aspect-ratio);
    background: #fff;
    border-radius: var(--theme-image-border-radius);
}

.gallery-type-horizontal .detail-gallery-big-aspect-wrapper {
    --gallery-aspect-ratio: 1.3333;
}

.gallery-type-vertical .detail-gallery-big-aspect-wrapper {
    --gallery-aspect-ratio: .7488;
}

.detail-gallery-big.image-list__link {
    position: relative;
}

.detail-gallery-big {
    --max-width: 592px;
    margin: 0 auto;
    max-width: var(--max-width);
    position: relative;
    min-width: 0;
}

.gallery-size-medium .detail-gallery-big {
    --max-width: 920px;
}

.gallery-size-large .detail-gallery-big {
    --max-width: 1066px;
}

.detail-gallery-big__item>a,
.detail-gallery-big__item--no-image>span {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: start;
    position: absolute;
    top: 0;
}

.detail .detail-gallery-big-slider .detail-gallery-big__item img {
    width: auto;
    display: inline-block;
    vertical-align: middle;
}

@media (max-width:991px) {
    .gallery-wrapper__aspect-ratio-container {
        gap: 10px
    }
}

.detail-gallery-big-slider.big {
    bottom: 0;
    height: 100%;
    left: 0;
    margin: 0 auto;
    position: absolute;
    right: 0;
    top: 0;
    width: 100%;
    border-radius: var(--theme-image-border-radius);
}

.detail-gallery-big__item img {
    cursor: zoom-in;
    mix-blend-mode: darken;
}

.detail-gallery-big__item--big.detail-gallery-big__item--no-image img {
    cursor: auto;
}

.detail-gallery-big-slider-thumbs {
    --thumbs-size: 64px;
    align-items: center;
    display: flex;
    position: relative;
    width: var(--thumbs-size);
    flex-shrink: 0;
    inset: 0;
}

@media (min-width:1200px) {
    .product-container:where(.gallery-size-medium, .gallery-size-large) .detail-gallery-big-slider-thumbs {
        --thumbs-size: 104px
    }
}

.gallery-slider-thumb-wrapper {
    position: absolute;
    inset: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.gallery-slider-thumb__container {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    gap: 4px;
}

@media screen and (max-width:767px) {
    .detail-gallery-big {
        flex: 0 0 100%;
        width: 100%;
        max-width: 454px
    }

    .detail-gallery-big:has(.grid-list) {
        max-width: none
    }

    .gallery-wrapper__aspect-ratio-container {
        gap: 0
    }

    .detail-gallery-big-slider-thumbs {
        position: static;
        height: 0;
        width: 0
    }

    .gallery-slider-thumb__container {
        display: none
    }

    .detail-gallery-big-wrapper .video-block {
        position: absolute;
        left: 0;
        bottom: 12px;
        z-index: 2
    }
}

.gallery__item--thumb {
    align-items: center;
    border: 2px solid transparent;
    display: flex;
    max-height: var(--thumbs-size);
    max-width: var(--thumbs-size);
    min-height: var(--thumbs-size);
    min-width: var(--thumbs-size);
    padding: 4px;
    width: 100%;
}

.gallery__item--thumb.swiper-slide-thumb-active {
    border-color: var(--white_text_black);
}

.detail-gallery-big-slider-thumbs .gallery-slider-thumb-button {
    align-items: center;
    border-radius: var(--theme-button-border-radius);
    bottom: auto;
    left: 0;
    margin: 0;
    position: relative;
    right: 0;
    top: auto;
    height: 32px;
    width: 100%;
    flex-shrink: 0;
    translate: none;
    box-shadow: none;
    transition: none;
}

.detail-gallery-big-slider-thumbs .gallery-slider-thumb-button.swiper-button-disabled:not(.swiper-button-lock) {
    display: flex;
}

@media screen and (max-width:600px) {
    .detail-gallery-big-slider-main {
        max-width: 300px;
        margin: auto
    }
}

.similar-gallery {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    z-index: 2;
    width: 48px;
    height: 36px;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: var(--theme-button-border-radius);
}

.show-more-gallery {
    grid-column: span 2;
    padding-top: 20px;
    text-align: center;
    width: auto !important;
}

@media (max-width:600px) {
    .show-more-gallery {
        padding-top: 0
    }

    .show-more-gallery .show-more-gallery__btn {
        height: 100%;
        white-space: normal;
        padding: 0 15px;
        display: flex;
        align-items: center;
        line-height: calc(1em + 2px);
        font-size: calc(1rem - 2px);
        max-width: 120px
    }
}