.masonry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
  padding: 60px 0;
  width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
}

.masonry-grid__item {
  /* Используем aspect-ratio напрямую */
  aspect-ratio: var(--aspect-ratio, 3 / 4);
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  background-color: #f0f0f0; /* Можно убрать или оставить как заглушку */
  position: relative;
}

.masonry-grid__item img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Важно: заполняет контейнер без искажений */
  display: block;
  /* Полностью отключаем hover-эффекты */
  transition: none !important;
}

@media screen and (max-width: 1024px) {
  .masonry-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  }
}

@media screen and (max-width: 600px) {
  .masonry-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
}

