/* =====================================================
   GALERÍA TIPO KIDZAPP
===================================================== */

.gallery-kidzapp {
    width: 100%;
}


/* =====================================================
   CONTENEDOR FOTO PRINCIPAL
===================================================== */

.gallery-kidzapp .gallery__stage {
    position: relative;

    width: 100%;

    aspect-ratio: 16 / 9;

    overflow: hidden;

    border-radius: 20px;

    background: #f3f4f6;
}


/* =====================================================
   IMAGEN PRINCIPAL
===================================================== */

.gallery-kidzapp .gallery-main-image {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: cover;

    object-position: center;

    transition:
        opacity .18s ease,
        transform .25s ease;
}


.gallery-kidzapp
.gallery-main-image.is-changing {
    opacity: .35;

    transform:
        scale(1.01);
}


/* =====================================================
   FLECHAS
===================================================== */

.gallery-nav {
    position: absolute;

    top: 50%;

    z-index: 15;

    width: 46px;
    height: 46px;

    padding: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    transform:
        translateY(-50%);

    border: 0;

    border-radius: 50%;

    background:
        rgba(255, 255, 255, .94);

    color: #0f172a;

    font-size: 18px;

    cursor: pointer;

    box-shadow:
        0 4px 18px
        rgba(0, 0, 0, .16);

    transition:
        transform .2s ease,
        background .2s ease,
        box-shadow .2s ease;
}


.gallery-nav:hover {
    background:
        #ffffff;

    transform:
        translateY(-50%)
        scale(1.08);

    box-shadow:
        0 7px 22px
        rgba(0, 0, 0, .20);
}


.gallery-nav-prev {
    left: 18px;
}


.gallery-nav-next {
    right: 18px;
}


/* =====================================================
   FAVORITO + COMPARTIR
===================================================== */

.gallery-kidzapp
.gallery-actions {
    position: absolute;

    top: 18px;
    right: 18px;

    z-index: 25;

    display: flex;
    align-items: center;

    gap: 10px;
}


.gallery-kidzapp
.gallery-favorite-form {
    margin: 0;

    display: inline-flex;
}


.gallery-kidzapp
.gallery-action-btn {
    width: 46px;
    height: 46px;

    flex: 0 0 46px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0;

    border: 0;

    border-radius: 50%;

    background:
        rgba(255, 255, 255, .96);

    color: #111827;

    font-size: 20px;

    text-decoration: none;

    cursor: pointer;

    box-shadow:
        0 4px 16px
        rgba(0, 0, 0, .16);

    transition:
        transform .2s ease,
        box-shadow .2s ease,
        color .2s ease;
}


.gallery-kidzapp
.gallery-action-btn:hover {
    transform:
        scale(1.07);

    box-shadow:
        0 6px 20px
        rgba(0, 0, 0, .20);
}


.gallery-kidzapp
.gallery-favorite-btn.is-favorite {
    color: #ef4444;
}


/* =====================================================
   CONTADOR
===================================================== */

.gallery-counter {
    position: absolute;

    right: 18px;
    bottom: 16px;

    z-index: 15;

    padding:
        6px 11px;

    border-radius: 20px;

    /* background: rgba(15, 23, 42, .72); */

    color: #ffffff;

    font-size: 10px;

    font-weight: 700;

    backdrop-filter:
        blur(5px);
}


/* =====================================================
   MINIATURAS
===================================================== */

.gallery-thumbnails {
    display: flex;

    align-items: center;

    gap: 10px;

    margin-top: 14px;

    padding:
        2px 2px 7px;

    overflow-x: auto;

    overflow-y: hidden;

    scroll-behavior: smooth;

    scrollbar-width: thin;

    -webkit-overflow-scrolling:
        touch;
}


/* MINIATURA */

.gallery-thumbnail {
    width: 130px;
    height: 82px;

    flex: 0 0 130px;

    padding: 3px;

    overflow: hidden;

    border:
        2px solid transparent;

    border-radius: 13px;

    background:
        #ffffff;

    cursor: pointer;

    transition:
        border-color .2s ease,
        transform .2s ease,
        box-shadow .2s ease;
}


.gallery-thumbnail img {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: cover;

    border-radius: 9px;
}


/* ACTIVA */

.gallery-thumbnail.is-active {
    border-color:
        #ff7a45;

    box-shadow:
        0 3px 12px
        rgba(255, 122, 69, .25);
}


.gallery-thumbnail:hover {
    transform:
        translateY(-2px);
}


/* =====================================================
   SIN IMAGEN
===================================================== */

.gallery-no-image {
    width: 100%;
    height: 100%;

    display: flex;
    flex-direction: column;

    align-items: center;
    justify-content: center;

    gap: 8px;

    color: #94a3b8;

    font-size: 14px;
}


.gallery-no-image i {
    font-size: 42px;
}


/* =====================================================
   TABLET
===================================================== */

@media (
    min-width: 577px
)
and (
    max-width: 991px
) {

    .gallery-kidzapp
    .gallery__stage {
        border-radius: 16px;
    }


    .gallery-nav {
        width: 42px;
        height: 42px;

        font-size: 16px;
    }


    .gallery-nav-prev {
        left: 12px;
    }


    .gallery-nav-next {
        right: 12px;
    }


    .gallery-kidzapp
    .gallery-actions {
        top: 13px;
        right: 13px;

        gap: 8px;
    }


    .gallery-kidzapp
    .gallery-action-btn {
        width: 42px;
        height: 42px;

        flex-basis: 42px;

        font-size: 18px;
    }


    .gallery-thumbnail {
        width: 110px;
        height: 72px;

        flex-basis: 110px;
    }

}


/* =====================================================
   CELULAR
===================================================== */

@media (
    max-width: 576px
) {

    .gallery-kidzapp {
        width: 100%;
    }


    .gallery-kidzapp
    .gallery__stage {
        width: 100%;

        aspect-ratio: 4 / 3;

        border-radius: 14px;
    }


    .gallery-kidzapp
    .gallery-main-image {
        object-fit: cover;
    }


    /*
    FLECHAS
    */

    .gallery-nav {
        width: 36px;
        height: 36px;

        font-size: 14px;

        background:
            rgba(255, 255, 255, .92);
    }


    .gallery-nav-prev {
        left: 8px;
    }


    .gallery-nav-next {
        right: 8px;
    }


    /*
    ACCIONES
    */

    .gallery-kidzapp
    .gallery-actions {
        top: 10px;
        right: 10px;

        gap: 7px;
    }


    .gallery-kidzapp
    .gallery-action-btn {
        width: 38px;
        height: 38px;

        flex-basis: 38px;

        font-size: 17px;
    }


    /*
    CONTADOR
    */

    .gallery-counter {
        right: 10px;
        bottom: 10px;

        padding:
            4px 8px;

        font-size: 11px;
    }


    /*
    MINIATURAS
    */

    .gallery-thumbnails {
        gap: 7px;

        margin-top: 10px;

        padding-bottom: 5px;
    }


    .gallery-thumbnail {
        width: 82px;
        height: 58px;

        flex-basis: 82px;

        padding: 2px;

        border-radius: 10px;
    }


    .gallery-thumbnail img {
        border-radius: 7px;
    }

}