/* Listing gallery lightbox (js/listing-lightbox.js) */

.llb-opener {
  cursor: zoom-in;
}
.llb-opener:focus-visible {
  outline: 3px solid #28d1cd;
  outline-offset: 3px;
}

html.llb-open {
  overflow: hidden;
}

.llb {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  flex-direction: column;
  background: rgba(12, 14, 16, 0.95);
  color: #fff;
  -webkit-user-select: none;
  user-select: none;
}
.llb[hidden] {
  display: none;
}

.llb__bar {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
        padding: 12px 16px 0;
}
.llb__counter {
  font-size: 15px;
  letter-spacing: 0.04em;
  opacity: 0.85;
  font-variant-numeric: tabular-nums;
}

.llb__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
  transition: background 0.2s;
}
.llb__btn:hover {
  background: rgba(255, 255, 255, 0.18);
}
.llb__btn:focus-visible {
  outline: 2px solid #28d1cd;
  outline-offset: 2px;
}

.llb__stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 80px;
  touch-action: pan-y pinch-zoom;
}
.llb__img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
  transition: opacity 0.2s, transform 0.25s ease;
}
.llb--dragging .llb__img {
  transition: none;
}
.llb--loading .llb__img {
  opacity: 0.35;
}

.llb__nav {
  position: absolute;
  top: 50%;
  width: 56px;
  height: 56px;
  transform: translateY(-50%);
}
.llb__nav--prev {
  left: 12px;
}
.llb__nav--next {
  right: 12px;
}

.llb__spinner {
  display: none;
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40px;
  height: 40px;
  margin: -20px 0 0 -20px;
  border: 3px solid rgba(255, 255, 255, 0.25);
  border-top-color: #fff;
  border-radius: 50%;
  animation: llb-spin 0.8s linear infinite;
}
.llb--loading .llb__spinner {
  display: block;
}
@keyframes llb-spin {
  to {
    transform: rotate(360deg);
  }
}

.llb__thumbs {
  flex: none;
  display: flex;
  gap: 8px;
  padding: 12px 16px 16px;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}
.llb__thumb {
  flex: none;
  width: 88px;
  height: 60px;
  margin: 0;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 4px;
  overflow: hidden;
  background: none;
  opacity: 0.55;
  cursor: pointer;
  transition: opacity 0.2s, border-color 0.2s;
}
.llb__thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.llb__thumb:hover {
  opacity: 0.85;
}
.llb__thumb[aria-current="true"] {
  opacity: 1;
  border-color: #28d1cd;
}
.llb__thumb:focus-visible {
  outline: 2px solid #28d1cd;
  outline-offset: 2px;
}

.llb--single .llb__nav,
.llb--single .llb__thumbs {
  display: none;
}

@media (max-width: 767px) {
  .llb__stage {
    padding: 0;
  }
  .llb__nav {
    width: 44px;
    height: 44px;
    background: rgba(0, 0, 0, 0.35);
  }
  .llb__nav--prev {
    left: 6px;
  }
  .llb__nav--next {
    right: 6px;
  }
  .llb__thumb {
    width: 64px;
    height: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .llb__img,
  .llb__btn,
  .llb__thumb {
    transition: none;
  }
  .llb__spinner {
    animation-duration: 2s;
  }
}
