/* RU | KZ language switcher (2026-09-25). Separate file: existing CSS is cached for 10 years. */
.lang-switch {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  padding: 2px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  line-height: 1;
}
.lang-switch a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.25s, background-color 0.25s;
}
.lang-switch a:hover { color: var(--accent); }
.lang-switch a.is-active,
.lang-switch a.is-active:hover {
  background: var(--accent);
  color: var(--on-accent);
  cursor: default;
}
.lang-switch a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Topbar (desktop): small divider from the social icons */
.topbar-inner .lang-switch { margin-left: 8px; }

/* Mobile menu: pinned top-left, level with the 44px close button; larger touch targets */
.mobile-nav > .lang-switch { position: absolute; top: 28px; left: 32px; padding: 3px; }
.mobile-nav > .lang-switch a { min-width: 52px; height: 36px; font-size: 13px; }

/* Kazakh menu labels are ~25% longer than Russian: slightly tighter desktop menu for /kz/ pages only */
html[lang="kk"] .nav-links { font-size: 13px; letter-spacing: 0.01em; gap: clamp(14px, 1.5vw, 32px); }
/* Measured in browser: the Kazakh desktop menu needs ~1460px; below that switch /kz/ to the burger
   (same rules as the RU 1240px breakpoint in style.css) instead of letting the WhatsApp button slide off-screen. */
@media (max-width: 1460px) {
  html[lang="kk"] .nav-links,
  html[lang="kk"] .nav-actions .btn-outline { display: none; }
  html[lang="kk"] .nav-toggle { display: flex; width: 32px; height: 32px; flex-shrink: 0; }
  html[lang="kk"] .nav nav { display: none; }
  html[lang="kk"] .nav-actions { margin-left: auto; margin-right: 16px; }
}

/* Kazakh button labels are longer; let them wrap instead of pushing the page wider than the phone screen */
@media (max-width: 720px) {
  html[lang="kk"] .btn { white-space: normal; text-align: center; max-width: 100%; }
}

/* Страницы категорий (25.09): у .cat-hero светлый фон без фото, а шапка до прокрутки рассчитана
   на тёмное фото — светлый логотип «INTER», меню и бургер были почти не видны. */
body:has(.cat-hero) .nav:not(.is-scrolled) .logo { color: var(--text); }
body:has(.cat-hero) .nav:not(.is-scrolled) .logo span { color: var(--accent); }
body:has(.cat-hero) .nav:not(.is-scrolled) .nav-links a { color: var(--text-muted); }
body:has(.cat-hero) .nav:not(.is-scrolled) .nav-links a:hover { color: var(--text); }
body:has(.cat-hero) .nav:not(.is-scrolled) .nav-toggle span { background: var(--text); }
