/* Lightbox: ampliar fotos de catálogo y galería al hacer clic */

#image-lightbox-root {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  box-sizing: border-box;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

#image-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.92);
  cursor: zoom-out;
}

#image-lightbox-figure {
  position: relative;
  z-index: 1;
  max-width: min(96vw, 1200px);
  max-height: 92vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

#image-lightbox-img {
  display: block;
  max-width: 100%;
  max-height: calc(92vh - 3rem);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 0.375rem;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.55);
}

#image-lightbox-caption {
  font-size: 0.8125rem;
  font-weight: 400;
  color: rgba(226, 232, 240, 0.92);
  text-align: center;
  max-width: 42rem;
  line-height: 1.45;
}

#image-lightbox-caption:empty {
  display: none;
}

#image-lightbox-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 2;
  width: 2.75rem;
  height: 2.75rem;
  border: none;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.12);
  color: #f8fafc;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, transform 0.15s ease;
}

#image-lightbox-close:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: scale(1.06);
}

@media (min-width: 640px) {
  #image-lightbox-close {
    top: 1rem;
    right: 1rem;
  }
}

/* Clic en imagen = ampliar */
#contenido-catalogo img.product-img,
#contenido-catalogo .catalog-category-card img,
#galeria .gallery-item img {
  cursor: zoom-in;
}
