/* Rafity – samostatná testovací vrstva pro Classic / Carbon. */
#header:is(.rafity-hp, :where(:has(> .navigation-wrapper > .header-top #formSearchForm):has(> .navigation-wrapper > #navigation):not(.ordering-process *))) .header-top {
  --hp-control: 44px;
  --hp-accent: #D2CFFF;
  display: grid;
  position: relative;
  align-items: center;
}

#header:is(.rafity-hp, :where(:has(> .navigation-wrapper > .header-top #formSearchForm):has(> .navigation-wrapper > #navigation):not(.ordering-process *))) .header-top > .navigation-buttons {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: calc(3 * var(--hp-control));
  margin: 0;
  padding: 0;
}

#header:is(.rafity-hp, :where(:has(> .navigation-wrapper > .header-top #formSearchForm):has(> .navigation-wrapper > #navigation):not(.ordering-process *))) .navigation-buttons > :is(#dkLabFavHeaderWrapper, .cart-count) {
  position: relative;
  inset: auto;
  margin: 0;
  flex: 0 0 var(--hp-control);
  transform: none !important;
}

#header:is(.rafity-hp, :where(:has(> .navigation-wrapper > .header-top #formSearchForm):has(> .navigation-wrapper > #navigation):not(.ordering-process *))) .navigation-buttons .dkLabFavHeaderIconBtn,
#header:is(.rafity-hp, :where(:has(> .navigation-wrapper > .header-top #formSearchForm):has(> .navigation-wrapper > #navigation):not(.ordering-process *))) .navigation-buttons > .cart-count {
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--hp-control) !important;
  height: var(--hp-control) !important;
  padding: 0;
}

#header:is(.rafity-hp, :where(:has(> .navigation-wrapper > .header-top #formSearchForm):has(> .navigation-wrapper > #navigation):not(.ordering-process *))) .cart-count .cart-price { display: none !important; }

#header:is(.rafity-hp, :where(:has(> .navigation-wrapper > .header-top #formSearchForm):has(> .navigation-wrapper > #navigation):not(.ordering-process *))) .header-top > .search {
  display: block;
  position: relative;
  width: 100%;
  min-width: 0;
  margin: 0;
}

body #header:is(.rafity-hp, :where(:has(> .navigation-wrapper > .header-top #formSearchForm):has(> .navigation-wrapper > #navigation):not(.ordering-process *))) .search > #formSearchForm {
  position: relative;
  inset: auto;
  display: block;
  transform: none;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

#header:is(.rafity-hp, :where(:has(> .navigation-wrapper > .header-top #formSearchForm):has(> .navigation-wrapper > #navigation):not(.ordering-process *))) #formSearchForm .search-toggle { display: none; }

#header:is(.rafity-hp, :where(:has(> .navigation-wrapper > .header-top #formSearchForm):has(> .navigation-wrapper > #navigation):not(.ordering-process *))) #formSearchForm fieldset {
  display: block;
  position: relative;
  inset: auto;
  width: 100%;
  height: 44px;
  margin: 0;
  animation: none;
}

#header:is(.rafity-hp, :where(:has(> .navigation-wrapper > .header-top #formSearchForm):has(> .navigation-wrapper > #navigation):not(.ordering-process *))) #formSearchForm .search-input {
  display: block;
  position: static;
  width: 100% !important;
  height: 44px;
  padding: 0 50px 0 12px;
  border: 2px solid var(--hp-accent) !important;
  background: #fff;
  color: #18171a;
  opacity: 1;
  visibility: visible;
  font-size: 16px;
}

#header:is(.rafity-hp, :where(:has(> .navigation-wrapper > .header-top #formSearchForm):has(> .navigation-wrapper > #navigation):not(.ordering-process *))) #formSearchForm [data-testid="searchBtn"] {
  position: absolute;
  inset: 0 0 auto auto;
  width: 44px !important;
  min-width: 0;
  height: 44px;
  margin: 0;
  padding: 0;
  opacity: 1;
  color: transparent;
  font-size: 0 !important;
  background: var(--hp-accent) !important;
  border: 0;
}
#header:is(.rafity-hp, :where(:has(> .navigation-wrapper > .header-top #formSearchForm):has(> .navigation-wrapper > #navigation):not(.ordering-process *))) #formSearchForm [data-testid="searchBtn"]::before { display: none; }

#header:is(.rafity-hp, :where(:has(> .navigation-wrapper > .header-top #formSearchForm):has(> .navigation-wrapper > #navigation):not(.ordering-process *))) .rafity-hp-contact {
  display: flex;
  align-items: center;
  gap: 9px;
  line-height: 1.3;
  color: #18171a;
}

#header:is(.rafity-hp, :where(:has(> .navigation-wrapper > .header-top #formSearchForm):has(> .navigation-wrapper > #navigation):not(.ordering-process *))) .rafity-hp-contact img {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}

#header:is(.rafity-hp, :where(:has(> .navigation-wrapper > .header-top #formSearchForm):has(> .navigation-wrapper > #navigation):not(.ordering-process *))) .rafity-hp-contact a,
#header:is(.rafity-hp, :where(:has(> .navigation-wrapper > .header-top #formSearchForm):has(> .navigation-wrapper > #navigation):not(.ordering-process *))) .rafity-hp-contact span {
  display: block;
  white-space: nowrap;
  font-size: 14px;
}

#header:is(.rafity-hp, :where(:has(> .navigation-wrapper > .header-top #formSearchForm):has(> .navigation-wrapper > #navigation):not(.ordering-process *))) .rafity-hp-contact a[href^="tel:"] {
  font-size: 16px;
  font-weight: 700;
}
#header:is(.rafity-hp, :where(:has(> .navigation-wrapper > .header-top #formSearchForm):has(> .navigation-wrapper > #navigation):not(.ordering-process *))) .rafity-hp-contact .rafity-hp-hours {
  font-weight: 400;
  text-transform: none;
  color: #59565f;
}

  #header:is(.rafity-hp, :where(:has(> .navigation-wrapper > .header-top #formSearchForm):has(> .navigation-wrapper > #navigation):not(.ordering-process *))) .header-top > :is(.top-nav-button-login, .top-nav-button-account) {
    position: absolute;
    top: 50%;
    right: var(--hp-control);
    transform: translateY(-50%);
    z-index: 2;
    width: var(--hp-control);
    height: var(--hp-control);
    margin: 0 !important;
    padding: 0;
    overflow: visible;
    background: transparent;
    font-size: 0 !important;
    color: #18171a;
    display: grid !important;
    place-items: center;
  }

  #header:is(.rafity-hp, :where(:has(> .navigation-wrapper > .header-top #formSearchForm):has(> .navigation-wrapper > #navigation):not(.ordering-process *))) .header-top > :is(.top-nav-button-login, .top-nav-button-account) span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }

#header:is(.rafity-hp, :where(:has(> .navigation-wrapper > .header-top #formSearchForm):has(> .navigation-wrapper > #navigation):not(.ordering-process *))) .header-top > :is(.top-nav-button-login, .top-nav-button-account)::before,
#header:is(.rafity-hp, :where(:has(> .navigation-wrapper > .header-top #formSearchForm):has(> .navigation-wrapper > #navigation):not(.ordering-process *))) .navigation-buttons > .cart-count::before {
  left: 50% !important;
  top: 50% !important;
  transform: translate(-50%, -50%) !important;
  filter: none !important;
  pointer-events: none;
}

#header:is(.rafity-hp, :where(:has(> .navigation-wrapper > .header-top #formSearchForm):has(> .navigation-wrapper > #navigation):not(.ordering-process *))) .navigation-buttons > .cart-count i {
  left: auto;
  right: 0;
  top: 1px;
  pointer-events: none;
}

#header:is(.rafity-hp, :where(:has(> .navigation-wrapper > .header-top #formSearchForm):has(> .navigation-wrapper > #navigation):not(.ordering-process *))) #formSearchForm .rafity-hp-loupe {
  position: absolute;
  width: 20px;
  height: 20px;
  inset: 12px auto auto 12px;
  color: #18171a;
  pointer-events: none;
}

#header:is(.rafity-hp, :where(:has(> .navigation-wrapper > .header-top #formSearchForm):has(> .navigation-wrapper > #navigation):not(.ordering-process *))) :is(.navigation-buttons a, .top-nav-button, .responsive-tools a, #formSearchForm button):focus-visible {
  outline: 2px solid #5D5399 !important;
  outline-offset: -2px;
}

@media (min-width: 1024px) {
  #header:is(.rafity-hp, :where(:has(> .navigation-wrapper > .header-top #formSearchForm):has(> .navigation-wrapper > #navigation):not(.ordering-process *))) .header-top {
    grid-template-columns: auto minmax(140px, 1fr) 170px auto;
    gap: clamp(8px, 2vw, 28px);
    height: auto;
    min-height: 76px;
  }

  #header:is(.rafity-hp, :where(:has(> .navigation-wrapper > .header-top #formSearchForm):has(> .navigation-wrapper > #navigation):not(.ordering-process *))) .site-name-wrapper { grid-column: 1; grid-row: 1; }
  #header:is(.rafity-hp, :where(:has(> .navigation-wrapper > .header-top #formSearchForm):has(> .navigation-wrapper > #navigation):not(.ordering-process *))) .search { grid-column: 2; grid-row: 1; }
  #header:is(.rafity-hp, :where(:has(> .navigation-wrapper > .header-top #formSearchForm):has(> .navigation-wrapper > #navigation):not(.ordering-process *))) .header-top > .rafity-hp-contact { grid-column: 3; grid-row: 1; }
  #header:is(.rafity-hp, :where(:has(> .navigation-wrapper > .header-top #formSearchForm):has(> .navigation-wrapper > #navigation):not(.ordering-process *))) .navigation-buttons { grid-column: 4; grid-row: 1; }
  #header:is(.rafity-hp, :where(:has(> .navigation-wrapper > .header-top #formSearchForm):has(> .navigation-wrapper > #navigation):not(.ordering-process *))) .rafity-hp-mobile-contact { display: none; }

  body #header:is(.rafity-hp, :where(:has(> .navigation-wrapper > .header-top #formSearchForm):has(> .navigation-wrapper > #navigation):not(.ordering-process *))) #navigation {
    position: relative !important;
    float: none;
    inset: auto;
    transform: none !important;
    width: 100% !important;
    margin: 0 !important;
    height: 48px !important;
    top: auto !important;
    border-top: 1px solid #eeedf0;
  }

  body #header:is(.rafity-hp, :where(:has(> .navigation-wrapper > .header-top #formSearchForm):has(> .navigation-wrapper > #navigation):not(.ordering-process *))) #navigation .menu-level-1 > li > a {
    height: 47px;
    line-height: 47px;
    margin-inline: clamp(8px, 1.3vw, 20px);
  }

  #header:is(.rafity-hp, :where(:has(> .navigation-wrapper > .header-top #formSearchForm):has(> .navigation-wrapper > #navigation):not(.ordering-process *))) #navigation .menu-level-1 > li > a::after { bottom: 8px; }
  body #header:is(.rafity-hp, :where(:has(> .navigation-wrapper > .header-top #formSearchForm):has(> .navigation-wrapper > #navigation):not(.ordering-process *))) #navigation .menu-level-1 > li > .menu-level-2 {
    margin-top: 0;
    margin-left: 0;
    width: 100% !important;
  }
}

/* Carbon měří menu podle původní užší hlavičky. Na širokém řádku
   vracíme původní položky do zobrazení, kopii „Více“ nezobrazujeme. */
@media (min-width: 1024px) {
  #header:is(.rafity-hp, :where(:has(> .navigation-wrapper > .header-top #formSearchForm):has(> .navigation-wrapper > #navigation):not(.ordering-process *))) #navigation .navigation-in {
    width: 100% !important;
  }
  #header:is(.rafity-hp, :where(:has(> .navigation-wrapper > .header-top #formSearchForm):has(> .navigation-wrapper > #navigation):not(.ordering-process *))) #navigation .navigation-in > .menu-level-1 {
    flex-wrap: nowrap;
    width: 100%;
  }
  body #header:is(.rafity-hp, :where(:has(> .navigation-wrapper > .header-top #formSearchForm):has(> .navigation-wrapper > #navigation):not(.ordering-process *))) #navigation .navigation-in > .menu-level-1 > li.splitted:not(.appended-category) {
    display: block !important;
    visibility: visible !important;
  }
  #header:is(.rafity-hp, :where(:has(> .navigation-wrapper > .header-top #formSearchForm):has(> .navigation-wrapper > #navigation):not(.ordering-process *))) .menu-helper {
    display: none !important;
  }
}

@media (max-width: 1023px) {
  #header:is(.rafity-hp, :where(:has(> .navigation-wrapper > .header-top #formSearchForm):has(> .navigation-wrapper > #navigation):not(.ordering-process *))) { height: auto !important; }
  #header:is(.rafity-hp, :where(:has(> .navigation-wrapper > .header-top #formSearchForm):has(> .navigation-wrapper > #navigation):not(.ordering-process *))) .header-top {
    grid-template-columns: 78px minmax(0, 1fr) 132px;
    grid-template-rows: 52px 44px;
    gap: 0 8px;
    height: auto !important;
    padding-bottom: 8px;
  }

  #header:is(.rafity-hp, :where(:has(> .navigation-wrapper > .header-top #formSearchForm):has(> .navigation-wrapper > #navigation):not(.ordering-process *))) .header-top > .rafity-hp-contact { display: none; }
  #header:is(.rafity-hp, :where(:has(> .navigation-wrapper > .header-top #formSearchForm):has(> .navigation-wrapper > #navigation):not(.ordering-process *))) .header-top > .site-name-wrapper {
    grid-row: 1;
    grid-column: 2;
    justify-self: stretch;
    width: auto;
    min-width: 0;
    margin: 0;
  }
  #header:is(.rafity-hp, :where(:has(> .navigation-wrapper > .header-top #formSearchForm):has(> .navigation-wrapper > #navigation):not(.ordering-process *))) .site-name { width: auto; margin: 0; }
  #header:is(.rafity-hp, :where(:has(> .navigation-wrapper > .header-top #formSearchForm):has(> .navigation-wrapper > #navigation):not(.ordering-process *))) .site-name img { max-width: 100%; height: auto; }
  #header:is(.rafity-hp, :where(:has(> .navigation-wrapper > .header-top #formSearchForm):has(> .navigation-wrapper > #navigation):not(.ordering-process *))) .header-top > .navigation-buttons { grid-row: 1; grid-column: 3; }
  #header:is(.rafity-hp, :where(:has(> .navigation-wrapper > .header-top #formSearchForm):has(> .navigation-wrapper > #navigation):not(.ordering-process *))) .header-top > .search { grid-row: 2; grid-column: 1 / -1; }
  #header:is(.rafity-hp, :where(:has(> .navigation-wrapper > .header-top #formSearchForm):has(> .navigation-wrapper > #navigation):not(.ordering-process *))) .header-top > .responsive-tools { display: contents; }
  #header:is(.rafity-hp, :where(:has(> .navigation-wrapper > .header-top #formSearchForm):has(> .navigation-wrapper > #navigation):not(.ordering-process *))) .responsive-tools :is([data-target="search"], [data-target="login"], [data-target="account"]) { display: none !important; }

  #header:is(.rafity-hp, :where(:has(> .navigation-wrapper > .header-top #formSearchForm):has(> .navigation-wrapper > #navigation):not(.ordering-process *))) .responsive-tools [data-target="navigation"] {
    position: absolute;
    inset: 4px auto auto 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 68px;
    height: 44px;
    margin: 0 !important;
    transform: none;
  }
  #header:is(.rafity-hp, :where(:has(> .navigation-wrapper > .header-top #formSearchForm):has(> .navigation-wrapper > #navigation):not(.ordering-process *))) .responsive-tools [data-target="navigation"]::after {
    content: "Menu";
    position: static;
    color: #18171a;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
  }
  #header:is(.rafity-hp, :where(:has(> .navigation-wrapper > .header-top #formSearchForm):has(> .navigation-wrapper > #navigation):not(.ordering-process *))) .header-top > :is(.top-nav-button-login, .top-nav-button-account) {
    inset: 4px var(--hp-control) auto auto;
    transform: none;
  }
  #header:is(.rafity-hp, :where(:has(> .navigation-wrapper > .header-top #formSearchForm):has(> .navigation-wrapper > #navigation):not(.ordering-process *))) .rafity-hp-mobile-contact { padding: 16px 20px; }
  #header:is(.rafity-hp, :where(:has(> .navigation-wrapper > .header-top #formSearchForm):has(> .navigation-wrapper > #navigation):not(.ordering-process *))) #navigation .rafity-hp-contact a {
    margin: 0;
    padding: 4px 0 !important;
    border: 0;
  }
}

/* Pevné pozice skupiny, nezávislé na pořadí v šabloně a v doplňku. */
#header:is(.rafity-hp, :where(:has(> .navigation-wrapper > .header-top #formSearchForm):has(> .navigation-wrapper > #navigation):not(.ordering-process *))) .header-top > .navigation-buttons {
  display: grid !important;
  grid-template-columns: repeat(3, var(--hp-control));
}
#header:is(.rafity-hp, :where(:has(> .navigation-wrapper > .header-top #formSearchForm):has(> .navigation-wrapper > #navigation):not(.ordering-process *))) .navigation-buttons > .cart-count {
  grid-area: 1 / 3;
}
#header:is(.rafity-hp, :where(:has(> .navigation-wrapper > .header-top #formSearchForm):has(> .navigation-wrapper > #navigation):not(.ordering-process *))) .navigation-buttons > :is(#dkLabFavHeaderWrapper, .rafity-hp-favorite) {
  grid-area: 1 / 1;
  display: flex !important;
  align-items: center;
  justify-content: center;
  visibility: visible !important;
  width: var(--hp-control);
  height: var(--hp-control);
}
#header:is(.rafity-hp, :where(:has(> .navigation-wrapper > .header-top #formSearchForm):has(> .navigation-wrapper > #navigation):not(.ordering-process *))) .navigation-buttons #dkLabFavHeaderIconBtn {
  display: flex !important;
  visibility: visible !important;
}
#header:is(.rafity-hp, :where(:has(> .navigation-wrapper > .header-top #formSearchForm):has(> .navigation-wrapper > #navigation):not(.ordering-process *))) .navigation-buttons:has(> #dkLabFavHeaderWrapper #dkLabFavHeaderIconBtn) > .rafity-hp-favorite {
  display: none !important;
}
#header:is(.rafity-hp, :where(:has(> .navigation-wrapper > .header-top #formSearchForm):has(> .navigation-wrapper > #navigation):not(.ordering-process *))) .rafity-hp-favorite { color: #7779C1; }
#header:is(.rafity-hp, :where(:has(> .navigation-wrapper > .header-top #formSearchForm):has(> .navigation-wrapper > #navigation):not(.ordering-process *))) .rafity-hp-favorite svg { width: 22px; height: 22px; }


#header:is(.rafity-hp, :where(:has(> .navigation-wrapper > .header-top #formSearchForm):has(> .navigation-wrapper > #navigation):not(.ordering-process *))) .rafity-hp-menu { display: none; }
#header:is(.rafity-hp, :where(:has(> .navigation-wrapper > .header-top #formSearchForm):has(> .navigation-wrapper > #navigation):not(.ordering-process *))) #navigation .rafity-hp-excluded { display: none !important; }
#header:is(.rafity-hp, :where(:has(> .navigation-wrapper > .header-top #formSearchForm):has(> .navigation-wrapper > #navigation):not(.ordering-process *))) .header-top > .search:focus-within { z-index: 5; }
body #header:is(.rafity-hp, :where(:has(> .navigation-wrapper > .header-top #formSearchForm):has(> .navigation-wrapper > #navigation):not(.ordering-process *))) .search,
body #header:is(.rafity-hp, :where(:has(> .navigation-wrapper > .header-top #formSearchForm):has(> .navigation-wrapper > #navigation):not(.ordering-process *))) #formSearchForm,
body #header:is(.rafity-hp, :where(:has(> .navigation-wrapper > .header-top #formSearchForm):has(> .navigation-wrapper > #navigation):not(.ordering-process *))) #formSearchForm fieldset { overflow: visible !important; }
body.rafity-banner-visible #header:is(.rafity-hp, :where(:has(> .navigation-wrapper > .header-top #formSearchForm):has(> .navigation-wrapper > #navigation):not(.ordering-process *))) .search-form:not(.hovered) { top: auto; }
body #header:is(.rafity-hp, :where(:has(> .navigation-wrapper > .header-top #formSearchForm):has(> .navigation-wrapper > #navigation):not(.ordering-process *))) .search-whisperer {
  position: absolute !important;
  inset: 100% 0 auto 0 !important;
  width: 100% !important;
  max-width: none !important;
  max-height: 55vh;
  overflow: auto;
  z-index: 20;
}
body.search-focused #header:is(.rafity-hp, :where(:has(> .navigation-wrapper > .header-top #formSearchForm):has(> .navigation-wrapper > #navigation):not(.ordering-process *))) #formSearchForm .search-whisperer.active {
  display: block !important;
}
body #header:is(.rafity-hp, :where(:has(> .navigation-wrapper > .header-top #formSearchForm):has(> .navigation-wrapper > #navigation):not(.ordering-process *))) #formSearchForm.rafity-hp-search-dismissed .search-whisperer.active {
  display: none !important;
}
#header:is(.rafity-hp, :where(:has(> .navigation-wrapper > .header-top #formSearchForm):has(> .navigation-wrapper > #navigation):not(.ordering-process *))) #formSearchForm .rafity-hp-search-hint {
  position: absolute;
  inset: 0 49px 0 12px;
  align-content: center;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: #626168;
  font-size: 16px;
  pointer-events: none;
}
#header:is(.rafity-hp, :where(:has(> .navigation-wrapper > .header-top #formSearchForm):has(> .navigation-wrapper > #navigation):not(.ordering-process *))) .rafity-hp-search-hint[hidden] { display: none; }
#header:is(.rafity-hp, :where(:has(> .navigation-wrapper > .header-top #formSearchForm):has(> .navigation-wrapper > #navigation):not(.ordering-process *))) .search-input:placeholder-shown + .rafity-hp-search-hint:not([hidden]) { display: block; }
#header:is(.rafity-hp, :where(:has(> .navigation-wrapper > .header-top #formSearchForm):has(> .navigation-wrapper > #navigation):not(.ordering-process *))) .rafity-hp-animated .search-input:not(:focus)::placeholder { color: transparent; }

.rafity-hp-avatar { position: relative; display: inline-flex; flex: none; }
.rafity-hp-avatar i {
  position: absolute; right: -2px; bottom: -1px; width: 11px; height: 11px;
  border: 2px solid #fff; border-radius: 50%; background: #77747d;
}
.rafity-hp-avatar i[data-online="true"] { background: #25834a; }

@media (min-width: 1024px) {
  body #header:is(.rafity-hp, :where(:has(> .navigation-wrapper > .header-top #formSearchForm):has(> .navigation-wrapper > #navigation):not(.ordering-process *))) #navigation .menu-level-1 > li > .menu-level-2 {
    top: 100% !important;
    margin-top: -1px !important;
  }
}
@media (max-width: 1023px) {
  #header.rafity-hp .responsive-tools [data-target="navigation"],
  body #header:is(.rafity-hp, :where(:has(> .navigation-wrapper > .header-top #formSearchForm):has(> .navigation-wrapper > #navigation):not(.ordering-process *))) #navigation,
  #header:is(.rafity-hp, :where(:has(> .navigation-wrapper > .header-top #formSearchForm):has(> .navigation-wrapper > #navigation):not(.ordering-process *))) .menu-helper { display: none !important; }
  #header:is(.rafity-hp, :where(:has(> .navigation-wrapper > .header-top #formSearchForm):has(> .navigation-wrapper > #navigation):not(.ordering-process *))) .site-name img { max-height: 44px; width: auto; object-fit: contain; }
  #header:is(.rafity-hp, :where(:has(> .navigation-wrapper > .header-top #formSearchForm):has(> .navigation-wrapper > #navigation):not(.ordering-process *))) .rafity-hp-menu {
    grid-area: 1 / 1; display: flex; align-items: center; justify-content: flex-start;
    gap: 6px; min-height: 44px; padding: 0 4px; border: 0;
    background: transparent; color: #18171a; font: inherit; font-size: 14px;
    font-weight: 600; text-transform: none;
  }
  #header:is(.rafity-hp, :where(:has(> .navigation-wrapper > .header-top #formSearchForm):has(> .navigation-wrapper > #navigation):not(.ordering-process *))) .rafity-hp-menu::before {
    content: ""; flex: 0 0 17px; height: 12px;
    background: linear-gradient(to bottom, currentColor 0 2px, transparent 2px 5px,
      currentColor 5px 7px, transparent 7px 10px, currentColor 10px 12px);
  }
}
html.rafity-hp-drawer-open, html.rafity-hp-drawer-open body { overflow: hidden; }
body .rafity-hp-drawer:not([open]) { display: none; }
body .rafity-hp-drawer {
  position: fixed; inset: 0 auto 0 0; margin: 0; padding: 0;
  width: min(100%, 520px); max-width: none; height: 100%; max-height: none;
  border: 0; color: #18171a; background: white; overflow: auto; overscroll-behavior: contain;
}
.rafity-hp-drawer::backdrop { background: #18171a70; }
.rafity-hp-drawer .rafity-hp-drawer-top {
  position: sticky; top: 0; z-index: 1; display: flex; align-items: center;
  justify-content: space-between; padding: 10px 16px; background: white;
  border-bottom: 1px solid #eee; font-size: 20px;
}
.rafity-hp-drawer button {
  min-width: 44px; min-height: 44px; padding: 0; border: 0;
  color: #18171a; background: #f0eeff; font-size: 24px;
}
.rafity-hp-drawer nav ul { list-style: none; margin: 0; padding: 0 16px; }
.rafity-hp-drawer nav li { margin: 0; border-bottom: 1px solid #eee; }
.rafity-hp-drawer nav li li:last-child { border-bottom: 0; }
.rafity-hp-drawer nav a, .rafity-hp-drawer summary {
  display: block; padding: 12px 8px; min-height: 44px; color: #18171a;
}
.rafity-hp-drawer summary { display: list-item; cursor: pointer; font-weight: 700; }
.rafity-hp-drawer .rafity-hp-contact { display: flex; align-items: center; gap: 12px; padding: 18px 24px; }
.rafity-hp-drawer .rafity-hp-contact img { width: 36px; height: 36px; border-radius: 50%; }
.rafity-hp-drawer .rafity-hp-contact :is(a, .rafity-hp-hours) { display: block; }

/* v5 – vizuální stavy, bez změn ovládání. */
#header:is(.rafity-hp, :where(:has(> .navigation-wrapper > .header-top #formSearchForm):has(> .navigation-wrapper > #navigation):not(.ordering-process *))) .header-top {
  --hp-accent-hover: #BDB8F3;
  --hp-ink: #18171a;
}
#header:is(.rafity-hp, :where(:has(> .navigation-wrapper > .header-top #formSearchForm):has(> .navigation-wrapper > #navigation):not(.ordering-process *))) .navigation-buttons :is(#dkLabFavHeaderIconBtn, .rafity-hp-favorite),
#header:is(.rafity-hp, :where(:has(> .navigation-wrapper > .header-top #formSearchForm):has(> .navigation-wrapper > #navigation):not(.ordering-process *))) .navigation-buttons #dkLabFavHeaderIconBtn::before {
  color: var(--hp-ink) !important;
}
#header:is(.rafity-hp, :where(:has(> .navigation-wrapper > .header-top #formSearchForm):has(> .navigation-wrapper > #navigation):not(.ordering-process *))) :is(.navigation-buttons :is(#dkLabFavHeaderIconBtn, .rafity-hp-favorite, .cart-count),
  .header-top > :is(.top-nav-button-login, .top-nav-button-account)) {
  border-radius: 50%;
  transition: background-color 150ms ease;
}
body #header:is(.rafity-hp, :where(:has(> .navigation-wrapper > .header-top #formSearchForm):has(> .navigation-wrapper > #navigation):not(.ordering-process *))) #navigation .menu-level-1 > li > a,
body #header:is(.rafity-hp, :where(:has(> .navigation-wrapper > .header-top #formSearchForm):has(> .navigation-wrapper > #navigation):not(.ordering-process *))) #navigation .menu-level-2 a:not(.menu-image),
body #header:is(.rafity-hp, :where(:has(> .navigation-wrapper > .header-top #formSearchForm):has(> .navigation-wrapper > #navigation):not(.ordering-process *))) #navigation :is(.menu-level-1 > li > a, .menu-level-2 a:not(.menu-image)) :is(b, strong, span:not(.submenu-arrow)),
body .rafity-hp-drawer nav :is(a, summary) {
  font-size: 18px !important;
}
@media (min-width: 1024px) {
  body #header:is(.rafity-hp, :where(:has(> .navigation-wrapper > .header-top #formSearchForm):has(> .navigation-wrapper > #navigation):not(.ordering-process *))) #navigation .menu-level-1 > li > a {
    margin-inline: clamp(7px, 1.1vw, 17px);
    white-space: nowrap;
  }
}
@media (hover: hover) {
  #header:is(.rafity-hp, :where(:has(> .navigation-wrapper > .header-top #formSearchForm):has(> .navigation-wrapper > #navigation):not(.ordering-process *))) :is(.navigation-buttons :is(#dkLabFavHeaderIconBtn, .rafity-hp-favorite, .cart-count),
    .header-top > :is(.top-nav-button-login, .top-nav-button-account)):hover {
    background: var(--hp-accent) !important;
  }
  body #header:is(.rafity-hp, :where(:has(> .navigation-wrapper > .header-top #formSearchForm):has(> .navigation-wrapper > #navigation):not(.ordering-process *))) #formSearchForm:has(.search-input:hover, [data-testid="searchBtn"]:hover) .search-input {
    border-color: var(--hp-accent-hover) !important;
  }
  body #header:is(.rafity-hp, :where(:has(> .navigation-wrapper > .header-top #formSearchForm):has(> .navigation-wrapper > #navigation):not(.ordering-process *))) #formSearchForm button[data-testid="searchBtn"]:hover {
    background: var(--hp-accent-hover) !important;
  }
  #header:is(.rafity-hp, :where(:has(> .navigation-wrapper > .header-top #formSearchForm):has(> .navigation-wrapper > #navigation):not(.ordering-process *))) .rafity-hp-contact a[href^="tel:"]:hover,
  .rafity-hp-drawer .rafity-hp-contact a[href^="tel:"]:hover {
    color: #51478b !important;
    text-decoration: underline;
    text-decoration-color: #D2CFFF;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
  }
}
@media (prefers-reduced-motion: reduce) {
  #header:is(.rafity-hp, :where(:has(> .navigation-wrapper > .header-top #formSearchForm):has(> .navigation-wrapper > #navigation):not(.ordering-process *))) :is(.navigation-buttons a, .top-nav-button) { transition: none; }
}

/* Rozložení a lupa jsou připravené už při vykreslení HTML. */
#header:is(.rafity-hp, :where(:has(> .navigation-wrapper > .header-top #formSearchForm):has(> .navigation-wrapper > #navigation):not(.ordering-process *))) #formSearchForm [data-testid="searchBtn"]::after {
  content: "";
  display: block;
  position: absolute;
  inset: 12px;
  background: #18171a;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='m15.5 15.5 5 5'/%3E%3C/svg%3E") center / contain no-repeat;
  pointer-events: none;
}
#header:is(.rafity-hp, :where(:has(> .navigation-wrapper > .header-top #formSearchForm):has(> .navigation-wrapper > #navigation):not(.ordering-process *))) #formSearchForm .rafity-hp-loupe { display: none; }
#header:is(.rafity-hp, :where(:has(> .navigation-wrapper > .header-top #formSearchForm):has(> .navigation-wrapper > #navigation):not(.ordering-process *))) #navigation .menu-level-1 > li:has(> a[href="/sperky/"]) { display: none !important; }
@media (max-width: 1023px) {
  #header:is(.rafity-hp, :where(:has(> .navigation-wrapper > .header-top #formSearchForm):has(> .navigation-wrapper > #navigation):not(.ordering-process *))):not(.rafity-hp) .responsive-tools [data-target="navigation"] {
    position: absolute;
    inset: 4px auto auto 0;
    width: 72px;
    height: 44px;
  }
}
