/* Lightbox overlay for full-size image viewing */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  touch-action: none;
}

.lightbox.open {
  display: flex;
}

.lightbox-image {
  max-width: 95vw;
  max-height: 95vh;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}

.lightbox-close,
.lightbox-arrow {
  position: absolute;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  cursor: pointer;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.lightbox-close:hover,
.lightbox-arrow:hover {
  background: rgba(255, 255, 255, 0.2);
}

.lightbox-close {
  top: 1rem;
  right: 1rem;
  width: 44px;
  height: 44px;
}

.lightbox-arrow {
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
}

.lightbox-arrow-left {
  left: 1rem;
}

.lightbox-arrow-right {
  right: 1rem;
}

.lightbox-counter {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-size: 0.875rem;
  background: rgba(0, 0, 0, 0.5);
  padding: 0.375rem 0.875rem;
  border-radius: 9999px;
  font-variant-numeric: tabular-nums;
}

#mainImage {
  cursor: zoom-in;
}

@media (max-width: 640px) {
  .lightbox-arrow {
    width: 44px;
    height: 44px;
  }
  .lightbox-arrow-left {
    left: 0.5rem;
  }
  .lightbox-arrow-right {
    right: 0.5rem;
  }
  .lightbox-close {
    top: 0.5rem;
    right: 0.5rem;
  }
}
