.offer-detail-page {
    overflow-x: hidden;
}

.offer-gallery,
.offer-gallery-main,
.offer-gallery-thumbs,
.offer-gallery-thumb,
.offer-gallery-slide,
.offer-lightbox,
.offer-lightbox-panel,
.offer-lightbox-panel img {
    box-sizing: border-box;
    max-width: 100%;
}

.offer-gallery,
.offer-gallery-main {
    min-width: 0;
    overflow: hidden;
}

.offer-gallery-slide {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.offer-gallery-thumbs {
    min-width: 0;
    max-width: 100%;
    overscroll-behavior-inline: contain;
}

.offer-gallery-thumb img {
    display: block;
    max-width: 100%;
}

.offer-gallery-control,
.offer-lightbox-control,
.offer-lightbox-close {
    display: inline-grid;
    place-items: center;
    aspect-ratio: 1;
    padding: 0;
    border-radius: 999px !important;
    line-height: 1;
}

.offer-gallery-control,
.offer-lightbox-control {
    width: 48px;
    height: 48px;
    color: #ffffff;
    background: linear-gradient(145deg, rgba(17, 24, 36, 0.54), rgba(17, 24, 36, 0.28));
    border: 1px solid rgba(255, 255, 255, 0.42);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.28);
    backdrop-filter: blur(16px) saturate(1.12);
    -webkit-backdrop-filter: blur(16px) saturate(1.12);
}

.offer-gallery-control:hover,
.offer-gallery-control:focus-visible,
.offer-lightbox-control:hover,
.offer-lightbox-control:focus-visible {
    color: var(--navy);
    background: rgba(255, 253, 250, 0.95);
    border-color: rgba(255, 255, 255, 0.76);
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.8);
    outline: none;
}

.offer-gallery-arrow-icon {
    display: block;
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.35;
    stroke-linecap: round;
    stroke-linejoin: round;
    pointer-events: none;
}

.offer-lightbox {
    overflow: hidden;
}

.offer-lightbox-panel {
    width: min(1120px, 100%);
    min-width: 0;
}

.offer-lightbox-panel img {
    width: 100%;
    object-fit: contain;
}

.offer-lightbox-close {
    top: 14px;
    right: 14px;
    width: 44px;
    height: 44px;
    font-size: 0;
}

.offer-lightbox-close::before,
.offer-lightbox-close::after {
    content: "";
    position: absolute;
    width: 18px;
    height: 2px;
    background: currentColor;
    border-radius: 999px;
}

.offer-lightbox-close::before {
    transform: rotate(45deg);
}

.offer-lightbox-close::after {
    transform: rotate(-45deg);
}

@media (max-width: 760px) {
    .offer-detail-shell,
    .offer-detail-content {
        width: min(100% - 28px, 1240px);
    }

    .offer-gallery {
        padding: 10px;
    }

    .offer-gallery-main {
        width: 100%;
        min-height: 0;
        aspect-ratio: 4 / 3;
    }

    .offer-gallery-control,
    .offer-lightbox-control {
        width: 40px;
        height: 40px;
    }

    .offer-gallery-arrow-icon {
        width: 20px;
        height: 20px;
    }

    .offer-lightbox {
        padding: 12px;
    }

    .offer-lightbox-panel {
        width: 100%;
        max-height: calc(100vh - 24px);
    }

    .offer-lightbox-panel img {
        max-height: calc(100vh - 92px);
    }

    .offer-lightbox-close {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 520px) {
    .offer-detail-shell,
    .offer-detail-content {
        width: min(100% - 24px, 1240px);
    }

    .offer-gallery {
        padding: 8px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .offer-gallery-control,
    .offer-lightbox-control,
    .offer-lightbox-close {
        transition: none;
    }
}
