.cea-gallery{
    max-height: 90vh;
}

.cea-gallery .swiper,
.cea-gallery .swiper-container {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.cea-gallery .swiper-wrapper {
    display: flex;
    transition-property: transform;
    box-sizing: content-box;
}

.cea-gallery .swiper-slide {
    flex-shrink: 0;
    position: relative;
    transition-property: transform;
}

/* Solo main-swiper: slides ocupan todo el ancho/alto */
.cea-gallery .main-swiper .swiper-slide {
    width: 100%;
    height: 100%;
}

/* Thumbs: dejar que Swiper calcule el tamaño automáticamente */
.cea-gallery .thumbs-swiper .swiper-slide {
    width: auto;
    height: auto;
}
.cea-gallery {
    width: 100%;
    box-sizing: border-box;
    min-height: 220px;
}

.cea-gallery .main-swiper {
    width: 100%;
    min-height: 200px;
    height: 70vh;
    max-height: 80vh;
    box-sizing: border-box;
    position: relative;
}

.cea-gallery .main-swiper .swiper-slide {
    display: flex;
    justify-content: center;
    align-items: center;
    height: -webkit-fill-available;
    min-width: 0;
    min-height: 0;
    border-radius: 20px;
    overflow: hidden;
}

.cea-gallery .main-swiper img {
    width: 100%;
    height: 100% !important;
    object-fit: cover;
    object-position: center;
    height: auto;
    display: block;
}

.cea-gallery .thumbs-swiper {
    margin-top: 10px;
    height: auto;
    min-height: 50px;
    aspect-ratio: 320/80;
    box-sizing: border-box;
    position: relative;
}

.cea-gallery .thumbs-swiper .swiper-slide {    
    border-radius: 12px;
    overflow: hidden;
}

@media (min-width: 1024px) {
    .cea-gallery {
        display: flex;
        gap: 16px;
        align-items: flex-start;
        height: 90vh;
        min-height: 320px;
        max-height: 90vh;
    }

    .cea-gallery.reverse {
        flex-direction: row-reverse;
    }

    .cea-gallery.left .main-swiper,
    .cea-gallery.reverse .main-swiper {
        width: 85%;
        min-height: 320px;
        max-height: 90vh;
        height: 100%;
    }

    .cea-gallery .main-swiper .swiper-slide {
        border-radius: 12px;
    }

    .cea-gallery .thumbs-swiper {
        width: 15%;
        height: 100%;
        aspect-ratio: 80/320;
        min-height: 120px;
        margin-top: 0;
        order: -1;
        gap: 16px;
    }

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

    .cea-gallery .thumbs-swiper .swiper-slide {
        border-radius: 8px;
        height: 25%;
    }

    .cea-gallery .thumbs-swiper img {
        width: 100%;
        height: auto;
    }
}

@media (min-width: 1024px) {
    .cea-gallery.bottom {
        flex-direction: column;
        align-items: stretch;
        gap: 0px;
    }

    .cea-gallery.bottom .main-swiper {
        width: 100%;
        min-height: 320px;
        max-height: 70vh;
        height: 70vh;
    }

    .cea-gallery.bottom .thumbs-swiper {
        width: 100%;
        height: 120px;
        min-height: 80px;
        margin-top: 16px;
        order: 2;
        aspect-ratio: unset;
    }

    .cea-gallery.bottom .thumbs-swiper .swiper-wrapper {
        flex-direction: row;
        gap: 16px;
    }

    .cea-gallery.bottom .thumbs-swiper .swiper-slide {
        height: 100%;
        width: 15%;
    }
}

.cea-gallery .thumbs-swiper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    cursor: pointer;
    opacity: 0.6;
    display: block;
}

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