.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.product-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.product-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-image {
    position: relative;
    width: 100%;
    padding-top: 90%;
    overflow: hidden;
    background: #f8f9fa;
}

.product-image img {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 80%;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: contain;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
    transform: translate(-50%, -50%) scale(1.05);
}

.product-info {
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-title {
    font-size: 17px;
    font-weight: 600;
    color: #222;
    margin-bottom: 10px;
    line-height: 1.4;
}

.product-specs {
    list-style: none;
    padding: 0;
    margin: 0 0 16px;
    font-size: 14px;
    color: #555;
    line-height: 1.5;
}

.product-specs li {
    margin-bottom: 4px;
}

.product-price-block {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.product-price {
    font-size: 18px;
    font-weight: 700;
    color: #000;
}

.product-btn {
    background: #00a8ff;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.product-btn:hover {
    background: #0089d6;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 40px;
}

.product-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    text-align: center;
    padding: 25px 15px 30px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    cursor: pointer;
}

.product-card:hover {
    transform: scale(1.04);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.product-card img {
    width: 100%;
    height: 190px;
    object-fit: contain;
    margin-bottom: 20px;
}

.product-card h3 {
    font-size: 17px;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
    line-height: 1.3;
    min-height: 45px;
}

.product-card .product-button {
    background: #28a745;
    color: #fff;
    font-size: 15px;
    font-weight: 500;
    padding: 10px 22px;
    border-radius: 6px;
    border: none;
    transition: background 0.2s ease;
}

.product-card .product-button:hover {
    background: #21913d;
}

/* Контейнер для выравнивания изображений */
.product-card .product-image {
    position: relative;
    width: 100%;
    padding-top: 70%;
    /* единая зона под фото (высота ≈70% ширины) */
    overflow: hidden;
    margin-bottom: 20px;
}

.product-card .product-image img {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 85%;
    height: 85%;
    object-fit: contain;
    transform: translate(-50%, -50%);
}

/* фиксируем высоту блока под текст и кнопку */
.product-info {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

/* фиксируем высоту заголовка */
.product-card h3 {
    min-height: 54px;
    /* под 2–3 строки текста */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.product-grid {
    align-items: stretch;
}

.product-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 420px;
    /* единая высота карточки */
}

.product-card img {
    flex-shrink: 0;
    height: 180px;
    object-fit: contain;
    margin-bottom: 15px;
}

.product-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-card h3 {
    height: 60px;
    /* стабильная высота зоны под заголовок */
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.product-card .product-button {
    margin-top: auto;
}

.product-card {
    height: 470px;
    /* +10px общий запас, карточки ровные */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-card h3 {
    min-height: 100px;
    line-height: 1.35;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    white-space: normal;
    overflow-wrap: break-word;
    /* теперь длинные слова переносятся */
    hyphens: auto;
    /* браузер ставит мягкий перенос по словарю */
    -webkit-hyphens: auto;
    -ms-hyphens: auto;
    word-break: break-word;
    padding: 0 8px;
    margin: 0 0 12px;
}