header {
  background: white;
  padding: 10px 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header > .container,
.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 0 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--primary-color);
  cursor: pointer;
  transition: transform 0.3s;
}

.logo:hover {
  transform: scale(1.05);
}

.logo sup {
  font-size: 12px;
  opacity: 0.7;
  margin-left: 5px;
}

.nav {
  display: flex;
  gap: 22px;
  align-items: center;
  flex: 1;
  min-width: 0;
}

.nav a {
  text-decoration: none;
  color: var(--text-dark);
  font-weight: 500;
  cursor: pointer;
  transition: color 0.3s;
}

.nav a:hover {
  color: var(--primary-color);
}

.product-dropdown {
  position: relative;
}

.product-dropdown > button {
  background: var(--primary-color);
  color: white;
  padding: 9px 18px;
  border-radius: 999px;
  font-weight: 800;
}

.product-menu {
  display: none;
  position: absolute;
  top: 44px;
  left: 0;
  min-width: 220px;
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 10px;
  z-index: 250;
}

.product-dropdown:hover .product-menu,
.product-dropdown:focus-within .product-menu {
  display: grid;
  gap: 2px;
}

.product-menu a {
  padding: 10px 12px;
  border-radius: 6px;
}

.product-menu a:hover {
  background: var(--bg-light);
}

.buttons {
  display: flex;
  gap: 10px;
  align-items: center;
  flex: none;
}

/* LANGUAGE DROPDOWN */
.language-dropdown {
  position: relative;
}

.language-btn,
.lang-btn {
  background: white;
  border: 2px solid var(--gold-color);
  color: var(--gold-color);
  padding: 8px 12px;
  border-radius: 20px;
  cursor: pointer;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.3s;
}

.language-btn:hover,
.lang-btn:hover {
  box-shadow: 0 2px 10px rgba(255, 215, 0, 0.3);
}

.language-menu,
.lang-menu {
  display: none;
  position: absolute;
  top: 40px;
  right: 0;
  background: white;
  border: 1px solid #ddd;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  min-width: 150px;
  z-index: 200;
}

.language-menu.active,
.lang-menu.active {
  display: block;
}

.language-item,
.lang-menu button {
  padding: 12px 15px;
  cursor: pointer;
  transition: background 0.3s;
  border-bottom: 1px solid #eee;
}

.language-item:last-child,
.lang-menu button:last-child {
  border-bottom: none;
}

.language-item:hover,
.lang-menu button:hover {
  background: #f5f5f5;
}

/* Пункты меню языка в регистрации — кнопки: сохраняем вид прежних div-пунктов. */
.language-menu button.language-item {
  display: block;
  width: 100%;
  border: 0;
  border-bottom: 1px solid #eee;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
}
.language-menu button.language-item:last-child { border-bottom: none; }

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

  .header-content {
    flex-wrap: wrap;
  }
}

@media (min-width: 769px) {
  .header > .container,
  .header-content {
    flex-wrap: nowrap;
  }

  .btn-login,
  .btn-primary:not(.btn-lg) {
    white-space: nowrap;
  }
}

@media (max-width: 720px) {
  /* Auth links switch between guest and signed-in sets after load. Reserve the
     taller mobile header so the page does not jump at 320-375px. */
  body.sl-page header {
    min-height: 85px;
  }
}
