.desert-product-gallery {
    --desert-gallery-gap: 12px;
    position: relative;
    width: 100%;
    min-width: 0;
    font-family: Manrope, Arial, sans-serif;
}

.desert-product-gallery__grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(190px, 1fr);
    gap: var(--desert-gallery-gap);
    width: 100%;
}

.desert-product-gallery__main {
    min-height: 420px;
}

.desert-product-gallery__side {
    display: grid;
    gap: var(--desert-gallery-gap);
    grid-template-rows: repeat(2, minmax(0, 1fr));
}

.desert-product-gallery__side-item,
.desert-product-gallery__main,
.desert-product-gallery__bottom-item {
    min-width: 0;
    overflow: hidden;
    background: #eef1f4;
    border-radius: 14px;
}

.desert-product-gallery__trigger {
    display: block;
    width: 100%;
    height: 100%;
    overflow: hidden;
    color: inherit;
    text-decoration: none;
}

.desert-product-gallery__trigger:focus-visible {
    outline: 3px solid #0a2a92;
    outline-offset: -4px;
}

.desert-product-gallery__image {
    display: block;
    width: 100% !important;
    height: 100% !important;
    min-height: 100%;
    object-fit: cover;
    transition: transform 180ms ease;
}

.desert-product-gallery__trigger:hover .desert-product-gallery__image {
    transform: scale(1.025);
}

.desert-product-gallery__bottom {
    grid-column: 1 / -1;
}

.desert-product-gallery__bottom-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: var(--desert-gallery-gap);
}

.desert-product-gallery__bottom-item {
    min-height: 150px;
}

.desert-product-gallery__dialog[hidden] {
    display: none;
}

.desert-product-gallery__dialog {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: grid;
    place-items: center;
    padding: 72px 88px 54px;
    color: #fff;
    background: rgba(13, 16, 20, 0.95);
}

.desert-product-gallery__figure {
    display: grid;
    gap: 14px;
    justify-items: center;
    width: min(1180px, 100%);
    max-height: 100%;
    margin: 0;
}

.desert-product-gallery__lightbox-image {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: calc(100vh - 150px);
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
}

.desert-product-gallery__caption {
    min-height: 22px;
    color: #f2f3f5;
    font-size: 14px;
    line-height: 22px;
    text-align: center;
}

.desert-product-gallery .desert-product-gallery__close,
.desert-product-gallery .desert-product-gallery__nav {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    padding: 0;
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.42);
    border-radius: 50%;
    cursor: pointer;
}

.desert-product-gallery .desert-product-gallery__close:hover,
.desert-product-gallery .desert-product-gallery__nav:hover {
    background: rgba(255, 255, 255, 0.24);
}

.desert-product-gallery .desert-product-gallery__close:focus-visible,
.desert-product-gallery .desert-product-gallery__nav:focus-visible {
    outline: 3px solid #8dc7ff;
    outline-offset: 3px;
}

.desert-product-gallery__close {
    top: 18px;
    right: 20px;
}

.desert-product-gallery__nav {
    top: 50%;
    transform: translateY(-50%);
}

.desert-product-gallery__nav--previous {
    left: 22px;
}

.desert-product-gallery__nav--next {
    right: 22px;
}

@media (max-width: 700px) {
    .desert-product-gallery__grid {
        grid-template-columns: 1fr;
    }

    .desert-product-gallery__main {
        min-height: 300px;
    }

    .desert-product-gallery__side {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-rows: none;
    }

    .desert-product-gallery__side-item,
    .desert-product-gallery__bottom-item {
        min-height: 125px;
    }

    .desert-product-gallery__dialog {
        padding: 64px 54px 42px;
    }

    .desert-product-gallery .desert-product-gallery__nav {
        width: 42px;
        height: 42px;
    }

    .desert-product-gallery__nav--previous {
        left: 6px;
    }

    .desert-product-gallery__nav--next {
        right: 6px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .desert-product-gallery__image {
        transition: none;
    }
}
