html {
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
}

ul {
  list-style: none;
}

a {
  text-decoration: none;
}

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

*:focus {
  outline: transparent;
}

body,
html {
  width: 100%;
}

a,
button,
input[type="submit"] {
  cursor: pointer;
}

input[type="text"],
button {
  -webkit-appearance: none;
  -webkit-border-radius: 0;
}
@font-face {
  font-family: "Montserrat";
  src: url(/static/fonts/Montserrat-Regular.ttf);
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Montserrat";
  src: url(/static/fonts/Montserrat-Medium.ttf);
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: "Montserrat";
  src: url(/static/fonts/Montserrat-SemiBold.ttf);
  font-weight: 600;
  font-display: swap;
}

:root {
  --black: #000;
  --white: #fff;
  --gray: #888;
  --shadow_hover: #82879cbd;
  --shadow: #82879c3b;
  --background_cart: #f5f5f7;
  --orange: #ff9b83;
}

.cart_count.active,
.favs_count.active {
  color: #fff;
  font-size: 0.65rem;
  font-weight: 500;
  line-height: 100%;
  padding: 2px 4px;
  border-radius: 10px;
  background: var(--orange);
  position: absolute;
  left: 16px;
  top: -4px;
  z-index: 1;
}

.system_message {
  align-items: center;
  justify-content: center;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  transition: all ease-in 0.4s;
  background: #fff;
  border-radius: 10px;
  padding: 20px;
  min-height: 100px;
  box-shadow: 0 10px 10px rgba(0, 0, 0, 0.2);
  z-index: 31;
  width: 100%;
  max-width: 400px;
  text-align: center;
  display: flex;
}

.system_message a {
  margin: 0 5px;
  color: cornflowerblue;
  text-decoration: underline;
}

.system_message .close {
  position: absolute;
  color: red;
  right: 8px;
  top: 3px;
  border: none;
  background: none;
  font-size: 1.125rem;
}

main {
  max-width: 1230px;
  width: 100%;
  margin: 0 auto;
  padding: 0 15px;
}

main section {
  margin-bottom: 65px;
}

#burger {
  min-width: 25px;
  max-width: 25px;
  width: 100%;
  height: 18px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  justify-content: space-between;
  cursor: pointer;
}

#burger span {
  height: 2px;
  width: 100%;
  display: block;
  background-color: var(--black);
  opacity: 1;
  position: relative;
  transition: all 0.3s;
}

#burger.active span:nth-child(1) {
  transform: rotate(45deg);
  top: 8px;
}

#burger.active span:nth-child(2) {
  opacity: 0;
}

#burger.active span:nth-child(3) {
  transform: rotate(-45deg);
  bottom: 8px;
}

.headline a {
  display: flex;
  justify-content: flex-start;
  gap: 5px;
  align-items: center;
  text-align: start;
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--black);
  margin-bottom: 20px;
}

.headline span {
  display: block;
  background: url(/static/images/arrow_right.svg);
  height: 25px;
  width: 11px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.headline:hover {
  opacity: 0.7;
}

.headline:hover span {
  opacity: 0.7;
}

body {
  font-family: "Montserrat", sans-serif;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-variant-numeric: lining-nums;
}

.head {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  align-items: center;
  max-width: 1230px;
  margin: 0 auto;
  padding: 15px;
  position: relative;
  transition: all 0.3s ease;
}

.head > div {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  align-items: center;
}

.h_list {
  position: absolute;
  top: -999999px;
  left: 0;
  background-color: var(--white);
  z-index: 1;
  flex-direction: column;
  align-items: flex-start !important;
  padding: 15px;
  box-shadow: 4px 4px 8px 0px rgba(34, 60, 80, 0.2);
  border-radius: 4px;
  min-width: 100%;
  max-height: 0;
  transition: all 0.3s ease;
}

.h_list.active {
  top: 70px;
  transition: all 0.3s ease;
  z-index: 10;
  max-height: 1000px;
}

.h_list a:hover {
  color: #424242;
  text-shadow: 1px -1px 1px #000;
}

.head a {
  color: var(--black);
}

#h_logo {
  position: relative;
  height: 40px;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

#h_logo img {
  max-width: 80px;
  width: 100%;
  height: auto;
}

#enter {
  display: block;
  font-size: 0.85rem;
  border: 1px solid var(--black);
  padding: 10px;
  max-width: 90px;
  padding: 6px 8px;
  border-radius: 4px;
  position: relative;
}

#enter:hover {
  background-color: var(--black);
  color: var(--white);
  box-shadow: 4px 4px 8px 0px rgba(34, 60, 80, 0.2);
}

#cart {
  position: relative;
  padding-left: 10px;
  width: 28px;
  height: 26px;
}

#cart:after {
  content: "";
  background-image: url(/static/images/cart.svg);
  background-repeat: no-repeat;
  background-size: cover;
  width: 26px;
  height: 26px;
  display: block;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

#cart:hover:after {
  background-image: url(/static/images/cart_hover.svg);
}

#favorite {
  position: relative;
  padding-left: 10px;
  width: 26px;
  height: 26px;
}

#favorite:after {
  content: "";
  background-image: url(/static/images/heart.svg);
  background-repeat: no-repeat;
  background-size: cover;
  width: 26px;
  height: 24px;
  display: block;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

#favorite:hover:after {
  background-image: url(/static/images/heart_full.svg);
}

#header_search {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-width: 290px;
  height: 30px;
  position: absolute;
  top: -99999px;
  left: 50%;
  transform: translateX(-50%);
}

#header_search.show {
  top: 60px;
  background-color: white;
  z-index: 2;
  max-width: 100%;
}

#header_search.show input[type="text"] {
  width: calc(100% - 90px)
}

#header_search:hover {
  opacity: 0.8;
}

#header_search input[type="text"] {
  font-size: 0.85rem;
  padding: 5px;
  border: 1px solid var(--black);
  height: 100%;
  border-radius: 4px 0 0 4px;
}

#search_btn {
  background-color: #fff;
  filter: invert(1);
  color: transparent;
  height: 100%;
  border: none;
  width: 55px;
  border-radius: 0 4px 4px 0;
  background-image: url(/static/images/search.svg);
  background-size: 25px;
  background-position: center;
  background-repeat: no-repeat;
}

#show_search {
  display: block;
  background-color: white;
  filter: invert(1);
  color: transparent;
  height: 30px;
  border: none;
  width: 45px;
  border-radius: 4px;
  background-image: url(/static/images/search.svg);
  background-size: 25px;
  background-position: center;
  background-repeat: no-repeat;
  min-width: 26px;
}

#show_search:hover {
  opacity: 0.8;
}

footer {
  max-width: 1230px;
  padding: 15px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 15px;
}

footer a {
  color: var(--black);
}

footer a:hover {
  color: #424242;
  text-shadow: 1px -1px 1px rgb(0 0 0);
}

footer ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.f_info li {
  width: 100%;
}

.f_info li:first-child a {
  display: block;
  height: 30px;
  max-width: 160px;
  position: relative;
  margin-bottom: 15px;
}

.f_info a img {
  position: absolute;
  top: 0;
  left: 0;
}

.f_info a:hover img {
  transform: scale(1.1);
}

#to-top {
  display: none;
  position: fixed;
  left: 2vw;
  bottom: 77px;
  width: 40px;
  height: 40px;
  background-color: #c6803c;
  color: transparent;
  opacity: 0.5;
  filter: invert(1);
  transition: all 0.3s;
  border-radius: 10px;
  border: none;
  z-index: 10;
}

#to-top svg {
  transform: scale(0.7);
}

#to-top:hover {
  opacity: 1;
  filter: invert(1) brightness(1.5);
}

@media all and (min-width: 360px) {
  #h_logo img {
    max-width: 160px;
  }
}

@media all and (min-width: 450px) {
  #enter {
    padding: 6px 15px;
  }

  .h_list {
    min-width: 300px;
  }

  #favorite {
    width: 24px;
    height: 22px;
  }

  #favorite:after {
    width: 24px;
    height: 22px;
  }

  #cart {
    width: 24px;
    height: 24px;
  }

  #cart:after {
    width: 24px;
    height: 24px;
  }
}

@media all and (min-width: 630px) {
  #show_search {
    display: none;
  }
  #header_search {
    top: 0;
    left: 0;
    transform: translate(0, 0);
    position: relative;
  }

  .head {
    gap: 30px;
  }
}

@media all and (min-width: 840px) {
  .h_list {
    position: relative;
    top: 0;
    left: 0;
    background-color: transparent;
    flex-direction: row;
    padding: 0;
    box-shadow: none;
    border-radius: 0;
    justify-content: flex-start !important;
    min-width: inherit;
  }

  #burger {
    display: none;
  }
}

@media all and (min-width: 1100px) {
  #h_logo {
    position: absolute;
  }
}
main form {
  width: 100%;
  max-width: 400px;
  border-radius: 15px;
  background-color: #fff;
  box-shadow: 0 10px 15px #aaa;
  padding: 20px;
  margin: 30px auto;
}

main form input[type="text"],
main form input[type="password"] {
  width: 100%;
  border: 1px solid #ddd;
  padding: 15px;
  border-radius: 15px;
  margin: 10px 0;
  font-size: 1rem;
}

main form input[type="submit"],
main form a {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1em;
  font-weight: 700;
  color: #fff;
  width: 160px;
  height: 50px;
  margin: 10px 0;
  border-radius: 15px;
  background-color: #757575;
  border: none;
  transition: all 0.3s;
}

main form input[type="submit"]:hover,
main form a:hover {
  background-color: #353535;
}
