/* ==================================================================
 * TsantaMerla – HBS Companion · Galleria camera (widget Elementor)
 * ================================================================== */

.tsmhbs-gallery {
    --tsmhbs-gap: 10px;
    width: 100%;
}

/* --- Slider principale --- */
.tsmhbs-gallery .tsmhbs-gallery-main {
    width: 100%;
    margin-bottom: var(--tsmhbs-gap);
    overflow: hidden;
}

.tsmhbs-gallery .tsmhbs-gallery-main .swiper-slide {
    background: #f2f2f2;
}

.tsmhbs-gallery .tsmhbs-main-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Proporzioni immagine principale */
.tsmhbs-gallery.tsmhbs-ratio-4x3  .tsmhbs-gallery-main .swiper-slide { aspect-ratio: 4 / 3; }
.tsmhbs-gallery.tsmhbs-ratio-3x2  .tsmhbs-gallery-main .swiper-slide { aspect-ratio: 3 / 2; }
.tsmhbs-gallery.tsmhbs-ratio-16x9 .tsmhbs-gallery-main .swiper-slide { aspect-ratio: 16 / 9; }
.tsmhbs-gallery.tsmhbs-ratio-1x1  .tsmhbs-gallery-main .swiper-slide { aspect-ratio: 1 / 1; }
/* "originale": nessun aspect-ratio, l'immagine mantiene le sue proporzioni */
.tsmhbs-gallery.tsmhbs-ratio-original .tsmhbs-main-img { height: auto; }

/* --- Frecce --- */
.tsmhbs-gallery .swiper-button-prev,
.tsmhbs-gallery .swiper-button-next {
    color: #fff;
    background: rgba(0, 0, 0, 0.4);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: background 0.2s ease;
}

.tsmhbs-gallery .swiper-button-prev:hover,
.tsmhbs-gallery .swiper-button-next:hover {
    background: rgba(0, 0, 0, 0.65);
}

.tsmhbs-gallery .swiper-button-prev::after,
.tsmhbs-gallery .swiper-button-next::after {
    font-size: 16px;
    font-weight: 700;
}

/* --- Thumbnail --- */
.tsmhbs-gallery .tsmhbs-gallery-thumbs .swiper-slide {
    aspect-ratio: 4 / 3;
    opacity: 0.75;
    cursor: pointer;
    overflow: hidden;
    transition: opacity 0.2s ease;
}

.tsmhbs-gallery .tsmhbs-gallery-thumbs .swiper-slide-thumb-active {
    opacity: 1;
}

.tsmhbs-gallery .tsmhbs-thumb-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* --- Messaggio in editor quando non ci sono immagini --- */
.tsmhbs-gallery-empty {
    padding: 1.5em;
    text-align: center;
    color: #666;
    background: #f7f7f7;
}
