.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #fff;
  border-bottom: 1px solid var(--color-border);
}

.site-header__inner {
  max-width: var(--max-width-page);
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.site-header__brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.site-header__logo-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.site-header__logo {
  height: 48px;
  width: auto;
}

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-desktop a {
  color: var(--color-primary);
  font-weight: 600;
  font-size: 0.95rem;
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown__menu {
  display: none;
  position: absolute;
  inset-inline-start: 0;
  top: 100%;
  min-width: 220px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 0.5rem;
  box-shadow: 0 12px 24px rgba(30, 7, 64, 0.12);
}

.nav-dropdown:hover .nav-dropdown__menu {
  display: block;
}

.nav-dropdown__menu a {
  display: block;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  color: var(--color-text);
  font-weight: 500;
}

.nav-dropdown__menu a:hover {
  background: var(--color-bg-lavender-1);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.header-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: #fff;
  color: var(--color-text-muted);
  position: relative;
}

.header-icon-btn--cart {
  overflow: visible;
}

.header-icon-btn__badge {
  position: absolute;
  top: -4px;
  inset-inline-end: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--color-accent);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}

.lang-switcher {
  display: flex;
  align-items: center;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 0.2rem;
  gap: 0.15rem;
}

.lang-switcher__btn {
  border: none;
  background: none;
  border-radius: 999px;
  padding: 0.3rem 0.65rem;
  font-size: 0.8rem;
  font-weight: 700;
  font-family: var(--font-family-base);
  color: var(--color-text-muted);
  cursor: pointer;
}

.lang-switcher__btn.is-active {
  background: var(--color-primary);
  color: #fff;
}

.header-user-dropdown {
  position: relative;
}

.header-user-dropdown .nav-dropdown__menu {
  inset-inline-start: auto;
  inset-inline-end: 0;
}

.header-user-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-text);
}

.nav-dropdown__menu-btn {
  display: block;
  width: 100%;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  border: none;
  background: none;
  color: var(--color-error);
  font-weight: 500;
  font-size: 0.95rem;
  text-align: inherit;
  cursor: pointer;
  font-family: var(--font-family-base);
}

.nav-dropdown__menu-btn:hover {
  background: var(--color-bg-lavender-1);
}

.header-user-link__avatar {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  object-fit: cover;
}

.header-user-link__avatar--placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary);
  color: #fff;
  font-weight: 700;
}

.hamburger-btn {
  display: none;
  width: 38px;
  height: 38px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: #fff;
}

.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem 1.5rem 1.5rem;
  border-top: 1px solid var(--color-border);
}

.mobile-nav a {
  padding: 0.5rem 0;
  color: var(--color-primary);
  font-weight: 600;
}

.mobile-nav.is-open {
  display: flex;
}

@media (max-width: 1024px) {
  .nav-desktop {
    display: none;
  }

  .hamburger-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

@media (max-width: 640px) {
  .site-header__inner {
    padding: 0.75rem 1rem;
    gap: 0.5rem;
  }

  .site-header__logo {
    height: 30px;
  }

  .header-actions {
    gap: 0.4rem;
  }

  .header-actions .btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
  }

  .header-actions .btn-outline {
    display: none;
  }

  /* Search/help are placeholder buttons (no behavior yet) and the language
     switcher moves into the hamburger menu below — none are worth the
     width on a small screen alongside the logo and primary CTA. */
  .header-actions > .header-icon-btn,
  .header-actions > .lang-switcher {
    display: none;
  }

  .mobile-nav .lang-switcher {
    align-self: flex-start;
  }
}
