*,
*:before,
*:after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #ffffff;
    font-family: Roboto, sans-serif;
    font-style: 18px;
    font-weight: 400;
    padding-top: 44px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.header-top {
    font-size: 16px;
    line-height: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header {
    margin-bottom: 50px;
}

.input {
    background: #ffffff;
    border: 1px solid #d9d9d9;
    border-radius: 2px;
    color: #bfbfbf;
    padding-left: 32px;
    height: 40px;
    align-items: center;
}

.input-address {
    flex: 0.8;
    background: url(../img/home.svg);
    background-repeat: no-repeat;
    background-position: left 11px center;
}

.input-search {
    min-width: 306px;
    background: url(../img/search.svg);
    background-repeat: no-repeat;
    background-position: left 11px center;
}

.buttons {
    display: flex;
}

.button-primary {
    color: #ffffff;
    background: #1890ff;
    border: 1px solid #1890ff;
}

.button-top {
    padding: 8px 16px;
    border-radius: 2px;
    display: flex;
    align-items: center;
    width: 100px;
}

.button-top:hover {
    background: #096dd9;
    border: 1px solid #096dd9;
    color: #ffffff;
}

.button-secondary {
    border: 1px solid #d9d9d9;
    color: #595959;
    background: #ffffff;
    box-shadow: 0 0 2px rgba(0, 0, 0, 0.015);
    margin-left: 10px;
}

.button-secondary:hover {
    border: 1px solid #17d82b;
    color: #595959;
    background: #c9fdce;
}

.button-icon {
    margin-right: 2px;
}

.button-icon.cart {
    margin-left: -7px;
}

.promo {
    background: #fff1b8 url(../img/promo.png) no-repeat center right 50px;
    border-radius: 10px;
    box-shadow: 0px 7px 12px rgba(158, 158, 163, 0.1);
    padding: 68px 70px 100px;
    color: #302c34;
    justify-content: center;
}

.promo-title {
    font-size: 39px;
    line-height: 46px;
}

.promo-text {
    max-width: 540px;
    font-size: 24px;
    line-height: 28px;
}

.main {
    background: linear-gradient(180deg, rgba(245, 245, 245, 0) 1.04%, #f5f5f5 100%);
}

.restaurants {
    margin: 56px 0;
}

.section-heading {
    display: flex;
    justify-content: space-between;
    margin-bottom: 44px;
}

.section-heading h2 {
    font-size: 36px;
    line-height: 42px;
    font-weight: bold;
    color: #000000;
    margin: 0;
}

.cards {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
}

.card {
    background-color: #ffffff;
    border-radius: 7px;
    overflow: hidden;
    box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
    flex-basis: 31%;
}

.card-image {
    width: 384px;
    height: 250px;
    object-fit: cover;
}

.card-text {
    padding: 20px 23px 35px;
}

.card-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-title {
    font-size: 24px;
    line-height: 32px;
    font-weight: 700;
    margin: 0;
}

.card-tag {
    font-size: 12px;
    line-height: 20px;
    color: #ffffff;
    background: #262626;
    padding: 1px 8px;
    border-radius: 2px;
}

.card-info {
    display: flex;
    align-items: flex-start;
    margin-top: 10px;
}

.rating {
    color: #ffc107;
    margin-right: 26px;
    font-weight: 700;
    font-size: 18px;
    line-height: 32px;
}

.price,
.category {
    color: #8c8c8c;
    font-size: 18px;
    line-height: 32px;
}

.price {
    margin-right: 10px;
}

.category {
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
    max-width: 150px;
}

.price:after {
    content: "";
    width: 5px;
    height: 5px;
    background-color: #8c8c8c;
    display: inline-block;
    vertical-align: middle;
    border-radius: 50%;
    margin-left: 10px;
}

.footer {
    padding: 0 0 60px;
}

.footer-block {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.footer-nav {
    margin-left: 35px;
    margin-right: auto;
}

.footer-link {
    display: inline-block;
    color: #595959;
    text-decoration: none;
    font-size: 18px;
    line-height: 21px;
    font-weight: 400;
}

.footer-link:not(:last-child) {
    margin-right: 15px;
}

.social-links {
    display: flex;
    align-items: center;
}

.social-link:not(:last-child) {
    margin-right: 21px;
}

@media (max-width: 1366px) {
    .container {
        max-width: 960px;
    }
    .promo {
        background-size: 400px;
    }
    .rating {
        margin-right: 15px;
    }
    .category,
    .price {
        font-size: 14px;
    }
}

@media (max-width: 992px) {
    .container {
        max-width: 750px;
    }
    .promo {
        padding: 50px;
        background-size: 300px;
    }
    .promo-title {
        font-size: 30px;
        line-height: 40px;
    }
    .promo-text {
        font-size: 18px;
        max-width: 400px;
    }
    .card {
        flex-basis: 48%;
    }
    .footer-link {
        font-size: 16px;
    }
}

@media (max-width: 768px) {
    .container {
        min-width: 560px;
    }
    .card-title {
        font-size: 20px;
    }
    .card-info {
        flex-wrap: wrap;
    }
    .rating {
        flex-basis: 100%;
    }
    .promo-title {
        font-size: 24px;
        line-height: 1.4;
        margin-bottom: 15px;
    }
    .promo {
        background-size: 200px;
    }
    .promo-text {
        max-width: 270px;
    }
}

@media (max-width: 578px) {
    .container {
        width: 90%;
    }
    .header {
        flex-wrap: wrap;
    }
    .input-address {
        order: 5;
        flex: 1;
        margin-top: 15px;
    }
    .promo {
        background-image: none;
    }
    .section-title {
        font-size: 20px;
    }
    .card {
        flex-basis: 100%;
    }
    .card-image {
        width: 100%;
    }
}