/* Bella V2 — Lightbox de fotos. */

body.lightbox-open {
  overflow: hidden !important;
  touch-action: none;
}

.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 12, 9, 0.96);
  display: flex;
  flex-direction: column;
  z-index: 10000;
  opacity: 0;
  transition: opacity 0.2s ease;
  padding: calc(var(--safe-top) + 16px) 16px calc(var(--safe-bottom) + 16px);
}
.lightbox-overlay.lightbox-in { opacity: 1; }
.lightbox-overlay.lightbox-closing { opacity: 0; }

.lightbox-close {
  position: absolute;
  top: calc(var(--safe-top) + 12px);
  right: 12px;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(248,241,229,0.18);
  color: var(--cream);
  border: none;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}

.lightbox-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  min-height: 0;
  gap: 8px;
}

.lightbox-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 16px 60px rgba(0,0,0,0.6);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(248,241,229,0.16);
  color: var(--cream);
  border: none;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  z-index: 1;
}
.lightbox-nav:disabled { opacity: 0.3; cursor: default; }
.lightbox-prev { left: 4px; }
.lightbox-next { right: 4px; }

.lightbox-footer {
  text-align: center;
  margin-top: 12px;
  color: var(--cream);
}
.lightbox-label {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 500;
}
.lightbox-counter {
  font-size: 11px;
  font-family: ui-monospace, monospace;
  color: rgba(248,241,229,0.55);
  margin-top: 2px;
  letter-spacing: 0.5px;
}

/* ─── Modo comparar (1ª foto × atual, slider de opacidade) ────────────────── */
.lightbox-img-base {
  /* Mesmas dimensões da .lightbox-img, centralizada por baixo dela — fotos do
     mesmo pipeline (resize 2400px) têm proporção parecida e se alinham. */
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
}
.lightbox-btn-compare {
  margin-top: 8px;
  padding: 8px 16px;
  border-radius: 99px;
  border: 1px solid rgba(248,241,229,0.35);
  background: rgba(248,241,229,0.12);
  color: var(--cream);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.lightbox-btn-compare-on {
  background: rgba(248,241,229,0.9);
  color: #2A1A0E;
}
.lightbox-compare-bar { padding: 4px 8px 0; }
.lightbox-compare-range {
  width: 100%;
  accent-color: var(--cream);
}
.lightbox-compare-legenda {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: rgba(248,241,229,0.7);
  margin-top: 2px;
}
