/* ===== Property Gallery Layout ===== */
.rb-property-gallery {
  display: grid;
  grid-template-columns: 2fr 1fr;
  grid-template-rows: auto;
  align-items: start;
  gap: 12px;
  width: 100%;
}

/* Main image - 16:9 via aspect-ratio */
.rb-gallery__main {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius, 8px);
  background: #1a1a1a;
}

/* Thumbs - height set by JS to match main */
.rb-gallery__thumbs {
  overflow: hidden;
  border-radius: var(--radius, 8px);
}

/* ===== Main Slider ===== */
.rb-gallery__main .splide,
.rb-gallery__main .splide__track,
.rb-gallery__main .splide__list,
.rb-gallery__main .splide__slide {
  height: 100% !important;
  width: 100% !important;
}

.rb-gallery__main .splide__slide a {
  display: block;
  width: 100%;
  height: 100%;
}

.rb-gallery__main .splide__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Main slider arrows */
.rb-gallery__main .splide__arrow {
  background: var(--bg-ultra-dark);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-s, 6px);
  opacity: 1;
  transition: opacity 0.2s ease;
}


.rb-gallery__main .splide__arrow--next {
  right: 16px;
}

.rb-gallery__main .splide__arrow:hover {
  opacity: 0.85;
}

.rb-gallery__main .splide__arrow svg {
  width: 18px;
  height: 18px;
  fill: #fff;
}

.rb-gallery__main .splide__arrow--prev {
  left: 16px;
  transform: translateY(-50%) scaleX(-1);
}

/* ===== Thumbnail Slider ===== */
.rb-gallery__thumbs .splide,
.rb-gallery__thumbs .splide__track {
  height: 100% !important;
}

.rb-gallery__thumbs .splide__slide {
  border: 2px solid transparent;
  border-radius: var(--radius-s, 6px);
  overflow: hidden;
  opacity: 0.55;
  cursor: pointer;
  transition: opacity 0.25s ease, border-color 0.25s ease;
}

.rb-gallery__thumbs .splide__slide.is-active {
  opacity: 1;
  border-color: var(--primary, #333);
}

.rb-gallery__thumbs .splide__slide:hover {
  opacity: 0.9;
}

.rb-gallery__thumbs .splide__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.rb-gallery__thumbs .splide__arrows {
  display: none;
}

/* ===== Mobile ===== */
@media (max-width: 767px) {
  .rb-property-gallery {
    grid-template-columns: 1fr;
  }

  .rb-gallery__thumbs {
    height: 80px !important;
  }

  .rb-gallery__main .splide__arrow {
    width: 34px;
    height: 34px;
  }
}
