/* Image zoom / lightbox (no distortion) */

.image-zoom-modal {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: none;
}

.image-zoom-modal.open {
  display: block;
}

.image-zoom-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.8);
}

.image-zoom-dialog {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
}

.image-zoom-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.25);
  background: rgba(0,0,0,0.55);
  color: #fff;
  cursor: pointer;
  z-index: 2;
}

.image-zoom-close:hover {
  background: rgba(0,0,0,0.75);
}

.image-zoom-img {
  max-width: min(96vw, 1200px);
  max-height: 90vh;
  width: auto;
  height: auto;
  display: block;

  object-fit: contain; /* avoid any distortion */
  transform: translateZ(0);

  border-radius: 12px;
  box-shadow: 0 24px 70px rgba(0,0,0,0.6);

  /* small appearance animation */
  opacity: 0;
  transform: scale(0.98);
  transition: opacity 160ms ease, transform 160ms ease;
}

.image-zoom-modal.open .image-zoom-img {
  opacity: 1;
  transform: scale(1);
}

/* Ensure zoom button doesn't break layout */
.image-zoom-btn {
  border: 0;
  padding: 0;
  margin: 0;
  background: transparent;
  cursor: zoom-in;
  display: block;
  width: 100%;
  height: 100%;
}

/* Make touch devices feel responsive */
@media (hover: none) {
  .image-zoom-btn {
    cursor: zoom-in;
  }
}


