.ave-acf-gallery-thumbnails {
    display: grid;
    grid-template-columns: repeat(3, minmax(150px, 1fr));
    gap: 10px;
}
.ave-acf-gallery-thumbnails img {
    border-radius: 8px!important;
    }
    
.ave-acf-gallery-thumbnails a {
    display: block;
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s ease-in-out;
}

.ave-acf-gallery-thumbnails a:hover {
    transform: scale(1.05);
    -webkit-box-shadow: 0px 0px 15px 0px rgba(0, 0, 0, 0.25);
-moz-box-shadow: 0px 0px 15px 0px rgba(0, 0, 0, 0.25);
box-shadow: 0px 0px 15px 0px rgba(0, 0, 0, 0.25);
z-index:10;
}

.ave-gallery-item {
    width: 100%;
    height: 100%;
}

.ave-gallery-item img,
.ave-gallery-item video {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Изображение/видео полностью заполняет контейнер */
}

/* Иконка "Play" для видео */
.ave-gallery-item--video .play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    pointer-events: none; /* Чтобы не мешала клику */
    display: flex;
    align-items: center;
    justify-content: center;
}
.ave-gallery-item--video .play-icon::after {
    content: '';
    display: block;
    width: 0;
    height: 0;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    border-left: 20px solid white;
    margin-left: 5px;
}
.f-thumbs__slide__button {
    width: 100%!important;
}
.fancybox__container button   {
    padding:0px!important;
}
.fancybox__container .f-button svg {
    min-width:24px;
}