.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.88);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.lightbox__inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: calc(100vw - 80px);
  max-height: calc(100vh - 80px);
}

.lightbox__img {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 80px);
  object-fit: contain;
  border-radius: 4px;
  transform: scale(0.92);
  transition: transform 0.25s ease;
  user-select: none;
}

.lightbox.is-open .lightbox__img {
  transform: scale(1);
}

.lightbox__caption {
  position: absolute;
  bottom: -36px;
  left: 0;
  right: 0;
  text-align: center;
  color: rgba(255, 255, 255, 0.65);
  font-family: var(--font-body, 'PT Sans Caption', sans-serif);
  font-size: 13px;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lightbox__btn {
  position: fixed;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.12);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  color: #fff;
  transition: background 0.18s ease;
  -webkit-tap-highlight-color: transparent;
}

.lightbox__btn:hover {
  background: rgba(255, 255, 255, 0.24);
}

.lightbox__btn--close {
  top: 20px;
  right: 20px;
}

.lightbox__btn--prev {
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox__btn--next {
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox__btn--hidden {
  opacity: 0;
  pointer-events: none;
}

.lightbox__btn svg {
  display: block;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Курсор zoom на тригерных изображениях */
.lightbox-trigger {
  cursor: zoom-in;
}

@media (max-width: 767px) {
  .lightbox__inner {
    max-width: calc(100vw - 24px);
  }

  .lightbox__btn--prev {
    left: 6px;
  }

  .lightbox__btn--next {
    right: 6px;
  }
}
