/* gallery.css — Full-width main photo + thumbnail strip below */

.gallery {
  position: relative;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
}

/* Grid: full-width main photo on top, row of 4 thumbnails below */
.gallery-grid {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto auto;
  gap: 4px;
}

.gallery-main {
  grid-column: 1 / -1;
  height: 480px;
  border-radius: 0;
  overflow: hidden;
  cursor: pointer;
  background: #f1f2f5;
}

/* Нет фото в выгрузке — без заглушек-картинок, только фон блока */
.gallery--empty .gallery-main {
  cursor: default;
}

.gallery--empty .gallery-main img {
  display: none;
}

.gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s ease;
}

.gallery-main:hover img {
  transform: scale(1.02);
}

/* Thumbnail strip: 4 images in a row */
.gallery-side {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: 1fr;
  gap: 4px;
}

.gallery-side-btn {
  height: 100px;
  border: 0;
  padding: 0;
  border-radius: 0;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  background: #f0f1f4;
}

.gallery-side-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s ease;
}

.gallery-side-btn:hover img {
  transform: scale(1.04);
}

.gallery-side-btn.more::after {
  content: attr(data-more);
  position: absolute;
  inset: 0;
  background: rgba(31, 31, 34, .35);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  transition: background .2s ease;
}

.gallery-side-btn.more:hover::after {
  background: rgba(31, 31, 34, .5);
}

/* Responsive */
@media (max-width: 1000px) {
  .gallery-main {
    height: 360px;
  }
  .gallery-side-btn {
    height: 80px;
  }
}

@media (max-width: 700px) {
  .gallery-main {
    height: 260px;
  }
  .gallery-side-btn {
    height: 64px;
  }
}
