/* ===== LIGHTBOX — fullscreen media viewer ===== */

.lightbox-overlay {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(10,9,8,0.97);
  display: none; align-items: center; justify-content: center;
}
.lightbox-overlay.open { display: flex; }

.lb-stage {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  padding: 72px 88px; position: relative;
}
.lb-stage img {
  max-width: 100%; max-height: 100%; object-fit: contain;
  user-select: none; border-radius: 1px; animation: lbIn 0.18s ease;
}
@keyframes lbIn {
  from { opacity: 0; transform: scale(0.965); }
  to   { opacity: 1; transform: scale(1); }
}

.lb-close,.lb-prev,.lb-next {
  position: fixed; display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.7); cursor: pointer;
  transition: background 0.2s, color 0.2s; z-index: 510; line-height: 1;
}
.lb-close:hover,.lb-prev:hover,.lb-next:hover {
  background: rgba(255,255,255,0.14); color: #fff;
}
.lb-close { top: 18px; right: 20px; width: 44px; height: 44px; font-size: 18px; border-radius: 50%; }
.lb-prev  { left: 20px; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; font-size: 20px; border-radius: 50%; }
.lb-next  { right: 20px; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; font-size: 20px; border-radius: 50%; }

.lb-counter {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%);
  font-size: 11px; letter-spacing: 0.12em; color: rgba(255,255,255,0.3); z-index: 510;
}

.lb-video-wrap {
  position: relative; display: flex; align-items: center; justify-content: center;
  max-width: 100%; max-height: 100%;
}
.lb-video-wrap video {
  max-width: 100%; max-height: calc(100vh - 180px);
  outline: none; display: block; animation: lbIn 0.18s ease;
}

.lb-vc {
  position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 10px;
  background: rgba(0,0,0,0.58); backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.08); border-radius: 40px;
  padding: 9px 18px; z-index: 5; min-width: 240px;
}
.vc-btn {
  background: none; border: none; color: #fff;
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; cursor: pointer; transition: background 0.18s; flex-shrink: 0; padding: 0;
}
.vc-btn:hover { background: rgba(255,255,255,0.14); }
.vc-progress {
  flex: 1; height: 3px; background: rgba(255,255,255,0.2);
  border-radius: 2px; cursor: pointer; min-width: 80px; position: relative;
}
.vc-progress-fill {
  height: 100%; background: #fff; border-radius: 2px;
  width: 0%; pointer-events: none; transition: width 0.08s linear;
}
.vc-time {
  font-size: 10px; color: rgba(255,255,255,0.55); white-space: nowrap;
  min-width: 62px; text-align: right; letter-spacing: 0.04em;
}

/* Modal media */
.modal-media-col { display: flex; flex-direction: column; background: #EAE6DF; overflow: hidden; }
.modal-main-media {
  flex: 1; min-height: 0; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  cursor: zoom-in; background: #EAE6DF;
}
.modal-main-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.modal-main-media:hover img { transform: scale(1.025); }
.modal-main-media video { width: 100%; height: 100%; object-fit: cover; }

.modal-thumbs {
  display: flex; gap: 4px; padding: 8px; background: #DDD8D0;
  min-height: 68px; overflow-x: auto;
}
.modal-thumbs::-webkit-scrollbar { height: 3px; }
.modal-thumbs::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.2); }

.thumb-item {
  flex-shrink: 0; width: 56px; height: 52px;
  overflow: hidden; cursor: pointer; border: 2px solid transparent;
  transition: border-color 0.2s, opacity 0.2s; background: #D0CBc4; position: relative;
}
.thumb-item img { width: 100%; height: 100%; object-fit: cover; }
.thumb-item.active { border-color: #1C1B18; }
.thumb-item:not(.active) { opacity: 0.5; }
.thumb-item:hover:not(.active) { opacity: 0.8; }
.thumb-item.is-video::after {
  content: '▶'; position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.4); color: rgba(255,255,255,0.9); font-size: 14px;
}
.modal-avail {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 9px; letter-spacing: 0.12em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 20px; margin-bottom: 20px;
}
.modal-avail::before { content: ''; width: 5px; height: 5px; border-radius: 50%; }
.modal-avail.yes { background: #EAF4EA; color: #2A6E2A; }
.modal-avail.yes::before { background: #3A9E3A; }
.modal-avail.no  { background: #F4EAEA; color: #7A2A2A; }
.modal-avail.no::before  { background: #C44; }

@media (max-width: 700px) {
  .lb-stage { padding: 56px 56px; }
  .lb-prev { left: 10px; width: 38px; height: 38px; }
  .lb-next { right: 10px; width: 38px; height: 38px; }
  .lb-close { top: 12px; right: 12px; }
}
