/*
 * Kominy Homepage v1.1.1 — promo slider + section visibility gates.
 * Desktop slider controls are configurable from Back Office. Mobile remains
 * under the existing theme behaviour and is intentionally not restyled here.
 */

.kh-layout-gate { display: contents; }
@media (min-width: 769px) {
  .kh-layout-gate--mobile { display: none !important; }
}
@media (max-width: 768px) {
  .kh-layout-gate--desktop { display: none !important; }
}

/* CTA introduced by the module is desktop-only to avoid changing current mobile. */
.kh-promo__cta { display: none; }

@media (min-width: 1025px) {
  body#index .kh-promo.cs-container {
    width: 100vw !important;
    max-width: none !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    overflow: visible !important;
  }

  body#index .kh-promo.cs-container > .cs-container__inner {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  body#index .kh-promo__viewport {
    --kh-slide-width: clamp(760px, var(--kh-admin-slide-width, 58vw), 1400px);
    --kh-slide-gap: var(--kh-admin-gap, 16px);
    --kh-center-space: max(0px, calc((100vw - var(--kh-slide-width)) / 2));
    position: relative !important;
    width: 100% !important;
    max-width: none !important;
    overflow: hidden !important;
  }

  body#index .kh-promo__slides {
    --kh-peek: 0px !important;
    position: relative !important;
    box-sizing: border-box !important;
    display: flex !important;
    align-items: flex-start !important;
    gap: var(--kh-slide-gap) !important;
    column-gap: var(--kh-slide-gap) !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 var(--kh-center-space) !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scroll-snap-type: none !important;
    scroll-behavior: auto !important;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  body#index .kh-promo__slides::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
  }

  body#index .kh-promo__slide {
    position: relative !important;
    flex: 0 0 var(--kh-slide-width) !important;
    width: var(--kh-slide-width) !important;
    min-width: var(--kh-slide-width) !important;
    max-width: var(--kh-slide-width) !important;
    height: auto !important;
    aspect-ratio: auto !important;
    overflow: hidden !important;
    scroll-snap-align: none !important;
    border-radius: 3px;
  }

  body#index .kh-promo__link,
  body#index .kh-promo__link picture {
    position: relative !important;
    display: block !important;
    width: 100% !important;
    height: auto !important;
    line-height: 0 !important;
  }

  body#index .kh-promo__img {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
    max-height: none !important;
    object-fit: contain !important;
    object-position: center center !important;
  }

  body#index .kh-promo__caption {
    position: absolute !important;
    z-index: 3 !important;
    top: 34px !important;
    right: auto !important;
    bottom: auto !important;
    left: 32px !important;
    width: 350px !important;
    max-width: calc(100% - 64px) !important;
    margin: 0 !important;
    padding: 0 !important;
    text-align: left !important;
    pointer-events: none;
  }

  body#index .kh-promo__slogan {
    margin: 0 !important;
    max-width: 350px !important;
    font-size: clamp(26px, 1.56vw, 32px) !important;
    line-height: 1.12 !important;
    font-weight: 500 !important;
    letter-spacing: -0.02em !important;
  }

  body#index .kh-promo__desc {
    margin: 17px 0 0 !important;
    max-width: 350px !important;
    font-size: 15px !important;
    line-height: 1.45 !important;
  }

  body#index .kh-promo__cta {
    display: inline-flex !important;
    align-items: center;
    margin-top: 42px !important;
    font-size: 15px !important;
    line-height: 1 !important;
    font-weight: 500 !important;
    white-space: nowrap;
  }

  body#index .kh-promo__nav {
    position: absolute !important;
    z-index: 20 !important;
    top: 50% !important;
    width: 40px !important;
    height: 42px !important;
    margin: 0 !important;
    padding: 0 !important;
    display: grid !important;
    place-items: center !important;
    border: 0 !important;
    border-radius: 2px !important;
    background: rgba(255,255,255,.97) !important;
    color: #222 !important;
    box-shadow: 0 1px 4px rgba(0,0,0,.08) !important;
    transform: translateY(-50%) !important;
    cursor: pointer;
  }
  body#index .kh-promo__nav--prev { left: 0 !important; right: auto !important; }
  body#index .kh-promo__nav--next { right: 0 !important; left: auto !important; }
  body#index .kh-promo__nav:hover:not(:disabled) { background:#fff !important; }
  body#index .kh-promo__nav:disabled { opacity:.38 !important; cursor:default; }

  body#index .kh-promo__dots {
    position:absolute !important;
    z-index:25 !important;
    left:50% !important;
    bottom:10px !important;
    transform:translateX(-50%) !important;
    display:flex !important;
    align-items:center;
    gap:6px;
  }
  body#index .kh-promo__dot {
    width:8px !important;
    height:8px !important;
    border-radius:50% !important;
    background:rgba(255,255,255,.58) !important;
    border:0 !important;
    padding:0 !important;
  }
  body#index .kh-promo__dot.is-active { background:#fff !important; }

  /* Classic: one centered banner with generous page margins. */
  body#index .kh-promo--classic .kh-promo__viewport {
    --kh-slide-width: min(1180px, calc(100vw - 96px));
  }

  /* Full: one edge-to-edge banner; neighbouring slides sit outside the viewport. */
  body#index .kh-promo--full .kh-promo__viewport {
    --kh-slide-width: 100vw;
    --kh-slide-gap: 0px;
    --kh-center-space: 0px;
  }
}

@media (min-width: 1025px) {
  body#index .kh-promo[data-kh-arrows="0"] .kh-promo__nav { display: none !important; }
  body#index .kh-promo[data-kh-dots="0"] .kh-promo__dots { display: none !important; }
}


/* Desktop infinite-loop clones are generated only by v1.1.1 JS. */
@media (min-width: 1025px) {
  body#index .kh-promo__slide[data-kh-loop-clone] {
    pointer-events: none;
  }
}

/* v1.2 — per-slide caption controls. */
@media (min-width: 1025px) {
  body#index .kh-promo__slide { --kh-slide-overlay: 0; }
  body#index .kh-promo__overlay {
    position: absolute;
    z-index: 2;
    inset: 0;
    pointer-events: none;
    background: rgba(0,0,0,calc(var(--kh-slide-overlay) / 100));
  }
  body#index .kh-promo__slide--text-light .kh-promo__caption { color:#fff !important; }
  body#index .kh-promo__slide--text-dark .kh-promo__caption { color:#191919 !important; }
  body#index .kh-promo__slide--caption-bottom-left .kh-promo__caption { top:auto !important; bottom:34px !important; left:32px !important; transform:none !important; }
  body#index .kh-promo__slide--caption-center-left .kh-promo__caption { top:50% !important; bottom:auto !important; left:32px !important; transform:translateY(-50%) !important; }
  body#index .kh-promo__slide--caption-center .kh-promo__caption { top:50% !important; bottom:auto !important; left:50% !important; width:min(520px,calc(100% - 64px)) !important; max-width:520px !important; text-align:center !important; transform:translate(-50%,-50%) !important; }
  body#index .kh-promo__slide--caption-center .kh-promo__slogan,
  body#index .kh-promo__slide--caption-center .kh-promo__desc { margin-left:auto !important; margin-right:auto !important; }
  body#index .kh-promo__slides { cursor:grab; }
  body#index .kh-promo__slides:active { cursor:grabbing; }
}

/* v1.2.2 — mobile product finder: every grey square is ONE horizontal slide.
   The theme sets flex-direction:column on mobile, so row/nowrap is deliberately
   forced here with !important. The track also breaks out of the theme container
   to reduce the white side margins while keeping a small peek of the next card. */
.kh-finder-mobile-dots { display:none; }
@media (max-width: 768px) {
  body#index .kh-finder-section .cs-container__inner,
  body#index [data-kh-finder],
  body#index [data-kh-finder] .cs-product-finder__step--current {
    overflow: visible !important;
  }

  body#index [data-kh-finder] .cs-product-finder__step-options {
    box-sizing:border-box !important;
    display:flex !important;
    flex-direction:row !important;
    flex-wrap:nowrap !important;
    flex-flow:row nowrap !important;
    align-items:stretch !important;
    justify-content:flex-start !important;
    grid-template-columns:none !important;
    grid-auto-flow:unset !important;
    gap:12px !important;
    column-gap:12px !important;
    row-gap:0 !important;

    width:100vw !important;
    max-width:none !important;
    min-width:100vw !important;
    position:relative !important;
    left:50% !important;
    right:auto !important;
    margin-left:-50vw !important;
    margin-right:0 !important;
    padding:6px 12px 12px !important;

    overflow-x:auto !important;
    overflow-y:hidden !important;
    scroll-snap-type:x mandatory !important;
    scroll-padding-left:12px !important;
    scroll-behavior:smooth !important;
    overscroll-behavior-x:contain !important;
    -webkit-overflow-scrolling:touch !important;
    scrollbar-width:none !important;
    -ms-overflow-style:none !important;
    touch-action:pan-x pan-y !important;
  }

  body#index [data-kh-finder] .cs-product-finder__step-options::-webkit-scrollbar {
    display:none !important;
    width:0 !important;
    height:0 !important;
    background:transparent !important;
  }

  body#index [data-kh-finder] .cs-product-finder__step-option {
    box-sizing:border-box !important;
    display:block !important;
    float:none !important;
    flex:0 0 calc(100vw - 44px) !important;
    flex-grow:0 !important;
    flex-shrink:0 !important;
    flex-basis:calc(100vw - 44px) !important;
    width:calc(100vw - 44px) !important;
    min-width:calc(100vw - 44px) !important;
    max-width:calc(100vw - 44px) !important;
    height:auto !important;
    min-height:0 !important;
    aspect-ratio:1 / 1 !important;
    margin:0 !important;
    padding:0 !important;
    scroll-snap-align:start !important;
    scroll-snap-stop:always !important;
    border-radius:14px !important;
    overflow:hidden !important;
  }

  body#index [data-kh-finder] .cs-product-finder__option-content {
    box-sizing:border-box !important;
    width:100% !important;
    height:100% !important;
    min-height:0 !important;
    margin:0 !important;
    padding:22px 16px 20px !important;
    display:flex !important;
    flex-direction:column !important;
    flex-wrap:nowrap !important;
    align-items:center !important;
    justify-content:center !important;
    gap:16px !important;
  }

  body#index [data-kh-finder] .cs-product-finder__option-image {
    display:block !important;
    flex:0 0 auto !important;
    width:clamp(160px,48vw,210px) !important;
    height:clamp(160px,48vw,210px) !important;
    max-width:62% !important;
    max-height:62% !important;
    margin:0 auto !important;
    object-fit:contain !important;
    object-position:center !important;
  }

  body#index [data-kh-finder] .cs-product-finder__option-label {
    flex:0 0 auto !important;
    width:100% !important;
    max-width:92% !important;
    font-size:clamp(17px,4.8vw,20px) !important;
    line-height:1.22 !important;
    font-weight:500 !important;
    text-align:center !important;
    margin:0 auto !important;
  }

  body#index [data-kh-finder] .cs-product-finder__step-title {
    font-size:clamp(25px,7.2vw,32px) !important;
    line-height:1.1 !important;
  }

  /* Keep the carousel controls in their own normal-flow row.  Some theme
     rules position generic finder children/buttons, which could otherwise put
     a dot on top of / between the cards. */
  body#index [data-kh-finder] .cs-product-finder__step--current {
    display:block !important;
    position:relative !important;
    width:100% !important;
    min-height:0 !important;
    margin-bottom:0 !important;
    padding-bottom:0 !important;
  }

  body#index [data-kh-finder] .kh-finder-mobile-dots {
    box-sizing:border-box !important;
    position:relative !important;
    inset:auto !important;
    top:auto !important;
    right:auto !important;
    bottom:auto !important;
    left:auto !important;
    z-index:4 !important;
    transform:none !important;
    float:none !important;
    clear:both !important;
    display:flex !important;
    flex-flow:row nowrap !important;
    justify-content:center !important;
    align-items:center !important;
    gap:7px !important;
    width:100% !important;
    max-width:100% !important;
    height:18px !important;
    min-height:18px !important;
    margin:10px auto 0 !important;
    padding:0 !important;
    overflow:visible !important;
    pointer-events:auto !important;
  }

  body#index [data-kh-finder] .kh-finder-mobile-dots button {
    appearance:none !important;
    -webkit-appearance:none !important;
    box-sizing:border-box !important;
    position:static !important;
    inset:auto !important;
    top:auto !important;
    right:auto !important;
    bottom:auto !important;
    left:auto !important;
    transform:none !important;
    float:none !important;
    flex:0 0 auto !important;
    display:block !important;
    width:7px !important;
    height:7px !important;
    min-width:7px !important;
    min-height:7px !important;
    max-width:none !important;
    max-height:none !important;
    border:0 !important;
    border-radius:999px !important;
    padding:0 !important;
    margin:0 !important;
    background:#d6dadd !important;
    box-shadow:none !important;
    cursor:pointer !important;
    transition:width .2s ease,background .2s ease !important;
  }

  body#index [data-kh-finder] .kh-finder-mobile-dots button.is-active {
    width:22px !important;
    background:#25282b !important;
  }

  /* The finder used to inherit a large section/footer spacing from the theme.
     Keep a compact transition to whichever homepage block follows it. */
  body#index .kh-finder-section {
    margin-bottom:0 !important;
    padding-bottom:20px !important;
  }
  body#index .kh-finder-section .cs-container__inner,
  body#index .kh-finder-section [data-kh-finder] {
    margin-bottom:0 !important;
    padding-bottom:0 !important;
    min-height:0 !important;
  }

  body#index [data-kh-finder] .cs-product-finder__step-options.kh-finder-is-dragging {
    scroll-snap-type:none !important;
    scroll-behavior:auto !important;
    cursor:grabbing !important;
    user-select:none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  body#index .kh-promo__slides { scroll-behavior:auto !important; }
  .kh-finder-mobile-dots button { transition:none !important; }
}

/* --------------------------------------------------------------------------
   v1.2.9 — Polecane produkty: filled seamless rotating infinite carousel
   --------------------------------------------------------------------------
   The old markup used the theme's .cs-products-carousel--use-whole-screen.
   That carousel paints its own strong edge treatment and navigation. The
   module now owns this section end-to-end so both edges fade symmetrically and
   the track can wrap forever without exposing an empty end. */
body#index .kh-recommended-section {
  overflow: visible !important;
}

body#index .kh-products-carousel {
  --kh-rec-card-width: clamp(210px, 13.5vw, 270px);
  --kh-rec-gap: clamp(14px, 1vw, 20px);
  --kh-rec-fade: clamp(76px, 7vw, 150px);
  position: relative;
  left: 50%;
  width: 100vw;
  max-width: none;
  margin-left: -50vw;
  padding: 0;
  overflow: visible;
  isolation: isolate;
}

body#index .kh-products-carousel__viewport {
  position: relative;
  width: 100%;
  max-width: none;
  overflow: hidden;
  /* v1.2.10: slightly stronger and earlier edge fog. The fade starts a
     touch sooner, is more noticeable around the third visible product and
     becomes denser at the extreme edges, while still keeping the carousel
     motion readable underneath. */
  -webkit-mask-image: linear-gradient(to right,
    transparent 0%,
    rgba(0,0,0,.10) 4%,
    rgba(0,0,0,.24) 9%,
    rgba(0,0,0,.42) 15%,
    rgba(0,0,0,.60) 21%,
    rgba(0,0,0,.76) 27%,
    rgba(0,0,0,.89) 33%,
    rgba(0,0,0,.97) 39%,
    #000 44%,
    #000 56%,
    rgba(0,0,0,.97) 61%,
    rgba(0,0,0,.89) 67%,
    rgba(0,0,0,.76) 73%,
    rgba(0,0,0,.60) 79%,
    rgba(0,0,0,.42) 85%,
    rgba(0,0,0,.24) 91%,
    rgba(0,0,0,.10) 96%,
    transparent 100%);
  mask-image: linear-gradient(to right,
    transparent 0%,
    rgba(0,0,0,.10) 4%,
    rgba(0,0,0,.24) 9%,
    rgba(0,0,0,.42) 15%,
    rgba(0,0,0,.60) 21%,
    rgba(0,0,0,.76) 27%,
    rgba(0,0,0,.89) 33%,
    rgba(0,0,0,.97) 39%,
    #000 44%,
    #000 56%,
    rgba(0,0,0,.97) 61%,
    rgba(0,0,0,.89) 67%,
    rgba(0,0,0,.76) 73%,
    rgba(0,0,0,.60) 79%,
    rgba(0,0,0,.42) 85%,
    rgba(0,0,0,.24) 91%,
    rgba(0,0,0,.10) 96%,
    transparent 100%);
}

body#index .kh-products-carousel__track {
  display: flex !important;
  flex-flow: row nowrap !important;
  align-items: stretch;
  gap: var(--kh-rec-gap) !important;
  width: max-content !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
  transform: translate3d(0,0,0);
  transition: transform 520ms cubic-bezier(.22,.61,.36,1);
  will-change: transform;
  touch-action: pan-y;
  user-select: none;
}

body#index .kh-products-carousel__track.kh-products-carousel__track--no-transition {
  transition: none !important;
}

body#index .kh-products-carousel__slide {
  box-sizing: border-box;
  flex: 0 0 var(--kh-rec-card-width) !important;
  width: var(--kh-rec-card-width) !important;
  min-width: var(--kh-rec-card-width) !important;
  max-width: var(--kh-rec-card-width) !important;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

body#index .kh-products-carousel__slide--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  padding: 2rem !important;
}

body#index .kh-products-carousel__product-tile,
body#index .kh-products-carousel__product-tile > .cs-product-tile {
  height: 100%;
}

/* Navigation lives OUTSIDE the masked viewport, so the arrows stay crisp even
   when the products behind them are fading into the page background. */
body#index .kh-products-carousel__nav {
  position: absolute !important;
  z-index: 30 !important;
  top: 50% !important;
  display: grid !important;
  place-items: center !important;
  width: 46px !important;
  height: 46px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 1px solid rgba(0,0,0,.14) !important;
  border-radius: 50% !important;
  background: rgba(255,255,255,.96) !important;
  color: #171717 !important;
  box-shadow: 0 5px 22px rgba(0,0,0,.13) !important;
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(-58%) !important;
  cursor: pointer !important;
  transition: background .2s ease, box-shadow .2s ease, transform .2s ease !important;
}
body#index .kh-products-carousel__nav:hover {
  background: #fff !important;
  box-shadow: 0 7px 26px rgba(0,0,0,.18) !important;
  transform: translateY(-58%) scale(1.04) !important;
}
body#index .kh-products-carousel__nav--prev { left: 22px !important; right: auto !important; }
body#index .kh-products-carousel__nav--next { right: 22px !important; left: auto !important; }
body#index .kh-products-carousel__nav svg { display:block; width:17px; height:17px; }
body#index .kh-products-carousel--single .kh-products-carousel__nav { display:none !important; }

body#index .kh-products-carousel__pagination {
  position: relative;
  width: 54px;
  height: 3px;
  margin: 18px auto 0;
  border-radius: 999px;
  overflow: hidden;
  background: #e7e7e7;
}
body#index .kh-products-carousel__pagination-bar {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  border-radius: inherit;
  background: var(--red, #e6382b);
  transform-origin: left center;
  transition: left .35s ease, width .35s ease;
}
body#index .kh-products-carousel--single .kh-products-carousel__pagination { display:none; }

@media (prefers-reduced-motion: reduce) {
  body#index .kh-products-carousel__track { transition-duration: 0ms !important; }
  body#index .kh-products-carousel__nav { transition: none !important; }
}

@media (max-width: 768px) {
  body#index .kh-products-carousel {
    --kh-rec-card-width: min(78vw, 310px);
    --kh-rec-gap: 12px;
    left: auto;
    width: 100%;
    margin-left: 0;
  }
  body#index .kh-products-carousel__viewport {
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0 0 6px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -webkit-mask-image: none;
    mask-image: none;
  }
  body#index .kh-products-carousel__viewport::-webkit-scrollbar { display:none; }
  body#index .kh-products-carousel__track {
    width: max-content !important;
    padding: 0 14px !important;
    transform: none !important;
    transition: none !important;
    touch-action: pan-x pan-y;
    user-select: auto;
  }
  body#index .kh-products-carousel__slide { scroll-snap-align: start; }
  body#index .kh-products-carousel__nav { display:none !important; }
  body#index .kh-products-carousel__pagination { display:none !important; }
}

/* v1.3.14 per-section spacing correction. Positive values add breathing room
   via padding, while negative values pull neighbouring sections together via
   margin. Zero preserves the existing layout exactly. */
.kh-layout-spacing {
  box-sizing: border-box;
  padding-top: max(var(--kh-space-top-desktop, 0px), 0px);
  padding-bottom: max(var(--kh-space-bottom-desktop, 0px), 0px);
  margin-top: min(var(--kh-space-top-desktop, 0px), 0px);
  margin-bottom: min(var(--kh-space-bottom-desktop, 0px), 0px);
}
@media (max-width: 768px) {
  .kh-layout-spacing {
    padding-top: max(var(--kh-space-top-mobile, 0px), 0px);
    padding-bottom: max(var(--kh-space-bottom-mobile, 0px), 0px);
    margin-top: min(var(--kh-space-top-mobile, 0px), 0px);
    margin-bottom: min(var(--kh-space-bottom-mobile, 0px), 0px);
  }
}

/* Safe visual presets for Recommended Products. The default/current preset is
   exactly the proven v1.2.10 geometry. */
@media (min-width: 769px) {
  body#index .kh-products-carousel--cards-compact { --kh-rec-card-width: clamp(190px, 12vw, 240px); }
  body#index .kh-products-carousel--cards-large { --kh-rec-card-width: clamp(230px, 15vw, 300px); }
  body#index .kh-products-carousel--gap-tight { --kh-rec-gap: clamp(8px, .55vw, 12px); }
  body#index .kh-products-carousel--gap-wide { --kh-rec-gap: clamp(20px, 1.35vw, 28px); }
  body#index .kh-products-carousel--fog-soft .kh-products-carousel__viewport {
    -webkit-mask-image: linear-gradient(to right,
      transparent 0%, rgba(0,0,0,.25) 6%, rgba(0,0,0,.55) 14%, rgba(0,0,0,.78) 22%,
      rgba(0,0,0,.94) 30%, #000 38%, #000 62%, rgba(0,0,0,.94) 70%,
      rgba(0,0,0,.78) 78%, rgba(0,0,0,.55) 86%, rgba(0,0,0,.25) 94%, transparent 100%);
    mask-image: linear-gradient(to right,
      transparent 0%, rgba(0,0,0,.25) 6%, rgba(0,0,0,.55) 14%, rgba(0,0,0,.78) 22%,
      rgba(0,0,0,.94) 30%, #000 38%, #000 62%, rgba(0,0,0,.94) 70%,
      rgba(0,0,0,.78) 78%, rgba(0,0,0,.55) 86%, rgba(0,0,0,.25) 94%, transparent 100%);
  }
  body#index .kh-products-carousel--fog-strong .kh-products-carousel__viewport {
    -webkit-mask-image: linear-gradient(to right,
      transparent 0%, rgba(0,0,0,.06) 5%, rgba(0,0,0,.18) 11%, rgba(0,0,0,.34) 17%,
      rgba(0,0,0,.52) 23%, rgba(0,0,0,.70) 29%, rgba(0,0,0,.86) 35%,
      rgba(0,0,0,.96) 41%, #000 46%, #000 54%, rgba(0,0,0,.96) 59%,
      rgba(0,0,0,.86) 65%, rgba(0,0,0,.70) 71%, rgba(0,0,0,.52) 77%,
      rgba(0,0,0,.34) 83%, rgba(0,0,0,.18) 89%, rgba(0,0,0,.06) 95%, transparent 100%);
    mask-image: linear-gradient(to right,
      transparent 0%, rgba(0,0,0,.06) 5%, rgba(0,0,0,.18) 11%, rgba(0,0,0,.34) 17%,
      rgba(0,0,0,.52) 23%, rgba(0,0,0,.70) 29%, rgba(0,0,0,.86) 35%,
      rgba(0,0,0,.96) 41%, #000 46%, #000 54%, rgba(0,0,0,.96) 59%,
      rgba(0,0,0,.86) 65%, rgba(0,0,0,.70) 71%, rgba(0,0,0,.52) 77%,
      rgba(0,0,0,.34) 83%, rgba(0,0,0,.18) 89%, rgba(0,0,0,.06) 95%, transparent 100%);
  }
}

/* ==========================================================================
   Linked Variants chimney configurator — v1.3.3
   Typ komina -> Średnica -> Wysokość
   ========================================================================== */
body#index [data-kh-linked-configurator] .kh-config-start {
  position: relative;
  z-index: 20;
  pointer-events: auto !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px !important;
  background: #e6382b !important;
  border: 1px solid #e6382b !important;
  color: #fff !important;
  font: inherit;
  font-weight: 600 !important;
  text-decoration: none !important;
  text-transform: uppercase;
  line-height: 1 !important;
  user-select: none;
  -webkit-user-select: none;
}
body#index [data-kh-linked-configurator] .kh-config-start:hover {
  background: #cf2f24 !important;
  border-color: #cf2f24 !important;
  color: #fff !important;
}
body#index [data-kh-linked-configurator] .kh-config-start:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

body#index [data-kh-linked-configurator] .kh-config-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: stretch;
  margin: 12px 0 18px;
}
body#index [data-kh-linked-configurator] .kh-config-option {
  appearance: none;
  -webkit-appearance: none;
  min-width: 96px;
  min-height: 54px;
  padding: 12px 18px;
  border: 1px solid #dedede;
  border-radius: 3px;
  background: #fff;
  color: #171717;
  font: inherit;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease;
}
body#index [data-kh-linked-configurator] .kh-config-option:hover,
body#index [data-kh-linked-configurator] .kh-config-option:focus-visible {
  border-color: var(--red, #e6382b);
  box-shadow: 0 0 0 1px var(--red, #e6382b);
  outline: none;
}
body#index [data-kh-linked-configurator] .kh-config-option.is-active {
  border-color: var(--red, #e6382b);
  background: var(--red, #e6382b);
  color: #fff;
  box-shadow: 0 0 0 1px var(--red, #e6382b);
}
body#index [data-kh-linked-configurator] .kh-config-empty {
  width: 100%;
  margin: 4px 0 10px;
  padding: 12px 14px;
  border: 1px solid #eadede;
  background: #fff8f8;
  color: #8c4444;
}
body#index [data-kh-linked-configurator] .kh-config-summary {
  display: grid;
  gap: 7px;
  margin-top: 10px;
}
body#index [data-kh-linked-configurator] .kh-config-summary__row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(0,0,0,.08);
}
body#index [data-kh-linked-configurator] .kh-config-summary__row span { color: #777; }
body#index [data-kh-linked-configurator] .kh-config-summary__row strong { color: #171717; text-align: right; }
body#index [data-kh-linked-configurator] [data-kh-config-image] img {
  display: block;
  max-width: 100%;
  max-height: 390px;
  margin: 0 auto;
  object-fit: contain;
}
body#index [data-kh-linked-configurator] .kh-config-show-product {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-width: 118px;
  min-height: 46px;
  padding: 11px 24px;
  margin: 0;
  border: 1px solid var(--red, #e6382b) !important;
  background: var(--red, #e6382b) !important;
  color: #fff !important;
  font-weight: 700;
  text-decoration: none !important;
  cursor: pointer;
  opacity: 1;
  visibility: visible !important;
}
body#index [data-kh-linked-configurator] .kh-config-show-product:hover {
  filter: brightness(.94);
  color: #fff !important;
}
body#index [data-kh-linked-configurator] .kh-config-show-product.is-disabled {
  display: inline-flex !important;
  opacity: .45;
  pointer-events: none;
  cursor: not-allowed;
}
body#index [data-kh-linked-configurator] .config-btns {
  display: flex !important;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}


@media (max-width: 768px) {
  body#index [data-kh-linked-configurator] .kh-config-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 8px;
  }
  body#index [data-kh-linked-configurator] .kh-config-option {
    width: 100%;
    min-width: 0;
    min-height: 52px;
    padding: 10px 8px;
  }
}


/* v1.3.10 — configurator card actions: one centered CTA only. */
body#index [data-kh-linked-configurator] .step_01 .btn-container {
  display: flex !important;
  width: 100% !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0 !important;
  text-align: center !important;
}
body#index [data-kh-linked-configurator] .step_01 .kh-config-start {
  margin-left: auto !important;
  margin-right: auto !important;
}


/* v1.3.13 — MOBILE ONLY: compact configurator options + final actions below options.
   Desktop is intentionally untouched. */
@media (max-width: 768px) {
  /* Keep the content flow deterministic even if the legacy theme applies
     positioning/order rules to the old configurator classes. */
  body#index [data-kh-linked-configurator] .step_02 .inputs_box,
  body#index [data-kh-linked-configurator] .step_03 .inputs_box,
  body#index [data-kh-linked-configurator] .step_04 .inputs_box {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
  }

  body#index [data-kh-linked-configurator] .step_02 .inputs_box > h2,
  body#index [data-kh-linked-configurator] .step_03 .inputs_box > h2,
  body#index [data-kh-linked-configurator] .step_04 .inputs_box > h2 {
    order: 10 !important;
  }

  body#index [data-kh-linked-configurator] .step_02 .inputs_box > .title,
  body#index [data-kh-linked-configurator] .step_03 .inputs_box > .title,
  body#index [data-kh-linked-configurator] .step_04 .inputs_box > .title {
    order: 20 !important;
  }

  body#index [data-kh-linked-configurator] .step_02 .kh-config-options,
  body#index [data-kh-linked-configurator] .step_03 .kh-config-options,
  body#index [data-kh-linked-configurator] .step_04 .kh-config-options {
    order: 30 !important;
    margin: 10px 0 12px !important;
    gap: 7px !important;
  }

  /* Diameter and height are short values: use four columns on mobile so the
     wizard stays compact. Longest labels such as 14,5m still fit safely. */
  body#index [data-kh-linked-configurator] .step_03 .kh-config-options,
  body#index [data-kh-linked-configurator] .step_04 .kh-config-options {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 5px !important;
  }

  body#index [data-kh-linked-configurator] .step_02 .kh-config-option {
    min-height: 42px !important;
    height: auto !important;
    padding: 7px 6px !important;
    font-size: 15px !important;
    line-height: 1.15 !important;
  }

  body#index [data-kh-linked-configurator] .step_03 .kh-config-option,
  body#index [data-kh-linked-configurator] .step_04 .kh-config-option {
    min-height: 39px !important;
    height: auto !important;
    padding: 6px 3px !important;
    font-size: 13.5px !important;
    line-height: 1.1 !important;
    white-space: nowrap !important;
  }

  /* Back buttons on the first two wizard steps stay below their tiles. */
  body#index [data-kh-linked-configurator] .step_02 .btn_back,
  body#index [data-kh-linked-configurator] .step_03 .btn_back {
    order: 40 !important;
    position: static !important;
    inset: auto !important;
    transform: none !important;
    float: none !important;
    align-self: flex-start !important;
    margin: 2px 0 0 !important;
  }

  /* The final step used to inherit a legacy rule that visually moved the
     actions above the heading. Force the action row to be the LAST element. */
  body#index [data-kh-linked-configurator] .step_04 .config-btns {
    order: 40 !important;
    position: static !important;
    inset: auto !important;
    transform: none !important;
    float: none !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    width: 100% !important;
    gap: 8px !important;
    margin: 4px 0 0 !important;
    padding: 0 !important;
  }

  body#index [data-kh-linked-configurator] .step_04 .config-btns .btn_back,
  body#index [data-kh-linked-configurator] .step_04 .config-btns .kh-config-show-product {
    position: static !important;
    inset: auto !important;
    transform: none !important;
    float: none !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 42px !important;
    height: 42px !important;
    margin: 0 !important;
    padding: 8px 10px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  body#index [data-kh-linked-configurator] .step_04 .config-btns .btn_back {
    order: 1 !important;
  }
  body#index [data-kh-linked-configurator] .step_04 .config-btns .kh-config-show-product {
    order: 2 !important;
  }
}

@media (max-width: 390px) {
  body#index [data-kh-linked-configurator] .step_03 .kh-config-options,
  body#index [data-kh-linked-configurator] .step_04 .kh-config-options {
    gap: 4px !important;
  }

  body#index [data-kh-linked-configurator] .step_02 .kh-config-option {
    min-height: 40px !important;
    padding: 6px 4px !important;
    font-size: 14px !important;
  }

  body#index [data-kh-linked-configurator] .step_03 .kh-config-option,
  body#index [data-kh-linked-configurator] .step_04 .kh-config-option {
    min-height: 37px !important;
    padding: 5px 2px !important;
    font-size: 12.5px !important;
  }
}



/* v1.3.19 — PHONE ONLY seamless hero. Keep the theme's original gap/spacing. */
@media (max-width: 768px) {
  body#index .kh-promo.cs-container {
    width: 100vw !important;
    max-width: none !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    overflow: hidden !important;
  }
  body#index .kh-promo.cs-container > .cs-container__inner {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
  }
  body#index .kh-promo__viewport {
    --kh-mobile-slide-width: calc(100vw - 48px);
    position: relative !important;
    width: 100% !important;
    max-width: none !important;
    overflow: hidden !important;
  }

  /* Hide only the phone promo track until JS has placed the first real slide
     exactly in the viewport centre. Prevents the left-edge flash on page load. */
  body#index .kh-promo--phone1324 .kh-promo__viewport {
    opacity: 0;
  }
  body#index .kh-promo--phone1324.kh-mobile-ready .kh-promo__viewport {
    opacity: 1;
  }
  body#index .kh-promo__slides.kh-mobile-transform-track {
    --kh-peek: 0px !important;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: flex-start !important;
    box-sizing: border-box !important;
    width: max-content !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    scroll-snap-type: none !important;
    scroll-behavior: auto !important;
    will-change: transform;
    touch-action: pan-y !important;
  }
  body#index .kh-promo__slides.kh-mobile-transform-track.kh-mobile-animating {
    transition: transform var(--kh-admin-transition, 500ms) cubic-bezier(.4,0,.2,1) !important;
  }
  body#index .kh-promo__slide {
    position: relative !important;
    flex: 0 0 var(--kh-mobile-slide-width) !important;
    width: var(--kh-mobile-slide-width) !important;
    min-width: var(--kh-mobile-slide-width) !important;
    max-width: var(--kh-mobile-slide-width) !important;
    scroll-snap-align: none !important;
  }
  body#index .kh-promo__link,
  body#index .kh-promo__link picture,
  body#index .kh-promo__img {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  body#index .kh-promo__slide[data-kh-loop-clone] { pointer-events: none !important; }
}
