/* ===================================
   GALERÍAS POR CATEGORÍA
=================================== */

.gallery-wrapper {
    width: 100%;
    max-width: 1300px;
    margin: 0 auto;
    padding: 40px 20px;
}

.gallery-category {
    margin-bottom: 60px;
}

.gallery-category h2 {
    font-size: 28px;
    margin-bottom: 16px;
    font-weight: 700;
    color: #222;
}

/* Imagen principal */
.gallery-main {
    width: 100%;
    height: 450px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.15);
    margin-bottom: 15px;
}

.gallery-main img {
    width: 100%;
    height: 450px;
    display: block;
    transition: opacity 0.3s ease;
}

/* Miniaturas */
/* CONTENEDOR DE LAS MINIATURAS + FLECHAS */
.gallery-thumbs-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 15px;
}

/* FLECHAS LATERALES */
.thumb-nav {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid #ccc;
    width: 32px;
    height: 80px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 28px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.25s ease;
    z-index: 10;
}

.thumb-nav:hover {
    background: white;
}

.thumb-nav.left {
    margin-right: 8px;
}

.thumb-nav.right {
    margin-left: 8px;
}

/* MINIATURAS EN UNA SOLA FILA DESPLAZABLE */
.gallery-thumbs {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding-bottom: 10px;
}

/* Ocultar scrollbar en Chrome/Safari */


.gallery-thumbs img {
    flex: 0 0 auto;
    width: 120px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    opacity: 0.7;
    transition: 0.25s ease;
    border: 2px solid transparent;
}

.gallery-thumbs img:hover {
    opacity: 1;
    transform: scale(1.1);
}

.gallery-thumbs img.active {
    border-color: #0d6efd;
    opacity: 1;
}


/* RESPONSIVE */
@media (max-width: 768px) {
    .gallery-main img {
        height: 280px;
    }

    .gallery-thumbs {
        grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    }

    .gallery-thumbs img {
        width: 95px;
        height: 65px;
    }

    .thumb-nav {
        height: 65px;
        width: 28px;
        font-size: 22px;
    }
}
/* Flechas del carrusel principal */
.main-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,.8);
    border: 1px solid #ccc;
    width: 40px;
    height: 70px;
    border-radius: 10px;
    font-size: 32px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: .25s;
    z-index: 20;
}

.main-nav:hover {
    background: white;
}

.main-nav.left {
    left: 10px;
}

.main-nav.right {
    right: 10px;
}

/* Asegura que el contenedor permita elementos encima */
.gallery-main {
    position: relative;
}
