.gallery_popup {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  --gallery-thumb-width: 100px;
  --gallery-thumb-height: 100px;
}

.gallery_popup img {
  width: min(var(--gallery-thumb-width, 100px), 90vw);
  height: min(var(--gallery-thumb-height, 100px), 90vw);
  object-fit: contain;
  cursor: pointer;
  border-radius: 4px;
  transition: transform 0.15s ease-out, box-shadow 0.15s ease-out;
  border: 2px solid transparent;
  background: #f5f5f5;
}

.gallery_popup img:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.25);
}

/* Overlay */

.lb-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease-out;
}

.lb-overlay.lb-open {
  opacity: 1;
  pointer-events: auto;
}

.lb-stage {
  position: relative;
  max-width: 90vw;
  max-height: 80vh;
  cursor: grab;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.lb-stage img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform-origin: center center;
  transition: transform 0.08s ease-out;
  will-change: transform;
}

.lb-thumbs {
  display: flex;
  gap: 10px;
  margin-top: 18px;
  max-width: 90vw;
  /*overflow-x: auto;*/
  padding-bottom: 4px;
}

.lb-thumbs img {
  width: 80px;
  height: auto;
  opacity: 0.5;
  cursor: pointer;
  border-radius: 4px;
  transition: opacity 0.15s ease-out, transform 0.15s ease-out, box-shadow 0.15s ease-out;
  flex-shrink: 0;
}

.lb-thumbs img.lb-active {
  opacity: 1;
  box-shadow: 0 0 0 2px #fff;
  transform: translateY(-2px);
}

/* Close / Controls (minimal, kannst du aufbohren) */

.lb-close {
  position: fixed;
  top: 18px;
  right: 24px;
  color: #fff;
  font-size: 26px;
  cursor: pointer;
  z-index: 10000;
  user-select: none;
}

.lb-close:hover {
  opacity: 0.8;
}