/* ---------- Просмотрщик изображений ---------- */
body.lb-locked { overflow: hidden; }

.lb-overlay {
  position: fixed;
  inset: 0;
  background: rgba(17, 15, 15, 0.985);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100000;
  opacity: 0;
  transition: opacity .18s ease;
  touch-action: pan-y;
}
.lb-overlay.lb-open { display: flex; opacity: 1; }

.lb-stage {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 64px;
  box-sizing: border-box;
}

.lb-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
  box-shadow: 0 8px 40px rgba(0, 0, 0, .55);
  background: #111;
  transition: opacity .15s ease;
}

.lb-btn {
  position: absolute;
  background: rgba(52, 50, 50, .85);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .18);
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s ease, transform .1s ease;
  user-select: none;
}
.lb-btn:hover { background: rgba(70, 67, 66, .95); }
.lb-btn:active { transform: scale(.96); }

.lb-close {
  top: 18px;
  right: 18px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 28px;
}

.lb-prev, .lb-next {
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 84px;
  border-radius: 6px;
}
.lb-prev { left: 16px; }
.lb-next { right: 16px; }

.lb-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: #cfcbc9;
  font-size: 12px;
  letter-spacing: .5px;
  background: linear-gradient(to top, rgba(0, 0, 0, .55), transparent);
  pointer-events: none;
}
.lb-counter { white-space: nowrap; }
.lb-caption {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: right;
  flex: 1;
}

@media (max-width: 900px) {
  .lb-stage { padding: 60px 8px 70px; }
  .lb-prev, .lb-next {
    width: 40px;
    height: 64px;
    opacity: .75;
  }
  .lb-prev { left: 4px; }
  .lb-next { right: 4px; }
  .lb-close { top: 10px; right: 10px; width: 40px; height: 40px; }
  .lb-bar { font-size: 11px; padding: 10px 12px; }
}
