.gallery-lightbox-thumb {
  display: block;
  width: 100%;
  padding: 0;
  margin: 0;
  cursor: zoom-in;
  background: none;
  border: none;
  border-radius: inherit;
  text-align: inherit;
}

.gallery-lightbox-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  transition: opacity 0.15s ease;
}

.gallery-lightbox-thumb:hover img {
  opacity: 0.92;
}

.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 3.5rem;
  background: rgba(0, 0, 0, 0.88);
}

.gallery-lightbox[hidden] {
  display: none !important;
}

.gallery-lightbox__figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: min(92vw, 960px);
  max-height: 90vh;
  margin: 0;
}

.gallery-lightbox__img {
  max-width: min(92vw, 960px);
  max-height: calc(90vh - 2.5rem);
  object-fit: contain;
  border-radius: 0.375rem;
  box-shadow: 0 8px 32px rgb(0 0 0 / 0.35);
}

.gallery-lightbox__caption {
  margin: 0.75rem 0 0;
  max-width: 36rem;
  font-size: 0.875rem;
  line-height: 1.45;
  color: #f3f4f6;
  text-align: center;
}

.gallery-lightbox__caption:empty {
  display: none;
}

.gallery-lightbox__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  font-size: 1.5rem;
  line-height: 1;
  color: #fff;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.12);
  border: none;
  border-radius: 50%;
  transition: background 0.15s ease;
}

.gallery-lightbox__close:hover {
  background: rgba(255, 255, 255, 0.22);
}

.gallery-lightbox__nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  color: #fff;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.12);
  border: none;
  border-radius: 50%;
  transform: translateY(-50%);
  transition: background 0.15s ease;
}

.gallery-lightbox__nav:hover {
  background: rgba(255, 255, 255, 0.22);
}

.gallery-lightbox__nav--prev {
  left: 1rem;
}

.gallery-lightbox__nav--next {
  right: 1rem;
}

.gallery-lightbox__nav[hidden] {
  display: none !important;
}

.gallery-lightbox__counter {
  position: absolute;
  top: 1.125rem;
  left: 50%;
  z-index: 2;
  padding: 0.25rem 0.625rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #fff;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 9999px;
  transform: translateX(-50%);
}
