.body {
    margin: 0px;
    padding: 0px;
}

* {
    box-sizing: border-box;
}

.page-title {
    width: 100%;
    text-align: center;
    margin: 20px 0; /* Отступы сверху и снизу */
}

.text {
    font-size: 30px; /* Размер шрифта заголовка */ 
}

.window {
    padding-top: 75px;
    display: flex;
    width: 100%;
    height: auto;
    flex-direction: column;
    padding: 30 auto;
}

.products {
    display: flex;
    width: 100%;
    height: auto;
    flex-wrap: wrap;
    margin: 0 auto;
    max-width: 1200px;
    justify-content: flex-start;
}

.product-card {
    width: calc(25% - 20px);
    max-width: 288px;
    max-height: 450px;
    margin: 10px;
    display: flex;
    flex-direction: column;
    overflow: visible;
}



/* Для адаптивности можно добавить медиа-запросы */
@media (max-width: 1200px) {
    .product-card {
        width: calc(33.33% - 20px); /* 3 карточки в строке */
    }
}

@media (max-width: 900px) {
    .product-card {
        width: calc(50% - 20px); /* 2 карточки в строке */
    }
}

@media (max-width: 600px) {
    .product-card {
        width: calc(100% - 20px); /* 1 карточка в строке */
    }
}

.product-card img {
    width: 100%;
    height: 300px; /* Высота изображения */
    object-fit: contain;
}

.product-info {
    padding: 10px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.name {
    min-height: auto; /* Убрал фиксированную высоту */
    margin-bottom: 10px;
}

.product-name {
    font-size: 20px;
    margin: 0;
    font-weight: bold;
    white-space: normal; /* Разрешаем перенос слов */
    word-wrap: break-word; /* Перенос длинных слов */
}

.price-buy {
    display: flex;
    align-items: center; /* Выравниваем по вертикали */
    gap: 10px; /* Добавляем отступ между ценой и кнопкой */
    margin-top: auto;
}

.product-price {
    font-weight: bold;
    font-size: 25px;
    margin: 0;
    white-space: nowrap; /* Запрещаем перенос цены на новую строку */
    flex-shrink: 0;
}

.buy-button {
    color: #000;
    cursor: pointer;
    border: 2px solid #000;
    border-radius: 150px;
    font-size: 16px;
    padding: 8px 15px; /* Горизонтальные отступы вместо фиксированной ширины */
    background: none;
    min-width: 100px; /* Минимальная ширина кнопки */
    flex-grow: 1; /* Позволяет кнопке растягиваться */
    flex-shrink: 1; /* Позволяет кнопке сжиматься */
    text-align: center;
}

.buy-button:hover {
    border: 3px solid #000;
}

.product-image {
    cursor: pointer; 
}

.img {
    width: auto;
    height: auto;
}

.s-back-to-top {
    position: fixed;
    right: 18px;
    bottom: 20px;
    z-index: 98;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 50px;
    height: 50px;
    border: 1px solid hsla(0, 0%, 100%, 0.12);
    border-radius: 16px;
    box-sizing: border-box;
    background-color: rgba(17, 17, 17, 0.56);
    transform: translateZ(0);
    cursor: pointer;
    transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
    opacity: 0;
    visibility: hidden;
}

.s-back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.s-back-to-top__image {
    right: 18px;
    bottom: 20px;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.s-back-to-top__icon {
    width: 24px;
    height: 24px;
}