/* Mobile header catalog control. Desktop (xl+) is untouched. */

@media (max-width: 1199.98px) {
  #header .mobile-katalog-btn {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    min-width: 44px;
    min-height: 44px;
    margin: 0;
    padding: 4px 5px 3px;
    border: 0;
    border-radius: 12px;
    background: #f3f6f8;
    color: #213545;
    line-height: 1;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    transition: background-color .18s ease, color .18s ease, transform .18s ease;
  }
  #header .mobile-katalog-btn i {
    font-size: 16px;
    width: 1em;
    height: 1em;
  }
  #header .mobile-katalog-btn span {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.01em;
    white-space: nowrap;
  }
  #header .mobile-katalog-btn:hover {
    background: #e6eef3;
  }
  #header .mobile-katalog-btn:active {
    transform: scale(0.94);
  }
  #header .mobile-katalog-btn[aria-expanded="true"] {
    background: #213545;
    color: #fff;
  }
  #header .mobile-katalog-btn:focus-visible {
    outline: 2px solid #213545;
    outline-offset: 2px;
  }
  #header .bg-primary-down-lg .col-auto {
    max-width: calc(100% - 196px);
  }
}

@media (max-width: 767.98px) {
  #header .bg-primary-down-lg .col-auto {
    max-width: calc(100% - 208px);
  }
}

@media (max-width: 430px) {
  #header .d-xl-none .list-unstyled > .col {
    padding-left: 0.12rem !important;
    padding-right: 0.12rem !important;
  }
  #header .bg-primary-down-lg .col-auto {
    max-width: calc(100% - 228px);
  }
  #header .bg-primary-down-lg .u-header__navbar-brand img {
    width: 78px;
    max-height: 28px;
  }
}

@media (max-width: 390px) {
  #header .bg-primary-down-lg .col-auto {
    max-width: calc(100% - 236px);
  }
  #header .bg-primary-down-lg .u-header__navbar-brand img {
    width: 72px;
    max-height: 26px;
  }
}

.mobile-katalog-dialog {
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: 100%;
  height: 100%;
  max-height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #1d1d1f;
  overflow: hidden;
  box-sizing: border-box;
}

.mobile-katalog-dialog::backdrop {
  background: rgba(16, 28, 40, 0.48);
}

.mobile-katalog-dialog[open] {
  display: flex;
  flex-direction: column;
}

.mobile-katalog-dialog[open] .mobile-katalog-sheet {
  animation: mobile-katalog-in .38s cubic-bezier(.16, 1, .3, 1);
}

.mobile-katalog-dialog[open]::backdrop {
  animation: mobile-katalog-fade .28s ease;
}

.mobile-katalog-dialog.is-closing .mobile-katalog-sheet {
  animation: mobile-katalog-out .26s cubic-bezier(.4, 0, 1, 1) forwards;
}

.mobile-katalog-dialog.is-closing::backdrop {
  animation: mobile-katalog-fade-out .26s ease forwards;
}

.mobile-katalog-sheet {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 100%;
  height: 100%;
  min-height: 0;
  margin: 0;
  background: #fff;
  box-sizing: border-box;
  overflow: hidden;
  transform: translateY(0);
}

.mobile-katalog-toolbar {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: max(12px, env(safe-area-inset-top)) 12px 12px 18px;
  border-bottom: 1px solid #e6edf2;
  background: #fff;
}

.mobile-katalog-heading {
  min-width: 0;
}

.mobile-katalog-kicker {
  margin: 0 0 2px;
  color: #5d7384;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.mobile-katalog-toolbar h2 {
  margin: 0;
  color: #213545;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.15;
}

.mobile-katalog-close {
  display: inline-flex;
  flex: 0 0 44px;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #f3f6f8;
  color: #213545;
  font-size: 20px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background-color .18s ease, transform .18s ease;
}

.mobile-katalog-close:hover { background: #e6eef3; }
.mobile-katalog-close:active { transform: scale(0.94); }
.mobile-katalog-close:focus-visible {
  outline: 2px solid #213545;
  outline-offset: 2px;
}

.mobile-katalog-body {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 8px 12px max(20px, env(safe-area-inset-bottom));
  box-sizing: border-box;
}

.mobile-katalog-group {
  min-width: 0;
  margin: 0 0 14px;
  padding: 12px 10px 6px;
  border: 1px solid #e6edf2;
  border-radius: 16px;
  background: #f8fafb;
  animation: mobile-katalog-rise .42s cubic-bezier(.2, .7, .2, 1) both;
}

.mobile-katalog-group:nth-child(2) { animation-delay: 40ms; }
.mobile-katalog-group:nth-child(3) { animation-delay: 80ms; }
.mobile-katalog-group:nth-child(4) { animation-delay: 120ms; }
.mobile-katalog-group:nth-child(5) { animation-delay: 160ms; }
.mobile-katalog-group:nth-child(6) { animation-delay: 200ms; }

.mobile-katalog-group h3 {
  margin: 0 8px 6px;
  color: #213545;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.mobile-katalog-group ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mobile-katalog-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  margin: 0;
  padding: 10px 12px;
  border-radius: 12px;
  color: #213545;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  text-decoration: none;
  overflow-wrap: anywhere;
  transition: background-color .16s ease, transform .16s ease;
}

.mobile-katalog-link::after {
  content: "";
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  margin-right: 4px;
  border-top: 2px solid #8aa0b0;
  border-right: 2px solid #8aa0b0;
  transform: rotate(45deg);
}

.mobile-katalog-link:hover,
.mobile-katalog-link:focus-visible {
  background: #fff;
  color: #213545;
  text-decoration: none;
}

.mobile-katalog-link:active {
  background: #e7eef3;
  transform: scale(0.985);
}

.mobile-katalog-link:focus-visible {
  outline: 2px solid #213545;
  outline-offset: 2px;
}

.mobile-katalog-link.is-catalog-all {
  color: #174ea6;
  font-weight: 700;
}

.mobile-katalog-fallback {
  margin-top: 8px;
}

html.mobile-katalog-open,
html.mobile-katalog-open body {
  overflow: hidden !important;
}

html.mobile-katalog-open body {
  position: fixed;
  width: 100%;
  left: 0;
  right: 0;
}

@keyframes mobile-katalog-in {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

@keyframes mobile-katalog-out {
  from { transform: translateY(0); }
  to { transform: translateY(100%); }
}

@keyframes mobile-katalog-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes mobile-katalog-fade-out {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes mobile-katalog-rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  #header .mobile-katalog-btn,
  .mobile-katalog-close,
  .mobile-katalog-link,
  .mobile-katalog-dialog[open] .mobile-katalog-sheet,
  .mobile-katalog-dialog[open]::backdrop,
  .mobile-katalog-dialog.is-closing .mobile-katalog-sheet,
  .mobile-katalog-dialog.is-closing::backdrop,
  .mobile-katalog-group {
    animation: none !important;
    transition: none !important;
  }
}

@media (min-width: 1200px) {
  #mobileKatalogInvoker,
  .mobile-katalog-slot {
    display: none !important;
  }
}
