.deution-product-gallery {
    position: relative;
    width: 100%;
    margin: 56px 0 0;
    padding: 58px 0 64px;
    background: transparent;
    color: #fff;
    overflow: visible;
}

.deution-product-gallery *,
.deution-product-gallery *::before,
.deution-product-gallery *::after {
    box-sizing: border-box;
}

.deution-product-gallery__inner {
    width: min(100%, 1320px);
    margin: 0 auto;
    padding: 0 48px;
}

.deution-product-gallery__header {
    margin: 0 0 90px;
    text-align: start;
}

.deution-product-gallery__title {
    margin: 0 0 10px;
    color: #fff;
    font-size: clamp(24px, 2.8vw, 36px);
    font-weight: 800;
    line-height: 1.25;
}

.deution-product-gallery__subtitle {
    max-width: 720px;
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.7;
}

.deution-product-gallery[dir="rtl"] .deution-product-gallery__subtitle {
    margin-inline-start: auto;
}

.deution-product-gallery__carousel {
    position: relative;
    padding: 0 42px;
}

.deution-product-gallery__viewport {
    overflow: hidden;
    width: 100%;
}

.deution-product-gallery__track {
    display: flex;
    gap: 24px;
    direction: ltr;
    transform: translate3d(0, 0, 0);
    transition: transform 320ms ease;
    will-change: transform;
}

.deution-product-gallery__item {
    flex: 0 0 calc((100% - var(--deution-product-gallery-space-desktop, 96px)) / var(--deution-product-gallery-items-desktop, 5));
    min-width: 0;
}

.deution-product-gallery__card {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 9 / 16;
    padding: 0;
    border: 0;
    border-radius: 20px;
    background: #171414;
    box-shadow: none;
    cursor: pointer;
    overflow: hidden;
    appearance: none;
}

.deution-product-gallery__image,
.deution-product-gallery__image-placeholder {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 400ms ease;
}

.deution-product-gallery__image-placeholder {
    background: linear-gradient(145deg, #2b2626, #100e0e);
}

.deution-product-gallery__overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: rgba(0, 0, 0, 0.52);
    transition: background 250ms ease;
}

.deution-product-gallery__play {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 2;
    width: 27px;
    height: 27px;
    border: 3px solid #fff;
    border-radius: 999px;
    transform: translate(-50%, -50%);
}

.deution-product-gallery__play::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 53%;
    width: 0;
    height: 0;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-left: 9px solid #fff;
    transform: translate(-42%, -50%);
}

.deution-product-gallery__item-title {
    position: absolute;
    right: 14px;
    bottom: 18px;
    left: 14px;
    z-index: 2;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.5;
    text-align: center;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

.deution-product-gallery__card:hover .deution-product-gallery__image {
    transform: scale(1.04);
}

.deution-product-gallery__card:hover .deution-product-gallery__overlay {
    background: rgba(0, 0, 0, 0.38);
}

.deution-product-gallery__nav {
    position: absolute;
    top: 50%;
    z-index: 5;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: var(--deution-product-gallery-nav-color, #f0065e);
    color: #fff;
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transform: translateY(-50%);
    appearance: none;
    transition: background 200ms ease, opacity 200ms ease;
}

.deution-product-gallery__nav span {
    display: block;
    margin-top: -2px;
}

.deution-product-gallery__nav--prev {
    left: 0;
}

.deution-product-gallery__nav--next {
    right: 0;
}

.deution-product-gallery__carousel.is-static .deution-product-gallery__nav {
    display: none;
}

.deution-product-gallery-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.deution-product-gallery-modal.is-open {
    display: flex;
}

.deution-product-gallery-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.82);
}

.deution-product-gallery-modal__dialog {
    position: relative;
    z-index: 1;
    width: min(100%, 960px);
    background: #0b0b0b;
    border-radius: 16px;
    box-shadow: 0 20px 70px rgba(0, 0, 0, 0.45);
}

.deution-product-gallery-modal__close {
    position: absolute;
    top: -18px;
    right: -18px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 999px;
    background: #fff;
    color: #111;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    appearance: none;
}

.deution-product-gallery-modal__content {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 16px;
}

.deution-product-gallery-modal__content iframe,
.deution-product-gallery-modal__content video {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    background: #000;
}


.deution-product-gallery-modal.is-self-hosted .deution-product-gallery-modal__dialog {
    width: auto;
    height: auto;
    max-width: calc(100vw - 48px);
    max-height: calc(100vh - 96px);
    background: transparent;
    border-radius: 0;
    box-shadow: none;
}

.deution-product-gallery-modal.is-self-hosted .deution-product-gallery-modal__content {
    display: flex;
    align-items: center;
    justify-content: center;
    width: auto;
    height: auto;
    max-width: calc(100vw - 48px);
    max-height: calc(100vh - 96px);
    aspect-ratio: auto;
    overflow: visible;
    border-radius: 0;
    background: transparent;
}

.deution-product-gallery-modal.is-self-hosted .deution-product-gallery-modal__content video {
    position: static;
    inset: auto;
    display: block;
    width: auto;
    height: auto;
    max-width: calc(100vw - 48px);
    max-height: calc(100vh - 96px);
    object-fit: contain;
    border: 0;
    background: transparent;
}

.deution-product-gallery-modal.is-self-hosted .deution-product-gallery-modal__close {
    top: -48px;
    right: 0;
}

html.deution-product-gallery-modal-open,
html.deution-product-gallery-modal-open body {
    overflow: hidden;
}

@media (max-width: 1024px) {
    .deution-product-gallery__inner {
        padding: 0 34px;
    }

    .deution-product-gallery__header {
        margin-bottom: 52px;
    }

    .deution-product-gallery__carousel {
        padding: 0 34px;
    }

    .deution-product-gallery__item {
        flex-basis: calc((100% - var(--deution-product-gallery-space-tablet, 48px)) / var(--deution-product-gallery-items-tablet, 3));
    }
}

@media (max-width: 640px) {
    .deution-product-gallery {
        padding: 42px 0 48px;
    }

    .deution-product-gallery__inner {
        padding: 0 20px;
    }

    .deution-product-gallery__header {
        margin-bottom: 32px;
    }

    .deution-product-gallery__carousel {
        padding: 0 30px;
    }

    .deution-product-gallery__track {
        gap: 16px;
    }

    .deution-product-gallery__item {
        flex-basis: calc((100% - var(--deution-product-gallery-space-mobile, 0px)) / var(--deution-product-gallery-items-mobile, 1));
    }

    .deution-product-gallery-modal__close {
        top: -46px;
        right: 0;
    }
}

@media (max-width: 640px) {
    .deution-product-gallery-modal.is-self-hosted {
        padding: 56px 16px 24px;
    }

    .deution-product-gallery-modal.is-self-hosted .deution-product-gallery-modal__dialog,
    .deution-product-gallery-modal.is-self-hosted .deution-product-gallery-modal__content,
    .deution-product-gallery-modal.is-self-hosted .deution-product-gallery-modal__content video {
        max-width: calc(100vw - 32px);
        max-height: calc(100vh - 96px);
    }

    .deution-product-gallery-modal.is-self-hosted .deution-product-gallery-modal__close {
        top: -48px;
        right: 0;
    }
}
