/* KuhArt existing-site header modernization. Keeps OCTemplates data/configuration intact. */
.kh-modern-header {
  position: relative;
  z-index: 1200;
  background: #fff;
  border-bottom: 1px solid #eceff3;
  box-shadow: 0 1px 0 rgba(28, 28, 40, .02);
}
.kh-modern-header .kh-header-row {
  min-height: 76px;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.kh-modern-header .kh-header-brand {
  flex: 0 0 auto;
  min-width: 0;
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}
.kh-modern-header #logo {
  margin: 0 !important;
  padding: 0 !important;
  min-width: 0;
  height: 100%;
  line-height: 0;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
}
.kh-modern-header #logo > a,
.kh-modern-header #logo > span {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  height: 100%;
  line-height: 0;
}
.kh-modern-header #logo img {
  display: block;
  width: auto;
  max-width: 155px;
  max-height: 48px;
  object-fit: contain;
  margin: 0 !important;
  vertical-align: middle;
}
.kh-header-nav-shell {
  position: relative;
  flex: 1 1 auto;
  min-width: 90px;
  align-items: center;
  overflow: hidden;
}
.kh-header-nav-scroll {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-behavior: smooth;
  padding: 4px 18px;
}
.kh-header-nav-scroll::-webkit-scrollbar { display: none; width: 0; height: 0; }
.kh-header-nav-link {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: transparent;
  color: #1c1c28;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-height: 40px;
  padding: 0 12px;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1;
  font-weight: 700;
  white-space: nowrap;
  text-decoration: none !important;
  transition: color .18s ease, background-color .18s ease;
}
.kh-header-nav-link:hover,
.kh-header-nav-link:focus-visible,
.kh-header-nav-link.clicked {
  color: #ff5c00;
  background: #fff4ed;
  outline: none;
}
.kh-header-catalog-link {
  color: #11151b;
}
.kh-header-nav-fade {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 4;
  width: 28px;
  pointer-events: none;
  opacity: 0;
  transition: opacity .18s ease;
}
.kh-header-nav-fade-left { left: 0; background: linear-gradient(90deg, #fff 18%, rgba(255,255,255,0)); }
.kh-header-nav-fade-right { right: 0; background: linear-gradient(270deg, #fff 18%, rgba(255,255,255,0)); }
.kh-header-nav-shell.kh-can-scroll-left .kh-header-nav-fade-left,
.kh-header-nav-shell.kh-can-scroll-right .kh-header-nav-fade-right { opacity: 1; }
.kh-header-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  min-width: 0;
}
.kh-header-icon-btn,
.kh-modern-header .kh-header-cart-wrap #cart {
  position: relative;
  width: 42px;
  height: 42px;
  min-width: 42px;
  padding: 0 !important;
  margin: 0 !important;
  border: 1px solid #e6e9ee !important;
  border-radius: 12px !important;
  background: #fff !important;
  color: #1c1c28 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none !important;
  box-shadow: none !important;
  transition: border-color .18s ease, background-color .18s ease, color .18s ease, transform .18s ease;
}
.kh-header-icon-btn:hover,
.kh-header-icon-btn:focus-visible,
.kh-modern-header .kh-header-cart-wrap #cart:hover {
  border-color: #ff5c00 !important;
  background: #fff8f4 !important;
  color: #ff5c00 !important;
  outline: none;
}
.kh-header-icon-btn:active,
.kh-modern-header .kh-header-cart-wrap #cart:active { transform: translateY(1px); }
.kh-header-icon-btn .sc-btn-icon,
.kh-modern-header .kh-header-cart-wrap #cart .sc-btn-icon { margin: 0 !important; }
.kh-modern-header .kh-header-cart-wrap #cart > .text-lowercase,
.kh-modern-header .kh-header-cart-wrap #cart > span:not(.header-buttons-cart-quantity) { display: none !important; }
.kh-modern-header .kh-header-cart-wrap #cart svg { width: 20px; height: 20px; }
.kh-modern-header .kh-header-cart-wrap #cart svg path { stroke: currentColor; }
.kh-modern-header .kh-header-cart-wrap #cart .kh-cart-basket-icon { overflow: visible; }
.kh-modern-header .header-buttons-cart-quantity,
.kh-header-badge {
  position: absolute;
  top: -6px;
  right: -5px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px !important;
  border: 2px solid #fff;
  border-radius: 999px;
  background: #ff5c00;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  line-height: 1;
  font-weight: 800;
}
.kh-header-phone {
  min-height: 44px;
  max-width: 190px;
  padding: 4px 10px;
  border: 1px solid rgba(255, 92, 0, .34);
  border-radius: 12px;
  background: #fff;
  color: #1c1c28;
  align-items: center;
  gap: 8px;
  text-decoration: none !important;
  cursor: pointer;
  transition: border-color .18s ease, background-color .18s ease;
}
.kh-header-phone:hover { border-color: #ff5c00; background: #fff8f4; color: #1c1c28; }
.kh-header-phone-icon {
  flex: 0 0 auto;
  width: 25px;
  height: 25px;
  border-radius: 8px;
  color: #ff5c00;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}
.kh-header-phone-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  line-height: 1.05;
  gap: 3px;
}
.kh-header-phone-label {
  color: #ff5c00;
  font-size: 9px;
  line-height: 1;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .025em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 118px;
}
.kh-header-phone-number {
  color: #1c1c28;
  font-size: 12px;
  line-height: 1;
  font-weight: 800;
  white-space: nowrap;
}
.kh-header-switchers { gap: 2px; }
.kh-modern-header .kh-header-switchers .sc-switcher {
  margin-left: 0 !important;
  padding: 4px !important;
  border-radius: 10px !important;
  background: #f7f8fa;
}
.kh-modern-header .kh-header-switchers .sc-switcher button { min-width: 24px; }
.kh-header-search-panel {
  position: absolute;
  top: calc(100% - 5px);
  right: 12px;
  z-index: 12250;
  width: min(540px, calc(100vw - 32px));
  padding: 12px;
  border: 1px solid #e6e9ee;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(28,28,40,.16);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
}
.kh-header-search-panel.kh-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}
.kh-header-search-panel .header-search { display: block !important; width: 100%; }
.kh-header-search-panel #search { margin: 0; }
.kh-modern-header > .container-fluid > .sc-megamenu {
  top: calc(100% + 4px) !important;
}

/* Mobile/tablet keeps OCTemplates sidebar mechanics, only the visible bar is modernized. */
@media (max-width: 1199.98px) {
  .kh-modern-header .kh-header-row { min-height: 66px; gap: 7px; }
  .kh-modern-header #logo img { max-width: 142px; max-height: 42px; }
  .kh-header-actions { margin-left: auto; gap: 6px; }
  .kh-header-icon-btn,
  .kh-modern-header .kh-header-cart-wrap #cart { width: 40px; height: 40px; min-width: 40px; border-radius: 11px !important; }
  .kh-header-search-panel { display: none; }
  .kh-modern-header > .container-fluid > .sc-megamenu { display: none !important; }
}
@media (max-width: 767.98px) {
  .kh-modern-header .kh-header-row { min-height: 60px; }
  .kh-modern-header #logo img { max-width: 126px; max-height: 38px; }
  .kh-header-icon-btn,
  .kh-modern-header .kh-header-cart-wrap #cart { width: 38px; height: 38px; min-width: 38px; }
}
@media (max-width: 575.98px) {
  .kh-header-compare { display: none !important; }
  .kh-modern-header .container-fluid { padding-left: 10px; padding-right: 10px; }
  .kh-modern-header #logo img { max-width: 112px; }
}
@media (max-width: 420px) {
  .kh-header-wishlist { display: none !important; }
}


/* Header hotfix 0.3: basket icon + configurable language popup */
.kh-modern-header .kh-header-cart-wrap #cart .kh-cart-basket-fa {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  font-size: 18px;
  line-height: 1;
  color: currentColor;
}
.kh-modern-language,
.kh-language-form {
  position: relative;
  margin: 0;
}
.kh-language-toggle {
  min-width: 62px;
  height: 42px;
  padding: 0 9px;
  border: 1px solid #e6e9ee;
  border-radius: 12px;
  background: #fff;
  color: #1c1c28;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  transition: border-color .18s ease, background-color .18s ease, color .18s ease;
}
.kh-language-toggle:hover,
.kh-language-toggle:focus-visible,
.kh-modern-language.is-open .kh-language-toggle {
  border-color: #ff5c00;
  background: #fff8f4;
  color: #ff5c00;
  outline: none;
}
.kh-language-current-mark,
.kh-language-option-mark {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.kh-language-current-mark img,
.kh-language-option-mark img {
  display: block;
  object-fit: cover;
  border-radius: 3px;
  box-shadow: 0 0 0 1px rgba(28,28,40,.08);
}
.kh-language-code-mark {
  min-width: 24px;
  height: 24px;
  padding: 0 5px;
  border-radius: 999px;
  background: #f2f4f6;
  color: #323740;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.kh-language-current-code {
  color: inherit;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}
.kh-language-chevron {
  font-size: 8px;
  opacity: .56;
  transition: transform .18s ease;
}
.kh-modern-language.is-open .kh-language-chevron { transform: rotate(180deg); }
.kh-language-menu {
  position: absolute;
  z-index: 12550;
  top: calc(100% + 9px);
  right: 0;
  width: 220px;
  padding: 7px;
  border: 1px solid #e7eaee;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(28,28,40,.16);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-6px) scale(.985);
  transform-origin: top right;
  transition: opacity .16s ease, transform .16s ease, visibility .16s ease;
}
.kh-modern-language.is-open .kh-language-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}
.kh-language-option {
  width: 100%;
  min-height: 48px;
  padding: 7px 9px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #252a31;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  cursor: pointer;
  transition: background-color .16s ease, color .16s ease;
}
.kh-language-option:hover,
.kh-language-option:focus-visible {
  background: #fff4ed;
  color: #ff5c00;
  outline: none;
}
.kh-language-option.is-active { background: #f7f8fa; }
.kh-language-option-copy {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.kh-language-option-copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: inherit;
  font-size: 12px;
  line-height: 1.2;
  font-weight: 800;
}
.kh-language-option-copy small {
  color: #8b929b;
  font-size: 9px;
  line-height: 1;
  font-weight: 700;
  text-transform: uppercase;
}
.kh-language-check {
  flex: 0 0 auto;
  color: #ff5c00;
  font-size: 11px;
}
@media (max-width: 767.98px) {
  .kh-language-menu { width: min(220px, calc(100vw - 24px)); }
}
