.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
}
.header_scrolled {
  background-color: var(--white);
}
.header__container {
  display: flex;
  flex-flow: row wrap;
  align-items: center;
  column-gap: 1rem;
  row-gap: 0.75rem;
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
  justify-content: center;
}
.header__hamburger {
  display: flex;
  justify-content: flex-start;
  flex: 1 1 0;
}
.header__hamburger_min {
  flex: 0.6 1 0;
}
.header__logo {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}
.header__logo img {
  display: block;
  max-width: 1.875rem;
  max-height: 1.75rem;
  object-fit: contain;
  object-position: center;
}
.header__search {
  order: 1;
  width: 100%;
}
.header__info {
  display: flex;
  align-items: center;
}
.header__contacts {
  grid-area: contacts;
}
.header__contact {
  display: block;
  color: var(--black);
  text-decoration: none;
  font-size: 0.75rem;
  line-height: 150%;
  transition: var(--transition);
  white-space: nowrap;
}
.header__contact:focus {
  opacity: 0.6;
}
.header__group {
  flex: 1 1 0;
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}
.header__menu {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: var(--white);
  z-index: 1;
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.4s ease, opacity 0.4s ease;
}
.header__menu_active {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.header__menu_closing {
  transition: transform 0.4s ease, opacity 5s ease;
}
.header__personal {
  position: absolute;
  top: 100%;
  right: 0;
  padding: 0;
  width: 100%;
  z-index: 2;
  display: none;
}
.header__personal_active {
  display: block;
}
.header__personal .personal-panel {
    gap: .8rem;
    border-radius: 0;
}
.header__personal .personal-panel__line {
  padding: 0;
  margin: 0;
}

@media (hover: hover) {
  .header__contact:hover {
    opacity: 0.6;
  }
}
.hamburger {
  border: none;
  background-color: transparent;
  width: 1.5rem;
  height: 2.5rem;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-form {
  background-color: var(--white);
  border: 0.0625rem solid var(--grey-1);
  width: 100%;
  border-radius: 0.75rem;
  padding: 0.5rem 0.75rem;
  position: relative;
    transition: box-shadow 0.3s;
}

.search-form:focus-within{
    /*box-shadow: 0 0 0 3px #E3E6ED;*/
    box-shadow: 0 0.25rem 1.25rem 0 var(--shadow-color);
}

.search-form:hover{
    /*box-shadow: 0 0 0 3px #E3E6ED;*/
    box-shadow: 0 0.25rem 1.25rem 0 var(--shadow-color);
    box-shadow: 0px 0px 20px 0px #1211271A;
}

.search-form.search-form_active:focus-within{
    box-shadow: 0 0.25rem 1.25rem 0 var(--shadow-color);
    box-shadow: 0px 0px 20px 0px #1211271A;
}

.search-form_active {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-color: transparent;
  box-shadow: 0 0.25rem 1.25rem 0 var(--shadow-color);
    box-shadow: 0px 0px 20px 0px #1211271A;
}
.search-form__group {
  display: flex;
  gap: 0.625rem;
  align-items: center;
}
.search-form__input {
  border: none;
  flex: 1 1 0;
  outline: none;
}
.search-form__input::placeholder {
  color: var(--black);
}
.search-form__close {
  border: none;
  background-color: transparent;
  padding: 0;
  display: none;
}
.search-form__close svg {
  vertical-align: middle;
}

.search-list {
  display: none;
  position: absolute;
  background-color: var(--white);
  left: -0.0625rem;
  right: -0.0625rem;
  top: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
  border-bottom-left-radius: 0.75rem;
  border-bottom-right-radius: 0.75rem;
  box-shadow: 0 1rem 1.25rem 0 var(--shadow-color);
  max-height: 17.8125rem;
  overflow: auto;
}
.search-list__item_empty {
  padding: 0.625rem;
}
.search-list__link {
  width: 100%;
  display: flex;
  gap: 0.625rem;
  padding: 0.5rem 0.75rem;
  text-decoration: none;
  color: var(--black);
  justify-content: space-between;
}

.search-list__link:hover, .search-list__link:focus{
    background-color: #F5F5F7;
}

/*.search-list__link:focus {*/
/*  color: var(--primary-hover);*/
/*}*/
.search-list__category {
  color: var(--grey-2);
}

@media (hover: hover) {
  .search-list__link:hover {
    color: var(--black);
  }
}
.menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1rem;
  border-bottom: 0.0625rem solid var(--grey-1);
}
.menu-header__logo {
  display: flex;
}
.menu-header__close {
  --grey-2: var(--black);
  padding: 0;
  width: 2.5rem;
  height: 2.5rem;
  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
}

.menu {
  display: flex;
  list-style: none;
  flex-direction: column;
  gap: 2rem;
  margin: 0;
  padding: 1.5rem 1.125rem;
  max-height: calc(100vh - 6.25rem);
  overflow: auto;
}
.menu__item {
  position: relative;
}
.menu__item:focus .menu__link {
  opacity: 0.6;
}
.menu__link {
  display: flex;
  align-items: center;
  color: var(--black);
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
  font-weight: 600;
}

.menu__arrow{
    transition: .5s;
}

@media (hover: hover) {
  .menu__item:hover .menu__link {
    opacity: 0.6;
  }

    .menu__item:hover .menu__link .menu__arrow{
        transform: translateY(2px);
        opacity: .6;
    }
}
.animate-menu-item {
  opacity: 0;
  transform: translateY(-1.25rem);
  animation: slideDown 0.3s forwards;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-1.25rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.submenu-container {
  position: relative;
  display: none;
  height: 0;
  opacity: 0;
  z-index: 1;
}

.submenu {
  position: relative;
  padding: 0.75rem 0 0 0;
  list-style: none;
  margin: 0 0 -1rem 0;
  width: 100%;
}
.submenu__link {
  display: flex;
  gap: 1rem;
  align-items: center;
  text-decoration: none;
  padding: 0.75rem;
}
.submenu__icon {
  max-width: 1.5rem;
  max-height: 1.5rem;
  object-fit: contain;
  object-position: center;
}
.submenu__title {
  font-weight: 600;
  color: var(--black);
}
.submenu__description {
  display: block;
  font-weight: 400;
  color: var(--grey-2);
}

.third-menu-container {
  display: none;
  margin: 1.625rem 2.75rem 1.625rem 0.75rem;
  padding: 0 0 0 1.5rem;
  border-left: 0.0625rem solid var(--grey-1);
  position: relative;
  list-style: none;
}

.third-menu {
  display: none;
}
.third-menu__item {
  margin-top: 0.75rem;
}
.third-menu__item:first-child {
  margin-top: 0;
}
.third-menu__link {
  color: var(--black);
  text-decoration: none;
  white-space: nowrap;
  width: 100%;
  display: block;
}
.third-menu__link:focus {
  color: var(--primary-hover);
}

@media (hover: hover) {
  .third-menu__link:hover {
    color: var(--primary-hover);
  }
}
.shopping-cart {
  position: relative;
}
.shopping-cart__link {
  position: relative;
  text-decoration: none;
  display: flex;
  width: 2.5rem;
  height: 2.5rem;
  align-items: center;
  justify-content: center;
}
.shopping-cart__link:focus, .shopping-cart__link:hover,
.header-login__icon.header-login__icon_visible:focus, .header-login__icon.header-login__icon_visible:hover{
  /*--black: var(--primary-hover);*/
    background-color: #fff;
    border-radius: 50%;
}
.shopping-cart__count {
  position: absolute;
  background-color: var(--primary-hover);
  color: var(--white);
  font-size: 0.75rem;
  line-height: 1.125rem;
  padding: 0 0.1875rem;
  height: 1.125rem;
  min-width: 1.125rem;
  border-radius: 50%;
  top: -0.1875rem;
  right: -0.125rem;
}
.shopping-cart__count_hidden {
  display: none;
}

@media (hover: hover) {
  .shopping-cart:hover .modal-cart {
    display: flex;
  }
  .shopping-cart__link:hover {
    /*--black: var(--primary-hover);*/
  }

    .shopping-cart:hover .modal-cart:has(.modal-cart__products-empty){
        padding: 15px 24px 16px;
        border-radius: 12px;
        z-index: 5;
    }
}
.modal-cart {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  background-color: var(--white);
  padding: 1rem;
  width: 100%;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 100vh;
  overflow: auto;
  display: none;
  z-index: 1;
    box-shadow: 0 0 1.25rem 0 #1211271A;
}
.modal-cart.modal-cart_active {
  display: flex;
}

.modal-cart:has(.modal-cart__products-empty) {
    left: auto;
    top: auto;
    right: 1rem;
    width: fit-content;
    flex-wrap: nowrap;
    padding: 15px 24px 16px;
    border-radius: 12px;
    z-index: 5;
    margin-top: 6px;
    flex-direction: row-reverse;
}
.modal-cart hr {
  width: 100%;
  margin: 0;
  border: none;
  border-top: 0.0625rem solid var(--grey-1);
}
.modal-cart__close {
  border: none;
  background-color: transparent;
  align-self: flex-end;
  padding: 0;
  display: flex;
}
.modal-cart__notification {
  background-color: var(--notification);
  border-radius: 0.625rem;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.modal-cart__products {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.modal-cart__price {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}
.modal-cart__products-empty{
    font-weight: 400;
}
.modal-cart:has(.modal-cart__products-empty){
    white-space: nowrap;
    padding-left: 24px;
    padding-right: 24px;
}



.modal-product {
  display: flex;
  gap: 0.75rem;
}
.modal-product__image {
  display: flex;
}
.modal-product__image img {
  width: 9.875rem;
  height: 7.9375rem;
  object-fit: cover;
  object-position: center;
  border-radius: 0.375rem;
}
.modal-product__info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.75rem;
  flex: 1 1 0;
}
.modal-product__title {
  color: var(--black);
  text-decoration: none;
  transition: var(--transition);
}
.modal-product__title:focus {
  color: var(--primary-hover);
}
.modal-product__description {
  margin: 0.375rem 0 0 0;
}
.modal-product__group {
  display: flex;
  align-items: center;
  justify-content: space-between;
  column-gap: 0.75rem;
  flex-flow: row wrap;
}
.modal-product__text {
  color: var(--grey-2);
}

@media (hover: hover) {
  .modal-product__title:hover {
    color: var(--primary-hover);
  }
}
.delivery-notification {
  background-color: var(--grey);
  border-radius: 0.625rem;
  padding: 1rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}
.delivery-notification__group {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}
.delivery-notification__progress {
  background-color: var(--grey-1);
  border-radius: 0.1875rem;
  height: 0.375rem;
  flex: 1 1 0;
  position: relative;
}
.delivery-notification__indicator {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  border-radius: 0.1875rem;
  background: linear-gradient(90deg, rgba(52, 125, 248, 0.9) 5.05%, rgba(13, 153, 255, 0.9) 44.78%, rgba(61, 173, 255, 0.9) 71.97%);
}
.delivery-notification__text {
  display: block;
  color: var(--grey-2);
}
.delivery-notification__text_active {
  color: var(--primary);
}

.header-login__button {
  display: none;
}
.header-login__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 2.5rem;
  background-color: transparent;
  border: none;
  padding: 0;
}

@media (min-width: 22.5rem) {
  .header__logo img {
    max-width: 3.25rem;
  }
  .hamburger {
    width: 2.5rem;
  }
  .header-login__icon {
    width: 2.5rem;
  }
}
@media (min-width: 48rem) {
  .header__container {
    padding-top: 0.9375rem;
    padding-bottom: 0.9375rem;
  }
  .header__hamburger {
    order: -1;
    flex: none;
    margin-right: 1.25rem;
  }
  .header__group {
    flex: none;
    margin-left: 1.25rem;
  }
  .header__contact {
    font-size: 1rem;
  }
  .header__login {
    position: relative;
  }
  .header__personal {
    width: auto;
    min-width: 18.375rem;
  }

  .header__personal .personal-panel{
      border-radius: 0.75rem;
      box-shadow: 0 0 1.25rem 0 #1211271A;
  }
  .header__personal .personal-panel .personal-panel__container {
      overflow: hidden;
  }
  .search-form {
    width: auto;
    order: -1;
    flex: 1 1 0;
    margin-right: 1.25rem;
  }

}
@media (min-width: 64rem) {
  .header__group {
    gap: 1.5rem;
  }
  .header__logo {
    flex: 0.57 1 0;
  }
  .header__info {
    flex: 1 1 0;
  }
  .header-login__icon {
    display: none;
  }
  .header-login__icon_visible {
    display: flex;
  }
  .header-login__button {
    display: flex;
    width: 4.5625rem;
    height: 2.5rem;
    font-size: 0.75rem;
    border-radius: 0.375rem;
    padding: 0;
  }
  .search-form {
    flex: none;
    width: 29.0625rem;
  }
  .modal-cart {
    position: absolute;
    top: 100%;
    right: 0;
    left: auto;
    width: 26.25rem;
    box-shadow: 0 0 1.25rem 0 var(--shadow-color);
    border-radius: 0.75rem;
    max-height: calc(100vh - 6.25rem);
      margin-top: 6px;
  }
  .modal-cart__close {
    display: none;
  }

    .modal-cart:has(.modal-cart__products-empty){
        width: fit-content;
        right: 0;
    }
}
@media (min-width: 80rem) {
  .header__container {
    column-gap: 1.5rem;
    row-gap: 0;
    padding-top: 0;
    padding-bottom: 0;
    flex-flow: row nowrap;
  }
  .header__hamburger {
    display: none;
  }
  .header__logo {
    flex: none;
  }
  .header__info {
    justify-content: flex-end;
    flex: 1 1 0;
    height: 5rem;
  }
  .header__contacts {
    padding-left: 1.5rem;
    border-left: 0.0625rem solid var(--grey-2);
    margin-left: 1.875rem;
  }
  .header__contact {
    font-size: inherit;
  }
  .header__group {
    flex: none;
  }
  .header__menu {
    display: block;
    position: relative;
    top: auto;
    right: auto;
    bottom: auto;
    left: auto;
    background-color: transparent;
    transform: none;
    opacity: 1;
    pointer-events: auto;
  }
  .header__menu_closing {
    transition: none;
  }
  .menu-header {
    display: none;
  }
  .menu {
    flex-direction: row;
    gap: 1.5rem;
    align-items: center;
    padding: 0;
    max-height: none;
    overflow: visible;
  }
  .menu__item {
    padding: 0.5rem 0;
  }
  .menu__link {
    font-weight: 400;
  }
  .submenu-container {
    display: none;
    position: absolute;
    top: 100%;
    left: -3.75rem;
    max-height: none;
    height: auto;
    opacity: 1;
    transition: none;
  }
  .submenu-container__bg {
    width: 100%;
    height: 100%;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    position: absolute;
    box-shadow: 0 0 1.25rem 0 var(--shadow-color);
    backdrop-filter: blur(1.25rem);
    background-color: rgba(255, 255, 255);
    border-radius: 0.75rem;
  }


    .submenu {
    min-width: 19.5625rem;
    width: auto;
    padding: 0.75rem 0;
    margin: 0;
  }
  .submenu__item {
    margin-top: 1rem;
    padding: 0 0.75rem;
  }
  .submenu__item:first-child {
    margin-top: 0;
  }
  .submenu__item_active .submenu__link {
    background-color: var(--grey);
  }
  .submenu__link {
    min-height: 4.5rem;
    border-radius: 0.75rem;
    transition: var(--transition);
  }
  .search-form {
    width: auto;
    order: initial;
    flex: 1 1 0;
    margin: 0;
  }
}
@media (min-width: 103.75rem) {
  .header__wrapper {
    max-width: 120rem;
    margin: 0 auto;
    position: relative;
  }
  .header__container {
    justify-content: space-between;
    gap: 2.5rem;
  }
  .header__logo {
    position: absolute;
    left: 2.5rem;
  }
  .header__logo img {
    max-width: 10.875rem;
    max-height: 2.125rem;
  }
  .header__search {
    order: inherit;
  }
  .header__contacts {
    margin-left: 2.3125rem;
  }
  .header__group {
    position: absolute;
    right: 1.875rem;
  }
  .menu {
    gap: 2.5rem;
  }
  .search-form {
    max-width: 29.0625rem;
  }
}
