* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

a {
  text-decoration: none;
  color: inherit;
}

a:hover {
  text-decoration: none;
}

li {
  list-style: none;
}

body {
  font-family: 'Roboto', sans-serif;
  padding: 44px 0 0;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.logo-link {
  display: block;
}

.header {
  margin-bottom: 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.input {
  background: #FFFFFF;
  border: 1px solid #D9D9D9;
  border-radius: 2px;
  font-size: 16px;
  line-height: 24px;
  padding: 8px;
  padding-left: 35px;
}

.input-address {
  width: 100%;
  flex: 0.8;
  background: url(../img/home.png) no-repeat left 11px center;
}

.buttons {
  display: flex;
  align-items: center;
}

.button {
  display: flex;
  align-items: center;
  padding: 8px 16px;
  background: #FFFFFF;
  border: 1px solid #D9D9D9;
  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: 6px;
}

.card-button {
  margin-right: 30px;
}

.button-card-text {
  margin-right: 10px;
}

.main {
  background: linear-gradient(180deg, rgba(245, 245, 245, 0) 1.04%, #F5F5F5 100%);
}

.promo {
  background: #fff1b8 url('../img/promo-img.png') no-repeat top -100px right -245px / 925px;
  box-shadow: 0px 7px 12px rgba(158, 158, 163, 0.1);
  border-radius: 10px;
  padding: 68px 70px;
}

.promo-title {
  font-size: 39px;
  font-weight: 700;
  line-height: 46px;
  color: #302C34;
  margin-bottom: 15px;
}

.promo-text {
  font-size: 24px;
  font-weight: 400;
  line-height: 28px;
  width: 100%;
  max-width: 540px;
  color: #302C34;
}

.input-search {
  background: url(../img/search.svg) no-repeat left 11px center;
  width: 100%;
  max-width: 300px;
}

.restaurants {
  padding: 55px 0 90px;
}

.section-heading {
  display: flex;
  align-items: center;
  margin-bottom: 45px;
}

.section-title {
  font-weight: 700;
  font-size: 36px;
  line-height: 42px;
  margin-right: 30px;
}

.input-search {
  margin-left: auto;
}

.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;
  flex-basis: 31%;
}

.card-image {
  width: 384px;
  height: 250px;
  object-fit: cover;
}

.card-text {
  padding: 20px 23px 35px;
}

.tanuki-card-text {
  padding: 20px 18px 35px;
}

.card-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.card-title {
  font-weight: 700;
  font-size: 24px;
  line-height: 32px;
}

.card-title-reg {
  font-weight: 400;
}

.tag {
  background: #262626;
  border-radius: 2px;
  color: #fff;
  padding: 2px 8px;
  font-size: 12px;
  line-height: 20px;
}

.card-info {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.rating {
  margin-right: 26px;
  font-weight: bold;
  font-size: 18px;
  line-height: 32px;
  color: #FFC107;
}

.ingredients {
  font-size: 18px;
  line-height: 21px;
  color: #8C8C8C;
  margin-bottom: 24px;
}

.price,
.category {
  color: #8C8C8C;
  font-size: 18px;
  line-height: 32px;
}

.price {
  margin-right: 25px;
  position: relative;
}

.price::after {
  content:"";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background-color: #8c8c8c;
  right: -14px;
  top: 50%;
  transform: translateY(-50%);
  position: absolute;
}

.card-price-bold {
  font-weight: 700;
  font-size: 20px;
  line-height: 32px;
}

.card-buttons {
  display: flex;
}

.category {
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
  max-width: 150px;
}

.footer {
  padding: 60px 0;
}

.footer-block {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-logo {
  margin-right: 35px;
}

.footer-nav {
  margin-right: auto;
}

.footer-list {
  display: flex;
}

.footer-item:not(:last-child) {
 margin-right: 15px;
}

.footer-link {
  display: inline-block;
  font-weight: 400;
  font-size: 18px;
  line-height: 21px;
  color: #595959;
}

.social-list {
  display: flex;
  align-items: center;
}

.social-item {
  margin-right: 21px;
}

.social-item:last-child {
  margin-right: 0;
}



.modal {
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  display: none;
  align-items: center;
  justify-content: center;
}

.is-open {
  display: flex;
}

.modal-dialog {
  width: 95%;
  max-width: 780px;
  background: #FFFFFF;
  border-radius: 5px;
  padding: 40px 45px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 45px;
}

.modal-title {
  font-size: 36px;
  font-weight: 700;
  line-height: 42px;
}

.modal-body {
  margin-bottom: 52px;
}

.close {
  font-size: 36px;
  border: none;
  background-color: transparent;
}

.food-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding-bottom: 8px;
  border-bottom: 1px solid #d9d9d9;
  margin-bottom: 15px;
}

.food-name {
  font-size: 18px;
  font-weight: 400;
  line-height: 32px;
}

.food-price {
  margin-left: auto;
  margin-right: 47px;
  font-size: 20px;
  font-weight: 700;
  line-height: 32px;
}

.food-counter {
  display: flex;
  align-items: center;}

.counter-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 39px;
  height: 32px;
  background: #FFFFFF;
  border: 1px solid #40A9FF;
  border-radius: 2px;
  font-weight: 400;
  font-size: 14px;
  line-height: 22px;
  color: #40A9FF;
}

.counter {
  font-size: 16px;
  line-height: 24px;
  margin-left: 10px;
  margin-right: 10px;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-buttons {
  display: flex;
  align-items: center;
}

.modal-pricetag {
  background: #262626;
  border-radius: 5px;
  color: #fff;
  padding: 15px 20px;
  font-size: 20px;
  line-height: 23px;
}

@media (max-width: 1366px) {
  .container {
    max-width: 960px;
  }

  .promo {
    background-position: center right -300px;
    background-size: 750px;
  }

  .rating {
    margin-right: 15px;
  }

  .category,
  .price {
    font-size: 14px;
  }
}

@media (max-width: 992px) {
  .container {
    max-width: 750px;
  }

  .promo {
    padding: 50px;
    background-size: 500px;
    background-position: center right -200px;
  }

  .promo-text {
    font-size: 18px;
    max-width: 400px;
  }

  .restaurants {
    padding-bottom: 30px;
  }

  .card {
    flex-basis: 49%;
  }

  .footer-link {
    font-size: 16px;
  }
}

@media (max-width: 768px) {
  .container {
    max-width: 560px;
  }

  .promo {
    background-size: 400px;
    background-position: bottom 50px right -200px;
  }

  .promo-title {
    font-size: 24px;
    line-height: 1.4;
  }

  .card-info {
    flex-wrap: wrap;
  }

  .card .rating {
    flex-basis: 100%;
  }

  .card-title {
    font-size: 18px;
  }

  .footer-list {
    flex-wrap: wrap;
  }
}

@media (max-width: 578px) {
  .container {
    width: 90%;
  }

  .header {
    flex-wrap: wrap;
  }

  .input-address {
    order: 5;
    flex: 1;
    min-width: 195px;
    margin-top: 15px;
  }

  .promo {
    background-image: none;
  }

  .promo-title {
    margin-bottom: 10px;
  }

  .section-title {
    font-size: 20px;
  }

  .card {
    flex-basis: 100%;
  }

  .card-image {
    width: 100%;
  }

  .footer {
    padding: 25px 0;
  }

  .footer-logo {
    margin-right: 0;
  }

  .footer-nav {
    margin-right: 0;
  }

  .footer-list {
    flex-direction: column;
  }

  .footer-item:not(:last-child) {
    margin-bottom: 15px;
  }

  .social-list {
    flex-direction: column;
  }

  .social-item {
    margin-right: 0;
  }

  .social-item:not(:last-child) {
    margin-bottom: 15px;
  }
}

@media (max-width: 470px) {
  .header {
    flex-direction: column;
  }

  .header-logo {
    margin-bottom: 15px;
  }

  .promo {
    padding: 20px;
    text-align: center;
  }

  .section-heading {
    flex-wrap: wrap;
  }
}