.site-header {
  gap: 18px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.header-account-link {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  border: 1px solid rgba(245, 207, 120, 0.46);
  border-radius: 50%;
  color: #1a1104;
  background: linear-gradient(145deg, #ffe7a7, var(--gold-2) 48%, var(--gold));
  box-shadow: 0 9px 26px rgba(214, 162, 71, 0.23), inset 0 1px 0 rgba(255, 255, 255, 0.48);
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.header-account-link svg,
.cart-icon {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.header-account-link:hover,
.header-account-link:focus-visible {
  outline: none;
  transform: translateY(-1px);
  filter: brightness(1.05);
  box-shadow: 0 12px 30px rgba(214, 162, 71, 0.33), inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.header-menu {
  position: relative;
}

.menu-toggle {
  display: grid;
  place-content: center;
  gap: 5px;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.menu-toggle:hover,
.menu-toggle:focus-visible {
  border-color: rgba(245, 207, 120, 0.55);
  background: rgba(214, 162, 71, 0.13);
  outline: none;
  transform: translateY(-1px);
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.header-menu.open .menu-toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.header-menu.open .menu-toggle span:nth-child(2) {
  opacity: 0;
}

.header-menu.open .menu-toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.header-actions .cart-button {
  position: relative;
  min-height: 48px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.header-actions .cart-button:hover,
.header-actions .cart-button:focus-visible {
  border-color: rgba(245, 207, 120, 0.55);
  background: rgba(214, 162, 71, 0.13);
  outline: none;
  transform: translateY(-1px);
}

.cart-icon {
  width: 20px;
  height: 20px;
}

.menu-panel {
  position: absolute;
  top: calc(100% + 13px);
  right: 0;
  z-index: 40;
  display: grid;
  gap: 6px;
  width: 280px;
  padding: 12px;
  border: 1px solid rgba(245, 207, 120, 0.24);
  border-radius: 20px;
  background: rgba(12, 10, 7, 0.98);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.58);
  backdrop-filter: blur(20px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-8px) scale(0.98);
  transform-origin: top right;
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
}

.header-menu.open .menu-panel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.menu-label {
  margin: 2px 8px 6px;
  color: var(--gold-2);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.menu-panel a,
.menu-panel-button {
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 100%;
  padding: 13px 14px;
  border: 1px solid transparent;
  border-radius: 14px;
  color: var(--text);
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.menu-panel a:hover,
.menu-panel a:focus-visible,
.menu-panel-button:hover,
.menu-panel-button:focus-visible {
  border-color: rgba(245, 207, 120, 0.18);
  background: rgba(245, 207, 120, 0.08);
  outline: none;
  transform: translateX(2px);
}

.menu-panel strong {
  font-size: 0.96rem;
}

.menu-panel small {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.4;
}

@media (max-width: 720px) {
  .site-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "brand actions"
      "nav nav";
    align-items: center;
    gap: 10px 12px;
    padding: 10px 12px 9px;
    border-radius: 25px;
    background: rgba(8, 7, 5, 0.9);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.42);
  }

  .site-header > .brand {
    grid-area: brand;
    min-width: 0;
    gap: 8px;
  }

  .site-header > .brand strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .site-header > .main-nav {
    grid-area: nav;
    order: initial;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
    gap: 6px;
    padding: 8px 0 0;
    border-top: 1px solid rgba(245, 207, 120, 0.14);
  }

  .site-header > .main-nav a {
    display: block;
    padding: 8px 6px;
    border-radius: 999px;
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 720;
    text-align: center;
    transition: color 0.18s ease, background 0.18s ease;
  }

  .site-header > .main-nav a:hover,
  .site-header > .main-nav a:focus-visible {
    color: var(--gold-2);
    background: rgba(245, 207, 120, 0.08);
    outline: none;
  }

  .header-actions {
    grid-area: actions;
    margin: 0;
    gap: 6px;
  }

  .header-account-link,
  .menu-toggle,
  .header-actions .cart-button {
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    flex-basis: 44px;
    padding: 0;
    justify-content: center;
    border-radius: 50%;
  }

  .header-account-link svg,
  .cart-icon {
    width: 20px;
    height: 20px;
  }

  .cart-label {
    display: none;
  }

  .header-actions .cart-button b {
    position: absolute;
    top: -4px;
    right: -3px;
    min-width: 19px;
    height: 19px;
    padding: 0 5px;
    border: 2px solid #0b0906;
    font-size: 0.66rem;
    line-height: 1;
  }

  .menu-panel {
    right: -50px;
    width: min(290px, calc(100vw - 32px));
  }
}

@media (max-width: 520px) {
  .site-header > .brand small {
    display: none;
  }

  .site-header > .brand strong {
    font-size: 0.94rem;
  }

  .site-header .brand-mark {
    width: 44px;
    height: 44px;
    border-radius: 14px;
  }

  .site-header .logo-mark img {
    width: 41px;
    height: 41px;
  }
}

@media (max-width: 390px) {
  .site-header {
    width: calc(100% - 22px);
    gap: 8px;
    padding-inline: 9px;
  }

  .site-header > .brand {
    gap: 7px;
  }

  .site-header > .brand strong {
    font-size: 0.88rem;
  }

  .header-account-link,
  .menu-toggle,
  .header-actions .cart-button {
    width: 41px;
    min-width: 41px;
    height: 41px;
    min-height: 41px;
    flex-basis: 41px;
  }

  .site-header > .main-nav a {
    padding-inline: 4px;
    font-size: 0.8rem;
  }

  .menu-panel {
    right: -47px;
  }
}

@media (max-width: 340px) {
  .site-header .brand-mark {
    width: 39px;
    height: 39px;
  }

  .site-header .logo-mark img {
    width: 36px;
    height: 36px;
  }

  .site-header > .brand strong {
    font-size: 0.82rem;
  }

  .header-actions {
    gap: 4px;
  }

  .header-account-link,
  .menu-toggle,
  .header-actions .cart-button {
    width: 38px;
    min-width: 38px;
    height: 38px;
    min-height: 38px;
    flex-basis: 38px;
  }
}