/* Сетка каталога */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-lg);
}

/* Карточка */
.products-grid .card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  padding:0;
}

.products-grid .card:hover {
  /*transform: translateY(-4px);*/
  box-shadow: var(--shadow-strong);
}

.products-grid .card a{
  text-decoration: none;
  border-bottom: none;
}

/* Контейнер изображения */
.product-card-image-wrapper {
  width: 100%;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  padding: var(--space-lg);
  aspect-ratio: 1 / 1;  /* одинаковая высота у всех */
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #f5f5f5; /* нейтральный фон */
}

/* Само изображение */
.product-card-image-wrapper img,
.product-card-image-wrapper picture {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;  /* помещается полностью */
  display: block;
}

/* Контент */
.product-card-content {
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-card-title {
  margin: 1em 0 var(--space-sm) 0;
  font-size: 1.1rem;
  line-height: 1.2rem;
  color: var(--color-primary-dark);
}

.product-card-title a{
  color: var(--color-primary-dark);
}

.product-card-description, .product-card-description:hover{
  color: var(--color-text-secondary);
  /*font-size: var(--fs-sm);*/
  line-height: 1.5rem;
}

.product-price{
  font-size: 1.3em;
  font-weight: bold;
}

.product-price span{
  color: var(--color-text-secondary);
  display:block;
  font-size: var(--fs-sm);
  font-weight: normal;
  line-height: 1em;
  margin-bottom: -.5em;
}

.product-card-footer {
  display: flex;              /* включаем флекс-контейнер */
  justify-content: flex-start; /* элементы прижаты к левому краю */
  align-items: center;        /* выравнивание по вертикали по центру */
  gap: 16px;                  /* расстояние между элементами, при необходимости */
  padding: 8px 0;             /* внутренние отступы, можно менять */
}
