/* ============================================================
   Tek Gallery Slider
   Sử dụng: Swiper.js + GLightbox
   ============================================================ */

.tek-gallery {
    margin: 18px 0;
    position: relative;
    overflow: hidden;
    border-radius: 4px;
    background: #111;
    user-select: none;
}

/* ── Main swiper ─────────────────────────────────────────── */
.tek-gallery .tek-gallery-main {
    width: 100%;
    position: relative;
}

.tek-gallery .tek-gallery-main .swiper-slide {
    overflow: hidden;
    background: #000;
    cursor: zoom-in;
}

.tek-gallery .tek-gallery-main .swiper-slide img {
    width: 100%;
    height: auto;
    max-height: 520px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

/* Caption dưới ảnh chính */
.tek-gallery .tek-gallery-caption {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,.65));
    color: #fff;
    font-size: 13px;
    padding: 24px 14px 10px;
    pointer-events: none;
    z-index: 5;
    min-height: 1px;
}

/* Prev / Next buttons */
.tek-gallery .swiper-button-prev,
.tek-gallery .swiper-button-next {
    color: #fff;
    background: rgba(0,0,0,.38);
    width: 36px; height: 36px;
    border-radius: 50%;
    transition: background .2s;
}
.tek-gallery .swiper-button-prev:hover,
.tek-gallery .swiper-button-next:hover {
    background: rgba(0,0,0,.65);
}
.tek-gallery .swiper-button-prev::after,
.tek-gallery .swiper-button-next::after {
    font-size: 14px;
}

/* Pagination dots */
.tek-gallery .swiper-pagination-bullet { background: #fff; opacity: .6; }
.tek-gallery .swiper-pagination-bullet-active { opacity: 1; }

/* ── Thumbnails strip ────────────────────────────────────── */
.tek-gallery .tek-gallery-thumbs {
    background: #000;
    padding: 4px 0;
}

.tek-gallery .tek-gallery-thumbs .swiper-slide {
    opacity: 0.5;
    cursor: pointer;
    transition: opacity .2s;
    overflow: hidden;
}

.tek-gallery .tek-gallery-thumbs .swiper-slide-thumb-active {
    opacity: 1;
    outline: 2px solid #fff;
}

.tek-gallery .tek-gallery-thumbs .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ── .tek-gallery-items: reset ul/div */
.tek-gallery .tek-gallery-items { list-style: none; margin: 0; padding: 0; }

/* ── Ẩn .tek-caption (chỉ dùng trong editor, frontend dùng .tek-gallery-caption) */
.tek-gallery .tek-caption { display: none; }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 640px) {
    .tek-gallery .tek-gallery-main .swiper-slide img {
        max-height: 260px;
    }
    .tek-gallery .tek-gallery-thumbs {
        display: none;
    }
}
