/* Galeria para Woocommerce — gallery.css */

.gwc-wrap {
    display: flex;
    flex-direction: row;
    gap: 10px;
    width: 100%;
}

/* ── Miniaturas (izquierda) ── */
.gwc-thumbs {
    flex: 0 0 76px;
    width: 76px;
}

.gwc-swiper-thumbs {
    height: 100%;
}

.gwc-swiper-thumbs .swiper-wrapper {
    flex-direction: column;
}

.gwc-swiper-thumbs .swiper-slide {
    width: 76px !important;
    height: 76px !important;
}

.gwc-thumb {
    width: 100%;
    height: 100%;
    border-radius: 4px;
    overflow: hidden;
    border: 2px solid transparent;
    cursor: pointer;
    transition: border-color .2s;
    background: #f5f5f5;
}

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

.gwc-swiper-thumbs .swiper-slide-thumb-active .gwc-thumb {
    border-color: #111;
}

.gwc-swiper-thumbs .swiper-slide:not(.swiper-slide-thumb-active) .gwc-thumb {
    opacity: 0.6;
}

/* ── Imagen principal ── */
.gwc-main {
    flex: 1 1 auto;
    min-width: 0;
    position: relative;
}

.gwc-swiper-main {
    border-radius: 6px;
    overflow: hidden;
    background: #f5f5f5;
}

.gwc-img-wrap {
    aspect-ratio: 1 / 1;
    cursor: zoom-in;
    overflow: hidden;
}

.gwc-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform .3s ease;
}

.gwc-img-wrap:hover img {
    transform: scale(1.04);
}

/* ── Botones navegación ── */
.gwc-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255,255,255,.92);
    border: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #111;
    box-shadow: 0 2px 6px rgba(0,0,0,.1);
    transition: box-shadow .2s;
}

.gwc-btn:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,.16);
}

.gwc-btn svg {
    width: 18px;
    height: 18px;
    display: block;
    pointer-events: none;
}

.gwc-prev { left: 10px; }
.gwc-next { right: 10px; }

.gwc-btn.swiper-button-disabled {
    opacity: 0.3;
    pointer-events: none;
}

/* ── Lightbox ── */
.gwc-lightbox {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease;
}

.gwc-lightbox.open {
    opacity: 1;
    pointer-events: all;
}

.gwc-lb-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.85);
    cursor: pointer;
}

.gwc-lb-inner {
    position: relative;
    z-index: 2;
    width: min(92vw, 960px);
    max-height: 90vh;
}

.gwc-lb-close {
    position: absolute;
    top: -42px;
    right: 0;
    z-index: 10;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,.15);
    border: 1px solid rgba(255,255,255,.3);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .2s;
    padding: 0;
}

.gwc-lb-close:hover {
    background: rgba(255,255,255,.25);
}

.gwc-lb-close svg {
    width: 20px;
    height: 20px;
    pointer-events: none;
}

.gwc-swiper-lb .swiper-slide {
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    max-height: 88vh;
}

.gwc-swiper-lb img {
    max-width: 100%;
    max-height: 88vh;
    object-fit: contain;
    display: block;
}

.gwc-lb-prev { left: 10px; }
.gwc-lb-next { right: 10px; }

.gwc-lb-prev,
.gwc-lb-next {
    background: rgba(255,255,255,.15);
    border-color: rgba(255,255,255,.3);
    color: #fff;
}

.gwc-lb-prev:hover,
.gwc-lb-next:hover {
    background: rgba(255,255,255,.25);
}

/* ── Mobile: miniaturas abajo ── */
@media (max-width: 580px) {
    .gwc-wrap {
        flex-direction: column;
    }

    .gwc-thumbs {
        flex: none;
        width: 100%;
        order: 2;
    }

    .gwc-swiper-thumbs .swiper-wrapper {
        flex-direction: row;
    }

    .gwc-swiper-thumbs .swiper-slide {
        width: 60px !important;
        height: 60px !important;
    }
}
