/* ===== Lightbox em tela cheia ===== */

/* Cursor de zoom nas fotos de produto (ícones ficam de fora via JS) */
.card img,
.produto img {
    cursor: zoom-in;
}

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    background: rgba(0, 0, 0, 0.92);
    align-items: center;
    justify-content: center;
}

.lightbox.aberto {
    display: flex;
}

.lightbox-stage {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    touch-action: pan-y; /* permite o arrastar horizontal sem rolar a página */
}

.lightbox-img {
    max-width: 92vw;
    max-height: 82vh;
    object-fit: contain;
    user-select: none;
    -webkit-user-drag: none;
    transition: transform 0.80s ease;
}

/* Enquanto arrasta, sem transição — segue o dedo/mouse */
.lightbox-img.arrastando {
    transition: none;
    cursor: grabbing;
}

/* Animação de slide ao trocar de imagem */
@keyframes lightboxSlideEsq {
    from { transform: translateX(40px); opacity: 0.4; }
    to   { transform: translateX(0);    opacity: 1; }
}

@keyframes lightboxSlideDir {
    from { transform: translateX(-40px); opacity: 0.4; }
    to   { transform: translateX(0);     opacity: 1; }
}

.lightbox-img.slide-esq { animation: lightboxSlideEsq 0.95s ease; }
.lightbox-img.slide-dir { animation: lightboxSlideDir 0.95s ease; }

.lightbox-legenda {
    color: #fff;
    margin-top: 12px;
    font-size: 0.95rem;
    text-align: center;
    max-width: 90vw;
}

.lightbox-contador {
    position: absolute;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.85rem;
    background: rgba(0, 0, 0, 0.45);
    padding: 4px 12px;
    border-radius: 999px;
}

.lightbox-fechar {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    color: #fff;
    font-size: 2.4rem;
    line-height: 1;
    cursor: pointer;
    padding: 6px 10px;
    z-index: 2;
}

.lightbox-seta {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: #fff;
    font-size: 2rem;
    line-height: 1;
    padding: 14px 12px;
    cursor: pointer;
    border-radius: 8px;
    z-index: 2;
    transition: background 0.2s ease;
}

.lightbox-seta:hover {
    background: rgba(0, 0, 0, 0.8);
}

.lightbox-anterior { left: 10px; }
.lightbox-proxima { right: 10px; }

.lightbox-seta.oculta {
    opacity: 0;
    pointer-events: none;
}

@media (max-width: 600px) {
    .lightbox-img {
        max-width: 100vw;
        max-height: 75vh;
    }

    .lightbox-seta {
        padding: 10px 8px;
        font-size: 1.5rem;
    }
}