


.catalog-grid {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;          /* разрешаем перенос карточек на новую строку */
  gap: 14px;                /* отступы между карточками */
  padding: 0px 3px 20px 3px;
  justify-content: flex-start;  /* или flex-start, по желанию */
  margin-top: 20px;
  text-decoration: none;
}

/* Карточка товара */
.catalog-card {
  flex: 1 1 150px;          /* растягивается, минимальная ширина 280px */
  max-width: 320px;         /* ограничиваем ширину на больших экранах */
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 16px 16px 16px 16px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
}

.catalog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
  text-decoration: none;
}
/* Обёртка картинки (чтобы картинка не искажалась) */
.catalog-card__image-wrapper {
  aspect-ratio: 1 / 1;      /* квадратное превью */
  overflow: hidden;
}

.catalog-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;        /* заполняем контейнер, обрезая лишнее */
}

.catalog-card__title {
  margin: 5px 16px 5px 16px;
  font-family: Comfortaa;
  font-size: 14px;
  font-weight: 600;
  text-align: left;
color: rgb(65, 38, 3);
text-decoration: none;
}

.catalog-card__price {
  margin: 0 0.75rem 0.75rem;
  font-size: 18px;
  font-weight: 700;
  color: #2563eb;
}

.catalog-card__button {
  margin: auto 0.75rem 0.75rem;   /* кнопка прижата к низу */
  padding: 0.6rem 1rem;
  background: #2563eb;
  color: white;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.catalog-card__button:hover {
  background: #1d4ed8;
}

/* Адаптация для больших экранов */
@media (min-width: 768px) {
  .catalog-grid {
    gap: 1.5rem;
    padding: 1.5rem;
  }
}