.dsc-product-gallery {
    --dsc-ease: cubic-bezier(0.22, 1, 0.36, 1);
    position: relative;
    isolation: isolate;
    width: 100%;
    height: 100dvh;
    min-height: 520px;
    overflow: hidden;
    background: #101414;
    outline: none;
}

.dsc-gallery__viewport,
.dsc-gallery__track,
.dsc-gallery__slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.dsc-gallery__slide {
    z-index: 0;
    opacity: 0;
    pointer-events: none;
}

.dsc-gallery__slide.is-active {
    z-index: 1;
    opacity: 1;
    pointer-events: auto;
}

.dsc-gallery__image {
    display: block;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    object-fit: cover;
    object-position: center;
    user-select: none;
    -webkit-user-drag: none;
}

.dsc-gallery__fx-layer {
    position: absolute;
    z-index: 10;
    box-sizing: border-box;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
    pointer-events: none;
    transition: all 550ms cubic-bezier(0.5, 0, 0.2, 1);
}

.dsc-gallery__fx-layer img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.dsc-gallery__fx-layer.is-current {
    z-index: 2;
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    height: 100% !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    opacity: 1;
    transition: none !important;
}

.dsc-gallery__counter,
.dsc-gallery__arrow,
.dsc-gallery__preview {
    position: absolute;
    z-index: 4;
}

.dsc-gallery__counter {
    left: clamp(18px, 2.2vw, 34px);
    bottom: clamp(18px, 2.2vw, 34px);
    min-width: 58px;
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 999px;
    color: #fff;
    background: rgba(18, 24, 25, 0.48);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
    backdrop-filter: blur(8px);
    font-size: 12px;
    line-height: 1;
    letter-spacing: 0.12em;
    text-align: center;
}

.dsc-gallery__arrow,
.dsc-gallery__preview {
    appearance: none;
    border: 0;
    cursor: pointer;
}

.dsc-gallery__arrow {
    top: 50%;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    color: #fff;
    background: rgba(18, 24, 25, 0.36);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(8px);
    opacity: 0;
    transform: translateY(-50%) scale(0.9);
    transition:
        opacity 400ms ease,
        background 400ms ease,
        box-shadow 400ms ease,
        transform 500ms var(--dsc-ease),
        color 250ms ease;
}

.dsc-gallery__arrow--prev {
    left: clamp(16px, 2vw, 30px);
}

.dsc-gallery__arrow--next {
    right: clamp(16px, 2vw, 30px);
}

.dsc-gallery__arrow svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.dsc-gallery__preview {
    right: clamp(18px, 2.2vw, 34px);
    bottom: clamp(18px, 2.2vw, 34px);
    width: 120px;
    aspect-ratio: var(--dsc-gallery-ratio, 1 / 1);
    padding: 0;
    overflow: hidden;
    border: 1px solid #fff;
    border-radius: 12px;
    background: #eee;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
    opacity: 1;
    transform: none;
    transform-origin: right bottom;
    transition:
        opacity 560ms cubic-bezier(0.16, 1, 0.3, 1),
        transform 820ms cubic-bezier(0.16, 1, 0.3, 1),
        box-shadow 250ms ease;
}

.dsc-gallery__preview-image {
    display: block;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    opacity: 1;
}

.dsc-product-gallery.is-changing .dsc-gallery__preview {
    opacity: 0;
    transform: scale(0.9);
}

.dsc-product-gallery.preview-no-transition .dsc-gallery__preview {
    transition: none !important;
}

.dsc-product-gallery--multi:hover .dsc-gallery__arrow,
.dsc-product-gallery--multi:focus-within .dsc-gallery__arrow {
    opacity: 1;
}

.dsc-product-gallery--multi:hover .dsc-gallery__arrow,
.dsc-product-gallery--multi:focus-within .dsc-gallery__arrow {
    transform: translateY(-50%) scale(1);
}

.dsc-gallery__arrow:hover,
.dsc-gallery__arrow:focus-visible {
    color: #334549;
    background: rgba(255, 255, 255, 0.94);
}

.dsc-gallery__preview:hover,
.dsc-gallery__preview:focus-visible {
    box-shadow: 0 9px 24px rgba(0, 0, 0, 0.34);
}

.dsc-product-gallery:focus-visible,
.dsc-gallery__arrow:focus-visible,
.dsc-gallery__preview:focus-visible {
    outline: 2px solid #fff;
    outline-offset: -4px;
}

@media (hover: none), (max-width: 980px) {
    .dsc-product-gallery {
        height: min(76svh, 780px);
        min-height: 440px;
    }

    .dsc-gallery__arrow,
    .dsc-gallery__preview {
        opacity: 1;
    }

    .dsc-gallery__arrow {
        width: 40px;
        height: 40px;
        transform: translateY(-50%) scale(1);
    }

    .dsc-gallery__preview {
        width: 86px;
        transform: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .dsc-gallery__slide,
    .dsc-gallery__fx-layer,
    .dsc-gallery__arrow,
    .dsc-gallery__preview,
    .dsc-gallery__preview-image {
        transition-duration: 1ms !important;
    }
}
