.gallery {
    max-width: 800px;
    margin: 0 auto;
}

.main-image-box img {
    width: 100%;
    height: 500px;
    object-fit: cover;
    cursor: pointer;
    transition: opacity 0.8s ease;
}

.thumbnails {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.thumbnails img {
    width: 80px;
    cursor: pointer;
}

.lightbox {
	z-index: 999;
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    justify-content: center;
    align-items: center;
}

.lightbox img {
    max-width: 80%;
    max-height: 80%;
	display: block; /* Это заставит изображение занимать всю строку */
    margin: auto;   /* Это центрирует изображение */
}
.lightbox-arrow.hidden {
    display: none;
}

.thumbnails {
    display: flex;
    align-items: center;
}

.thumbnail-window {
    overflow: hidden;
    width: calc(100px * 6); /* предполагая, что ширина миниатюры 100px */
    margin: 0 10px;
}

.thumbnail-container {
    display: flex;
    transition: transform 0.3s ease;
}

.thumbnail-container img {
    margin-right: 10px;
}  
.lightbox-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.7);
    border: none;
    font-size: 24px;
    padding: 10px;
    cursor: pointer;
}

#prevArrow {
    left: 10px;
}

#nextArrow {
    right: 10px;
}