/**
 * Desktop header — layout x-kom / eMAG accent (html:not(.mobile), ≥768px).
 */

:root {
  /* Pasek akcentu — gradient jak navbar eMAG.ro (navbar-aux) */
  --emag-header-accent-red: #ff1d25;
  --emag-header-accent-magenta: #a0328c;
  --emag-header-accent-purple: #7040a4;
  --emag-header-accent-indigo: #4359c7;
  --emag-header-accent-blue: #0082e6;
  --emag-header-accent: #0082e6;
  --emag-header-accent-bar-height: 9px;
  --emag-footer-accent-gap: 12px;
  --emag-content-max-width: 1320px;
  --emag-header-accent-gradient: linear-gradient(
    90deg,
    var(--emag-header-accent-red) 5%,
    var(--emag-header-accent-magenta) 35%,
    var(--emag-header-accent-purple) 45%,
    var(--emag-header-accent-indigo) 55%,
    var(--emag-header-accent-blue) 70%,
    var(--emag-header-accent-blue) 100%
  );
  --emag-header-search-bg: #f2f2f2;
  --emag-header-search-btn: #333333;
  --emag-header-action-size: 53px;
  --emag-header-icon-size: 28px;
  --emag-header-action-hover-bg: #f2f2f2;
  --emag-header-action-radius: 8px;
  --emag-header-actions-gap: 2px;
  --emag-header-logo-max-h: 53px;
  --emag-header-logo-scale: 1.1;
  --emag-header-logo-scale-scrolled: 0.97;
  --emag-header-search-max-w: 540px;
  --emag-header-search-min-w: 120px;
  --emag-header-gutter: 40px;
  --emag-header-logo-bar-gap: clamp(8px, 1.2vw, 16px);
  --emag-header-row-pad-y: 5px;
  --emag-header-logo-bar-min-h: 64px;
  --emag-header-logo-bar-pad-y: 8px;
}

@media screen and (min-width: 768px) {
  /* Hammer header.row: 40px | 1070px | 250px (stary koszyk) | 40px — ikony kończyły się ~290px przed krawędzią treści */
  html:not(.mobile) header.row {
    border-top: var(--emag-header-accent-bar-height) solid transparent;
    border-image: var(--emag-header-accent-gradient) 1;
    padding-top: var(--emag-header-row-pad-y);
    padding-bottom: var(--emag-header-row-pad-y);
    background: #fff !important;
    background-image: none !important;
    grid-template-columns: var(--emag-header-gutter) minmax(0, 1fr) var(--emag-header-gutter) !important;
  }

  html:not(.mobile) header.row > .logo-bar {
    grid-column: 2 / 3 !important;
  }

  html:not(.mobile) header.row:before {
    background: var(--emag-header-accent-gradient);
  }

  html:not(.mobile) header .login-bar {
    display: none !important;
  }

  html:not(.mobile) header .logo-bar #box_wce_headerinfo {
    display: none !important;
  }

  /* Siatka 1fr | search | 1fr — środek kolumny search = optyczny ś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(var(--emag-header-search-min-w), var(--emag-header-search-max-w)) 1fr;
    align-items: center;
    column-gap: var(--emag-header-logo-bar-gap);
    position: relative;
    min-height: var(--emag-header-logo-bar-min-h);
    padding-top: var(--emag-header-logo-bar-pad-y);
    padding-bottom: var(--emag-header-logo-bar-pad-y);
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
    overflow: visible;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  html:not(.mobile) #box_wce_sticky-header.emag-sticky-compact > .container.emag-header-logo-bar,
  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(var(--emag-header-search-min-w), var(--emag-header-search-max-w)) 1fr;
    align-items: center;
    column-gap: var(--emag-header-logo-bar-gap);
    position: relative;
    min-height: var(--emag-header-logo-bar-min-h);
    padding-top: var(--emag-header-logo-bar-pad-y);
    padding-bottom: var(--emag-header-logo-bar-pad-y);
    grid-column: 2 / 3 !important;
    width: 100% !important;
    max-width: var(--emag-content-max-width) !important;
    margin-left: auto !important;
    margin-right: auto !important;
    box-sizing: border-box;
    overflow: visible;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  html:not(.mobile) header .logo-bar.emag-header-logo-bar::after,
  html:not(.mobile) #box_wce_sticky-header.emag-sticky-compact > .container::after {
    content: none;
    display: none;
  }

  /* Ukryj osierocone dzieci Hammer/G01 poza główną trójką */
  html:not(.mobile) header .logo-bar.emag-header-logo-bar > *:not(.link-logo):not(.search__container):not(.emag-header-actions) {
    display: none !important;
  }

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

  html:not(.mobile) header .logo-bar .link-logo img,
  html:not(.mobile) #box_wce_sticky-header.emag-sticky-compact #wce_sticky-logo img {
    display: block;
    max-height: var(--emag-header-logo-max-h);
    width: auto;
    transform: scale(var(--emag-header-logo-scale));
    transform-origin: left center;
    transition: transform 0.2s ease;
  }

  html:not(.mobile).emag-header-scrolled header .logo-bar .link-logo img {
    transform: scale(var(--emag-header-logo-scale));
  }

  /* Sticky: ta sama skala logo co góra (bez skoku ikon po scrollu) */
  html:not(.mobile) #box_wce_sticky-header.emag-sticky-compact #wce_sticky-logo img {
    transform: scale(var(--emag-header-logo-scale)) !important;
  }

  html:not(.mobile) header .logo-bar .search__container,
  html:not(.mobile) #box_wce_sticky-header.emag-sticky-compact #wce_sticky-search {
    position: relative;
    left: auto;
    top: auto;
    transform: none;
    grid-area: emag-search;
    justify-self: stretch;
    width: 100%;
    min-width: 0;
    max-width: none;
    margin: 0 !important;
    float: none !important;
    z-index: 1;
    /* G01: header .logo-bar > .search__container { padding: 30px 0 } — rozpycha grid do 100px */
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    height: auto;
    min-height: 0;
    align-self: center;
    overflow: visible;
  }

  html:not(.mobile) header.row:has(.search_open),
  html:not(.mobile) header.row:has(.search_focused),
  html:not(.mobile).emag-search-active header.row {
    position: relative;
    z-index: 10080 !important;
  }

  /* Sticky poza flow gdy niewidoczny — nie position:relative (psuje layout menu) */
  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) 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),
  html:not(.mobile) #box_wce_sticky-header.emag-sticky-compact #wce_sticky-search:has(.search_open),
  html:not(.mobile) #box_wce_sticky-header.emag-sticky-compact #wce_sticky-search: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 .logo-bar .emag-header-actions,
  html:not(.mobile) #box_wce_sticky-header.emag-sticky-compact .emag-header-actions {
    position: relative;
    right: auto;
    top: auto;
    transform: none;
    grid-area: emag-actions;
    justify-self: end;
    float: none !important;
    display: flex !important;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-end;
    gap: var(--emag-header-actions-gap);
    margin: 0 !important;
    padding: 0;
    z-index: 10050;
    max-width: none;
    width: auto;
    flex-shrink: 0;
  }

  html:not(.mobile) header .search.js__search,
  html:not(.mobile) header .search-form,
  html:not(.mobile) #box_wce_sticky-header.emag-sticky-compact .search.js__search,
  html:not(.mobile) #box_wce_sticky-header.emag-sticky-compact .search-form {
    float: none !important;
    width: 100%;
    margin: 0;
  }

  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 {
    background: var(--emag-header-search-bg) !important;
    border: 0 !important;
    border-radius: 8px;
    align-items: center !important;
    min-height: 40px;
    height: 40px;
    padding: 0 4px 0 14px;
    box-shadow: none;
    width: 100%;
    box-sizing: border-box;
  }

  html:not(.mobile) header .search .search__input-area > .search__input-area-item,
  html:not(.mobile) #box_wce_sticky-header.emag-sticky-compact .search .search__input-area > .search__input-area-item {
    display: flex !important;
    align-items: center !important;
    align-self: center !important;
    height: 40px !important;
    max-height: 40px !important;
  }

  html:not(.mobile) header .search .search__input-area-item_grow,
  html:not(.mobile) #box_wce_sticky-header.emag-sticky-compact .search .search__input-area-item_grow {
    flex: 1 1 auto !important;
    min-width: 0 !important;
  }

  html:not(.mobile) header .search .emag-search-scope-wrap,
  html:not(.mobile) #box_wce_sticky-header .search .emag-search-scope-wrap {
    align-self: center !important;
    height: 40px !important;
  }

  html:not(.mobile) header .search .emag-search-scope,
  html:not(.mobile) #box_wce_sticky-header .search .emag-search-scope {
    display: flex !important;
    align-items: center !important;
    height: 40px !important;
  }

  html:not(.mobile) header .search .emag-search-scope__trigger,
  html:not(.mobile) #box_wce_sticky-header .search .emag-search-scope__trigger {
    display: inline-flex !important;
    align-items: center !important;
    min-height: 40px !important;
    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"] {
    background: transparent;
    border: 0;
    box-shadow: none;
    height: 40px;
    min-height: 40px;
    min-width: 0;
    line-height: 40px;
    font-size: 15px;
    color: #222;
    text-overflow: ellipsis;
  }

  html:not(.mobile) header .search .search__input::placeholder {
    color: #767676;
    opacity: 1;
  }

  html:not(.mobile) header .search .js__search-close-btn,
  html:not(.mobile) header .search .js__search-clear-btn,
  html:not(.mobile) #box_wce_sticky-header.emag-sticky-compact .search .js__search-close-btn,
  html:not(.mobile) #box_wce_sticky-header.emag-sticky-compact .search .js__search-clear-btn {
    display: none !important;
  }

  html:not(.mobile) header .search .search__btn-search,
  html:not(.mobile) header .search-form .search-btn,
  html:not(.mobile) #box_wce_sticky-header.emag-sticky-compact .search .search__btn-search {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px;
    min-height: 40px;
    padding: 0 !important;
    margin: 0;
    border: 0;
    border-radius: 6px;
    background: var(--emag-header-search-btn) !important;
    color: #fff;
    box-shadow: none;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  html:not(.mobile) header .search .search__btn-search .fa-search,
  html:not(.mobile) header .search-form .search-btn:before {
    color: #fff;
    font-size: 16px;
    line-height: 1;
  }

  html:not(.mobile) header .search .search__content {
    top: calc(100% + 4px);
    border-radius: 8px;
    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,
  html:not(.mobile) .emag-header-account {
    position: relative;
    flex: 0 0 auto;
    flex-shrink: 0;
  }

  html:not(.mobile) .emag-header-account__trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: var(--emag-header-action-size);
    padding: 0 10px 0 4px;
    border-radius: var(--emag-header-action-radius);
    text-decoration: none;
    color: #222;
    white-space: nowrap;
    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 {
    text-decoration: none;
    color: #111;
    background: var(--emag-header-action-hover-bg);
  }

  html:not(.mobile) .emag-header-account__text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    font-size: 12px;
    line-height: 1.25;
    max-width: 110px;
  }

  html:not(.mobile) .emag-header-account__hello {
    color: #666;
  }

  html:not(.mobile) .emag-header-account__cta,
  html:not(.mobile) .emag-header-account__name {
    font-weight: 600;
    color: #111;
  }

  html:not(.mobile) .emag-header-account__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--emag-header-action-size);
    height: var(--emag-header-action-size);
    flex-shrink: 0;
    color: #333;
    border-radius: var(--emag-header-action-radius);
    transition: background 0.15s ease;
  }

  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;
  }

  html:not(.mobile) .emag-header-account__menu {
    display: none;
    position: absolute;
    top: calc(100% - 4px);
    right: 0;
    min-width: 180px;
    padding: 8px 0;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    z-index: 10020;
  }

  html:not(.mobile) .emag-header-account:hover .emag-header-account__menu,
  html:not(.mobile) .emag-header-account:focus-within .emag-header-account__menu {
    display: block;
  }

  html:not(.mobile) .emag-header-account__menu a {
    display: block;
    padding: 10px 16px;
    font-size: 14px;
    color: #222;
    text-decoration: none;
  }

  html:not(.mobile) .emag-header-account__menu a:hover {
    background: #f5f5f5;
    text-decoration: none;
  }

  html:not(.mobile) .emag-header-action > a,
  html:not(.mobile) a.emag-header-action,
  html:not(.mobile) a.emag-header-help {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--emag-header-action-size);
    height: var(--emag-header-action-size);
    color: #333;
    text-decoration: none;
  }

  html:not(.mobile) .emag-header-action__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
    color: #333;
  }

  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,
  html:not(.mobile) header .wce-header-wish__icon svg,
  html:not(.mobile) #box_wce_sticky-header .wce-header-wish__icon svg {
    display: block;
    width: var(--emag-header-icon-size);
    height: var(--emag-header-icon-size);
  }

  /* Jednolity hit area + hover dla ikon-only (x-kom: 53×53) */
  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 {
    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) header .emag-header-currency.wce_i18n-container,
  html:not(.mobile) #box_wce_sticky-header .emag-header-currency.wce_i18n-container {
    position: static !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    width: var(--emag-header-action-size) !important;
    height: var(--emag-header-action-size) !important;
    margin: 0 !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    position: relative !important;
  }

  /* Hammer login-bar: .boxhead { width ~67px; margin-right: 30px } — nakłada się na ikonę konsultanta */
  html:not(.mobile) header .emag-header-currency .boxhead,
  html:not(.mobile) #box_wce_sticky-header .emag-header-currency .boxhead {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 100% !important;
    height: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
    position: static !important;
    cursor: pointer;
    overflow: hidden;
  }

  html:not(.mobile) header .emag-header-currency .boxhead:hover,
  html:not(.mobile) #box_wce_sticky-header .emag-header-currency .boxhead:hover {
    border-color: transparent !important;
    box-shadow: none !important;
  }

  html:not(.mobile) header .emag-header-currency .boxhead > span,
  html:not(.mobile) header .emag-header-currency .boxhead img,
  html:not(.mobile) #box_wce_sticky-header .emag-header-currency .boxhead > span,
  html:not(.mobile) #box_wce_sticky-header .emag-header-currency .boxhead img {
    display: none !important;
  }

  html:not(.mobile) header .emag-header-currency .submenu,
  html:not(.mobile) #box_wce_sticky-header .emag-header-currency .submenu {
    position: absolute;
    top: calc(100% - 1px);
    right: 0;
    left: auto;
    margin: 0;
    z-index: 10025;
  }

  html:not(.mobile) header .emag-header-currency .wce_i18n-label,
  html:not(.mobile) header .emag-header-currency .wce_i18n-name,
  html:not(.mobile) header .emag-header-currency > span:not(.wce_currency),
  html:not(.mobile) header .emag-header-currency > a > span:not(.wce_currency),
  html:not(.mobile) header .emag-header-currency .wce_i18n-trigger span,
  html:not(.mobile) header .emag-header-currency a:not(.wce_currency),
  html:not(.mobile) #box_wce_sticky-header .emag-header-currency .wce_i18n-label,
  html:not(.mobile) #box_wce_sticky-header .emag-header-currency .wce_i18n-name,
  html:not(.mobile) #box_wce_sticky-header .emag-header-currency > span:not(.wce_currency),
  html:not(.mobile) #box_wce_sticky-header .emag-header-currency > a > span:not(.wce_currency) {
    display: none !important;
    visibility: hidden !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    font-size: 0 !important;
  }

  html:not(.mobile) header .emag-header-currency .wce_currency,
  html:not(.mobile) #box_wce_sticky-header .emag-header-currency .wce_currency {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: var(--emag-header-action-size);
    height: var(--emag-header-action-size);
    font-size: 0;
    line-height: 0;
    border: 0;
    background: transparent;
  }

  html:not(.mobile) header .emag-header-currency .wce_currency:before,
  html:not(.mobile) #box_wce_sticky-header .emag-header-currency .wce_currency:before {
    font-size: 13px !important;
    font-weight: 700;
    line-height: 1;
    color: #333;
  }

  html:not(.mobile) header .emag-header-wish,
  html:not(.mobile) #box_wce_sticky-header .emag-header-wish,
  html:not(.mobile) header .emag-header-actions .wce-header-wish,
  html:not(.mobile) #box_wce_sticky-header .emag-header-actions .wce-header-wish {
    position: relative !important;
    right: auto !important;
    bottom: auto !important;
    width: var(--emag-header-action-size) !important;
    height: var(--emag-header-action-size) !important;
    min-width: var(--emag-header-action-size);
    min-height: var(--emag-header-action-size);
    margin: 0 !important;
    flex-shrink: 0;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
  }

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

  html:not(.mobile) header .emag-header-basket-wrap,
  html:not(.mobile) #box_wce_sticky-header .emag-header-basket-wrap {
    position: relative;
    flex-shrink: 0;
  }

  html:not(.mobile) header .emag-header-basket-wrap .basket,
  html:not(.mobile) #box_wce_sticky-header .emag-header-basket-wrap .basket {
    position: static !important;
    top: auto !important;
    right: auto !important;
    width: var(--emag-header-action-size) !important;
    min-width: 0 !important;
    height: var(--emag-header-action-size) !important;
    line-height: 1 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
  }

  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 {
    display: none !important;
    content: none !important;
  }

  html:not(.mobile) header .emag-header-basket-wrap .basket > a.count img.px1,
  html:not(.mobile) #box_wce_sticky-header .emag-header-basket-wrap .basket > a.count img.px1 {
    display: none !important;
  }

  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 {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: var(--emag-header-action-size);
    height: var(--emag-header-action-size);
    padding: 0 !important;
    position: relative;
    color: #333;
  }

  html:not(.mobile) header .emag-header-basket-wrap .basket .countlabel,
  html:not(.mobile) #box_wce_sticky-header .emag-header-basket-wrap .basket .countlabel {
    display: none !important;
  }

  html:not(.mobile) header .emag-header-basket-wrap .basket b.count,
  html:not(.mobile) #box_wce_sticky-header .emag-header-basket-wrap .basket b.count {
    position: absolute;
    top: 4px;
    right: 2px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 4px;
    background: #111;
    color: #fff;
    font-size: 0;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
    box-sizing: border-box;
  }

  html:not(.mobile) header .emag-header-basket-wrap .basket b.count span,
  html:not(.mobile) #box_wce_sticky-header .emag-header-basket-wrap .basket b.count span {
    font-size: 10px;
    color: #fff;
  }

  html:not(.mobile) header .emag-header-basket-wrap .basket.empty-basket b.count,
  html:not(.mobile) #box_wce_sticky-header .emag-header-basket-wrap .basket.empty-basket b.count {
    display: none;
  }

  html:not(.mobile) header .emag-header-basket-wrap:hover .basket-contain,
  html:not(.mobile) header .emag-header-basket-wrap:focus-within .basket-contain,
  html:not(.mobile) #box_wce_sticky-header .emag-header-basket-wrap:hover .basket-contain,
  html:not(.mobile) #box_wce_sticky-header .emag-header-basket-wrap:focus-within .basket-contain {
    display: block;
  }

  html:not(.mobile) header .emag-header-basket-wrap .basket-contain,
  html:not(.mobile) #box_wce_sticky-header .emag-header-basket-wrap .basket-contain {
    right: 0;
    left: auto;
    top: 100%;
    min-width: 320px;
    z-index: 10030;
  }

  /* Sticky — opcja B */
  html:not(.mobile) #box_wce_sticky-header.emag-sticky-compact #wce_sticky-menu,
  html:not(.mobile) #box_wce_sticky-header.emag-sticky-compact #wce_sticky-mobile,
  html:not(.mobile) #box_wce_sticky-header.emag-sticky-compact #wce_sticky-roll-up,
  html:not(.mobile) #box_wce_sticky-header.emag-sticky-compact #wce_sticky-basket {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
  }

  html:not(.mobile) #box_wce_sticky-header.emag-sticky-compact.wce_visible {
    box-shadow: rgba(0, 0, 0, 0.08) 0px 2px 4px 0px, rgba(0, 0, 0, 0.08) 0px 0px 2px 1px;
    border-top: var(--emag-header-accent-bar-height) solid transparent;
    border-image: var(--emag-header-accent-gradient) 1;
    background: #fff !important;
    overflow: visible;
    display: grid !important;
    grid-template-columns: var(--emag-header-gutter) minmax(0, 1fr) var(--emag-header-gutter) !important;
    width: 100% !important;
    box-sizing: border-box;
  }

  /* Wąski desktop — tekst konta schowa się wcześniej, search ma więcej miejsca */
  @media screen and (max-width: 1180px) {
    html:not(.mobile) .emag-header-account__text {
      display: none !important;
    }

    html:not(.mobile) .emag-header-account__trigger {
      gap: 0;
      padding: 0;
    }
  }

  @media screen and (max-width: 1024px) {
    html:not(.mobile):not(.emag-logo-bar-desktop) {
      --emag-header-actions-gap: 2px;
      --emag-header-gutter: 24px;
      --emag-header-logo-scale: 1;
    }

    html.emag-logo-bar-desktop {
      --emag-header-actions-gap: 2px;
      --emag-header-gutter: 24px;
    }
  }

  @media screen and (max-width: 900px) {
    html:not(.mobile):not(.emag-logo-bar-desktop) {
      --emag-header-search-min-w: 80px;
      --emag-header-logo-bar-gap: 8px;
      --emag-header-gutter: 16px;
    }

    html.emag-logo-bar-desktop:not(.emag-logo-bar--two-rows) {
      --emag-header-logo-bar-gap: 8px;
    }

    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"] {
      font-size: 14px;
    }
  }

  @media screen and (max-width: 820px) {
    html:not(.mobile):not(.emag-logo-bar-desktop) {
      --emag-header-logo-scale: 0.92;
      --emag-header-action-size: 48px;
    }
  }

  html:not(.mobile) #box_wce_sticky-header.emag-sticky-compact .search .search__content {
    top: calc(100% + 4px);
    border-radius: 8px;
    z-index: 10080 !important;
    background: #fff !important;
  }

  /* Stopka — copyright + odstęp + dolny pasek gradientu (bez Shoper / ShopGadget) */
  html:not(.mobile) #shoper-foot {
    display: block !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    overflow: visible !important;
    text-align: left;
    font-size: 14px;
    line-height: 1.4;
  }

  html:not(.mobile) #shoper-foot > .rwd {
    display: block !important;
    visibility: visible !important;
    max-width: var(--emag-content-max-width);
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
    padding-left: 0;
    padding-right: 0;
  }

  html:not(.mobile) #shoper-foot .container.r--l-flex {
    display: block !important;
    visibility: visible !important;
    padding: 0 !important;
    margin: 0 auto !important;
    max-width: 100%;
    background: transparent !important;
    text-align: left !important;
  }

  html:not(.mobile) #shoper-foot > div:first-child .container::before,
  html:not(.mobile) #shoper-foot > div:first-child .container:before {
    display: none !important;
    content: none !important;
    height: 0 !important;
    margin: 0 !important;
    width: 0 !important;
  }

  html:not(.mobile) #shoper-foot .left {
    display: block !important;
    visibility: visible !important;
    float: none !important;
    text-align: left !important;
    margin: 0 0 var(--emag-footer-accent-gap) !important;
  }

  html:not(.mobile) #shoper-foot .left span,
  html:not(.mobile) #shoper-foot .left a {
    display: inline !important;
    visibility: visible !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    color: #333 !important;
  }

  html:not(.mobile) #shoper-foot .right,
  html:not(.mobile) #shoper-foot #wce_sg-foot,
  html:not(.mobile) #shoper-foot a.popup,
  html:not(.mobile) #shoper-foot .separator {
    display: none !important;
    visibility: hidden !important;
  }

  html:not(.mobile) #shoper-foot::after {
    content: "";
    display: block;
    width: 100%;
    height: var(--emag-header-accent-bar-height);
    background: var(--emag-header-accent-gradient);
  }
}

/* Mobile — bez dolnego paska; ukryj branding Shoper */
html.mobile #shoper-foot {
  display: none !important;
}
