/* Lightbox overlay */
.lb-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.92);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
}

/* Visible state */
.lb-overlay.is-open { display: flex; }

/* Wrapper that controls max size */
.lb-img-wrap {
  position: relative;
  max-width: 96vw;
  max-height: 94vh;
  overflow: hidden;
  touch-action: pinch-zoom;
}

/* FIX: Image fits screen perfectly */
.lb-img {
  display: block;
  width: auto !important;
  height: auto !important;
  max-width: 96vw !important;
  max-height: 94vh !important;
  object-fit: contain !important;
  margin: auto;
  transform-origin: center center;
  transition: transform .15s ease;
  will-change: transform;
}

/* Controls */
.lb-close, .lb-prev, .lb-next {
  position: absolute;
  background: rgba(0,0,0,.6);
  border: none;
  color: white;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  z-index: 10001;
}

.lb-close { top: 10px; right: 10px; }
.lb-prev  { top: 50%; left: 10px; transform: translateY(-50%); }
.lb-next  { top: 50%; right: 10px; transform: translateY(-50%); }

.lb-counter {
  position: absolute;
  top: 10px; left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,.5);
  color: #fff;
  padding: 6px 10px;
  border-radius: 8px;
}

/* Prevent scroll when lightbox open */
html.lb-lock, body.lb-lock { overflow: hidden; }

