/* Styles for Product Gallery Block Output */
.gallery-container {
    margin: 0 auto;
    position: relative;
}

.image-container{
    width: 100%; /* Ширина блока div */
    height: 400px; /* Высота блока div */
    border: 1px solid #e9e9e9; /* Граница блока div */
    overflow: hidden; /* Скрытие изображения, которое выходит за пределы блока */
    display: flex; /* Использование flexbox для центрирования */
    justify-content: center; /* Центрирование по горизонтали */
    align-items: center; /* Центрирование по вертикали */
    cursor: pointer;
}

.main-image {
    max-width: 100%; /* Максимальная ширина изображения */
    max-height: 100%; /* Максимальная высота изображения */
    width: auto; /* Автоматическое вычисление ширины */
    height: auto; /* Автоматическое вычисление высоты */
    margin: auto; /* Центрирование изображения внутри блока */
    display: block;
    cursor: pointer;
}

.thumbnail-carousel {
    display: flex;
    justify-content: space-between;
    overflow: hidden;
    margin-top: 10px;
}

.thumbnail-container {
    overflow-x: auto;
    white-space: nowrap;
    position: relative;
}

.thumbnail-container::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.thumbnail-container::-webkit-scrollbar-track {
    background: transparent;
}

.thumbnail-container::-webkit-scrollbar-thumb {
    background: #0099e5;
    border-radius: 4px;
}

.thumbnail-container::-webkit-scrollbar-thumb:hover {
    background: #036ea2;
}

.thumbnail {
    max-width: 100px!important;
    max-height: 60px!important;
    flex-shrink: 0;
    cursor: pointer;
}

.thumbnail-container {
    overflow-x: hidden;
    white-space: nowrap;
    position: relative;
    /* Remove scrollbar styling from here */
}


.a-button {
    background-color: white;
    color: #0099e5;
    font-size: 25px;
    /*border-radius: 50%;*/
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: 45px!important;
    margin: 10px 2px;
    height: 35px;
    /*border: 2px solid #0099e5;*/
    border:0;
    padding:0;
}

.a-button:hover {
    box-shadow: none!important; /* добавляем тень при наведении */
    transform: translateY(-2px); /* кнопка поднимается чуть вверх */
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999; /* Выше всех элементов */
}

.overlay.active {
    display: flex;
}

.image-viewer {
    position: relative;
    max-width: calc(100% - 80px); /* Учитываем ширину стрелок */
    max-height: calc(100% - 80px); /* Учитываем высоту стрелок */
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
}

.arrow-overlay {
    position: fixed;
    top: 0;
    bottom: 0;
    width: 40px; /* Ширина поля для переключения */
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0.5;
    cursor: pointer;
    transition: background-color 0.3s ease;
    z-index: 9999; /* Перекрывает основное изображение */
}

.left-overlay {
    left: 0;
}

.right-overlay {
    right: 0;
}

.left-overlay i, .right-overlay i {
    color: #fff;
    font-size: 24px;
}

.left-overlay:hover, .right-overlay:hover {
    background-color: rgba(255, 255, 255, 0.2);
}
