
.product-grid {
    display: grid;
    /* Создаем колонки: минимум 240px */
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    /* Важно: задаем расстояние между рядами КАРТОЧЕК */
    row-gap: 20px; 
    column-gap: 20px;
    align-items: start;
}
.product-card {
    display: grid;
    /* Карточка занимает 4 ряда основной сетки */
    grid-row: span 4;
    /* Включаем subgrid для рядов */
    grid-template-rows: subgrid; 
    
    background: #ffffff;
    border: 2px solid #eaeaea;
    padding: 0px;
    max-height: 400px;
    box-sizing: border-box;
    overflow: hidden;
}

/* 1-й ряд: Изображение */
.product-card__image {
    grid-row: 1;
    text-align: center;
}
.product-card__image img {
    height: 150px;
    object-fit: contain;
}

/* 2-й ряд: Заголовок */
.product-card__title {
    grid-row: 2;
    margin: 10px 0;
    font-size: 16px;
    text-align: center !important; /* !important чтобы перебить остатки стилей темы */
}
.product-card__title a {
    text-decoration: none;
    color: #333;
    display: block;
}

/* 3-й ряд: Описание */
.product-card__description {
    grid-row: 3;
    font-size: 12px;
    color: #777;
    text-align: center;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 4-й ряд: Цена и кнопка */
.product-card__bottom {
    grid-row: 4;
    align-self: end; /* Всегда прижато к низу */
    padding-top: 10px;
}

.product-card__price {
    font-size: 18px;
    font-weight: bold;
    text-align: center !important; /* Центрируем цену */
    margin-bottom: 8px;
    display: block;
}

.btn-buy {
    display: block;
    width: 100%;
    padding: 10px;
    background: blue;
    color: #2198c6;
    border: none;
    text-transform: uppercase;
    cursor: pointer;
}





