.zoom {
    position: relative;
    display: inline-block;
    width: 100%;
    cursor: pointer; /* Mano con dedo levantado */
    transition: transform 0.2s ease; /* Opcional: efecto suave al hacer hover */
}

.zoom-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0,0,0,0.6);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.3s;
}

.zoom:hover .zoom-icon {
        opacity: 1;
    }

/* Lightbox styles */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 1001;
    align-items: center;
    justify-content: center;
    touch-action: none;
}

.lightbox-content {
    position: relative;
    width: 90%;
    height: 90%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.lightbox-img-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
    cursor: grab;
    user-select: none;
    -webkit-user-drag: none;
    cursor: pointer; /* Mismo cursor en el lightbox */
}

.lightbox-img:active {
    cursor: grabbing;
}

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

.lightbox-nav {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    pointer-events: none;
    transition: opacity 0.3s;
}

.lightbox-nav.hidden {
    opacity: 0;
}

.lightbox-prev, .lightbox-next {
    color: white;
    font-size: 40px;
    cursor: pointer;
    padding: 20px;
    pointer-events: auto;
    background: rgba(0,0,0,0.3);
    border-radius: 50%;
    margin: 0 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    transition: opacity 0.3s;
    opacity: 1;
}

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

/* Efecto de swipe */
.swipe-left {
    animation: swipeLeft 0.3s forwards;
}

.swipe-right {
    animation: swipeRight 0.3s forwards;
}

@keyframes swipeLeft {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(-100%); opacity: 0; }
}

@keyframes swipeRight {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}

/* Responsive */
@media (max-width: 768px) {
    .lightbox-prev, .lightbox-next {
        font-size: 30px;
        width: 40px;
        height: 40px;
        opacity: 0.8; /* Mas transparente en movil por defecto */
    }
    
    .lightbox-close {
        font-size: 25px;
        width: 40px;
        height: 40px;
        top: 15px;
        right: 15px;
    }
    
    .zoom-icon {
        opacity: 1;
        width: 25px;
        height: 25px;
        font-size: 12px;
    }
}