* {
  box-sizing: border-box;
}

body {
  font-family: 'Roboto', sans-serif;
  padding-top: 44px;
}

a,
button {
  cursor: pointer;
  color: inherit;
  transition: 0.3s;
}

.hide {
  display: none;
}

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

.header {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 20px;
  margin-bottom: 40px;
}

.logo {
  margin-right: auto;
}

.input {
  background-color: #ffffff;
  border: 1px solid #d9d9d9;
  border-radius: 2px;
  font-size: 16px;
  line-height: 24px;
  padding: 8px 8px 8px 35px;
  background-repeat: no-repeat;
  background-position: left 11px center;
}

.address {
  flex: 1;
}

.input-address {
  width: 100%;
  background-image: url(../img/icon/home.svg);
}

.input-search {
  width: 300px;
  background-image: url(../img/icon/search.svg);
}

.buttons {
  display: flex;
  align-items: center;
  gap: 10px;
}

.button {
  display: flex;
  align-items: center;
  padding: 8px 16px;
  background: #ffffff;
  border: 1px solid #d9d9d9;
  box-sizing: border-box;
  box-shadow: 0 0 2px rgba(0, 0, 0, 0.0015);
  border-radius: 2px;
  color: #595959;
  font-size: 16px;
  line-height: 24px;
}

.button:hover {
  background: #1890ff;
  border: 1px solid #1890ff;
  color: #fff;
}

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

.button-primary:hover {
  background: #ffffff;
  border: 1px solid #d9d9d9;
  color: #595959;
}

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

.button-auth {
  background-position: 20px 13px;
}

.button-primary .button-auth-svg {
  width: 24px;
  height: 24px;
  background-color: #fff;
  -webkit-mask: url('../img/icon/user.svg') no-repeat 50% 50%;
  mask: url('../img/icon/user.svg') no-repeat 50% 50%;
  background-repeat: no-repeat;
  transition: 0.3s;
}

.button-primary:hover .button-auth-svg {
  background-color: #595959;
}

.button .button-cart-svg {
  width: 24px;
  height: 24px;
  background-color: #595959;
  -webkit-mask: url('../img/icon/shopping-cart.svg') no-repeat 50% 50%;
  mask: url('../img/icon/shopping-cart.svg') no-repeat 50% 50%;
  background-repeat: no-repeat;
  transition: 0.3s;
}

.button-primary .button-cart-svg {
  background-color: #fff;
}

.button:hover .button-cart-svg {
  background-color: #fff;
}

.button-primary:hover .button-cart-svg {
  background-color: #595959;
}

.button-cart {
  display: none;
  padding-left: 10px;
}

.button-out {
  display: none;
}

.user-name {
  display: none;
  font-weight: bold;
  font-size: 18px;
}

.promo-slider {
  width: 600px;
  height: 300px;
}

.promo {
  box-shadow: 0 7px 12px rgba(158, 158, 163, 0.1);
  border-radius: 10px;
  padding: 68px 70px;
  margin-bottom: 45px;
}

.pizza {
  background: #fff1b8 url(../img/promo/pizza.png) no-repeat top -100px right -250px / 830px;
}

.kebab {
  background: #d6e4ff url(../img/promo/kebab.png) no-repeat top 45px right 40px / 450px;
}

.vegetables {
  background: #fff566 url(../img/promo/vegetables.png) no-repeat top 0 right 0 / 825px;
}

.sushi {
  background: #fff1f0 url(../img/promo/sushi.png) no-repeat top 10px right 15px / 500px;
}

.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;
  max-width: 538px;
}

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

.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 30px 0 0;
  color: #000000;
}

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

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

.card-restaurant {
  cursor: pointer;
}

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

.card-text {
  padding: 20px 23px 35px;
  min-height: 275px;
  display: flex;
  flex-direction: column;
}

.restaurants .card-text {
  min-height: auto;
}

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

.card-title {
  margin: 0;
  font-style: normal;
  font-weight: bold;
  font-size: 22px;
  line-height: 32px;
}

.card-title-reg {
  font-weight: 400;
}

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

.card-info {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.card-buttons {
  display: flex;
  margin-top: 24px;
  flex-grow: 1;
  align-items: flex-end;
}

.card-price-bold {
  font-weight: bold;
  font-size: 20px;
  line-height: 32px;
  margin-left: 30px;
}

.rating {
  background-image: url('../img/icon/rating.svg');
  background-repeat: no-repeat;
  background-position: 0 7px;
  padding-left: 20px;
  margin-right: 26px;
  color: #ffc107;
  font-weight: bold;
  font-size: 18px;
  line-height: 32px;
}

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

.price {
  margin-right: 10px;
}

.ingredients {
  color: #8c8c8c;
  font-size: 18px;
  line-height: 21px;
}

.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: 60px 0;
}

.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;
  font-style: normal;
  font-weight: normal;
  font-size: 18px;
  line-height: 21px;
  text-decoration: none;
}

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

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

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

/* ----------------------------------- */

.modal {
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  padding: 16px;
  background: rgba(0, 0, 0, 0.4);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 999;
}

.open {
  display: flex;
}

.modal-dialog {
  position: relative;
  width: 100%;
  max-width: 780px;
  max-height: 100%;
  background: #ffffff;
  border-radius: 5px;
  padding: 40px 45px;
  overflow: auto;
}

.modal-dialog-auth {
  width: auto;
}

.label-auth {
  display: block;
  margin: 30px;
}

.label-auth span {
  width: 80px;
  display: inline-block;
}

.label-auth input,
.label-info input {
  padding: 3px 5px;
}

.label-info {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin: 30px 10px;
}

.label-info span {
  flex-basis: 130px;
}

.label-info input {
  flex-grow: 1;
}

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

.modal-title {
  margin: 0;
  font-weight: bold;
  font-size: 36px;
}

.close {
  font-size: 36px;
  border: none;
  background-color: transparent;
}

.close-auth,
.close-info {
  position: absolute;
  top: 10px;
  right: 20px;
}

.modal-body {
  margin-bottom: 22px;
}

.food-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 8px;
  border-bottom: 1px solid #d9d9d9;
  margin-bottom: 15px;
  gap: 40px;
}

.food-name {
  font-weight: normal;
  font-size: 18px;
  line-height: 1.2;
}

.food-price {
  margin-left: auto;
  font-weight: bold;
  font-size: 20px;
  white-space: nowrap;
}

.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;
  box-sizing: border-box;
  border-radius: 2px;
  font-weight: normal;
  font-size: 14px;
  line-height: 22px;
  color: #40a9ff;
}

.counter-button:hover {
  background: #40a9ff;
  border: 1px solid #ffffff;
  color: #ffffff;
}

.counter {
  font-size: 16px;
  line-height: 24px;
  margin-left: 10px;
  margin-right: 10px;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-top: 40px;
}

.modal-cart .modal-footer {
  justify-content: space-between;
}

.footer-buttons {
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-pricetag {
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: 70px;
  margin-right: 10px;
  padding: 15px 20px;
  white-space: nowrap;
  font-weight: bold;
  background: #262626;
  border-radius: 5px;
  color: #ffffff;
  font-size: 20px;
  line-height: 23px;
}

@media (max-width: 1200px) {
  .pizza {
    background-position: center right -300px;
    background-size: 750px;
  }

  .kebab {
    background-position: top -5px right -93px;
    background-size: 530px;
  }

  .vegetables {
    background-position: top 0 right -93px;
    background-size: 820px;
  }

  .sushi {
    background-position: center right -90px;
  }

  .rating {
    margin-right: 15px;
  }

  .category,
  .price {
    font-size: 14px;
  }
}

@media (max-width: 992px) {
  .container {
    max-width: 900px;
  }

  .pizza {
    background-size: 500px;
    background-position: center right -200px;
  }

  .kebab {
    background-position: top 55px right -100px;
    background-size: 385px;
  }

  .vegetables {
    background-position: top 0 right -280px;
    background-size: 810px;
  }

  .sushi {
    background-position: top 30px right -175px;
  }

  .promo-title {
    font-size: 34px;
  }

  .promo-text {
    font-size: 18px;
    max-width: 400px;
  }

  .card {
    flex-basis: 48%;
  }

  .footer-link {
    font-size: 16px;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0 20px;
  }

  .header {
    flex-wrap: wrap;
  }

  .address {
    flex-basis: 100%;
    order: 2;
  }

  .promo {
    padding: 68px 58px;
  }

  .promo-title {
    font-size: 30px;
    line-height: 1.4;
  }

  .promo-text {
    margin-top: 0;
  }

  .swiper-button-next:after,
  .swiper-button-prev:after {
    font-size: 30px;
  }

  .swiper-button-prev {
    left: 0;
  }

  .swiper-button-next {
    right: 0;
  }

  .card-info {
    flex-wrap: wrap;
  }

  .card .rating {
    flex-basis: 100%;
  }

  .card-title {
    font-size: 20px;
  }

  .card-text {
    min-height: 290px;
  }

  .card-price-bold {
    margin-left: 20px;
  }

  .pizza {
    background-size: 400px;
    background-position: bottom 50px right -200px;
  }

  .kebab {
    background-position: top -5px right -74px;
    background-size: 300px;
  }

  .vegetables {
    background-position: top 0 right -240px;
    background-size: 702px;
  }

  .sushi {
    background-position: top -24px right -75px;
    background-size: 302px;
  }
}

@media (max-width: 578px) {
  .container {
    padding: 0 16px;
  }

  .button-text {
    display: none;
  }

  .button {
    min-height: 40px;
    padding: 5px 12px;
  }

  .button-out-svg {
    width: 24px;
    height: 24px;
    background-color: #fff;
    -webkit-mask: url(../img/icon/logout.svg) no-repeat 50% 50%;
    mask: url(../img/icon/logout.svg) no-repeat 50% 50%;
    background-repeat: no-repeat;
    -webkit-mask-size: 20px;
    mask-size: 20px;
  }

  .promo {
    padding: 40px;
    background-image: none;
  }

  .promo-title {
    font-size: 28px;
    margin-bottom: 10px;
  }

  .section-heading {
    margin-bottom: 30px;
  }

  .section-title {
    font-size: 22px;
  }

  .card {
    flex-basis: 100%;
  }

  .card-text {
    min-height: auto;
  }

  .card-image {
    width: 100%;
  }

  .footer {
    padding: 30px 0;
  }

  .footer-block {
    align-items: flex-start;
  }

  .footer-nav {
    margin-left: 0;
    margin-right: 0;
    order: 0;
    display: flex;
    flex-direction: column;
  }

  .footer-logo {
    margin-right: 15px;
    order: 1;
  }

  .social-links {
    order: 2;
  }

  .modal-dialog {
    padding: 45px 20px 25px;
  }

  .modal-message .modal-dialog {
    padding: 50px 20px;
  }

  .modal-title {
    font-size: 30px;
  }

  .label-auth {
    margin: 30px 3px;
  }

  .label-info {
    margin: 15px 3px;
  }

  .label-auth input,
  .label-info input {
    width: 100%;
  }

  .label-auth span,
  .label-info span {
    margin-bottom: 5px;
  }

  .label-info span {
    flex-basis: auto;
  }

  .modal-cart .modal-dialog {
    padding: 30px;
  }

  .food-name {
    font-size: 16px;
  }

  .food-price {
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .header {
    gap: 15px;
  }

  .promo {
    padding: 20px 35px;
  }

  .promo-title {
    font-size: 22px;
  }

  .promo-text {
    font-size: 17px;
  }

  .section-heading {
    flex-wrap: wrap;
  }

  .search {
    flex-basis: 100%;
    margin-top: 10px;
  }

  .input-search {
    width: 100%;
  }

  .footer-block {
    flex-wrap: wrap;
    flex-direction: column;
    align-items: center;
  }

  .footer-logo {
    order: 0;
    margin-bottom: 20px;
  }

  .footer-nav {
    margin-bottom: 20px;
    text-align: center;
  }

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

  .modal-cart .modal-dialog {
    padding: 20px 20px 30px;
  }

  .modal-header {
    margin-bottom: 20px;
  }

  .modal-footer {
    margin-top: 30px;
  }

  .modal-title {
    font-size: 24px;
  }

  .food-row {
    gap: 15px;
  }

  .counter-button {
    width: 30px;
    height: 30px;
  }

  .modal-pricetag,
  .button-order,
  .button-clear-cart {
    height: 50px;
    padding: 5px 10px;
    font-size: 16px;
    line-height: 1.1;
  }
}

@media (max-width: 400px) {
  .modal-add-title {
    display: none;
  }
}

@media (max-width: 358px) {
  .promo-title {
    font-size: 18px;
  }
  .promo-text {
    font-size: 16px;
  }

  .food-name,
  .food-price,
  .counter {
    font-size: 14px;
  }
  .modal-pricetag,
  .button-order,
  .button-clear-cart {
    font-size: 14px;
  }
}

/* ------------------------- */

.swiper-button-next,
.swiper-button-prev {
  margin-top: -34px;
  color: rgba(1, 1, 1, 0.3);
}

.swiper-slide {
  height: auto;
}

.button-order {
  display: none;
}

.button-order.open {
  display: flex;
}

legend {
  padding: 0 2px;
}

input:focus::placeholder {
  opacity: 0;
}

.modal input::placeholder {
  font-size: 14px;
}

.restaurants {
  padding-top: 20px;
}

.restaurants .section-heading {
  justify-content: space-between;
}

.lock {
  pointer-events: none;
}

.invisible {
  opacity: 0;
}

.modal-message .modal-title {
  text-align: center;
}
