.gallery {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
}

.main-image img {
    max-width: 640px;
    height: auto;
    cursor: pointer;
    border: 2px solid #ddd;
    border-radius: 5px;
	filter: drop-shadow(5px 5px 5px #222);
}

.thumbnails {
    display: flex;
    align-items: center;
    margin-top: 20px;
    width: 100%;
    max-width: 1160px; /* Ограничиваем ширину контейнера */
    justify-content: space-between;
    border-radius: 5px;
	filter: drop-shadow(5px 5px 5px #222);
}

.thumbnails-container {
    display: flex;
    overflow-x: hidden; /* Убираем горизонтальную полосу прокрутки */
    scroll-behavior: smooth;
    width: 80%;
    height: 100px; /* Фиксируем высоту контейнера */
    align-items: center; /* Выравниваем миниатюры по центру */
}

.thumbnails-container img {
    width: 100px;
    height: auto;
    max-height: 75px;
    margin: 0 10px;
    cursor: pointer;
    transition: transform 0.2s;
    flex-shrink: 0; /* Запрещаем сжатие миниатюр */
}

.thumbnails-container img:hover {
    transform: scale(1.1);
}

.arrow {
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 10px;
    cursor: pointer;
    font-size: 18px;
    flex-shrink: 0; /* Запрещаем сжатие стрелок */
}

.arrow:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    padding-top: 60px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgb(0, 0, 0);
}

.modal-content {
    margin: auto;
    display: block !important;
    max-width: 80%;
    max-height: 80%;
	border-color: white;
    border-width: medium;
}

.close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #ccc;
}

.modal-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 15px;
    cursor: pointer;
    font-size: 24px;
}

.modal-arrow.left {
    left: 20px;
}

.modal-arrow.right {
    right: 20px;
}

.modal-arrow:hover {
    background-color: rgba(0, 0, 0, 0.8);
}