
/* Fullscreen lightbox overlay */
.lb-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.lb-overlay.open { display: flex; }

.lb-stage {
  position: relative;
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-rows: 56px 1fr 56px;
  color: #fff;
}

.lb-topbar, .lb-bottombar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  user-select: none;
}

.lb-title { font-size: 14px; opacity: .85; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60vw; }
.lb-counter { font-size: 14px; opacity: .85; }

.lb-canvas {
  position: relative;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.lb-img {
  max-width: 96vw;
  max-height: 80vh;
  box-shadow: 0 10px 40px rgba(0,0,0/.5);
  border-radius: 8px;
  transition: transform .2s ease;
}

.lb-btn {
  appearance: none;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.15);
  color: #fff;
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 14px;
  cursor: pointer;
}
.lb-btn:hover { background: rgba(255,255,255,.16); }

.lb-close { font-weight: 700; }
.lb-nav {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  display: flex; gap: 8px;
  width: 100%; justify-content: space-between;
  pointer-events: none;
}
.lb-nav button {
  pointer-events: auto;
  padding: 12px 14px;
  background: rgba(0,0,0,.35);
  border: 1px solid rgba(255,255,255,.18);
  font-size: 16px;
}

/* Simple grid for thumbnails (adjust/replace with your theme's grid) */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill,minmax(160px,1fr));
  gap: 10px;
}
.gallery-grid .thumb img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}

@media (max-width: 768px) {
  .lb-img { max-width: 100vw; max-height: 72vh; border-radius: 4px; }
  .lb-topbar, .lb-bottombar { padding: 10px 12px; }
}
