.spinner {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: inherit;
}

.spinner::after {
  width: 48px;
  height: 48px;
  border: 5px solid var(--color-grey);
  border-bottom-color: var(--color-red);
  border-radius: 50%;
  animation: rotation 1s linear infinite;
  content: '';
}

@keyframes rotation {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  outline: 0;
}

html * {
  font-family: 'Open Sans', sans-serif;
}

body {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 100vh;
  overflow-x: hidden;
}

main {
  width: 100%;
  height: auto;
}

a {
  color: var(--color-black);
}

button {
  background: none;
  border: none;
  cursor: pointer;
}

.wrapper {
  position: relative;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
}

.icon {
  fill: var(--color-white);
}

:root {
  --color-white: white;
  --color-black: black;
  --color-grey: #d7d7d7;
  --color-pink: #f8c3d2;
  --color-main-dark: #634d7f;
  --color-main-medium: #fceaff;
  --color-main-light: #fdf7ff;
  --color-icon: white;
  --color-bg-new: #0078ae;
  --color-bg-sale: #f9f871;
  --color-tag: #d7d7d7;
  --color-line: rgb(0 0 0 / 20.5%);
  --color-rating: #ffc364;
  --color-bg-text-block: #f6f6f6;
  --color-confirm: rgb(49 172 33);
  --color-error: rgb(236 110 110);
  --bg-header: var(--color-main-dark);
  --bg-footer: var(--color-main-dark);
}


#subheader {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  background: var(--color-main-medium);
  box-shadow: inset 0 0 0 1px hsl(0deg 0% 100% / 20%), 0 0 0 1px rgb(0 0 0 / 90%);
}

.subheader_menu {
  z-index: 3;
  width: 100%;
  list-style-type: none;
}

.subheader_menu__item {
  display: flex;
  align-items: center;
  height: 50px;
  padding: 0 1em;
  color: var(--color-black);
  text-decoration: none;
  box-shadow: 0px 1px 0px black;
}

[data-edit='baseCatalog'] {
  display: flex;
  align-items: center;
  padding: 0 1em;
  color: var(--color-white);
  cursor: pointer;
}

[data-edit='baseCatalog'] .icon {
  width: 23px;
  margin-right: 1em;
}

.navigation_menu__container {
  position: relative;
  background-color: var(--color-main-dark);
  box-shadow: 0px 1px 0px black;
}

.navigation_menu__container::after {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  height: 2px;
  content: '';
}

.open_navigation {
  display: flex;
  gap: 0.5em;
  font-size: 1em;
}

.burger_icon {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 23px;
  height: 2px;
  background: var(--color-white);
}

.burger_icon::before,
.burger_icon::after {
  position: absolute;
  width: 23px;
  height: 2px;
  background: var(--color-white);
  transition: all 200ms;
  content: '';
}

.burger_icon::before {
  top: -6px;
}

.burger_icon::after {
  bottom: -6px;
}

#navigation, #navigation2 {
  position: absolute;
  top: calc(100% + 1px);
  left: 0;
  z-index: 3;
  display: flex;
  height: auto;
  padding: 1em;
  color: var(--color-black);
  background: var(--color-white);
  box-shadow: rgb(255 255 255 / 20%) 0 0 0 1px inset, rgb(0 0 0 / 90%) 0 0 0 1px;
  transition: all 100ms ease-in-out;

  &::before {
    position: absolute;
    top: -50px;
    
    right: 100%;
    height: 50px;
    cursor: pointer;
    content: '';
  }

  &:hover {
    transform: translateY(0);
  }
}

.navigation_menu__container:hover .burger_icon {
  height: 0;
}

.navigation_menu__container:hover .burger_icon::before {
  transform: translateY(5px) rotate(45deg);
}

.navigation_menu__container:hover .burger_icon::after {
  transform: translateY(-5px) rotate(-45deg);
}

#header2 {
  position: sticky;
  top: 0;
  z-index: 9;
  align-items: center;
  padding: 0 1em;
  color: var(--color-white);
  column-gap: 1em;
  background: var(--color-main-dark);
  -ms-grid-columns: auto 1em 1fr 1em auto;
}

.logo-big {
  display: flex;
  width: 100%;
  max-width: 200px;
  height: 60px;
}

.logo-big .icon {
  width: 100%;
  max-width: 200px;
  height: 60px;
}

.user_actions {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: center;
  justify-content: center;
  height: 100%;
  -ms-grid-columns: 1fr 1fr 1fr;
}

.user_actions2 {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  align-items: center;
  justify-content: center;
  height: 100%;
  -ms-grid-columns: 1fr 1fr 1fr 1fr;
}

#headerSearchForm {
  & input {
    width: 100%;
    height: 30px;
    font-size: 1em;
    border: none;
    border-radius: 8px;
  }
}

[data-label='search'] {
  display: flex;
  align-items: center;
  width: 100%;
  height: 35px;
  padding: 0 0.5em;
  background: var(--color-white);
  border-radius: 8px;
}

[data-label='search'] .icon {
  width: 1em;
  height: 1em;
  fill: var(--color-black);
}

.user_actions__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 50px;
  color: var(--color-white);
  font-size: 0.9em;
  text-decoration: none;
  cursor: pointer;
}

.user_actions__item .icon {
  width: 23px;
  height: 23px;
  pointer-events: none;
}

#iconWishlist {
  position: relative;
}

#iconWishlist .icon {
  width: 27px;
}

#iconWishlist.active .icon {
  fill: var(--color-main-light);
}

.icon_wishlist::before {
  position: absolute;
  top: 7px;
  color: var(--color-black);
  font-weight: 700;
  font-size: 0.9em;
  content: attr(data-wishlist-count);
}

#iconCart {
  position: relative;
}

.icon_cart::before {
  position: absolute;
  top: 10px;
  color: var(--color-black);
  font-weight: 700;
  font-size: 0.9em;
  content: attr(data-shopping-cart-count);
}

.icon_cart::after {
  position: absolute;
  top: 100%;
  width: 100%;
  height: 10px;
  content: '';
}

.cart_header1 {
  position: absolute;
  top: 100%;
  right: -1em;
  z-index: 3;
  display: grid;
  width: 370px;
  height: auto;
  background: var(--color-main-dark);
  border: 5px solid var(--color-main-medium);
  border-radius: 10px 0 0 10px;
  transform: translateY(-10px);
  visibility: hidden;
  opacity: 0;
  filter: drop-shadow(-5px 4px 4px rgb(0 0 0 / 25%));
  transition: opacity 200ms ease-in-out, transform 200ms ease-in-out;
}

.cart_header__container:hover .cart_header1 {
  transform: translateY(0);
  visibility: visible;
  opacity: 1;
}

#userCabinet {
  display: flex;
  justify-content: center;
}


#footer {
  display: grid;
  width: 100%;
  height: 50px;
  height: auto;
  margin-top: auto;
  padding: 2em 2em 1em;
  color: var(--color-white);
  background: var(--color-main-dark);
}

.footer__title {
  margin-bottom: 1.5em;
  font-weight: normal;
  font-size: 1.2rem;
}

.footer_body {
  grid-template-areas: 'social links app';
  grid-template-columns: repeat(3, 1fr);
  gap: 1em;
  justify-content: space-around;
  width: 100%;
  padding-bottom: 80px;
}

.footer_social {
  display: grid;
  grid-area: social;
  grid-template-rows: auto 1fr;
}

.footer_social__link {
  display: flex;
  align-items: center;
  width: auto;
  height: 25px;
  margin-bottom: 0.5em;
  color: var(--color-white);
  font-weight: bold;
  font-size: 1em;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  text-decoration: none;
  background-repeat: no-repeat;
  background-size: 25px;

  & .icon {
    width: 25px;
    height: 25px;
    margin-right: 5px;
  }
}

/* .footer_social__vk {
  background-image: url('../../../../Public/img/svg/vk_logo.svg');
}

.footer_social__telegram {
  background-image: url('../../../../Public/img/svg/telegram_logo.svg');
} */

.footer_links {
  display: grid;
  grid-area: links;
  grid-template-rows: auto 1fr;
  align-items: start;
}

.footer_links__container {
  display: grid;
  gap: 0.5em;
}

.footer_links__link {
  color: var(--color-white);
}

.footer_app {
  grid-area: app;
  width: auto;
}

.footer_app__container {
  gap: 1em;
  width: auto;
  height: auto;
}

.footer_app__link {
  /* display: grid; */
  display: flex;
  align-items: center;
  width: 50%;
  min-width: 160px;
  height: auto;
  padding: 1em;
  color: var(--color-black);
  font-size: 0.8em;
  text-decoration: none;
  background-color: var(--color-main-light);
  background-repeat: no-repeat;
  background-position: 1em;
  background-size: 30px;
  border-radius: 8px;
  box-shadow: rgb(255 255 255 / 20%) 0 0 0 1px inset, rgb(0 0 0 / 90%) 0 0 0 1px;

  & strong {
    font-size: 1.1em;
  }

  & span {
    display: grid;
  }

  & .icon {
    width: 30px;
    height: 30px;
    margin-right: 8px;
    fill: var(--color-black);
  }
}

/* .footer_app__apple {
  background-image: url('../../../../Public/img/svg/apple_logo.svg');
}

.footer_app__android {
  background-image: url('../../../../Public/img/svg/android_logo.svg');
} */

.footer_bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding-top: 1em;
  font-size: 0.8em;
  border-top: var(--color-main-light) solid 1px;
}

.footer_bottom__links {
  display: flex;
  flex-wrap: wrap;
  gap: 1em;
}

.footer_bottom__link {
  color: var(--color-white);
}

.footer__social {
  grid-area: footer__social;
}

#popup {
  display: none;

  &.active {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    display: flex;
    width: 100%;
    height: 100%;
    background: hsl(0deg 0% 0% / 31%);
  }
}

[name='closePopup'] {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 17px;
  height: 17px;
  cursor: pointer;

  &::before,
  &::after {
    position: absolute;
    top: 50%;
    left: 50%;
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--color-black);
    opacity: 0.7;
    content: '';
  }

  &::before {
    transform: translate(-50%, -50%) rotate(45deg);
  }

  &::after {
    transform: translate(-50%, -50%) rotate(135deg);
  }

  &:hover {
    &::before,
    &::after {
      background-color: var(--color-main-dark);
    }

    &::before {
      transform: translate(-50%, -50%) rotate(45deg) scale(1.25);
    }

    &::after {
      transform: translate(-50%, -50%) rotate(135deg) scale(1.25);
    }
  }
}

[data-label='span'] {
  position: relative;
  display: flex;
  align-items: center;
  height: 2.5em;
  color: var(--color-black);
  background: var(--color-white);
  border-radius: 8px;
  box-shadow: rgb(67 71 85 / 27%) 0 0 0.25em, rgb(90 125 188 / 5%) 0 0.25em 1em;

  & .icon {
    width: 100%;
    max-width: 31px;
    height: 100%;
    padding: 0 0.5em;
    border-radius: 0 8px 8px 0;
    box-shadow: rgb(67 71 85 / 27%) 0 0 0.25em, rgb(90 125 188 / 5%) 0 0.25em 1em;
    fill: var(--color-black);
  }

  & [name='showPassword'] {
    height: 15px;
    margin-right: 10px;

    & svg {
      height: 100%;
      pointer-events: none;
    }

    & line {
      display: none;
    }

    &.show {
      & line {
        display: block;
      }
    }
  }

  & span {
    position: absolute;
    top: 50%;
    padding: 0.2em 0.5em 0;
    font-size: 1em;
    background: inherit;
    border-radius: 8px 8px 0 0;
    transform: translateY(-55%);
    transition: all 80ms ease-out;
    pointer-events: none;

    &.active {
      top: 0;
      font-size: 0.8em;
    }

    & em {
      color: var(--color-error);
    }
  }

  & input {
    width: 100%;
    height: 100%;
    padding-left: 8px;
    font-size: 1em;
    background: var(--color-white);
    border: none;
    border-radius: 8px 0 0 8px;

    &:-webkit-autofill,
    &:-webkit-autofill:hover,
    &:-webkit-autofill:focus {
      box-shadow: 0 0 0 1000px var(--color-white) inset;
      transition: background-color 5000s ease-in-out 0s;
    }

    &:focus ~ span,
    &:valid ~ span,
    &:not(:placeholder-shown) ~ span {
      top: 0;
      font-size: 0.8em;
    }

    &:valid ~ .icon {
      background: var(--color-confirm);
      fill: var(--color-white);
    }

    &:valid ~ span em {
      color: var(--color-confirm);
    }
  }

  &.invalid {
    /* stylelint-disable-next-line no-descending-specificity */
    & input {
      border: 1px solid var(--color-error);

      &:valid ~ .icon {
        background: var(--color-error);
      }

      &:valid ~ span em {
        color: var(--color-error);
      }
    }
  }
}

#signInForm {
  position: relative;
  display: grid;
  grid-template: repeat(5, 1fr) / 1fr auto;
  grid-template-areas:
    'text text'
    '. lock'
    '. lock'
    'button button'
    'link link';
  gap: 14px 10px;
  transform: translateX(-100%);
  transition: all 100ms ease-in-out;

  &.active {
    transform: translateX(0);
  }

  &.forget {
    transform: translateY(-100%);
  }

  & p {
    grid-area: text;
  }

  & .error {
    grid-area: error;
    text-align: center;
  }

  & button {
    grid-area: button;
  }

  & [name='forget'] {
    grid-area: link;
    align-self: center;
    text-align: center;
    cursor: pointer;

    &:hover {
      text-decoration: underline;
    }
  }
}

.sign_in_lock {
  display: flex;
  grid-area: lock;
  align-items: center;
  padding: 1em;
  background: var(--color-main-medium);
  border-radius: 8px;
  box-shadow: rgb(67 71 85 / 27%) 0 0 0.25em, rgb(90 125 188 / 5%) 0 0.25em 1em;

  & svg {
    width: 1em;
  }

  &.active {
    background: var(--color-confirm);
  }
}

#registerForm {
  display: grid;
  grid-template-rows: repeat(3, 1fr);
  gap: 14px;
  align-items: center;
  transform: translateX(0);
  transition: all 100ms ease-in-out;

  &.active {
    transform: translateX(-100%);
  }
}

#forgetForm {
  display: flex;
  flex-direction: column;
  gap: 14px;
  transform: translate(-200%, 100%);
  transition: all 100ms ease-in-out;

  &.active {
    transform: translate(-200%, 0);
  }

  &.register {
    transform: translate(-300%, 0);
  }
}

#forgetError {
  display: none;
  text-align: center;

  &.active {
    display: block;
  }
}

#registerAndLogin {
  display: grid;
  width: 370px;
  margin: auto;
}

#registerAndLoginContainer {
  position: relative;
  display: flex;
  height: 100%;
  overflow: hidden;
  background: var(--color-main-light);
  border-radius: 0 0 1em 1em;
}

.login__header {
  --transform: 0;

  position: relative;
  z-index: 3;
  display: flex;
  height: 50px;
  background: var(--color-main-medium);
  border-radius: 1em 1em 0 0;
  transition: all 100ms ease-in-out;

  &::before {
    position: absolute;
    top: 0;
    width: 50%;
    height: 100%;
    border-radius: 1em 1em 0 0;
    transform: translateX(var(--transform));
    transition: all 100ms ease-in-out;
    content: '';
  }
}

.login__menu {
  position: relative;
  width: 50%;
  font-weight: 600;
  font-size: 0.9em;
  text-align: center;
  cursor: pointer;

  &[name='signIn'] {
    border-radius: 1em 0 0;
  }

  &[name='register'] {
    border-radius: 0 1em;
  }
}

.login__item {
  flex-shrink: 0;
  width: 100%;
  height: 100%;
  padding: 2em;
  background: var(--color-main-light);
  border-radius: 0 0 1em 1em;
}

.login__button {
  width: 100%;
  height: 2.5em;
  color: var(--color-white);
  font-size: 1em;
  text-align: center;
  background: var(--color-main-dark);
  border: none;
  border-radius: 8px;

  &:disabled {
    cursor: not-allowed;
    opacity: 0.5;
  }
}

.top_banner {
  position: relative;
  width: 100%;
  height: auto;
  background: radial-gradient(circle, #5f9fbe 0, #a9d7e8 100%);
  aspect-ratio: 10/3;
}

.top_banner__image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.top_banner__container {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 38%;
  max-width: 700px;
  text-align: center;
  transform: translate(-50%, -50%);
}

.top_banner__title {
  display: flex;
  align-items: center;

  /* max-height: 174px; */
  margin-bottom: 50px;
  padding: 20px;
  font-weight: 700;
  font-size: 3em;
  text-transform: uppercase;

  & svg {
    width: 100%;
    max-height: 112px;
    fill: black;
  }
}

.phone_top_banner__container {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1em;
  text-align: center;
  transform: translate(-50%, -50%);
}

.phone_top_banner__title {
  display: flex;
  align-items: center;

  /* max-height: 174px; */
  margin-right: 50px;
  padding: 20px;
  font-weight: 700;
  font-size: 3em;
  text-transform: uppercase;

  & svg {
    width: 100%;
    max-height: 112px;
    fill: black;
  }
}

.phone_top_banner__content,
.phone_top_banner__title,
.top_banner__content,
.top_banner__title {
  width: 100%;
  background: var(--color-white);
  border-radius: 8px;
}

.top_banner__content {
  padding: 1em;
  font-size: 2em;
}

#categoryList h2 {
  display: flex;
  align-items: center;
  height: 50px;
  padding: 0 1rem;
  color: #202020;
  font-size: 1rem;
  text-transform: uppercase;
  background: #d8d6ec;
}

.category_list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  padding: 1rem;
}

.category_item__title {
  position: absolute;
  top: 50%;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 50px;
  font-size: 100%;
  text-align: center;
  background: #f9c3d2;
  box-shadow: 0 5px 15px rgb(0 0 0 / 35%);
  transform: translateY(-50%);
}

.category_item {
  position: relative;
  display: block;
  min-width: 200px;
  max-width: 419px;
  max-height: 419px;
  color: rgb(32 32 32);
  text-transform: uppercase;
  border-radius: 1em;
  aspect-ratio: 1 / 1;
}

.category_item__img {
  width: 100%;
  max-width: inherit;
  height: 100%;
  max-height: inherit;
  object-fit: cover;
  border-radius: 1em;
  box-shadow: rgb(255 255 255 / 20%) 0 0 0 1px inset, rgb(0 0 0 / 90%) 0 0 0 1px;
  box-shadow: rgb(0 0 0 / 35%) 0 5px 15px;
}

/* #test {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  display: flex;
  width: 100%;
  height: 100%;
  background: hsl(0deg 0% 0% / 31%);
} */

.loader {
  border: 8px solid #f3f3f3; /* Light grey */
  border-top: 8px solid var(--color-main-dark); /* Blue */
  border-radius: 50%;
  width: 60px;
  height: 60px;
  animation: spin 2s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}