/* Gallery Swiper - estilos específicos */
.gallery-swiper {
    max-width: 860px;
    margin: 0 auto 20px;
    background: #111;
}

.gallery-swiper .gallery-main {
    aspect-ratio: 16 / 10;
    background: #000;
}

.gallery-swiper .gallery-main .swiper-slide {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
}

.gallery-swiper .gallery-main img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.gallery-swiper .slide-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 10px 15px;
    font-size: 14px;
}

.gallery-swiper .slide-description {
    margin-bottom: 4px;
}

.gallery-swiper .slide-copyright {
    font-size: 11px;
    opacity: 0.7;
}

.gallery-swiper .gallery-thumbs {
    padding: 10px 0;
    background: #111;
}

.gallery-swiper .gallery-thumbs .swiper-slide {
    width: 80px;
    height: 60px;
    opacity: 0.5;
    cursor: pointer;
    transition: opacity 0.2s;
}

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

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

/* Flechas de navegación */
.gallery-swiper .swiper-button-prev,
.gallery-swiper .swiper-button-next {
    color: #fff;
}

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

/* Lightbox fullscreen */
body.gallery-lightbox-open {
    overflow: hidden;
}

.gallery-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-lightbox-swiper {
    width: 100%;
    height: 100%;
}

.gallery-lightbox-swiper .swiper-slide {
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-lightbox-swiper img {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
}

.gallery-lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    font-size: 24px;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    z-index: 10;
}

.gallery-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.gallery-lightbox-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 14px;
    background: rgba(0, 0, 0, 0.5);
    padding: 5px 15px;
    border-radius: 20px;
}

.gallery-lightbox .swiper-button-prev,
.gallery-lightbox .swiper-button-next {
    color: #fff;
}

/* Indicador de ampliar en galería principal */
.gallery-swiper .gallery-main .swiper-slide {
    cursor: zoom-in;
}

/* Hint de zoom en lightbox */
.gallery-lightbox-zoom-hint {
    position: absolute;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 13px;
    background: rgba(0, 0, 0, 0.6);
    padding: 8px 16px;
    border-radius: 20px;
    transition: opacity 0.3s;
    pointer-events: none;
}

.gallery-lightbox-zoom-hint.hidden {
    opacity: 0;
}

/* Zoom activo */
.gallery-lightbox-swiper .swiper-slide {
    cursor: zoom-in;
}

.gallery-lightbox-swiper .swiper-zoom-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-lightbox-swiper .swiper-slide-zoomed {
    cursor: grab;
}

.gallery-lightbox-swiper .swiper-slide-zoomed:active {
    cursor: grabbing;
}

/* Transición suave para cierre con swipe vertical */
.gallery-lightbox-swiper {
    transition: opacity 0.1s;
}

/* Ajustes específicos para galerías de anuncios */
.ad-gallery .gallery-main {
    aspect-ratio: 4 / 3;
    background: #f5f5f5;
}

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

.ad-gallery .gallery-thumbs {
    background: #f5f5f5;
}