/* MODUŁ TYP 4 — siatka wielowierszowa (np. 6×2), wspólne przewijanie poziome */
.emag-module-t4.emag-carousel {
  --emag-carousel-rows: 2;
}

.emag-module-t4.emag-carousel .emag-carousel__slide {
  grid-template-rows: repeat(var(--emag-carousel-rows, 2), minmax(0, auto));
}

.shop_index #box_lastadded.emag-module-t4.emag-carousel {
  max-width: 1320px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  box-sizing: border-box;
}

@media screen and (max-width: 767px) {
  .emag-module-t4.emag-carousel {
    --emag-carousel-visible: 3;
  }

  .emag-module-t4.emag-carousel .emag-carousel__arrow {
    display: none !important;
  }

  .emag-module-t4.emag-carousel .emag-carousel__viewport {
    padding-left: 0;
    padding-right: 0;
  }
}

/* Badge poza .boximgsize — kontener ma overflow:hidden i przycinał etykietę + ramkę */
.emag-module-t3.emag-carousel .emag-carousel__slide > .product > a {
  position: relative;
}

.emag-module-t3.emag-carousel .emag-discount-badge,
#box_mainproducts.emag-carousel .emag-discount-badge,
#box_specialoffer.emag-carousel .emag-discount-badge,
#box_lastadded.emag-carousel .emag-discount-badge,
[id*="box_recommendations_"].emag-carousel .emag-discount-badge,
#box_bestsellers.emag-carousel .emag-discount-badge,
.wce-wishlists-page__list-carousel.emag-carousel .emag-discount-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  z-index: 3;
  margin: 0;
  background-color: var(--emag-header-accent-red, #ff1d25);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  line-height: 1;
  padding: 6px 9px;
  border-radius: 7px;
  pointer-events: none;
  white-space: nowrap;
}

.emag-module-t3.emag-carousel .emag-new-badge,
#box_mainproducts.emag-carousel .emag-new-badge,
#box_specialoffer.emag-carousel .emag-new-badge,
#box_lastadded.emag-carousel .emag-new-badge,
[id*="box_recommendations_"].emag-carousel .emag-new-badge,
#box_bestsellers.emag-carousel .emag-new-badge,
.wce-wishlists-page__list-carousel.emag-carousel .emag-new-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  z-index: 3;
  margin: 0;
  background-color: var(--emag-header-accent-blue, #0082e6);
  color: #fff;
  font-weight: 500;
  text-shadow: 0.25px 0 0 currentColor, -0.25px 0 0 currentColor;
  font-size: 12px;
  line-height: 1;
  padding: 6px 9px;
  border-radius: 7px;
  pointer-events: none;
  white-space: nowrap;
}

.emag-module-t3.emag-carousel .emag-discount-badge + .emag-new-badge,
#box_mainproducts.emag-carousel .emag-discount-badge + .emag-new-badge,
#box_specialoffer.emag-carousel .emag-discount-badge + .emag-new-badge,
#box_lastadded.emag-carousel .emag-discount-badge + .emag-new-badge,
[id*="box_recommendations_"].emag-carousel .emag-discount-badge + .emag-new-badge,
#box_bestsellers.emag-carousel .emag-discount-badge + .emag-new-badge,
.wce-wishlists-page__list-carousel.emag-carousel .emag-discount-badge + .emag-new-badge {
  top: 37px;
}

.products.emag-product-list .emag-new-badge {
  font-size: 12px !important;
}

#box_mainproducts.emag-carousel .emag-carousel__slide > .product > a,
#box_specialoffer.emag-carousel .emag-carousel__slide > .product > a,
#box_lastadded.emag-carousel .emag-carousel__slide > .product > a,
[id*="box_recommendations_"].emag-carousel .emag-carousel__slide > .product > a,
#box_bestsellers.emag-carousel .emag-carousel__slide > .product > a,
.wce-wishlists-page__list-carousel.emag-carousel .emag-carousel__slide > .product > a {
  position: relative;
}

/* SG TYP 1/2/4: spójna typografia tytułu (Bestsellery = jak Polecane) */
#box_mainproducts.emag-carousel .emag-carousel__slide > .product .productnamewrap .productname,
#box_bestsellers.emag-carousel .emag-carousel__slide > .product .productnamewrap .productname,
.wce-wishlists-page__list-carousel.emag-carousel .emag-carousel__slide > .product .productnamewrap .productname,
#box_specialoffer.emag-carousel .emag-carousel__slide > .product .productnamewrap .productname,
#box_lastadded.emag-carousel .emag-carousel__slide > .product .productnamewrap .productname,
[id*="box_recommendations_"].emag-carousel .emag-carousel__slide > .product .productnamewrap .productname {
  font-size: 1em;
  font-weight: inherit;
  padding: 0;
  line-height: 1.35;
  display: block;
}

/* SG (TYP 1/2/4): −20% odstępu między końcem tytułu a ceną (60→48px rezerwa, margin 10→8px) */
.shop_index .box.emag-carousel:not(.emag-module-t3) .emag-carousel__slide > .product .productnamewrap,
.shop_index .box.emag-carousel:not(.emag-module-t3) .emag-carousel__slide > .product > a > .productname {
  min-height: 48px !important;
  max-height: 48px !important;
  margin-bottom: 8px !important;
}

.emag-module-t3.emag-carousel .emag-cart-btn__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}

.emag-module-t3.emag-carousel .emag-cart-btn__img {
  width: 20px;
  height: 20px;
  display: block;
  filter: brightness(0) invert(1);
}

/* Mobile: kompaktowe zdjęcie (g01: height:0 + padding-bottom, img absolute) */
@media screen and (max-width: 767px) {
  .shop_product .emag-module-t3.emag-carousel .boximgsize {
    position: relative !important;
    display: block !important;
    flex: 0 0 auto !important;
    width: 100% !important;
    height: 0 !important;
    padding: 0 0 100% !important;
    margin: 0 !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
  }

  .shop_product .emag-module-t3.emag-carousel .boximgsize > img,
  .shop_product .emag-module-t3.emag-carousel .boximgsize .wce_carousel-wrap > img {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    margin: 0 auto !important;
    padding: 0 !important;
    object-fit: contain !important;
    object-position: center center !important;
  }

  .shop_product .emag-module-t3.emag-carousel .emag-carousel__slide > .product > a {
    flex: 0 0 auto !important;
    position: relative !important;
    z-index: 0 !important;
  }

  .shop_product .emag-module-t3.emag-carousel .emag-carousel__slide > .product .productnamewrap {
    position: relative !important;
    z-index: 1 !important;
    margin-top: 4px !important;
    margin-bottom: 0 !important;
  }

  .shop_product .emag-module-t3.emag-carousel .emag-carousel__slide > .product > .product__buy-row {
    position: relative !important;
    z-index: 1 !important;
  }

  .shop_product .emag-module-t3.emag-carousel .emag-carousel__slide > .product {
    padding-top: 0 !important;
    padding-bottom: 6px !important;
  }
}

/* SG mobile (TYP 1/2/4): tytuł max 3 linie + … — jak TYP 3 (2 linie) na karcie produktu */
@media screen and (max-width: 767px) {
  .shop_index .box.emag-carousel:not(.emag-module-t3) .productnamewrap.row::before,
  .shop_index .box.emag-carousel:not(.emag-module-t3) .productnamewrap.row::after,
  .shop_index .box.emag-carousel:not(.emag-module-t3) .emag-carousel__slide > .product > a > .productname.row::before,
  .shop_index .box.emag-carousel:not(.emag-module-t3) .emag-carousel__slide > .product > a > .productname.row::after {
    display: none !important;
    content: none !important;
  }

  .shop_index .box.emag-carousel:not(.emag-module-t3) .emag-carousel__slide > .product .productnamewrap,
  .shop_index .box.emag-carousel:not(.emag-module-t3) .emag-carousel__slide > .product > a > .productname {
    min-height: 0 !important;
    max-height: none !important;
    overflow: hidden !important;
    display: block !important;
    margin: 10px 0 8px !important;
    padding: 0 !important;
  }

  .shop_index .box.emag-carousel:not(.emag-module-t3) .emag-carousel__slide > .product .productnamewrap .productname,
  .shop_index .box.emag-carousel:not(.emag-module-t3) .emag-carousel__slide > .product > a > .productname {
    display: -webkit-box !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 3 !important;
    line-clamp: 3 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    line-height: 1.35 !important;
    max-height: calc(1.35em * 3) !important;
    word-break: break-word !important;
    padding: 0 !important;
  }
}

@media screen and (orientation: landscape) and (max-height: 520px) {
  html.mobile .shop_index .box.emag-carousel:not(.emag-module-t3) .productnamewrap.row::before,
  html.mobile .shop_index .box.emag-carousel:not(.emag-module-t3) .productnamewrap.row::after,
  html.mobile .shop_index .box.emag-carousel:not(.emag-module-t3) .emag-carousel__slide > .product > a > .productname.row::before,
  html.mobile .shop_index .box.emag-carousel:not(.emag-module-t3) .emag-carousel__slide > .product > a > .productname.row::after {
    display: none !important;
    content: none !important;
  }

  html.mobile .shop_index .box.emag-carousel:not(.emag-module-t3) .emag-carousel__slide > .product .productnamewrap,
  html.mobile .shop_index .box.emag-carousel:not(.emag-module-t3) .emag-carousel__slide > .product > a > .productname {
    min-height: 0 !important;
    max-height: none !important;
    overflow: hidden !important;
    display: block !important;
    margin: 10px 0 8px !important;
    padding: 0 !important;
  }

  html.mobile .shop_index .box.emag-carousel:not(.emag-module-t3) .emag-carousel__slide > .product .productnamewrap .productname,
  html.mobile .shop_index .box.emag-carousel:not(.emag-module-t3) .emag-carousel__slide > .product > a > .productname {
    display: -webkit-box !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 3 !important;
    line-clamp: 3 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    line-height: 1.35 !important;
    max-height: calc(1.35em * 3) !important;
    word-break: break-word !important;
    padding: 0 !important;
  }
}

/* eMAG karuzele — wyłącz Hammer wce_loader (lazy load zarządza emag-carousel.js) */
.box.emag-carousel.emag-lazy-managed .boximgsize.lazy-load,
.box.emag-carousel.emag-lazy-managed .boximgsize.loading,
.box.emag-carousel.emag-lazy-managed .boximgsize.emag-lazy-managed {
  background: none !important;
}

.box.emag-carousel.emag-lazy-managed .boximgsize.lazy-load::before,
.box.emag-carousel.emag-lazy-managed .boximgsize.lazy-load::after,
.box.emag-carousel.emag-lazy-managed .boximgsize.loading::before,
.box.emag-carousel.emag-lazy-managed .boximgsize.loading::after {
  display: none !important;
  content: none !important;
  animation: none !important;
  pointer-events: none !important;
}

/* eMAG lazy load — ukryj wce_loader gdy img już załadowane (Hammer zostawiał .lazy-load) */
.box.emag-carousel .boximgsize.lazy-load:has(img[data-emag-loaded="1"]),
.box.emag-carousel .boximgsize.loading:has(img[data-emag-loaded="1"]),
.box.emag-carousel .boximgsize.lazy-load:has(img:not([src^="data:"])),
.box.emag-carousel .boximgsize.loading:has(img:not([src^="data:"])) {
  background: none !important;
}

.box.emag-carousel .boximgsize.lazy-load::before,
.box.emag-carousel .boximgsize.lazy-load::after,
.box.emag-carousel .boximgsize.loading::before,
.box.emag-carousel .boximgsize.loading::after {
  pointer-events: none !important;
}

.box.emag-carousel .boximgsize.lazy-load:has(img[data-emag-loaded="1"])::before,
.box.emag-carousel .boximgsize.lazy-load:has(img[data-emag-loaded="1"])::after,
.box.emag-carousel .boximgsize.loading:has(img[data-emag-loaded="1"])::before,
.box.emag-carousel .boximgsize.loading:has(img[data-emag-loaded="1"])::after,
.box.emag-carousel .boximgsize.lazy-load:has(img:not([src^="data:"]))::before,
.box.emag-carousel .boximgsize.lazy-load:has(img:not([src^="data:"]))::after,
.box.emag-carousel .boximgsize.loading:has(img:not([src^="data:"]))::before,
.box.emag-carousel .boximgsize.loading:has(img:not([src^="data:"]))::after {
  display: none !important;
  content: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
}

/* Tytuł produktu: podkreślenie na hover (x-kom), bez przesuwania w dół (override g01 .productnamewrap:hover) */
.box.emag-carousel .productnamewrap,
.box.emag-carousel .productnamewrap:hover {
  overflow: hidden !important;
}

.box.emag-carousel .productnamewrap .productname,
.box.emag-carousel .productnamewrap:hover .productname,
.box.emag-carousel .emag-carousel__slide > .product > a > .productname {
  position: static !important;
  top: auto !important;
  bottom: auto !important;
  left: auto !important;
  right: auto !important;
  height: auto !important;
  min-height: 0 !important;
  background: none !important;
  box-shadow: none !important;
  text-decoration: none;
}

@media (hover: hover) {
  .box.emag-carousel .emag-carousel__slide > .product:hover .productnamewrap .productname,
  .box.emag-carousel .emag-carousel__slide > .product:focus-within .productnamewrap .productname,
  .box.emag-carousel .emag-carousel__slide > .product > a:hover .productname {
    text-decoration: underline;
    text-underline-offset: 2px;
  }
}

/* Desktop header — koszyk: badge jak ulubione + blokada auto-rozwijania po scrollu (backup) */
@media screen and (min-width: 768px) {
  html:not(.mobile) header .emag-header-basket__count,
  html:not(.mobile) header .wce-header-wish__count,
  html:not(.mobile) #box_wce_sticky-header .emag-header-basket__count,
  html:not(.mobile) #box_wce_sticky-header .wce-header-wish__count {
    position: absolute;
    top: 0;
    right: -2px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 8px;
    background: #111;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    display: none;
    align-items: center;
    justify-content: center;
    line-height: 1;
    pointer-events: none;
    box-sizing: border-box;
  }

  html:not(.mobile) header .emag-header-basket__count.is-visible,
  html:not(.mobile) header .wce-header-wish__count.is-visible,
  html:not(.mobile) #box_wce_sticky-header .emag-header-basket__count.is-visible,
  html:not(.mobile) #box_wce_sticky-header .wce-header-wish__count.is-visible {
    display: inline-flex !important;
  }

  /* G01: a.count::after (Font Awesome) po usunięciu empty-basket — strzałka w dół */
  html:not(.mobile) header .emag-header-basket-wrap .basket > a.count:before,
  html:not(.mobile) #box_wce_sticky-header .emag-header-basket-wrap .basket > a.count:before,
  html:not(.mobile) header .emag-header-basket-wrap .basket > a.count:after,
  html:not(.mobile) #box_wce_sticky-header .emag-header-basket-wrap .basket > a.count:after {
    display: none !important;
    content: none !important;
  }

  html:not(.mobile).emag-header-scrolling .emag-header-basket-wrap,
  html:not(.mobile).emag-header-scrolling .emag-header-basket-wrap .basket,
  html:not(.mobile).emag-header-scrolling .emag-header-basket-wrap .basket-contain {
    pointer-events: none !important;
  }

  html:not(.mobile) .emag-header-basket-wrap:not(.emag-basket-open) > .basket-contain {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transform: scaleY(0) !important;
    pointer-events: none !important;
    max-height: 0 !important;
    overflow: hidden !important;
  }

  html:not(.mobile) .emag-header-basket-wrap:not(.emag-basket-open) .basket:not(.empty-basket):hover + .basket-contain,
  html:not(.mobile) .emag-header-basket-wrap:not(.emag-basket-open) .basket-contain:hover {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transform: scaleY(0) !important;
    pointer-events: none !important;
  }

  html:not(.mobile) .emag-header-basket-wrap.emag-basket-open > .basket-contain {
    display: grid !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: scaleY(1) !important;
    transform-origin: top center !important;
    pointer-events: auto !important;
    max-height: none !important;
    overflow: auto !important;
  }

  html:not(.mobile) .emag-header-basket-wrap.emag-basket-open {
    overflow: visible !important;
  }

  html:not(.mobile) .emag-header-basket-wrap.emag-basket-open > .basket-contain::before {
    content: "";
    position: absolute;
    top: -12px;
    left: 0;
    right: 0;
    height: 12px;
  }

  /* G01: header .logo-bar .basket-contain { top: calc(100% + 53px) } */
  html:not(.mobile) header .logo-bar .emag-header-basket-wrap > .basket-contain,
  html:not(.mobile) header .emag-header-basket-wrap > .basket-contain,
  html:not(.mobile) #box_wce_sticky-header .emag-header-basket-wrap > .basket-contain {
    position: absolute !important;
    top: 100% !important;
    margin-top: 0 !important;
    transform-origin: top center !important;
    /* G01: left:auto !important tylko w header .logo-bar — sticky bez tego „lepi” do viewportu */
    left: auto !important;
    right: 0 !important;
    width: 540px !important;
    max-width: min(540px, calc(100vw - 32px)) !important;
    box-sizing: border-box !important;
  }

  /* Rozmiar ikon nagłówka (+10%) + podświetlenie hover jak x-kom — Faza A: jednolite 53×53 / SVG 28px */
  html:not(.mobile) {
    --emag-header-action-size: 53px;
    --emag-header-icon-size: 28px;
    --emag-header-wish-icon-size: calc(0.857375 * var(--emag-header-icon-size));
    --emag-header-actions-gap: 2px;
    --emag-header-action-hover-bg: #f2f2f2;
    --emag-header-action-radius: 8px;
  }

  html:not(.mobile) #box_wce_sticky-header.emag-sticky-compact #wce_sticky-logo img {
    transform: scale(var(--emag-header-logo-scale, 1.1)) !important;
  }

  html:not(.mobile) header .emag-header-actions .wce-header-wish,
  html:not(.mobile) #box_wce_sticky-header .emag-header-actions .wce-header-wish {
    width: var(--emag-header-action-size) !important;
    height: var(--emag-header-action-size) !important;
    min-width: var(--emag-header-action-size) !important;
    min-height: var(--emag-header-action-size) !important;
  }

  /* Podgląd koszyka nad menu/linią — .emag-header-actions ma transform (kontekst stackingu); podnieś blok */
  html:not(.mobile) header .logo-bar .emag-header-actions,
  html:not(.mobile) #box_wce_sticky-header.emag-sticky-compact .emag-header-actions {
    z-index: 10050 !important;
  }

  /* Responsywność logo-bar — grid 1fr|search|1fr (środek search = środek strony) */
  html:not(.mobile) header .logo-bar.emag-header-logo-bar,
  html:not(.mobile) header .logo-bar {
    display: grid !important;
    grid-template-areas: "emag-logo emag-search emag-actions";
    grid-template-columns: 1fr minmax(80px, 540px) 1fr;
    align-items: center;
    column-gap: clamp(8px, 1.2vw, 16px);
    min-height: var(--emag-header-logo-bar-min-h, 64px);
    padding-top: var(--emag-header-logo-bar-pad-y, 8px);
    padding-bottom: var(--emag-header-logo-bar-pad-y, 8px);
    width: 100% !important;
    max-width: var(--emag-content-max-width, 1320px) !important;
    margin-left: auto !important;
    margin-right: auto !important;
    box-sizing: border-box;
  }

  html:not(.mobile) #box_wce_sticky-header.emag-sticky-compact.wce_visible {
    display: grid !important;
    grid-template-columns: var(--emag-header-gutter, 40px) minmax(0, 1fr) var(--emag-header-gutter, 40px) !important;
    width: 100% !important;
    box-sizing: border-box;
  }

  html:not(.mobile) header.row {
    padding-top: var(--emag-header-row-pad-y, 5px) !important;
    padding-bottom: var(--emag-header-row-pad-y, 5px) !important;
  }

  html:not(.mobile) #box_wce_sticky-header.emag-sticky-compact > .container {
    display: grid !important;
    grid-template-areas: "emag-logo emag-search emag-actions";
    grid-template-columns: 1fr minmax(80px, 540px) 1fr;
    align-items: center;
    column-gap: clamp(8px, 1.2vw, 16px);
    grid-column: 2 / 3 !important;
    width: 100% !important;
    max-width: var(--emag-content-max-width, 1320px) !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    min-height: var(--emag-header-logo-bar-min-h, 64px);
    padding-top: var(--emag-header-logo-bar-pad-y, 8px);
    padding-bottom: var(--emag-header-logo-bar-pad-y, 8px);
    box-sizing: border-box;
  }

  html:not(.mobile) header .logo-bar .link-logo,
  html:not(.mobile) #box_wce_sticky-header.emag-sticky-compact #wce_sticky-logo {
    grid-area: emag-logo !important;
    justify-self: start !important;
    position: relative !important;
    left: auto !important;
    top: auto !important;
    transform: none !important;
    width: auto !important;
    max-width: max-content;
    height: var(--emag-header-action-size, 53px) !important;
    display: inline-flex !important;
    align-items: center !important;
  }

  html:not(.mobile) header .logo-bar .search__container,
  html:not(.mobile) #box_wce_sticky-header.emag-sticky-compact #wce_sticky-search {
    grid-area: emag-search !important;
    justify-self: stretch !important;
    position: relative !important;
    left: auto !important;
    top: auto !important;
    transform: none !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    height: auto !important;
    min-height: 0 !important;
    align-self: center !important;
    overflow: visible !important;
  }

  html:not(.mobile) header .logo-bar .emag-header-actions,
  html:not(.mobile) #box_wce_sticky-header.emag-sticky-compact .emag-header-actions {
    grid-area: emag-actions !important;
    justify-self: end !important;
    position: relative !important;
    right: auto !important;
    top: auto !important;
    transform: none !important;
    flex-shrink: 0;
    gap: 2px !important;
    column-gap: 2px !important;
  }

  @media screen and (max-width: 1180px) {
    html:not(.mobile) .emag-header-account__text {
      display: none !important;
    }
  }

  html:not(.mobile) .emag-header-basket-wrap.emag-basket-open > .basket-contain {
    z-index: 10060 !important;
  }

  /* 1) Wysokość pola wyszukiwarki = wysokość przycisku lupy (40px) */
  html:not(.mobile) header .search .search__input-area,
  html:not(.mobile) header .search-form .search-input,
  html:not(.mobile) #box_wce_sticky-header.emag-sticky-compact .search .search__input-area,
  html:not(.mobile) #box_wce_sticky-header.emag-sticky-compact .search-form .search-input {
    height: 40px !important;
    min-height: 40px !important;
  }

  html:not(.mobile) header .search .search__input[type="search"],
  html:not(.mobile) header .search-form .search-input,
  html:not(.mobile) #box_wce_sticky-header.emag-sticky-compact .search .search__input[type="search"] {
    height: 40px !important;
    min-height: 40px !important;
    line-height: 40px !important;
  }

  /* 2) Wyniki wyszukiwania na wierzchu — podnieś cały kontener (z-index:1) gdy search aktywny */
  html:not(.mobile).emag-search-active header.row,
  html:not(.mobile) header.row:has(.search_open),
  html:not(.mobile) header.row:has(.search_focused) {
    position: relative;
    z-index: 10080 !important;
  }

  html:not(.mobile) #box_wce_sticky-header:not(.wce_visible) {
    position: fixed !important;
    top: 0 !important;
    height: 0 !important;
    min-height: 0 !important;
    overflow: hidden !important;
    pointer-events: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  html:not(.mobile).emag-search-active #box_wce_sticky-header.wce_visible {
    z-index: 10080 !important;
  }

  html:not(.mobile).emag-search-active .menu.row,
  html:not(.mobile).emag-search-active nav.innermenu {
    z-index: 1 !important;
  }

  html:not(.mobile).emag-search-active header .logo-bar .search__container,
  html:not(.mobile) header .logo-bar .search__container:has(.search_open),
  html:not(.mobile) header .logo-bar .search__container:has(.search_focused),
  html:not(.mobile) #box_wce_sticky-header .search__container:has(.search_open),
  html:not(.mobile) #box_wce_sticky-header .search__container:has(.search_focused) {
    z-index: 10080 !important;
  }

  html:not(.mobile) header .search.search_open,
  html:not(.mobile) header .search.search_focused,
  html:not(.mobile) #box_wce_sticky-header .search.search_open,
  html:not(.mobile) #box_wce_sticky-header .search.search_focused {
    position: relative !important;
    z-index: 10080 !important;
  }

  html:not(.mobile) header .search .search__content,
  html:not(.mobile) header .search-form .suggestion,
  html:not(.mobile) #box_wce_sticky-header.emag-sticky-compact .search .search__content {
    z-index: 10080 !important;
    background: #fff !important;
    isolation: isolate;
  }

  html:not(.mobile) header .search.search_open .search__content,
  html:not(.mobile) header .search.search_focused .search__content,
  html:not(.mobile) header .search .search__content .js__search-xhr-content,
  html:not(.mobile) header .search .search__content .search__section,
  html:not(.mobile) header .search .search__content .search__section-head,
  html:not(.mobile) header .search .search__content .search__item,
  html:not(.mobile) header .search .search__content .search__results-container,
  html:not(.mobile) header .search .search__content .search__list-item,
  html:not(.mobile) header .search .search__content .search__product,
  html:not(.mobile) header .search .search__content .search__product-img,
  html:not(.mobile) header .search .search__content [data-search-section-name] {
    background: #fff !important;
  }

  html:not(.mobile) .emag-header-action__icon .emag-header-svg,
  html:not(.mobile) .emag-header-account__icon .emag-header-svg,
  html:not(.mobile) .emag-header-basket__icon .emag-header-svg {
    width: var(--emag-header-icon-size) !important;
    height: var(--emag-header-icon-size) !important;
  }

  html:not(.mobile) header .wce-header-wish__icon svg,
  html:not(.mobile) #box_wce_sticky-header .wce-header-wish__icon svg {
    width: var(--emag-header-wish-icon-size) !important;
    height: var(--emag-header-wish-icon-size) !important;
  }

  html:not(.mobile) a.emag-header-help,
  html:not(.mobile) header .emag-header-actions .wce-header-wish,
  html:not(.mobile) #box_wce_sticky-header .emag-header-actions .wce-header-wish,
  html:not(.mobile) header .emag-header-basket-wrap .basket > a.count,
  html:not(.mobile) #box_wce_sticky-header .emag-header-basket-wrap .basket > a.count,
  html:not(.mobile) header .emag-header-currency .boxhead,
  html:not(.mobile) #box_wce_sticky-header .emag-header-currency .boxhead,
  html:not(.mobile) .emag-header-account__icon {
    border-radius: var(--emag-header-action-radius);
    transition: background 0.15s ease, color 0.15s ease;
  }

  html:not(.mobile) a.emag-header-help:hover,
  html:not(.mobile) a.emag-header-help:focus-visible,
  html:not(.mobile) header .emag-header-actions .wce-header-wish:hover,
  html:not(.mobile) #box_wce_sticky-header .emag-header-actions .wce-header-wish:hover,
  html:not(.mobile) header .emag-header-basket-wrap .basket > a.count:hover,
  html:not(.mobile) #box_wce_sticky-header .emag-header-basket-wrap .basket > a.count:hover,
  html:not(.mobile) header .emag-header-currency .boxhead:hover,
  html:not(.mobile) #box_wce_sticky-header .emag-header-currency .boxhead:hover {
    background: var(--emag-header-action-hover-bg) !important;
  }

  html:not(.mobile) .emag-header-account__trigger {
    border-radius: var(--emag-header-action-radius);
    transition: background 0.15s ease, color 0.15s ease;
  }

  html:not(.mobile) .emag-header-account__trigger:hover,
  html:not(.mobile) .emag-header-account__trigger:focus-visible {
    background: var(--emag-header-action-hover-bg);
  }

  html:not(.mobile) .emag-header-account__trigger:hover .emag-header-account__icon,
  html:not(.mobile) .emag-header-account__trigger:focus-visible .emag-header-account__icon {
    background: transparent !important;
  }

  /* === Podgląd koszyka (mini-koszyk) — jednolity wygląd góra = po scrollu === */
  /* Grid dawał różne odstępy w nagłówku vs sticky (górna wersja miała padding 30px);
     flex + wyzerowany padding => identyczna wysokość i wygląd listy przed i po scrollu. */
  html:not(.mobile) header .emag-header-basket-wrap.emag-basket-open > .basket-contain,
  html:not(.mobile) #box_wce_sticky-header .emag-header-basket-wrap.emag-basket-open > .basket-contain {
    display: flex !important;
    flex-direction: column !important;
    row-gap: 0 !important;
    column-gap: 0 !important;
    gap: 0 !important;
    padding: 0 !important;
    /* Nie wychodzi poza dół okna przeglądarki — reszta idzie na pasek przewijania listy */
    max-height: calc(100vh - 96px) !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
  }

  /* Lista produktów: przewijana z paskiem po prawej, gdy nie mieści się w oknie.
     Stopka „do kasy” zostaje zawsze widoczna (poza obszarem przewijania). */
  html:not(.mobile) .emag-header-basket-wrap .basket-contain .basket-products {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding: 0.75em 1em !important;
    scrollbar-width: thin;
    scrollbar-color: var(--emag-header-accent-blue, #0082e6) #ececec;
  }

  html:not(.mobile) .emag-header-basket-wrap .basket-contain .basket-products::-webkit-scrollbar {
    width: 8px;
  }

  html:not(.mobile) .emag-header-basket-wrap .basket-contain .basket-products::-webkit-scrollbar-track {
    background: #ececec;
    border-radius: 8px;
  }

  html:not(.mobile) .emag-header-basket-wrap .basket-contain .basket-products::-webkit-scrollbar-thumb {
    background: var(--emag-header-accent-blue, #0082e6);
    border-radius: 8px;
  }

  /* Zwężenie pionowe prezentacji produktów (~15%) — więcej pozycji na ekranie */
  html:not(.mobile) .emag-header-basket-wrap .basket-contain .basket-product-list > li {
    padding-bottom: 12px !important;
    margin-bottom: 12px !important;
  }

  html:not(.mobile) .emag-header-basket-wrap .basket-contain .basket-product-list > li:last-child {
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
  }

  html:not(.mobile) .emag-header-basket-wrap .basket-contain .basket-products li img {
    max-width: 62px !important;
  }

  html:not(.mobile) .emag-header-basket-wrap .basket-contain .basket-products li .product-info {
    padding: 0.45em 0 !important;
  }

  html:not(.mobile) .emag-header-basket-wrap .basket-contain .basket-summery {
    flex: 0 0 auto !important;
  }

  /* „Do kasy” — niebieski #0082e6 (G01 wymusza czerwony a:not(:hover) w skompilowanym CSS) */
  html:not(.mobile) .emag-header-basket-wrap .basket-contain .basket-summery > a,
  html:not(.mobile) .emag-header-basket-wrap .basket-contain .basket-summery > a:not(:hover) {
    background: #0082e6 !important;
    background-color: #0082e6 !important;
    color: #fff !important;
    border-color: #0082e6 !important;
    box-shadow: 0 2px 12px rgba(0, 130, 230, 0.35);
  }

  html:not(.mobile) .emag-header-basket-wrap .basket-contain .basket-summery > a:hover,
  html:not(.mobile) .emag-header-basket-wrap .basket-contain .basket-summery > a:focus-visible {
    background: #00a5e6 !important;
    background-color: #00a5e6 !important;
    color: #fff !important;
    border-color: #00a5e6 !important;
    box-shadow: 0 2px 12px rgba(0, 165, 230, 0.35);
  }

  /* Usuń — czerwony X (FontAwesome ::before); tekst „usuń” ukryty bez psucia rozmiaru ikony */
  html:not(.mobile) .emag-header-basket-wrap .basket-contain .remove-product a {
    font-size: 0 !important;
    line-height: 0 !important;
    color: transparent !important;
  }

  html:not(.mobile) .emag-header-basket-wrap .basket-contain .remove-product a::before {
    display: block !important;
    font-size: 13px !important;
    line-height: 40px !important;
    width: 100% !important;
    height: 100% !important;
    border-radius: 50% !important;
    color: var(--emag-header-accent-red, #ff1d25) !important;
    background: #fff !important;
    transition: background-color 0.3s ease-in-out, color 0.3s ease-in-out;
  }

  html:not(.mobile) .emag-header-basket-wrap .basket-contain .remove-product a:hover::before,
  html:not(.mobile) .emag-header-basket-wrap .basket-contain .remove-product a:focus-visible::before {
    background: var(--emag-header-accent-red, #ff1d25) !important;
    color: #fff !important;
  }
}

/* Koszyk — pasek darmowej dostawy */
.free-shipping-progress-bar {
  position: relative;
  padding: 15px 20px;
  background: transparent;
  border: 1px solid #000;
  border-radius: 12px;
  margin: 10px 0;
  box-shadow: none;
}

.free-shipping-progress-bar .progress-fill {
  background: var(
    --emag-header-accent-gradient,
    linear-gradient(
      90deg,
      #ff1d25 5%,
      #a0328c 35%,
      #7040a4 45%,
      #4359c7 55%,
      #0082e6 70%,
      #0082e6 100%
    )
  );
}

.free-shipping-progress-bar .progress-bar.complete .progress-fill {
  background: linear-gradient(90deg, #0082e6 0%, #4daef0 100%);
}

.free-shipping-progress-bar .progress-thumb.complete {
  border-color: #0082e6;
  background: #0082e6;
  box-shadow: 0 4px 16px rgba(0, 130, 230, 0.35);
}

#box_freeshipping.box,
#box_freeshipping .slider {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
}

#box_freeshipping .innerbox,
#box_freeshipping .free-shipping__content {
  display: none !important;
}

.free-shipping-progress-bar .progress-status {
  font-size: calc(14px * 1.15);
  color: #000;
  font-weight: 600;
}

.free-shipping-progress-bar .progress-status__text {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: center;
}

.free-shipping-progress-bar .progress-status__current,
.free-shipping-progress-bar .progress-status__current strong,
.free-shipping-progress-bar .progress-status__hint {
  color: #000;
}

.free-shipping-progress-bar .progress-status__missing,
.free-shipping-progress-bar .progress-status__missing strong {
  color: #ff1d25;
}

.free-shipping-progress-bar .progress-status.complete {
  color: #0082e6;
}

.free-shipping-progress-bar .progress-status.complete strong {
  color: #0082e6;
}

@media (max-width: 768px) {
  .free-shipping-progress-bar {
    padding: 12px 15px;
  }

  .free-shipping-progress-bar .progress-status {
    font-size: calc(13px * 1.15);
  }
}

@media (max-width: 480px) {
  .free-shipping-progress-bar {
    padding: 10px 12px;
  }

  .free-shipping-progress-bar .progress-status {
    font-size: calc(12px * 1.15);
  }
}
