* {
  box-sizing: border-box;
}
body {
  font-family: "Roboto", sans-serif;
  padding-top: 44px;
}
.container {
  max-width: 1440px;
  margin: 0 auto;
}
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 40px;
}
.input {
  background: #ffffff;
  border: 1px solid #d9d9d9;
  border-radius: 2px;
  font-size: 16px;
  background-repeat: no-repeat;
  background-position: left 11px center;
  line-height: 24px;
  color: #bfbfbf;
}
.input-address {
  flex: 0.8;
  padding: 8px 0 8px 35px;
  background-image: url(../images/home.svg);
}
.input-search {
  padding: 5px 0 5px 35px;
  width: 306px;
  background-image: url(../images/search.svg);
  margin-left: auto;
}
.buttons {
  display: flex;
  align-items: center;
}
.button {
  display: flex;
  align-items: center;
  padding: 8px 16px;
  background: #ffffff;
  border: 1px solid #d9d9d9;
  box-sizing: border-box;
  box-shadow: 0px 0px 2px rgba(0, 0, 0, 0.0015);
  border-radius: 2px;
  color: #595959;
  font-size: 16px;
  line-height: 24px;
}
.button-primary {
  background: #1890ff;
  border: 1px solid #1890ff;
  color: #fff;
  margin-right: 10px;
}
.button-icon {
  margin-right: 5px;
}
.button-card-text {
  margin-right: 10px;
}
.promo {
  box-shadow: 0px 7px 12px rgba(158, 158, 163, 0.1);
  background: #fff1b8 url(../images/promo-img.png) no-repeat top -100px right -247px /
    924px;
  border-radius: 10px;
  padding: 68px 70px;
  margin-bottom: 56px;
}
.promo-title {
  font-style: normal;
  font-weight: bold;
  font-size: 39px;
  line-height: 46px;

  color: #302c34;
}
.promo-text {
  font-style: normal;
  font-weight: normal;
  font-size: 24px;
  line-height: 28px;

  color: #302c34;
}
.section-heading {
  display: flex;
  align-items: center;
  margin-bottom: 44px;
}
.section-title {
  font-style: normal;
  font-weight: bold;
  font-size: 36px;
  line-height: 42px;
  margin: 0;
  color: #000000;
  margin-right: 30px;
}
.cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
}
.card {
  background: #ffffff;
  box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.05);
  border-radius: 7px;
  overflow: hidden;
  margin-bottom: 30px;
  text-decoration: none;
}
.card-img {
  max-width: 384px;
  max-height: 250px;
  object-fit: cover;
}
.card-text {
  padding: 20px 23px 35px 23px;
}
.card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-title {
  margin: 0;
  font-style: normal;
  font-weight: bold;
  font-size: 24px;
  line-height: 32px;
  color: #000000;
}
.card-title-reg {
  font-weight: 400;
}
.card-tag {
  font-style: normal;
  font-weight: normal;
  font-size: 12px;
  line-height: 20px;
  color: #fff;
  background: #262626;
  border-radius: 2px;
  padding: 1px 8px;
}
.card-info {
  display: flex;
  align-items: center;
}
.rating {
  margin-right: 26px;
  font-style: normal;
  font-weight: bold;
  font-size: 18px;
  line-height: 32px;
  color: #ffc107;
}
.price,
.category {
  font-style: normal;
  font-weight: normal;
  font-size: 18px;
  line-height: 32px;
  color: #8c8c8c;
}
.price {
  margin-right: 10px;
}
.price:after {
  content: "";
  width: 5px;
  height: 5px;
  background-color: #8c8c8c;
  display: inline-block;
  vertical-align: middle;
  border-radius: 50%;
}
.category {
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
  max-width: 150px;
}
.ingredients {
  max-width: 335px;
  font-style: normal;
  font-weight: normal;
  font-size: 18px;
  line-height: 21px;
  color: #8c8c8c;
  margin-top: 10px;
}
.card-price-bold {
  font-style: normal;
  font-size: 20px;
  line-height: 32px;
  color: #000000;
  margin-left: 22px;
}
.card-buttons {
  margin-top: 20px;
  display: flex;
  align-items: center;
}
.rating-star {
  margin-right: 5px;
}
.main {
  background: linear-gradient(
    180deg,
    rgba(245, 245, 245, 0) 1.04%,
    #f5f5f5 100%
  );
}
.footer {
  padding: 60px 0;
}
.footer-block {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.footer-link {
  display: inline-block;
  font-style: normal;
  font-weight: normal;
  font-size: 18px;
  line-height: 21px;
  color: #595959;
  text-decoration: none;
}
.footer-link:not(:last-child) {
  margin-right: 15px;
}
.footer-nav {
  margin-right: auto;
  margin-left: 36px;
}
.social-links {
  display: flex;
  align-items: center;
}
.social-link:not(:last-child) {
  margin-right: 21px;
}

.modal {
  display: none;
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
}

.is-modal-open{
  display: flex;
}

.modal-dialog {
  max-width: 780px;
  width: 95%;
  min-height: 552px;
  background: #ffffff;
  border-radius: 5px;
  margin: auto;
  padding: 40px 45px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 45px;
}

.modal-title {
  margin: 0;
  font-style: normal;
  font-weight: bold;
  font-size: 36px;
  line-height: 42px;
  color: #000000;
}

.close {
  font-size: 48px;
  border: none;
  background-color: transparent;
  outline: none;
  cursor: pointer;
}

.food-row {
  display: flex;
  align-items: flex-start;
  border-bottom: 1px solid #d9d9d9;
  padding-bottom: 10px;
  margin-bottom: 15px;
}

.food-name {
  font-style: normal;
  font-weight: normal;
  font-size: 18px;
  line-height: 32px;
  color: #000000;
}

.food-price {
  font-style: normal;
  font-weight: bold;
  font-size: 20px;
  line-height: 32px;
  color: #000000;
  margin-left: 285px;
  margin-right: 48px;
}

.food-counter {
  display: flex;
  align-items: center;
}

.counter-button {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #40a9ff;
  width: 39px;
  height: 32px;
  border: 1px solid #40a9ff;
  background: #ffffff;
  border-radius: 2px;
  font-style: normal;
  font-weight: normal;
  font-size: 14px;
  line-height: 22px;
}

.counter {
  font-style: normal;
  font-weight: normal;
  font-size: 16px;
  line-height: 24px;
  color: #000;
  margin: 0 13px;
}

.modal-footer {
  margin-top: 53px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-footer-buttons {
  display: flex;
  align-items: center;
}

.total-price {
  width: 106px;
  height: 53px;
  font-style: normal;
  font-weight: bold;
  font-size: 20px;
  line-height: 23px;
  color: #fafafa;
  background: #262626;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.order-button{
  margin-right: 18px;
}

@media (max-width: 1480px) {
  .container {
    padding: 0 15px;
  }
}
@media (max-width: 1366px) {
  .container {
    max-width: 990px;
  }
  .promo {
    background-size: 750px;
    background-position: center right -300px;
  }
  .category,
  .price {
    font-size: 14px;
  }
  .rating {
    margin-right: 15px;
  }
  .card {
    flex-basis: 30%;
  }
}
@media (max-width: 992px) {
  .container {
    max-width: 780px;
  }
  .promo {
    padding: 50px;
    background-size: 500px;
    background-position: center right -220px;
  }
  .promo-text {
    font-size: 18px;
    max-width: 400px;
  }
  .card {
    flex-basis: 49%;
  }
  .footer-link {
    font-size: 16px;
  }
}
@media (max-width: 768px) {
  .container {
    max-width: 590px;
  }
  .card-info {
    flex-wrap: wrap;
  }
  .card .rating {
    flex-basis: 100%;
  }
  .card-title {
    font-size: 18px;
  }
  .promo {
    background-size: 400px;
    background-position: bottom 50px right -200px;
  }
  .promo-title {
    font-size: 24px;
    line-height: 1.4;
  }
  .promo-text {
    margin-bottom: 0;
  }
  .button-text {
    display: none;
  }
  .button {
    min-height: 40px;
  }
  .button-icon {
    margin-right: 0;
  }
}
@media (max-width: 588px) {
  .container {
    width: 350px;
  }
  .promo {
    background-image: none;
  }
  .promo-text {
    font-size: 14px;
  }
  .header {
    flex-wrap: wrap;
  }
  .input-address {
    margin-top: 15px;
    order: 5;
    flex: 1;
  }
  .promo-title {
    margin-bottom: 10px;
  }
  .section-title {
    font-size: 20px;
  }
  .card {
    flex-basis: 100%;
  }
  .card-img {
    min-width: 100%;
  }
  .input-search {
    width: 250px;
  }
  .footer {
    padding: 30px 0;
  }
  .footer-block {
    align-items: flex-start;
  }
  .footer-nav {
    margin-right: 0;
    order: 0;
    margin-left: 0;
    display: flex;
    flex-direction: column;
  }
  .footer-logo {
    order: 1;
  }
  .social-links {
    order: 2;
  }
}
@media (max-width: 480px) {
  .promo {
    padding: 20px;
  }
  .promo-text {
    font-size: 11px;
    line-height: 1.5;
  }
  .input-search {
    width: 100%;
  }
  .footer-block {
    flex-wrap: wrap;
    flex-direction: column;
    align-items: center;
  }
  .section-heading {
    flex-wrap: wrap;
  }
  .footer-logo {
    order: 0;
    margin-bottom: 20px;
  }
  .footer-nav {
    margin-bottom: 20px;
    text-align: center;
  }
  .footer-link:not(:last-child) {
    margin-right: 0;
  }
}
