/* WooCommerce Product Gallery CSS */

.woo-gallery-container {
    max-width: 600px;
    margin: 0 auto;
}

/* Nagy kép container */
.woo-main-image {
    margin-bottom: 20px;
    position: relative;
}

.main-swiper {
    width: 100%;
    height: 500px;
}

/* Zoom container */
.zoom-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #f8f8f8;
}

/* Fix #9: cursor: grab csak valódi asztali egéren jelenik meg, mobilon nem */
@media (hover: hover) and (pointer: fine) {
    .zoom-container {
        cursor: grab;
    }
    .zoom-container:active {
        cursor: grabbing;
    }
}

.zoom-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transform: scale(1);
    transform-origin: center center;
    transition: transform 0.3s ease;
    /* Fix #8: will-change NINCS itt – csak zoom közben aktív (lásd .zoomed img lentebb) */
}

/* JS adja hozzá mouseenter-kor asztali egéren */
.zoom-container.zoomed img {
    transform: scale(2.5);
    cursor: move;
    will-change: transform; /* Fix #8: GPU réteg csak aktív zoom esetén nyílik */
}

/* Panelés/mozgatás közben transition kikapcsolva, hogy ne lagoljon */
.zoom-container.panning img {
    transition: none;
}

/* Sima kép (nincs galéria) */
.single-image {
    height: 500px;
}

/* Fix #4: Slider navigációs gombok CSAK a galéria containeren belül – nem szennyez más Swiper instance-t */
.woo-gallery-container .swiper-button-next,
.woo-gallery-container .swiper-button-prev {
    color: #007cba;
    background: rgba(255, 255, 255, 0.9);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
    margin-top: -22px;
}

.woo-gallery-container .swiper-button-next:after,
.woo-gallery-container .swiper-button-prev:after {
    font-size: 18px;
    font-weight: bold;
}

/* Thumbnails */
.woo-thumbnails {
    margin-top: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.thumbnail {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border: 2px solid transparent;
    cursor: pointer;
    transition: border-color 0.2s ease;
    border-radius: 4px;
    flex-shrink: 0;
}

.thumbnail:hover {
    border-color: #666;
}

.thumbnail.active {
    border-color: #007cba;
}

/* Fix #7: .thumbnail-swiper és .thumbnail-swiper .swiper-slide osztályok eltávolítva
   (halott CSS volt – a PHP nem renderel thumbnail Swipet, csak sima img tageket) */

/* Mobile stílusok */
@media (max-width: 768px) {
    .woo-gallery-container {
        max-width: 100%;
        padding: 0 15px;
    }

    .main-swiper {
        height: 300px;
    }

    .single-image {
        height: 300px;
    }

    .thumbnail {
        width: 60px;
        height: 60px;
    }

    /* Fix #4: mobilon is csak a saját containeren belüli gombokra hat */
    .woo-gallery-container .swiper-button-next,
    .woo-gallery-container .swiper-button-prev {
        width: 35px;
        height: 35px;
        margin-top: -17px;
    }

    .woo-gallery-container .swiper-button-next:after,
    .woo-gallery-container .swiper-button-prev:after {
        font-size: 14px;
    }
}
