:root {
  --mobile-header-height: 96px;
}

.mobile-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1100;
  height: 96px;
  background: #fff;
  transform: translate3d(0, 0, 0);
  transition: transform 0.35s ease, background-color 0.2s ease, box-shadow 0.2s ease;
  will-change: transform;
}

.mobile-header.is-hidden {
  transform: translate3d(0, -100%, 0);
  pointer-events: none;
}

body.mobile-menu-open .mobile-header,
body.mobile-menu-open .mobile-header.is-hidden {
  transform: translate3d(0, 0, 0);
  pointer-events: auto;
}

.mobile-header__inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  height: 100%;
  padding: 20px;
  box-sizing: border-box;
}

.mobile-header__logo {
  display: block;
  flex-shrink: 0;
  line-height: 0;
}

.mobile-header__logo img {
  display: block;
  width: 56px;
  height: 56px;
  border-radius: 0;
}

.mobile-header__burger {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 56px;
  height: 56px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: #ffc601;
  cursor: pointer;
  flex-shrink: 0;
}

.mobile-header__burger-line {
  display: block;
  width: 22px;
  height: 3px;
  border-radius: 999px;
  background: #233140;
}

.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 1200;
}

.mobile-nav__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(35, 49, 64, 0.45);
}

.mobile-nav__panel {
  position: absolute;
  inset: 0;
  max-height: 324px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 76px 20px;
  background: #ffc601;
  border-radius: 0 0 50px 50px;
  box-sizing: border-box;
}

.mobile-nav__close {
  position: absolute;
  top: 20px;
  right: 20px;
  display: block;
  width: 56px;
  height: 56px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  line-height: 0;
}

.mobile-nav__close img {
  display: block;
  width: 56px;
  height: 56px;
}

.mobile-nav__list {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mobile-nav__link {
  font-family: "Cocomat Pro", sans-serif;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  color: #233140;
  text-decoration: none;
  text-align: center;
}

/* Обводка только у пункта "Товар за 1 рубль" */
.mobile-nav__link[href="#promocode-gift"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 22px;
  border: 2px solid #233140;
  border-radius: 50px;
  box-sizing: border-box;
  white-space: nowrap;
}

.mobile-nav__link.is-active {
  opacity: 0.55;
}

body.mobile-menu-open {
  overflow: hidden;
}

body.mobile-menu-open .mobile-header__burger {
  visibility: hidden;
}

body.has-mobile-header {
  padding-top: var(--mobile-header-height);
}

body.has-mobile-header.homepage .home-logo--mobile {
  display: none !important;
}

@media (min-width: 62rem) {
  body.has-mobile-header {
    padding-top: 0;
  }
}

@media (max-width: 61.999rem) {
  body.catalog-page:not(.catalog-page--index).has-mobile-header .main-catalog .page-container {
    padding-top: 0;
    padding-bottom: 20px;
  }
}
/* Main mobile menu: shop navigation lives in the bottom dock. */
.mobile-nav:not(.mobile-nav--logistics):not(.mobile-nav--business) .mobile-nav__panel {
  bottom: auto;
  max-height: calc(100vh - 20px);
  max-height: calc(100dvh - 20px);
  padding-bottom: 38px;
  overflow-y: auto;
}

/* Mobile page start and breadcrumbs match the personal account. */
@media (max-width: 61.999rem) {
  body.has-mobile-header main .site-breadcrumbs {
    box-sizing: border-box;
    min-width: 0;
    margin: 0 0 22px;
    padding: 0;
    gap: 12px;
    justify-content: flex-start;
    text-align: left;
    font-family: "Cocomat Pro", sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
    letter-spacing: normal;
    color: #7c8793;
  }
  body.has-mobile-header main .site-breadcrumbs > a,
  body.has-mobile-header main .site-breadcrumbs > span {
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
    color: inherit;
  }
  body.has-mobile-header main .site-breadcrumbs > a:hover {
    color: #233140;
  }
  /* These two page families are full-bleed; other pages already have gutters. */
  body.has-mobile-header .main-journal .site-breadcrumbs,
  body.has-mobile-header .about-page__head .site-breadcrumbs {
    padding-inline: 20px;
  }
  body.has-mobile-header .vv-account,
  body.has-mobile-header main .vv-legal-page {
    padding-top: 0;
  }
  /* The old -40px adjustment is admin-only; do not shift the actual header. */
  body.has-mobile-header.admin-panel-visible .main-about {
    margin-top: 0;
  }
}

/* The active account section is indicated by its background, not a checkmark. */
@media (max-width: 700px) {
  body.has-mobile-header .vv-account__mobile-panel .vv-account__nav > a[aria-current]::after {
    content: none;
  }
}

/* A brief mobile account-menu hint, repeated on a two-second cycle. */
@media (max-width: 700px) {
  body.has-mobile-header .vv-account__mobile-toggle {
    padding-block: 12px;
  }
  body.has-mobile-header .vv-account__mobile-toggle > svg {
    box-sizing: border-box;
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    padding: 6px;
    border-radius: 50%;
    background: #ffc601;
    color: #233140;
    transform-origin: center;
  }
  body.has-mobile-header .vv-account__mobile-menu[open] > .vv-account__mobile-toggle > svg {
    animation: none;
    transform: rotate(180deg);
  }
}

@media (max-width: 700px) and (prefers-reduced-motion: no-preference) {
  body.has-mobile-header .vv-account__mobile-menu:not([open]) > .vv-account__mobile-toggle > svg {
    animation: vv-account-arrow-hint 2s ease-in-out infinite;
  }
}

@keyframes vv-account-arrow-hint {
  0%, 30%, 100% { transform: rotate(0deg); }
  5% { transform: rotate(-12deg); }
  10% { transform: rotate(12deg); }
  15% { transform: rotate(-9deg); }
  20% { transform: rotate(6deg); }
}

@media (max-width: 700px) and (prefers-reduced-motion: reduce) {
  body.has-mobile-header .vv-account__mobile-toggle > svg {
    animation: none;
    transition: none;
  }
}
