.shpe-lightbox {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.shpe-lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.shpe-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(6px);
}

.shpe-lightbox__toolbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 64px;
  padding: 14px 24px;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0));
  pointer-events: none;
}

.shpe-lightbox__counter {
  flex: 0 0 auto;
  color: #fff;
  font: 600 13px/1 'Segoe UI', Arial, sans-serif;
  letter-spacing: 0.04em;
  background: rgba(255, 255, 255, 0.12);
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
}

.shpe-lightbox__title {
  flex: 1 1 auto;
  color: #fff;
  font: 500 15px/1.35 'Segoe UI', Arial, sans-serif;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0.95;
  padding: 0 12px;
}

.shpe-lightbox__close {
  flex: 0 0 auto;
  margin-left: auto;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  backdrop-filter: blur(8px);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.shpe-lightbox__close:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.45);
  transform: scale(1.05);
}

.shpe-lightbox__close svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.shpe-lightbox__nav {
  position: fixed;
  top: 50%;
  z-index: 6;
  width: 56px;
  height: 56px;
  margin-top: -28px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(10px);
  pointer-events: auto;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.shpe-lightbox__nav:hover {
  background: rgba(255, 255, 255, 0.26);
  border-color: rgba(255, 255, 255, 0.55);
  transform: scale(1.08);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.45);
}

.shpe-lightbox__nav:active {
  transform: scale(0.96);
}

.shpe-lightbox__nav svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.shpe-lightbox__nav--prev {
  left: 28px;
}

.shpe-lightbox__nav--next {
  right: 28px;
}

.shpe-lightbox__stage {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(92vw, 1200px);
  height: min(78vh, 900px);
  padding: 72px 96px 48px;
  pointer-events: none;
}

.shpe-lightbox__loader {
  position: absolute;
  width: 42px;
  height: 42px;
  border: 3px solid rgba(255, 255, 255, 0.18);
  border-top-color: #fff;
  border-radius: 50%;
  animation: shpe-lightbox-spin 0.75s linear infinite;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.shpe-lightbox.is-loading .shpe-lightbox__loader {
  opacity: 1;
  visibility: visible;
}

.shpe-lightbox.is-loading .shpe-lightbox__image {
  opacity: 0;
}

.shpe-lightbox__image {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
  pointer-events: auto;
  opacity: 0;
  transform: scale(0.96);
  transition: opacity 0.32s ease, transform 0.32s ease;
}

.shpe-lightbox__image.is-visible {
  opacity: 1;
  transform: scale(1);
}

.shpe-lightbox__image.is-slide-out-left {
  opacity: 0;
  transform: translateX(-36px) scale(0.98);
}

.shpe-lightbox__image.is-slide-out-right {
  opacity: 0;
  transform: translateX(36px) scale(0.98);
}

.shpe-lightbox__image.is-slide-in-left {
  opacity: 0;
  transform: translateX(36px) scale(0.98);
}

.shpe-lightbox__image.is-slide-in-right {
  opacity: 0;
  transform: translateX(-36px) scale(0.98);
}

.shpe-lightbox__dots {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 8px;
  transform: translateX(-50%);
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  pointer-events: none;
}

.shpe-lightbox__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  transition: transform 0.2s ease, background 0.2s ease;
}

.shpe-lightbox__dot.is-active {
  background: #fff;
  transform: scale(1.25);
}

.shpe-lightbox__hint {
  position: fixed;
  bottom: 72px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  color: rgba(255, 255, 255, 0.55);
  font: 400 12px/1 'Segoe UI', Arial, sans-serif;
  letter-spacing: 0.02em;
  pointer-events: none;
}

body.shpe-lightbox-open {
  overflow: hidden;
}

a[data-shpe-lightbox],
.e-gallery-item,
.gallery-item a,
.elementor-image-carousel a[data-elementor-open-lightbox] {
  cursor: zoom-in;
}

@keyframes shpe-lightbox-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 768px) {
  .shpe-lightbox__stage {
    width: 100vw;
    height: 72vh;
    padding: 64px 20px 40px;
  }

  .shpe-lightbox__toolbar {
    padding: 12px 16px;
    min-height: 56px;
  }

  .shpe-lightbox__title {
    font-size: 13px;
  }

  .shpe-lightbox__nav {
    width: 48px;
    height: 48px;
    margin-top: -24px;
  }

  .shpe-lightbox__nav--prev {
    left: 12px;
  }

  .shpe-lightbox__nav--next {
    right: 12px;
  }

  .shpe-lightbox__hint {
    display: none;
  }

  .shpe-lightbox__dots {
    bottom: 16px;
    max-width: calc(100vw - 32px);
    overflow-x: auto;
    scrollbar-width: none;
  }

  .shpe-lightbox__dots::-webkit-scrollbar {
    display: none;
  }
}

@media (min-width: 769px) {
  .shpe-lightbox__dots {
    display: none;
  }
}
