/* NW mobile header patch - mobile only. Existing desktop layout unchanged. */
@media (max-width: 767.98px) {
  .nw-header-main { padding-block: 9px 0; }
  .nw-header-main .nw-header-main__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 5px 10px;
    align-items: center;
  }
  .nw-header-main .nw-branding { grid-column:1; grid-row:1; min-width:0; }
  .nw-header-main .nw-branding__primary img { max-width:100px; max-height:58px; width:auto; height:auto; }
  .nw-header-main .nw-branding__sister { display:none!important; }
  .nw-header-main .nw-mobile-sister { grid-column:2; grid-row:1; }
  .nw-header-main .nw-mobile-sister a { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:0; color:#274364; font-size:10px; font-weight:650; text-decoration:none; }
  .nw-header-main .nw-mobile-sister img { width:auto; max-width:52px; max-height:37px; object-fit:contain; }
  .nw-header-main .nw-header-actions { grid-column:3; grid-row:1; display:flex; flex-wrap:nowrap; gap:0; }
  .nw-header-main .nw-header-actions .header-block__action-btn { min-width:36px; min-height:36px; padding:5px; }
  .nw-header-main .nw-search { grid-column:1 / -1; grid-row:2; min-width:0; margin:5px 0 9px; }
  .nw-header-main .nw-search .ps-searchbar,
  .nw-header-main .nw-search .search-widget,
  .nw-header-main .nw-search form { display:flex; width:100%; align-items:center; }
  .nw-header-main .nw-search input[type="search"],
  .nw-header-main .nw-search input[name="s"],
  .nw-header-main .nw-search .ps-searchbar__input { width:100%; min-width:0; min-height:40px; border-radius:10px; }
  .nw-header-main .nw-mobile-contacts { margin:0; padding:9px 0 10px; border-top:1px solid #edf1f6; display:grid; gap:6px; }
  .nw-header-main .nw-mobile-contacts__line { display:flex; flex-wrap:wrap; align-items:center; gap:3px 10px; font-size:11px; line-height:1.45; }
  .nw-header-main .nw-mobile-contacts__caption { min-width:78px; color:#27374a; font-size:10px; font-weight:800; }
  .nw-header-main .nw-mobile-contacts a { color:#105eaf; text-decoration:none; white-space:nowrap; }
  .nw-navigation { border-bottom:1px solid #0b69f6; }
  .nw-navigation .container { min-height:43px; display:flex; align-items:center; }
}
@media (max-width: 375px) {
  .nw-header-main .nw-branding__primary img { max-width:80px; max-height:49px; }
  .nw-header-main .nw-mobile-sister img { max-width:42px; max-height:32px; }
  .nw-header-main .nw-mobile-contacts__caption { min-width:72px; }
  .nw-header-main .nw-mobile-contacts__line { font-size:10px; gap:3px 7px; }
}
@media (min-width: 768px) { .nw-mobile-sister,.nw-mobile-contacts { display:none!important; } }

/* v2: selectors visible in header, accessible offcanvas close/back. */
@media(max-width:767.98px){
  .nw-header-main .nw-mobile-sister a > span {display:none!important;}
  .nw-header-main .nw-mobile-sister img {max-width:50px;max-height:40px;}
  .nw-header-main .nw-mobile-locale {display:flex!important; margin:0; padding:6px 0 8px; border-top:1px solid #eef1f6;}
  .nw-mobile-locale__slot {display:flex;align-items:center;gap:8px;flex-wrap:wrap;width:100%;}
  .nw-mobile-locale__slot #_mobile_ps_languageselector,
  .nw-mobile-locale__slot #_mobile_ps_currencyselector {display:block!important;position:static!important;width:auto!important;min-width:0!important;margin:0!important;}
  .nw-mobile-locale__slot select,
  .nw-mobile-locale__slot .form-select,
  .nw-mobile-locale__slot .btn,
  .nw-mobile-locale__slot button {font-size:12px!important;min-height:34px!important;max-width:160px!important;line-height:1.3!important;padding:6px 26px 6px 10px!important;border-radius:8px!important;border:1px solid #dae2ed!important;color:#18314d!important;background-color:#fff!important;box-shadow:none!important;}
  #mobileMenu.ps-mainmenu--mobile {height:100dvh;max-height:100dvh;}
  #mobileMenu .offcanvas-header {display:flex!important;position:sticky!important;top:0;left:0;right:0;min-height:56px;flex-shrink:0;align-items:center!important;justify-content:space-between!important;padding:10px 16px!important;background:#fff!important;border-bottom:1px solid #e4eaf1!important;z-index:101!important;visibility:visible!important;opacity:1!important;}
  #mobileMenu .offcanvas-header .btn-close {display:block!important;visibility:visible!important;opacity:1!important;width:36px!important;height:36px!important;margin:0!important;padding:9px!important;flex:0 0 auto!important;border:1px solid #dbe3ed!important;border-radius:8px!important;background-color:#f8fafc!important;background-size:13px!important;}
  #mobileMenu .ps-mainmenu__back-button {display:flex!important;align-items:center!important;min-width:0;}
  #mobileMenu .ps-mainmenu__back-button .js-back-button:not(.d-none) {display:inline-flex!important;align-items:center;gap:5px;}
  #mobileMenu .ps-mainmenu__mobile {min-height:0;overflow-y:auto;overscroll-behavior:contain;}
  #mobileMenu .ps-mainmenu__additionnals .ps-mainmenu__selects:empty {display:none!important;}
}
@media(min-width:768px){ .nw-mobile-locale{display:none!important;} }

/* v3: hamburger - center logo - quick actions; search + locale in one row */
@media(max-width:767.98px) {
 .nw-header-main .nw-header-main__grid { display:grid;grid-template-columns:42px minmax(72px,1fr) auto;grid-template-rows:auto auto;column-gap:8px;row-gap:3px;align-items:center; }
 .nw-header-main .nw-mobile-menu-slot {grid-column:1;grid-row:1;display:flex;align-items:center;justify-content:flex-start;min-height:52px;}
 .nw-mobile-menu-slot .ps-mainmenu__mobile-toggle {display:block!important;position:static!important;margin:0!important;padding:0!important;}
 .nw-mobile-menu-slot .menu-toggle {display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;padding:5px!important;margin:0!important;color:#142538!important;}
 .nw-header-main .nw-branding {grid-column:2;grid-row:1;justify-self:center;display:flex;justify-content:center;align-items:center;min-width:0;margin:0!important;}
 .nw-header-main .nw-branding__primary img {width:auto;max-width:88px;max-height:64px;height:auto;}
 .nw-header-main .nw-mobile-right {grid-column:3;grid-row:1;display:flex;align-items:center;gap:5px;justify-content:flex-end;min-width:0;}
 .nw-header-main .nw-mobile-right .nw-mobile-sister, .nw-header-main .nw-mobile-right .nw-header-actions {grid-column:auto;grid-row:auto;margin:0!important;}
 .nw-header-main .nw-mobile-sister img {max-width:43px;max-height:33px;}
 .nw-header-main .nw-header-actions .header-block__action-btn {min-width:32px;min-height:34px;padding:3px;}
 .nw-header-main .nw-search {grid-column:1;grid-row:2;margin:0!important;justify-self:start;min-width:39px;width:39px;}
 .nw-header-main .nw-mobile-locale {grid-column:2 / 4;grid-row:2;min-width:0;display:flex!important;border:0!important;padding:3px 0!important;margin:0!important;justify-content:flex-end;}
 .nw-header-main .nw-mobile-locale__slot {justify-content:flex-end;flex-wrap:nowrap!important;gap:5px!important;}
 .nw-mobile-locale__slot select,.nw-mobile-locale__slot .form-select,.nw-mobile-locale__slot .btn,.nw-mobile-locale__slot button {max-width:135px!important;min-height:32px!important;padding:5px 20px 5px 7px!important;font-size:11px!important;}
 .nw-header-main .nw-mobile-contacts {margin-top:4px;padding-top:7px;}
 .nw-navigation .container {min-height:0!important;}
 .nw-navigation .ps-mainmenu__mobile-toggle {display:none!important;}
}
@media(max-width:375px) {
 .nw-header-main .nw-header-main__grid {grid-template-columns:38px minmax(60px,1fr) auto;gap:3px;}
 .nw-header-main .nw-branding__primary img {max-width:73px;max-height:52px;}
 .nw-header-main .nw-mobile-sister img {max-width:35px;max-height:28px;}
 .nw-header-main .nw-mobile-right {gap:1px;}
 .nw-header-main .nw-header-actions .header-block__action-btn {min-width:29px;padding:2px;}
 .nw-mobile-locale__slot select,.nw-mobile-locale__slot .form-select,.nw-mobile-locale__slot .btn,.nw-mobile-locale__slot button {max-width:115px!important;font-size:10px!important;}
}
/* Preserve the existing desktop CSS grid placements. */
@media(min-width:768px){
  .nw-header-main .nw-mobile-right {display:contents;}
  .nw-header-main .nw-mobile-menu-slot {display:none!important;}
}


/* v4: one centered chevron per native language/currency control (mobile). */
@media (max-width: 767.98px) {
  .nw-mobile-locale__slot #_mobile_ps_languageselector select,
  .nw-mobile-locale__slot #_mobile_ps_currencyselector select,
  .nw-mobile-locale__slot #_mobile_ps_languageselector .form-select,
  .nw-mobile-locale__slot #_mobile_ps_currencyselector .form-select,
  .nw-mobile-locale__slot #_mobile_ps_languageselector button,
  .nw-mobile-locale__slot #_mobile_ps_currencyselector button,
  .nw-mobile-locale__slot #_mobile_ps_languageselector .btn,
  .nw-mobile-locale__slot #_mobile_ps_currencyselector .btn {
    -webkit-appearance: none !important;
    appearance: none !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='m1 1.5 5 5 5-5' fill='none' stroke='%233b5068' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
    background-position: right 10px center !important;
    background-repeat: no-repeat !important;
    background-size: 12px 8px !important;
    padding-right: 30px !important;
    text-align: left !important;
  }
  .nw-mobile-locale__slot #_mobile_ps_languageselector button::after,
  .nw-mobile-locale__slot #_mobile_ps_currencyselector button::after,
  .nw-mobile-locale__slot #_mobile_ps_languageselector .dropdown-toggle::after,
  .nw-mobile-locale__slot #_mobile_ps_currencyselector .dropdown-toggle::after,
  .nw-mobile-locale__slot #_mobile_ps_languageselector button::before,
  .nw-mobile-locale__slot #_mobile_ps_currencyselector button::before {
    display: none !important;
    content: none !important;
  }
  .nw-mobile-locale__slot #_mobile_ps_languageselector button > .material-icons,
  .nw-mobile-locale__slot #_mobile_ps_currencyselector button > .material-icons,
  .nw-mobile-locale__slot #_mobile_ps_languageselector button > .fa-chevron-down,
  .nw-mobile-locale__slot #_mobile_ps_currencyselector button > .fa-chevron-down,
  .nw-mobile-locale__slot #_mobile_ps_languageselector button > .icon-chevron-down,
  .nw-mobile-locale__slot #_mobile_ps_currencyselector button > .icon-chevron-down {
    display: none !important;
  }
}

/* v5: Offcanvas musi zaczynac sie POD mobilnym naglowkiem, nie pod nim ukrywac. */
@media (max-width: 767.98px) {
  #mobileMenu.ps-mainmenu--mobile.offcanvas {
    position: fixed !important;
    inset-block-start: var(--nw-mobile-menu-top, 0px) !important;
    top: var(--nw-mobile-menu-top, 0px) !important;
    bottom: 0 !important;
    height: calc(100dvh - var(--nw-mobile-menu-top, 0px)) !important;
    max-height: calc(100dvh - var(--nw-mobile-menu-top, 0px)) !important;
    z-index: 1060 !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    background: #fff !important;
  }
  #mobileMenu .offcanvas-header {
    display: flex !important;
    position: relative !important;
    top: auto !important;
    min-height: 46px !important;
    flex: 0 0 46px !important;
    padding: 6px 15px !important;
    order: 0;
    z-index: 5 !important;
  }
  #mobileMenu .ps-mainmenu__mobile {
    position: relative !important;
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    overscroll-behavior: contain;
    order: 1;
  }
  #mobileMenu .ps-mainmenu__additionnals {
    flex: 0 0 auto !important;
    max-height: 18vh;
    overflow-y: auto;
    order: 2;
  }
  #mobileMenu .offcanvas-header .btn-close {
    display: block !important;
    pointer-events: auto !important;
    cursor: pointer !important;
  }
}
