.property-gallery {
  display: block;
  min-width: 0;
}

.property-gallery-stage {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 20px;
  background: #e8edf0;
  box-shadow: 0 18px 42px rgba(13, 33, 50, 0.12);
}

.property-gallery-main {
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  cursor: zoom-in;
}

.property-gallery .property-gallery-main-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
  transition: transform 240ms ease;
}

.property-gallery-main:hover .property-gallery-main-image {
  transform: scale(1.015);
}

.property-gallery-zoom,
.property-gallery-counter {
  position: absolute;
  z-index: 2;
  color: #fff;
  background: rgba(13, 33, 50, 0.78);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(8px);
  pointer-events: none;
}

.property-gallery-zoom {
  right: 16px;
  bottom: 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.property-gallery-counter {
  top: 16px;
  right: 16px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 900;
}

.property-gallery svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.property-gallery-slider {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  gap: 10px;
  align-items: center;
  margin-top: 14px;
}

.property-gallery-track {
  display: flex;
  gap: 10px;
  min-width: 0;
  overflow-x: auto;
  padding: 3px;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  overscroll-behavior-inline: contain;
}

.property-gallery-track::-webkit-scrollbar {
  display: none;
}

.property-gallery-step,
.property-gallery-thumbnail,
.property-lightbox button {
  appearance: none;
  border: 0;
  font: inherit;
}

.property-gallery-step {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid rgba(13, 33, 50, 0.12);
  border-radius: 50%;
  color: var(--ink, #0d2132);
  background: var(--surface, #fff);
  box-shadow: 0 8px 20px rgba(13, 33, 50, 0.08);
  cursor: pointer;
  transition: color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.property-gallery-step:hover {
  color: var(--orange, #ff5b14);
  border-color: currentColor;
  transform: translateY(-1px);
}

.property-gallery-thumbnail {
  flex: 0 0 clamp(88px, 16%, 116px);
  aspect-ratio: 4 / 3;
  overflow: hidden;
  padding: 0;
  border: 3px solid transparent;
  border-radius: 13px;
  background: #e8edf0;
  cursor: pointer;
  scroll-snap-align: center;
  opacity: 0.72;
  transition: border-color 180ms ease, opacity 180ms ease, transform 180ms ease;
}

.property-gallery .property-gallery-thumbnail img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 9px;
}

.property-gallery-thumbnail:hover,
.property-gallery-thumbnail.is-active {
  opacity: 1;
  transform: translateY(-1px);
}

.property-gallery-thumbnail.is-active {
  border-color: var(--orange, #ff5b14);
  box-shadow: 0 0 0 2px rgba(255, 91, 20, 0.14);
}

.property-gallery :is(a, button):focus-visible {
  outline: 3px solid rgba(255, 91, 20, 0.45);
  outline-offset: 3px;
}

.property-lightbox {
  width: min(96vw, 1500px);
  height: 94dvh;
  max-width: none;
  max-height: none;
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 20px;
  color: #fff;
  background: #08141d;
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.55);
}

.property-lightbox::backdrop {
  background: rgba(3, 10, 15, 0.88);
  backdrop-filter: blur(5px);
}

.property-lightbox-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: 100%;
  height: 100%;
}

.property-lightbox-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 66px;
  padding: 10px 16px 10px 22px;
  background: #0d2132;
}

.property-lightbox-toolbar > span {
  font-size: 0.86rem;
  font-weight: 800;
}

.property-lightbox-toolbar > div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.property-lightbox-toolbar button,
.property-lightbox-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  cursor: pointer;
}

.property-lightbox-toolbar button {
  min-width: 44px;
  height: 44px;
  gap: 8px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
}

.property-lightbox-toolbar button:last-child {
  width: 44px;
  padding: 0;
}

.property-lightbox-toolbar button:hover,
.property-lightbox-step:hover {
  background: var(--orange, #ff5b14);
}

.property-lightbox-stage {
  position: relative;
  display: flex;
  min-height: 0;
  align-items: center;
  justify-content: center;
  overflow: auto;
  padding: 12px 64px;
}

.property-gallery .property-lightbox-image {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
}

.property-lightbox-step {
  position: fixed;
  top: 50%;
  z-index: 2;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  transform: translateY(-50%);
}

.property-lightbox-step.is-previous {
  left: max(3vw, 24px);
}

.property-lightbox-step.is-next {
  right: max(3vw, 24px);
}

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

@media (max-width: 850px) {
  .property-gallery-stage {
    aspect-ratio: 4 / 3;
    border-radius: 16px;
  }

  .property-gallery-slider {
    grid-template-columns: 38px minmax(0, 1fr) 38px;
    gap: 7px;
  }

  .property-gallery-step {
    width: 38px;
    height: 38px;
  }

  .property-gallery-thumbnail {
    flex-basis: 84px;
  }

  .property-lightbox {
    width: 100vw;
    height: 100dvh;
    border-radius: 0;
  }

  .property-lightbox-toolbar {
    min-height: 58px;
    padding: 7px 10px 7px 16px;
  }

  .property-lightbox-stage {
    padding: 8px 48px;
  }

  .property-lightbox-step {
    width: 42px;
    height: 42px;
  }

  .property-lightbox-step.is-previous {
    left: 8px;
  }

  .property-lightbox-step.is-next {
    right: 8px;
  }

}

@media (max-width: 520px) {
  .property-gallery-zoom {
    right: 10px;
    bottom: 10px;
    padding: 9px;
    font-size: 0;
  }

  .property-gallery-counter {
    top: 10px;
    right: 10px;
  }

}

@media (prefers-reduced-motion: reduce) {
  .property-gallery-main-image,
  .property-gallery-step,
  .property-gallery-thumbnail {
    transition: none;
  }

  .property-gallery-track {
    scroll-behavior: auto;
  }
}
