.grid {
    display: flex;
    flex-wrap: wrap;
    /* разрешаем перенос */
    justify-content: center;
    /* чтобы по центру стояли */
    gap: 20px;
    margin-top: 10px;
}

.cars {
    border: 1px solid silver;
    background: white;
    position: relative;
    vertical-align: top;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    padding: 10px;
    font-family: OpenSans-Regular, sans-serif;

    width: 255px;
    /* фиксируем ширину */
    flex: 0 0 255px;
    /* запрещаем сжимать */
    display: flex;
    flex-direction: column;
    align-items: center;
}

.img1_books {
    background-image: url('../images/menu/books/kniga.png');
}

.img2_books {
    background-image: url('../images/menu/books/zhurnal.png');
}

.img3_books {
    background-image: url('../images/menu/books/gazeta.png');
}

.content {
    margin-top: 10px;
    font-size: 16px;
}

.contents {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    /* выравнивание элементов по вертикали */
    height: 100%;
    /* для выравнивания элементов по всей высоте */
    padding: 20px;
}

.naz {
    line-height: 24px;
    font-weight: 700;
    color: #0072ab;
    font-size: 20px;
    height: 50px;
    margin-bottom: auto;
}

.naz_text {
    text-align: left;
    color: #606060;
    font-size: 13px;
    line-height: 22px;
    font-weight: 400;
    margin-bottom: auto;
}

.txt {
    text-align: left;
    font-size: 13px;
    color: #606060;
    margin-bottom: auto;
    margin-top: 10px;
}

.button {
    display: inline-block;
    padding: 5px 10px;
    background-color: #0072ab;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    margin: 5px 0 5px 0;
}