/* KIRSANOV — RU / KK responsive navigation and control fit, October 2026.
   Applied only to localized pages. English master deliberately untouched. */
:is(html[lang="ru"], html[lang="kk"]) body,
:is(html[lang="ru"], html[lang="kk"]) body * { box-sizing: border-box; }

/* All interactive labels must be fully legible rather than forced beyond their boxes. */
:is(html[lang="ru"], html[lang="kk"]) body :is(a.pd-buy, a.pd-enquire, a.k-primary, button.k-primary, button.k-enquiry-submit, a.q-btn, a.outline-btn, a.bespoke-commission-btn, a.kc-login-cta, a.gs-read, .k-search-more, .k-search-form button, .k-search-filter, .k-enquiry-tabs button) {
  max-width: 100% !important;
  min-width: 0 !important;
  height: auto !important;
  white-space: normal !important;
  overflow-wrap: break-word !important;
  text-align: center !important;
  line-height: 1.34 !important;
}
:is(html[lang="ru"], html[lang="kk"]) body :is(a.pd-buy, a.k-primary, button.k-primary, button.k-enquiry-submit, a.q-btn, a.outline-btn, a.bespoke-commission-btn, a.kc-login-cta) {
  padding: 14px clamp(14px, 2.2vw, 28px) !important;
}
:is(html[lang="ru"], html[lang="kk"]) body :is(.pd-actions, .timber-buttons, .k-search-filters, .k-enquiry-tabs) {
  min-width: 0 !important;
  max-width: 100% !important;
}
:is(html[lang="ru"], html[lang="kk"]) body .pd-actions {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 12px 16px !important;
}
:is(html[lang="ru"], html[lang="kk"]) body .pd-actions > :is(a,button),
:is(html[lang="ru"], html[lang="kk"]) body .timber-buttons button { flex: 0 1 auto !important; }
:is(html[lang="ru"], html[lang="kk"]) body :is(.product-grid .product, .k-cabinet-grid .product, .c-card, .q-card, .gs-feature-text, .k-order-grid > *, .k-enquiry-two > *) { min-width: 0 !important; }
:is(html[lang="ru"], html[lang="kk"]) body :is(.product-name, .product h2, .product-description, .k-cart-item h2, .q-card h3, .gs-feature-text h2, .k-search-result-text, .k-form-field, .k-enquiry-form label) {
  overflow-wrap: break-word !important;
  white-space: normal !important;
}

/* Wider translated navigation is given a separate row before it begins to collide. */
@media (min-width: 901px) and (max-width: 1380px) {
  :is(html[lang="ru"], html[lang="kk"]) body .site-header {
    display: grid !important;
    grid-template-columns: minmax(0,1fr) auto !important;
    grid-template-rows: auto auto !important;
    column-gap: 14px !important;
    row-gap: 11px !important;
    height: auto !important;
    min-height: 88px !important;
    padding: 13px clamp(20px,3.6vw,46px) 14px !important;
    align-items: center !important;
  }
  :is(html[lang="ru"], html[lang="kk"]) body .site-header .brand {
    grid-column: 1 !important; grid-row: 1 !important;
    min-width: 0 !important; max-width: 100% !important;
  }
  :is(html[lang="ru"], html[lang="kk"]) body .site-header .header-end {
    grid-column: 2 !important; grid-row: 1 !important;
    justify-self: end !important;
    position: static !important; transform: none !important;
    width: auto !important; min-width: 0 !important;
    display: flex !important; align-items: center !important;
    gap: clamp(8px,1vw,15px) !important;
  }
  :is(html[lang="ru"], html[lang="kk"]) body .site-header nav.nav {
    grid-column: 1 / -1 !important; grid-row: 2 !important;
    display: flex !important; flex-wrap: wrap !important;
    justify-content: center !important; align-items: center !important;
    gap: 9px clamp(19px,3vw,46px) !important;
    min-width: 0 !important; max-width: 100% !important;
    width: 100% !important;
    padding: 3px 0 0 !important; margin: 0 !important;
    position: static !important; transform: none !important;
    overflow: visible !important;
  }
  :is(html[lang="ru"], html[lang="kk"]) body .site-header .nav a {
    font-size: 12px !important;
    letter-spacing: .08em !important;
    line-height: 1.3 !important;
    white-space: normal !important;
    text-align: center !important;
    max-width: 30% !important;
  }
}

/* Keep all four translated menu entries visible rather than hiding the later ones by horizontal clipping. */
@media (max-width: 900px) {
  :is(html[lang="ru"], html[lang="kk"]) body .site-header {
    display: grid !important;
    grid-template-columns: minmax(0,1fr) auto !important;
    grid-template-rows: auto auto !important;
    height: auto !important;
    min-height: 0 !important;
    align-items: center !important;
    gap: 10px 8px !important;
  }
  :is(html[lang="ru"], html[lang="kk"]) body .site-header .brand {
    grid-column: 1 !important; grid-row: 1 !important;
    min-width: 0 !important; max-width: 100% !important;
    letter-spacing: .08em !important;
  }
  :is(html[lang="ru"], html[lang="kk"]) body .site-header .header-end {
    grid-column: 2 !important; grid-row: 1 !important;
    justify-self: end !important;
    min-width: 0 !important;
    position: static !important; transform: none !important;
    display: flex !important; flex-wrap: nowrap !important;
    align-items: center !important; gap: 7px !important;
  }
  :is(html[lang="ru"], html[lang="kk"]) body .site-header .header-end .search { display: block !important; flex: 0 0 20px !important; }
  :is(html[lang="ru"], html[lang="kk"]) body .site-header nav.nav {
    grid-column: 1 / -1 !important; grid-row: 2 !important;
    display: flex !important; flex-wrap: wrap !important;
    justify-content: center !important; align-items: center !important;
    column-gap: clamp(11px,3vw,22px) !important;
    row-gap: 9px !important;
    width: 100% !important; min-width: 0 !important;
    overflow: visible !important;
    padding: 8px 0 2px !important; margin: 0 !important;
    transform: none !important;
  }
  :is(html[lang="ru"], html[lang="kk"]) body .site-header nav.nav a {
    flex: 0 1 auto !important;
    white-space: normal !important;
    font-size: clamp(11px,1.7vw,13px) !important;
    line-height: 1.3 !important;
    letter-spacing: .04em !important;
    text-align: center !important;
    max-width: calc(50% - 7px) !important;
  }
  :is(html[lang="ru"], html[lang="kk"]) body .site-header .header-end .k-header-actions-stack {
    min-width: 0 !important; max-width: 150px !important;
    gap: 4px !important;
  }
  :is(html[lang="ru"], html[lang="kk"]) body .site-header .header-end .k-header-actions-stack :is(.enquire,.k-client-login-desktop) {
    white-space: normal !important;
    overflow-wrap: break-word !important;
    text-align: right !important;
    line-height: 1.2 !important;
  }
  :is(html[lang="ru"], html[lang="kk"]) body .k-order-grid {
    grid-template-columns: minmax(0,1fr) !important;
    gap: 26px !important;
  }
  :is(html[lang="ru"], html[lang="kk"]) body .k-enquiry-tabs {
    display: grid !important;
    grid-template-columns: repeat(2,minmax(0,1fr)) !important;
    gap: 8px 16px !important;
    align-items: stretch !important;
  }
  :is(html[lang="ru"], html[lang="kk"]) body .k-enquiry-tabs button {
    width: 100% !important;
    min-height: 46px !important;
    padding: 10px 6px !important;
    line-height: 1.3 !important;
    letter-spacing: .025em !important;
    font-size: clamp(12px,1.7vw,15px) !important;
  }
  :is(html[lang="ru"], html[lang="kk"]) body :is(.pd-actions, .timber-buttons) { flex-wrap: wrap !important; }
}
@media (max-width: 480px) {
  :is(html[lang="ru"], html[lang="kk"]) body .site-header { padding: 12px 13px 10px !important; }
  :is(html[lang="ru"], html[lang="kk"]) body .site-header .brand {
    font-size: clamp(18px,5.1vw,24px) !important;
    letter-spacing: .045em !important;
  }
  :is(html[lang="ru"], html[lang="kk"]) body .site-header .header-end { gap: 5px !important; }
  :is(html[lang="ru"], html[lang="kk"]) body .site-header .header-end .k-header-actions-stack {
    max-width: min(30vw,113px) !important;
    flex: 0 1 auto !important;
  }
  :is(html[lang="ru"], html[lang="kk"]) body .site-header .header-end .k-client-login-desktop {
    font-size: 10px !important;
    letter-spacing: .01em !important;
    white-space: normal !important;
    line-height: 1.25 !important;
  }
  :is(html[lang="ru"], html[lang="kk"]) body .site-header .header-end .enquire {
    font-size: 11px !important;
    letter-spacing: .025em !important;
  }
  :is(html[lang="ru"], html[lang="kk"]) body .site-header .header-end select.k-lang-select {
    flex: 0 0 45px !important; width: 45px !important;
    min-width: 45px !important; max-width: 45px !important;
    font-size: 11px !important;
  }
  :is(html[lang="ru"], html[lang="kk"]) body .site-header nav.nav { gap: 9px 12px !important; }
  :is(html[lang="ru"], html[lang="kk"]) body .site-header nav.nav a {
    font-size: 11px !important;
    letter-spacing: .01em !important;
  }
  :is(html[lang="ru"], html[lang="kk"]) body :is(.pd-actions a.pd-buy, .pd-actions a.pd-enquire, .k-enquiry-submit, .k-primary) {
    max-width: 100% !important;
    white-space: normal !important;
    line-height: 1.35 !important;
  }
}
@media (max-width: 340px) {
  :is(html[lang="ru"], html[lang="kk"]) body .site-header .brand { font-size: 17px !important; }
  :is(html[lang="ru"], html[lang="kk"]) body .k-enquiry-tabs { grid-template-columns: minmax(0,1fr) !important; }
}

@media (max-width: 430px) {
  :is(html[lang="ru"], html[lang="kk"]) body .site-header .header-end .search { display: none !important; }
}
