/* Shared interior photo bento grid (1..N photos) */
.interior-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: minmax(140px, 18vw);
  gap: 8px;
  width: 100%;
  max-height: 560px;
}

.interior-gallery--count-1 {
  grid-template-columns: 1fr;
  grid-auto-rows: minmax(280px, 52vw);
  max-height: 480px;
}

.interior-gallery--count-2 {
  grid-template-columns: 1fr 1fr;
  grid-auto-rows: minmax(220px, 36vw);
  max-height: 420px;
}

.interior-gallery--count-3 {
  grid-template-columns: 1.4fr 1fr;
  grid-template-rows: 1fr 1fr;
  grid-auto-rows: unset;
  height: min(480px, 70vw);
  max-height: none;
}

.interior-gallery--count-3 .interior-gallery__item--span-2x2 {
  grid-column: 1;
  grid-row: 1 / span 2;
}

.interior-gallery--count-3 .interior-gallery__item--span-1x1 {
  grid-column: 2;
}

.interior-gallery__item {
  position: relative;
  overflow: hidden;
  margin: 0;
  background: rgba(0, 0, 0, 0.25);
}

.interior-gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease;
}

.interior-gallery__item:hover img {
  transform: scale(1.05);
}

.interior-gallery__item--full {
  grid-column: 1 / -1;
  grid-row: 1 / -1;
}

.interior-gallery__item--half {
  grid-column: span 1;
}

.interior-gallery__item--span-2x2 {
  grid-column: span 2;
  grid-row: span 2;
}

.interior-gallery__item--span-2x1 {
  grid-column: span 2;
  grid-row: span 1;
}

.interior-gallery__item--span-1x1 {
  grid-column: span 1;
  grid-row: span 1;
}

@media (max-width: 860px) {
  .interior-gallery {
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: 140px;
    max-height: none;
  }

  .interior-gallery--count-1 {
    grid-template-columns: 1fr;
    grid-auto-rows: 240px;
  }

  .interior-gallery--count-2 {
    grid-auto-rows: 180px;
  }

  .interior-gallery--count-3 {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: none;
    height: auto;
  }

  .interior-gallery--count-3 .interior-gallery__item--span-2x2 {
    grid-column: 1 / -1;
    grid-row: auto;
    min-height: 200px;
  }

  .interior-gallery--count-3 .interior-gallery__item--span-1x1 {
    grid-column: auto;
  }

  .interior-gallery__item--span-2x2,
  .interior-gallery__item--span-2x1,
  .interior-gallery__item--full {
    grid-column: 1 / -1;
    grid-row: span 1;
    min-height: 180px;
  }
}
