.chs-lightbox[hidden] { display: none; }

.chs-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.85);
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 20px;
}

.chs-lightbox__figure { max-width: 1100px; width: 100%; }
.chs-lightbox__img { width: 100%; height: auto; display: block; border-radius: 5px; }
.chs-lightbox__caption { margin-top: 10px; color: #fff; }

.chs-lightbox__close {
  position: fixed;
  top: 14px;
  right: 14px;
  font-size: 32px;
  line-height: 1;
  background: transparent;
  border: 0;
  color: #fff;
  cursor: pointer;
}

/* --- Thumbnails gleich groß --- */
.chs-gallery__thumb{
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;   /* kannst du auch 1/1 oder 16/9 machen */
  overflow: hidden;
  border-radius: 3px;
  background: rgba(0,0,0,.05);
}

.chs-gallery__img{
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

/* optional: leichter Hover */
.chs-gallery__item:hover .chs-gallery__img{
  transform: scale(1.02);
  transition: transform .15s ease;
}

/* Figure zentriert */
.chs-lightbox__figure{
  max-width: 1100px;
  margin: 0 auto;
}

/* Wrapper hat EXAKT Bildgröße */
.chs-lightbox__media{
  position: relative;
  display: inline-block; /* <- DAS ist der Schlüssel */
}

/* Bild */
.chs-lightbox__img{
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
}

/* Navigation DIREKT AM BILD */
.chs-lightbox__nav{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 0;
  background: rgba(0,0,0,.6);
  color: #fff;
  font-size: 28px;
  line-height: 44px;
  cursor: pointer;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chs-lightbox__prev{
  left: 12px;
}

.chs-lightbox__next{
  right: 12px;
}

.chs-lightbox__nav:hover{
  background: rgba(0,0,0,.8);
}




html.chs-lightbox-open, html.chs-lightbox-open body { overflow: hidden; }
