@-webkit-keyframes underline {
  from { border-bottom: 1px solid var(--red-color); }
  to { border-bottom: 1px solid var(--red-color-alpha); }
}

@keyframes underline {
  from { border-bottom: 1px solid var(--red-color); }
  to { border-bottom: 1px solid var(--red-color-alpha); }
}

body > .header {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 930px;
}

body > .header header {
  text-transform: uppercase;
  width: calc(100% - 75px);
  margin-top: 20px;
  font-size: 15vw;
  color: var(--primary-text-color);
}

body > .header nav {
  width: 100%;
  margin: 20px 0;
  padding: 0 25px;
  box-sizing: border-box;
}

body > .header nav a:nth-of-type(3),
body > .header nav a:nth-of-type(4),
body > .header nav a:nth-of-type(5) {
  display: none;
}

body > .header nav div {
  border: 2px solid var(--nav-color);
  border-radius: 10px;
  width: 175px;
  display: grid;
  grid-auto-flow: column;
  box-sizing: border-box;
  overflow: hidden;
  transition: width 200ms ease-in-out;
}

@media only screen and (max-width: 479px) {
  body.scrolled > .header header {
    position: fixed;
    top: 0;
    text-align: center;
    font-size: 20px;
    font-weight: bold;
    -webkit-animation: fadeIn 200ms ease-in-out 0ms normal;
            animation: fadeIn 200ms ease-in-out 0ms normal;
  }
  
  body.scrolled > .header header::after {
    content: "";
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    height: 64px;
    z-index: -1;
    background-color: var(--background-color);
  }

  body.scrolled > .header nav {
    position: fixed;
    top: 44px;
    height: 60px;
    background: linear-gradient(
      0deg,
      var(--background-color-alpha) 0%,
      var(--background-color) 40%
    );
  }
  
  body.scrolled > .header nav div {
    width: 100%;
  }
}

body > .header nav a {
  text-decoration: none;
  color: var(--nav-text-color);
  padding: 5px 15px;
  position: relative;
  text-align: center;
}

body > .header nav a::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  z-index: -1;
  background-color: var(--nav-color);
  display: none;
  transform: skew(-25deg);
}

body > .header nav a:nth-of-type(2)::before {
  transform: skew(25deg);
}

body.services > .header nav a:nth-of-type(1) {
  color: var(--primary-text-color);
}

body.services > .header nav a:nth-of-type(1)::before,
body.services > .header nav a:nth-of-type(1)::after {
  display: block;
}

body.shop > .header nav a:nth-of-type(2) {
  color: var(--primary-text-color);
}

body.shop > .header nav a:nth-of-type(2)::before,
body.shop > .header nav a:nth-of-type(2)::after {
  display: block;
}

body.search > .header nav a:nth-of-type(3) {
  color: var(--primary-text-color);
}

body > .header nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 50%;
  top: 0;
  bottom: 0;
  z-index: -1;
  background-color: var(--nav-color);
  display: none;
}

body > .header nav a:nth-of-type(2)::after {
  left: 50%;
  right: 0;
}

body > .header nav a:nth-of-type(4) {
  position: relative;
}

body > .header nav a:nth-of-type(4)[data-number]::after  {
  content: attr(data-number);
  position: absolute;
  top: 23px;
  left: 3px;
  display: block!important;
  width: -webkit-fit-content;
  width: -moz-fit-content;
  width: fit-content;
  height: -webkit-fit-content;
  height: -moz-fit-content;
  height: fit-content;
  min-width: 18px;
  min-height: 18px; 
  font-size: 14px;
  text-align: center;
  line-height: 17px;
  box-sizing: border-box;
  border-radius: 9px;
  z-index: -1;
  padding: 0 5px;
  background-color: var(--red-color);
  color: var(--background-color);
  font-weight: bold;
}

body > .banner {
  display: none;
  width: 100%;
  background-color: var(--banner-background);
  color: var(--primary-text-color);
  align-items: center;
  justify-content: center;
  margin-bottom: 25px;
}

body > .banner figure {
  max-width: 700px;
  width: 100%;
  margin: 30px 0;
  display: flex;
  flex-direction: row;
  gap: 20px;
}

body > .banner h1 {
  margin: 0;
  margin-bottom: 30px;
  font-weight: normal;
}

body > .banner p {
  margin: 20px 0;
  line-height: 25px;
  font-size: 18px;
}

body > .banner p:last-of-type {
  margin: 0;
  margin-top: 20px;
}

body > .banner img {
  width: 200px;
}

@media only screen and (min-width: 700px) {
  body > .banner {
    display: flex;
  }
}

body > main {
  padding: 0 25px;
}

body.shop > main section:nth-of-type(1),
body.services > main section:nth-of-type(2),
body.search > main section {
  display: none;
}

article.info {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: var(--banner-background);
  border-radius: 16px;
  padding: 20px 16px;
}

article.info header {
  font-size: 18px;
  color: var(--primary-text-color);
  text-align: center;
}

article.info p {
  color: var(--secondary-text-color);
  text-align: center;
}

article.info a {
  color: var(--nav-text-color);
  text-align: center;
  text-decoration: none;
  -webkit-animation: underline 1000ms ease-in-out 0ms infinite alternate;
          animation: underline 1000ms ease-in-out 0ms infinite alternate;
}

article.info a:hover,
article.info a:focus,
article.info a:active {
  border-bottom: 1px solid var(--red-color);
  -webkit-animation: none;
          animation: none;
}

body > #searchDialog article.info {
  display: none;
}

article.service,
article.shop {
  width: 100%;
  margin: 25px 0;
  max-width: 500px;
}

article.shop {
  margin: 25px 0 40px;
}

article.service header,
article.shop header {
  color: var(--primary-text-color);
  font-size: 25px;
  min-height: 30px;
  margin-bottom: 15px;
}

article.service p,
article.shop p {
  color: var(--secondary-text-color);
  font-size: 16px;
  margin: 0;
  line-height: 22px;
}

article.service a {
  color: var(--secondary-text-color);
}

article.shop {
  display: grid;
  grid-template-columns: auto 100px;
}

article.shop p {
  margin-bottom: 15px;
}

article.shop div > div {
  display: flex;
}

article.shop button {
  width: 30px;
  height: 30px;
  border-radius: 15px;
  border: 3px solid var(--red-color);
  background-color: var(--red-color-alpha);
  color: var(--red-color);
  font-size: 21px;
  font-weight: bold;
  box-sizing: border-box;
  margin-left: 8px;
  outline: none;
  cursor: pointer;
  line-height: 0px;
  text-indent: -0.5px;
  transition: background-color 200ms ease-in-out, color 200ms ease-in-out;
}

article.shop button[data-added] {
  text-indent: -3px;
}

article.shop button:hover {
  background-color: var(--red-color);
  color: var(--background-color);
}

article.shop span {
  height: 30px;
  border: 3px solid var(--red-color);
  border-radius: 15px;
  box-sizing: border-box;
  padding: 0 6px;
  line-height: 24px;
  font-size: 16px;
  color: var(--primary-text-color);
  display: inline-block;
}

@media only screen and (max-width: 340px) {
  article.shop span[data-prices] {
    font-size: 13px;
  }
}

article.shop .img {
  margin-top: 15px;
  margin-left: 15px;
  height: 85px;
  width: 85px;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

article.shop .img img {
  width: 100%;
  height: -webkit-fit-content;
  height: -moz-fit-content;
  height: fit-content;
}

article.shop a {
  display: block;
  width: 100%;
  text-align: right;
  color: var(--secondary-text-color);
  text-decoration: none;
  font-weight: bold;
  font-size: 25px;
  margin-top: -8px;
}

article.shop a small {
  font-size: 13px;
  color: var(--secondary-text-color);
}

body > main article.service:first-of-type,
body > main article.shop:first-of-type {
  margin-top: 0;
}

@media only screen and (max-width: 479px) {
  body.scrolled > main article.service:first-of-type,
  body.scrolled > main article.shop:first-of-type {
    margin-top: 310px;
  }
}

@media only screen and (min-width: 321px) and (max-width: 479px) {
  body.scrolled > main article.service:first-of-type,
  body.scrolled > main article.shop:first-of-type {
    margin-top: 295px;
  }
}

@media only screen and (min-width: 376px) and (max-width: 479px) {
  body.scrolled > main article.service:first-of-type,
  body.scrolled > main article.shop:first-of-type {
    margin-top: 320px;
  }
}

@media only screen and (max-width: 479px) {
  body > main article:last-of-type {
    margin-bottom: 125px;
  }
}

body > aside {
  position: fixed;
  bottom: 70px;
  right: 15px;
  width: 48px;
  z-index: 1;
  display: flex;
  flex-direction: column-reverse;
  opacity: 0;
  -webkit-animation: fadeIn 200ms ease-in-out 100ms normal forwards;
          animation: fadeIn 200ms ease-in-out 100ms normal forwards;
}

body > aside a {
  display: block;
  -webkit-user-select: none;
     -moz-user-select: none;
      -ms-user-select: none;
          user-select: none;
  outline: none;
  width: 48px;
  height: 48px;
  margin: 15px 0 0 0;
}

body > aside a:nth-of-type(1) {
  background: url("/img/search.svg");
}

body > aside a:nth-of-type(2) {
  background: url("/img/cart.svg");
  -webkit-animation: fadeOutWithDisplay 200ms ease-in-out 0ms normal forwards;
          animation: fadeOutWithDisplay 200ms ease-in-out 0ms normal forwards;
}

body.shop > aside a:nth-of-type(2) {
  -webkit-animation: fadeIn 200ms ease-in-out 0ms normal;
          animation: fadeIn 200ms ease-in-out 0ms normal;
  text-decoration: none;
  color: var(--primary-text-color);
  position: relative;
}

body.shop > aside a:nth-of-type(2)[data-number]::after {
  content: attr(data-number);
  background-color: var(--red-color);
  position: absolute;
  font-size: 14px;
  top: -6px;
  right: 0;
  border-radius: 9px;
  box-sizing: border-box;
  min-width: 18px;
  height: 18px;
  text-align: center;
  padding: 0 5px;
  font-weight: bold;
  color: var(--background-color);
}

body > #searchDialog {
  display: none;
  border: none;
  padding: 0;
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  min-height: 100vh;
  background-color: var(--background-color);
  width: unset;
  height: unset;
  z-index: 1;
}

body.search > #searchDialog {
  display: block;
}

body > #searchDialog section {
  height: 64px;
  display: grid;
  justify-content: center;
  grid-auto-flow: column;
  border-bottom: 3px solid var(--nav-color);
  transition: border-color 200ms ease-in-out;
}

body > #searchDialog section:focus-within {
  border-bottom: 3px solid var(--green-color);
}

body > #searchDialog section input {
  background-color: transparent;
  border: none;
  max-width: 500px;
  width: calc(100vw - 84px);
  font-size: 20px;
  justify-self: left;
  color: var(--primary-text-color);
  margin-left: 20px;
}

body > #searchDialog section input:focus {
  outline: none;
}

body > #searchDialog section input::-webkit-input-placeholder {
  color: var(--secondary-text-color);
}

body > #searchDialog section input::-moz-placeholder {
  color: var(--secondary-text-color);
}

body > #searchDialog section input:-ms-input-placeholder {
  color: var(--secondary-text-color);
}

body > #searchDialog section input::-ms-input-placeholder {
  color: var(--secondary-text-color);
}

body > #searchDialog section input::placeholder {
  color: var(--secondary-text-color);
}

body > #searchDialog section a {
  display: block;
  width: 32px;
  height: 32px;
  margin-right: 16px;
  align-self: center;
  justify-self: right;
  background: url("/img/exit.svg");
  background-size: contain;
}

body > #searchDialog > p {
  display: none;
  font-size: 16px;
  text-align: center;
  color: var(--red-color);
}

body > #searchDialog > p.notMatched {
  display: block;
}

body > #searchDialog article {
  width: calc(100% - 50px);
  margin: 25px auto;
}

body > #searchDialog article.notMatched {
  display: none;
}

body > #shopDialog {
  display: none;
  border: none;
  padding: 0;
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  min-height: 100vh;
  background-color: transparent;
  width: unset;
  height: unset;
  z-index: 1;
  flex-direction: column;
  justify-content: center;
}

body.shop-dialog > #shopDialog {
  display: flex;
}

#shopDialog .wrapper {
  margin: 0 auto;
  max-width: 560px;
  width: 100vw;
  height: -webkit-fit-content;
  height: -moz-fit-content;
  height: fit-content;
  padding: 10px 25px;
  box-sizing: border-box;
  background-color: var(--background-color);
  box-shadow: 0px 0px 40px 40px var(--modal-background);
  -webkit-animation: fadeIn 200ms ease-in-out 0ms normal;
          animation: fadeIn 200ms ease-in-out 0ms normal;
}

#shopDialog .row {
  display: grid;
  grid-template-columns: auto 85px;
}

#shopDialog .row:nth-of-type(3) {
  margin-top: 20px;
  margin-bottom: 15px;
}

#shopDialog .row:nth-of-type(3),
#shopDialog .row:nth-of-type(4) {
  grid-template-columns: 160px auto;
  gap: 20px;
}

#shopDialog .column {
  display: flex;
  flex-direction: column;
}

#shopDialog .row:nth-of-type(4) .column {
  align-items: center;
}

#shopDialog p {
  margin: 0;
}

#shopDialog header {
  color: var(--primary-text-color);
  min-height: 30px;
  margin-bottom: 20px;
  font-size: 25px;
}

#shopDialog .close {
  width: 32px;
  height: 32px;
  border: 0;
  background: url('/img/exit.svg');
  justify-self: right;
}

#shopDialog .description {
  color: var(--secondary-text-color);
}

#shopDialog a {
  text-align: right;
  color: var(--primary-text-color); 
  font-weight: bold;
  font-size: 13px;
}

#shopDialog .image-container {
  width: 160px;
  height: 160px;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 10px;
}

#shopDialog .number {
  font-size: 20px;
  color: var(--primary-text-color);
}

#shopDialog .total {
  font-size: 22px;
  font-weight: bold;
  color: var(--red-color);
  margin-bottom: 20px;
  margin-top: 5px;
}

#shopDialog .sum-text {
  font-size: 17px;
  color: var(--secondary-text-color);
}

#shopDialog .sum {
  font-size: 17px;
  font-weight: bold;
  color: var(--secondary-text-color);
}

#shopDialog .input-group {
  display: grid;
  grid-template-columns: 22px auto 27px;
  border-radius: 15px;
  border: 3px solid var(--red-color);
  position: relative;
  height: 30px;
  box-sizing: border-box;
}

#shopDialog .input-group input {
  width: 100%;
  text-align: center;
  background: transparent;
  border: none;
  color: var(--primary-text-color);
  font-size: 18px;
  outline: none;
}

#shopDialog .input-group button {
  position: absolute;
  top: -3px;
  width: 30px;
  height: 30px;
  border-radius: 15px;
  box-sizing: border-box;
  border: 3px solid var(--red-color);
  background-color: var(--red-color-alpha);
  font-size: 24px;
  color: var(--red-color);
  font-weight: bold;
  line-height: 0px;
  text-indent: -1px;
  outline: none;
  transition: all 200ms ease-in-out;
}

#shopDialog .input-group button:hover {
  background-color: var(--red-color);
  color: var(--background-color);
}

#shopDialog .input-group div:nth-of-type(1) button {
  left: -3px;
}

#shopDialog .input-group div:nth-of-type(2) button {
  right: -3px;
}

#shopDialog .row-prices {
  display: none;
  grid-template-columns: 160px auto;
  gap: 20px;
}

#shopDialog .row-prices .input-group {
  margin: 12px 0;
}

#shopDialog .row-prices p {
  color: var(--primary-text-color);
  font-size: 16px;
  display: flex;
  height: 54px;
  align-items: center;
  text-align: center;
  justify-content: center;
}

#shopDialog .row-prices p small {
  font-size: 16px;
  color: var(--secondary-text-color);
}

body.shop-dialog-prices #shopDialog .row-prices {
  display: grid;
}

body.shop-dialog-prices #shopDialog .row:nth-of-type(4) {
  display: none;
}

#shopDialog .price {
  display: block;
  height: 30px;
  border: 3px solid var(--red-color);
  border-radius: 15px;
  box-sizing: border-box;
  padding: 0 8px;
  line-height: 24px;
  font-size: 18px;
  color: var(--primary-text-color);
}

#shopDialog .price-text,
#shopDialog .number-text {
  text-align: center;
  color: var(--primary-text-color);
  margin-top: 5px;
  font-size: 15px;
}

body.shop-dialog-prices #shopDialog .price {
  height: 32px;
  line-height: 25px;
  font-size: 16px;
}

body.shop-dialog-prices #shopDialog .price-text {
  display: none;
}

body > footer {
  position: fixed;
  bottom: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  height: 100px;
  background: linear-gradient(
    180deg,
    var(--background-color-alpha) 0%,
    var(--background-color) 40%
  );
}

@media only screen and (min-width: 480px) {
  body > .header {
    flex-direction: row;
    height: 80px;
    width: calc(100% - 50px);
    justify-content: space-between;
    position: -webkit-sticky;
    position: sticky;
    top: 0;
  }

  body > .header::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
    background-color: var(--background-color);
    z-index: -1;
  }

  body > .header header {
    font-size: 20px;
    font-weight: bold;
    min-width: 240px;
    margin: 0;
  }

  body > .header nav {
    margin: 0;
    padding: 0;
    width: -webkit-fit-content;
    width: -moz-fit-content;
    width: fit-content;
  }
}

@media only screen and (min-width: 560px) {
  body > .header nav > div {
    border: 0;
    width: -webkit-fit-content;
    width: -moz-fit-content;
    width: fit-content;
    overflow: visible;
  }
  
  body > .header nav a::before,
  body > .header nav a::after {
    display: none!important;
  }

  body > .header nav a:hover {
    text-decoration: underline;
  }

  body > .header nav a:nth-of-type(5) {
    display: initial;
  }

  body.services > .header nav a:nth-of-type(1),
  body.shop > .header nav a:nth-of-type(2) {
    text-decoration: underline;
  }

  body > aside {
    bottom: 25px;
  }

  body > footer {
    display: none;
  }
}

@media only screen and (min-width: 700px) {
  body > .header nav a:nth-of-type(3),
  body > .header nav a:nth-of-type(4) {
    display: initial;
  }

  body > aside {
    display: none;
  }
}