/* ===== GALERÍA PRINCIPAL ===== */
.galeriaP {
    padding: 10px 0;
        background: linear-gradient(135deg, #6a11cb, #2575fc);
    animation: gradientBG 8s ease infinite;
}

.contenedorP {
    max-width: 1200px;
    margin: auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.Producto {
    background: #fff;
    padding: 15px;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: .3s;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.Producto:hover {
    transform: translateY(-5px);
}

.Producto img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    border-radius: 8px;
}

.Producto h3 {
    margin-top: 12px;
    font-size: 20px;
    color: #222;
}

.Producto p {
    font-size: 14px;
    color: #555;
}


/* ===== MODAL ===== */
.modalP {
    display: none;
    position: fixed;
    z-index: 99999;
    padding: 20px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: rgba(0,0,0,0.92);
    backdrop-filter: blur(4px);
}

/* Cerrar */
.cerrarP {
    position: absolute;
    top: 15px;
    right: 25px;
    font-size: 40px;
    font-weight: bold;
    color: #fff;
    cursor: pointer;
    z-index: 1001;
    transition: .3s;
}

.cerrarP:hover {
    color: #ff3b3b;
}

/* Slider principal */
.modal-sliderP {
    position: relative;
    max-width: 80%;
    height: 70vh;
    margin: 60px auto 20px auto;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-sliderP img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    opacity: 0;
    position: absolute;
    transition: opacity .3s ease-in-out;
}

.modal-sliderP img.active {
    opacity: 1;
    position: relative;
}

/* Botones navegación */
.prevP, .nextP {
    cursor: pointer;
    position: absolute;
    top: 50%;
    padding: 14px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    transition: .3s;
    user-select: none;
    border: none;
    background: rgba(0,0,0,0.4);
    border-radius: 50%;
    transform: translateY(-50%);
}

.prevP:hover, .nextP:hover {
    background: rgba(255,255,255,0.3);
}

.prevP {
    left: 50px;
}

.nextP {
    right: 50px;
}


/* ===== MINIATURAS ===== */
.miniaturasP {
    height: 120px;
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 20px;
    justify-content: center;
}

.miniaturasP::-webkit-scrollbar {
    height: 8px;
}

.miniaturasP::-webkit-scrollbar-thumb {
    background: #777;
    border-radius: 5px;
}

.miniaturasP img {
    height: 100px;
    width: 150px;
    object-fit: cover;
    border-radius: 6px;
    opacity: .5;
    transition: .3s;
    cursor: pointer;
}

.miniaturasP img:hover {
    opacity: .8;
}

.miniaturasP img.active {
    opacity: 1;
    border: 2px solid #fff;
}


/* ===== RESPONSIVE ===== */

@media (max-width: 768px) {
    .modal-sliderP {
        max-width: 95%;
        height: 60vh;
    }

    .prevP, .nextP {
        font-size: 30px;
        padding: 10px;
        left: 20px;
        right: 20px;
    }

    .miniaturasP img {
        height: 70px;
        width: 100px;
    }
}

@media (max-width: 480px) {
    .cerrarP {
        font-size: 30px;
    }

    .modal-sliderP {
        height: 50vh;
    }

    .miniaturasP img {
        height: 60px;
        width: 90px;
    }
}
