/* 기본 오버레이 레이어 */
.lightbox-wrap {
  position: fixed;
  inset: 0;
  z-index: 9990;
  display: none;
  /* JS가 열 때 flex로 바꿔줌 */
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0);
  /* JS가 0 → 0.92로 애니메이션 */
}

/* JS에서 is-active 달아주니까 이건 그대로 유지 */
.lightbox-wrap.is-active {
  display: flex;
}

/* 안쪽 내용 래퍼 */
.lightbox-inner {
  position: relative;
  width: min(90vw, 1100px);
  max-width: 100%;
  height: min(90vh, 100%);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 0;
}

.lightbox-inner>*+* {
  margin-top: 1.25rem;
}

.lightbox-img {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 0;
}

/* 이미지 영역 */
.lightbox-img__item {
  visibility: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.lightbox-img__item.is-active {
  visibility: visible;
}

.lightbox-img__item img {
  object-fit: contain !important;
  width: auto;
  max-width: 100%;
  max-height: 100%;
  display: block;
}

.lightbox-img__item img.is-landscape {
  max-width: 110%;
  max-height: 92vh;
}

.lightbox-img__item img.is-portrait {
  max-width: 100%;
  max-height: 100%;
}

/* 하단 컨트롤 레이아웃 */
.lightbox-controls {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  color: #fff;
  position: relative;
}

.lightbox-counter {
  font-size: 0.78rem;
  opacity: 0.85;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  padding: 0.35rem 0.9rem;
  background: rgba(255, 255, 255, 0.14);
  border-radius: 9999px;
}

.lightbox-nav__button {
  min-width: 72px;
  padding: 0.45rem 1.1rem;
  border: none;
  background: rgba(255, 255, 255, 0.14);
  color: inherit;
  font: inherit;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 9999px;
  cursor: pointer;
  transition: background 0.2s ease, opacity 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.lightbox-close {
  min-width: 72px;
  padding: 0.45rem 1.1rem;
  border: none;
  background: rgba(255, 255, 255, 0.14);
  color: inherit;
  font: inherit;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 9999px;
  cursor: pointer;
  transition: background 0.2s ease, opacity 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

.lightbox-nav__button:hover,
.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.28);
}

.lightbox-nav__dot {
  width: 0.35rem;
  height: 0.35rem;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.65;
}

/* -------------------------------------------------------------------------
   모바일(≤767.98px) 라이트박스 비활성화
   - 트리거/오버레이를 숨겨 Swiper만 동작하도록 제한
   ------------------------------------------------------------------------- */
@media (max-width: 767.98px) {
  .lightbox-wrap {
    display: none !important;
  }

  /* 모바일에서는 확대 커서 제거 */
  #main-swiper .swiper-slide {
    cursor: default;
  }
}
