/* =============================================
   LIGHTBOX — Feel No Paint Studio
   Activa en cualquier img[data-full] dentro de .gallery-grid
   ============================================= */

#fnp-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.95);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

#fnp-lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

/* Imagen principal */
#fnp-lightbox-img {
  display: block;
  max-width: min(92vw, 1600px);
  max-height: 90vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border: 1px solid rgba(200, 169, 110, 0.2);
  opacity: 0;
  transform: scale(0.97);
  transition: opacity 0.22s ease, transform 0.22s ease;
  user-select: none;
  -webkit-user-drag: none;
}

#fnp-lightbox.is-loaded #fnp-lightbox-img {
  opacity: 1;
  transform: scale(1);
}

/* Spinner mientras carga */
#fnp-lightbox-spinner {
  position: absolute;
  width: 40px;
  height: 40px;
  border: 2px solid rgba(200, 169, 110, 0.2);
  border-top-color: #c8a96e;
  border-radius: 50%;
  animation: fnp-spin 0.7s linear infinite;
  display: none;
}

#fnp-lightbox.is-open:not(.is-loaded) #fnp-lightbox-spinner {
  display: block;
}

@keyframes fnp-spin {
  to { transform: rotate(360deg); }
}

/* Botón cerrar */
#fnp-lightbox-close {
  position: fixed;
  top: 1.1rem;
  right: 1.25rem;
  width: 40px;
  height: 40px;
  background: none;
  border: 1px solid rgba(200, 169, 110, 0.4);
  border-radius: 2px;
  color: #c8a96e;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, border-color 0.15s;
  z-index: 9010;
}

#fnp-lightbox-close:hover,
#fnp-lightbox-close:focus-visible {
  background: rgba(200, 169, 110, 0.15);
  border-color: #c8a96e;
  outline: none;
}

/* Flechas de navegación */
.fnp-lightbox-arrow {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 64px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(200, 169, 110, 0.3);
  border-radius: 2px;
  color: #c8a96e;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, border-color 0.15s, opacity 0.15s;
  z-index: 9010;
  user-select: none;
}

.fnp-lightbox-arrow:hover,
.fnp-lightbox-arrow:focus-visible {
  background: rgba(200, 169, 110, 0.15);
  border-color: #c8a96e;
  outline: none;
}

.fnp-lightbox-arrow:disabled {
  opacity: 0.2;
  cursor: default;
  pointer-events: none;
}

#fnp-lightbox-prev { left: 0.75rem; }
#fnp-lightbox-next { right: 0.75rem; }

/* Indicador de posición */
#fnp-lightbox-counter {
  position: fixed;
  top: 1.25rem;
  left: 1.25rem;
  font-family: 'Cinzel', serif;
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  color: rgba(200, 169, 110, 0.7);
  z-index: 9010;
  pointer-events: none;
}

/* ---- Responsive móvil ---- */
@media (max-width: 600px) {
  .fnp-lightbox-arrow {
    width: 36px;
    height: 48px;
    font-size: 1.1rem;
  }

  #fnp-lightbox-prev { left: 0.25rem; }
  #fnp-lightbox-next { right: 0.25rem; }

  #fnp-lightbox-img {
    max-width: 96vw;
    max-height: 85vh;
  }
}
