html:root #root #toppanel.corfix-family-banner {
  --banner-surface: #102338;
  --banner-tint: #1c3851;
  --banner-ink: #f0f5fb;
  --banner-edge: #34516e;
  --banner-flag-panel: #152b42;
  --banner-logo: url("/Layout/CORFIX/Images/corfix-rodinny-logotyp-bily.be87a16f77e0.png");
  isolation: isolate;
  container-type: inline-size;
  background: var(--banner-surface);
  border-radius: 7px;
  box-shadow: none;
}

#root #toppanel.corfix-family-banner::before,
#root #toppanel.corfix-family-banner::after {
  content: none;
}

#root #toppanel.corfix-family-banner #homelink {
  position: absolute;
  z-index: 1;
  top: 0 !important;
  left: 3.2%;
  height: 100% !important;
  width: 13cqw !important;
  background: var(--banner-logo) center / contain no-repeat;
}

#root #toppanel .corfix-family-slogan {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 20.2%;
  transform: translateY(-50%);
  display: grid;
  gap: .06em;
  margin: 0;
  white-space: nowrap;
  color: var(--banner-ink);
  font: 400 clamp(18px, 2.8cqw, 35px)/1.08 var(--corfix-wide-font, Roboto, Arial, sans-serif);
  letter-spacing: -.025em;
}

#root #toppanel .corfix-family-art {
  position: absolute;
  inset: 0 0 0 auto;
  width: 50%;
  pointer-events: none;
  background: linear-gradient(90deg, var(--banner-surface), var(--banner-tint) 75%);
}

#root #toppanel .corfix-family-art::before {
  display: block;
  width: 76%;
  height: 100%;
  content: "";
  background: url("/Layout/CORFIX/Images/corfix-rodinny-motiv.e11e2644b00b.jpg") center 57% / cover no-repeat;
  mask-image: linear-gradient(
    90deg,
    transparent 0%, #0002 6%, #000c 15%, #000 23%,
    #000 77%, #000c 85%, #0002 94%, transparent 100%
  );
}

html #root #toppanel.corfix-family-banner #lng_menu {
  position: absolute;
  z-index: 2;
  inset: 7px 8px auto auto;
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 3px;
  border: 1px solid var(--banner-edge);
  border-radius: 4px;
  background: var(--banner-flag-panel);
}

html #root #toppanel.corfix-family-banner #lng_menu a {
  flex: none;
  width: 24px;
  height: 16px;
  margin: 0;
  border-radius: 1px;
  background: url("/Layout/CORFIX/Images/corfix-rodinny-vlajky.47aa4379ec8f.jpg") -917px -10px / 992px 120px no-repeat;
}

html #root #toppanel.corfix-family-banner #lng_menu #lng_sk {
  background-position-x: -946px;
}

#root #toppanel.corfix-family-banner #lng_menu a:focus-visible {
  outline: 2px solid #83b9eb;
  outline-offset: 2px;
}

@container (max-width: 580px) {
  #root #toppanel.corfix-family-banner #homelink {
    left: 2.25%;
    width: 13.5cqw !important;
  }

  #root #toppanel .corfix-family-slogan {
    left: calc(15.75% + clamp(5px, 2cqw, 11px));
    font-size: clamp(10px, 3.35cqw, 19.5px);
  }

  #root #toppanel .corfix-family-art {
    inset-inline-end: 30px;
    width: 39%;
  }

  #root #toppanel .corfix-family-art::before {
    width: 100%;
    background-position: 51% 56%;
    mask-image: linear-gradient(
      90deg,
      transparent 0%, #0002 4%, #000c 10%, #000 17%,
      #000 83%, #000c 90%, #0002 96%, transparent 100%
    );
  }

  html #root #toppanel.corfix-family-banner #lng_menu {
    inset: 3px 2px auto auto;
    flex-direction: column;
    padding: 2px;
    gap: 3px;
    border: 0;
  }
}

html:root #root > #toppanel + .topPane {
  border-bottom: 2px solid #327dbe;
}

/* Let the footer reach the viewport edge on short shop pages. */
body:has(> #mainForm > #root > #content > #footer) {
  padding-block-end: 0;
}

#mainForm:has(> #root > #content > #footer) {
  display: flex;
  flex-direction: column;
  min-block-size: 100vh;
  min-block-size: 100dvh;
}

#mainForm > #root:has(> #content > #footer),
#mainForm > #root > #content:has(> #footer) {
  display: flex;
  flex: 1 0 auto;
  flex-direction: column;
}

#mainForm > #root > #content:has(> #footer) {
  padding-block-end: 0;
}

#root > #content > #footer {
  margin-block-start: auto;
}

/* Match the homepage cards shown to the native Novinky limit. */
#root #content .corfix-home-news--archive .corfix-home-news__items > .NewGoods:nth-child(n+10):nth-child(-n+15) {
  display: block;
}
