/* ŁapDeal Listing V32 — wyłącznie układ mobile; PC pozostaje bez zmian.
   Skróty szybkich filtrów, kolejność panelu filtrów oraz ikonowe sortowanie. */
.ld2-quick-option .ld2-quick-short{display:none}
.ld2-mobile-sort-switch,.ld2-mobile-sort-menu{display:none}
@media (max-width:690px){
  /* V37: Filtry, Zdjęcie i Wysyłka w jednym rzędzie; aktywne filtry poniżej. */
  #ld2SearchForm .ld2-filter-toprow{
    display:grid!important;grid-template-columns:max-content minmax(0,1fr)!important;
    align-items:center!important;column-gap:7px!important;row-gap:7px!important;
    min-width:0!important;width:100%!important;max-width:100%!important;box-sizing:border-box;
  }
  #ld2SearchForm .ld2-filter-toprow .ld2-utility{display:contents!important}
  #ld2SearchForm .ld2-filter-toprow #ld2FiltersToggle{
    grid-column:1;grid-row:1;align-self:center!important;justify-self:start;
    min-width:0!important;width:auto!important;margin:0!important;
    white-space:nowrap!important;padding:7px 8px!important;font-size:12px!important;line-height:1.25!important;
  }
  #ld2SearchForm .ld2-filter-toprow .ld2-quick-options{
    grid-column:2;grid-row:1;display:flex!important;flex-wrap:wrap!important;
    align-items:center!important;justify-content:flex-end!important;align-self:center!important;min-width:0!important;width:100%!important;
    box-sizing:border-box;gap:6px!important;margin:0!important;padding:0!important;
  }
  #ld2SearchForm .ld2-filter-toprow .ld2-quick-option{
    display:inline-flex;flex:0 0 auto;align-items:center;
    min-width:0!important;width:auto!important;max-width:100%;
    margin:0!important;padding:7px 6px!important;gap:4px!important;
    font-size:12px!important;line-height:1.25!important;white-space:nowrap!important;
  }
  #ld2SearchForm .ld2-quick-option[hidden]{display:none!important}
  #ld2SearchForm .ld2-quick-option .ld2-quick-long{display:none!important}
  #ld2SearchForm .ld2-quick-option .ld2-quick-short{display:inline!important}
  #ld2SearchForm .ld2-filter-toprow .ld2-quick-option svg{
    width:15px!important;height:15px!important;flex:0 0 15px;
  }
  #ld2SearchForm .ld2-filter-toprow .ld2-chips{
    grid-column:1/-1;grid-row:2;
    display:flex!important;flex-direction:row!important;flex-wrap:nowrap!important;
    align-items:center!important;gap:7px!important;
    min-width:0!important;max-width:100%!important;width:100%!important;
    overflow-x:auto!important;overflow-y:hidden!important;
    -webkit-overflow-scrolling:touch;scrollbar-width:none;
    padding:1px 1px 2px 0;box-sizing:border-box;margin:0!important;
  }
  #ld2SearchForm .ld2-filter-toprow .ld2-chips:empty{display:none!important}
  #ld2SearchForm .ld2-filter-toprow .ld2-chips::-webkit-scrollbar{display:none;width:0;height:0}
  #ld2SearchForm .ld2-filter-toprow .ld2-chips .ld2-chip,
  #ld2SearchForm .ld2-filter-toprow .ld2-chips .ld2-chip--tire{
    flex:0 0 auto!important;white-space:nowrap!important;max-width:none!important;
  }
  /* Licznik ofert oraz dwa ikonowe selektory w jednym wierszu. */
  .ld2-shell .ld2-topline{
    display:flex!important;flex-direction:row!important;flex-wrap:nowrap!important;
    align-items:center!important;justify-content:space-between!important;
    min-width:0!important;gap:6px!important;
    position:relative!important;overflow:visible!important;z-index:25;
  }
  .ld2-shell .ld2-topline .ld2-count{
    display:block!important;min-width:0!important;flex:1 1 auto!important;
    overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
    font-size:12px!important;line-height:1.4;
  }
  .ld2-shell .ld2-count .ld2-count-prefix{display:none!important}
  .ld2-shell .ld2-topline .ld2-sortbar{
    display:flex!important;flex:0 0 auto!important;align-items:center!important;
    gap:6px!important;width:auto!important;min-width:0!important;
    margin:0!important;justify-content:flex-end!important;
    overflow:visible!important;
  }
  .ld2-shell .ld2-sort-holder{position:relative;flex:0 0 auto;min-width:0}
  .ld2-shell #ld2SortControl{display:none!important}
  .ld2-shell #ld2MobileSortSwitch{
    appearance:none!important;display:inline-grid!important;place-items:center!important;
    box-sizing:border-box;width:39px!important;height:39px!important;
    padding:0!important;margin:0!important;min-width:39px;
    border:1px solid #dce4ed!important;border-radius:10px!important;
    color:#243b54!important;background:#fff!important;box-shadow:none!important;
    cursor:pointer;-webkit-tap-highlight-color:transparent;
  }
  .ld2-shell #ld2MobileSortSwitch[aria-expanded="true"]{
    border-color:#ff6b2b!important;color:#f05e21!important;
  }
  .ld2-shell #ld2MobileSortSwitch:focus-visible{
    outline:2px solid #ff8b56;outline-offset:2px;
  }
  .ld2-shell #ld2MobileSortMenu{
    display:flex;flex-direction:column;gap:1px;
    position:absolute!important;right:0!important;top:calc(100% + 7px)!important;
    width:min(220px,calc(100vw - 30px));max-height:min(55vh,320px);
    overflow:auto;overscroll-behavior:contain;scrollbar-width:none;
    padding:7px!important;box-sizing:border-box;
    background:#fff!important;border:1px solid #e0e7f0!important;border-radius:12px!important;
    box-shadow:0 12px 30px rgba(23,43,67,.14)!important;
    z-index:700!important;
  }
  .ld2-shell #ld2MobileSortMenu[hidden]{display:none!important}
  .ld2-shell #ld2MobileSortMenu::-webkit-scrollbar{display:none;width:0}
  .ld2-shell #ld2MobileSortMenu button{
    display:block;width:100%;box-sizing:border-box;text-align:left;
    border:0!important;background:transparent!important;color:#263d55;
    border-radius:8px;padding:12px 11px!important;margin:0;
    font:600 14px/1.25 Arial,system-ui,sans-serif;
  }
  .ld2-shell #ld2MobileSortMenu button.selected{background:#fff0e8!important;color:#db571b}
  .ld2-shell #ld2MobileSortMenu button:focus-visible{outline:2px solid #ff8b56;outline-offset:-2px}
  .ld2-shell .ld2-view-holder{flex:0 0 auto}
  .ld2-shell #ld2ViewSwitch{
    box-sizing:border-box!important;width:39px!important;height:39px!important;
    min-width:39px!important;padding:0!important;
  }
}
/* V33: sortowanie native całkowicie wyłączone na mobile; licznik przy lewej. */
@media (max-width:690px){
  main.ld2-shell div.ld2-topline { direction:ltr!important; justify-content:flex-start!important; }
  main.ld2-shell div.ld2-topline > div.ld2-count {
    display:block!important;order:0!important;flex:1 1 auto!important;
    text-align:left!important;margin:0 auto 0 0!important;width:auto!important;
    min-width:0!important;max-width:100%!important;
  }
  main.ld2-shell .ld2-count .ld2-count-prefix{display:inline!important}
  main.ld2-shell div.ld2-topline > div.ld2-sortbar {
    display:flex!important;order:1!important;flex:0 0 auto!important;
    width:auto!important;max-width:none!important;margin-left:auto!important;
    justify-content:flex-end!important;
  }
  main.ld2-shell div.ld2-topline > div.ld2-sortbar > select#ld2SortControl,
  main.ld2-shell div.ld2-topline > div.ld2-sortbar > select#ld2SortControl[hidden] {
    display:none!important;visibility:hidden!important;position:absolute!important;
    width:0!important;height:0!important;min-width:0!important;padding:0!important;margin:0!important;
  }
  #ld2SearchForm .ld2-submit .ld2-mobile-search-submit {
    display:grid!important;place-items:center!important;width:48px!important;min-width:48px!important;
    max-width:48px!important;padding:0!important;min-height:44px!important;
    background:#ff641f!important;color:#fff!important;border-radius:10px!important;
  }
  #ld2SearchForm .ld2-submit .ld2-mobile-search-submit .ld2-search-label{display:none!important}
  #ld2SearchForm .ld2-submit .ld2-mobile-search-submit .ld2-search-icon{width:22px!important;height:22px!important;display:block!important}
  #ld2SearchForm .ld2-bar .ld2-submit{flex:0 0 48px!important;min-width:48px!important;width:48px!important}
}
@media (min-width:691px){
  #ld2SearchForm .ld2-submit .ld2-mobile-search-submit .ld2-search-icon{display:none!important}
}

/* V34 — naprawa ukrywania przycisku wygenerowanego przez enhanceSelect,
   wyśrodkowania licznika i wymiarów przycisku Szukaj. */
@media (max-width:690px){
  main.ld2-shell .ld2-sortbar .ld2-native-sort-wrap,
  main.ld2-shell .ld2-sortbar .ld2-pretty-wrap:has(> #ld2SortControl){
    display:none!important;visibility:hidden!important;pointer-events:none!important;
  }
  main.ld2-shell .ld2-topline{align-items:center!important;min-height:44px!important;}
  main.ld2-shell div.ld2-topline > div.ld2-count{
    display:flex!important;align-items:center!important;align-self:center!important;
    margin:0 auto 0 0!important;min-height:40px!important;height:40px!important;
    padding:0!important;line-height:1.25!important;
  }
  main.ld2-shell .ld2-topline .ld2-count-text{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  #ld2SearchForm .ld2-bar{
    display:grid!important;grid-template-columns:minmax(0,1fr) 48px!important;
    column-gap:10px!important;row-gap:9px!important;align-items:center!important;
    width:100%!important;max-width:100%!important;min-width:0!important;box-sizing:border-box!important;
  }
  #ld2SearchForm .ld2-bar > .ld2-query{grid-column:1/-1!important;grid-row:1!important;min-width:0!important;max-width:100%!important;width:100%!important}
  #ld2SearchForm .ld2-bar > .ld2-location{grid-column:1!important;grid-row:2!important;min-width:0!important;max-width:100%!important;width:100%!important}
  #ld2SearchForm .ld2-bar > .ld2-radius:not([hidden]){grid-column:1/-1!important;grid-row:3!important;min-width:0!important;max-width:100%!important;width:100%!important}
  #ld2SearchForm .ld2-bar > .ld2-radius[hidden]{display:none!important}
  #ld2SearchForm .ld2-bar > .ld2-submit{
    grid-column:2!important;grid-row:2!important;place-self:center end!important;
    display:block!important;flex:none!important;position:static!important;
    box-sizing:border-box!important;width:48px!important;min-width:48px!important;
    max-width:48px!important;height:48px!important;min-height:48px!important;
    max-height:48px!important;padding:0!important;margin:0!important;
  }
  #ld2SearchForm .ld2-bar > .ld2-submit > .ld2-mobile-search-submit{
    appearance:none!important;display:grid!important;place-items:center!important;
    width:48px!important;min-width:48px!important;max-width:48px!important;
    height:48px!important;min-height:48px!important;max-height:48px!important;
    aspect-ratio:1!important;box-sizing:border-box!important;margin:0!important;padding:0!important;
    border-radius:11px!important;overflow:hidden!important;
  }
  #ld2SearchForm .ld2-bar .ld2-search-icon{display:block!important;width:22px!important;height:22px!important;margin:0!important}
  #ld2SearchForm .ld2-bar .ld2-search-label{display:none!important}
  #ld2SearchForm .ld2-bar .ld2-field input,
  #ld2SearchForm .ld2-bar .ld2-clear-wrap{max-width:100%!important;min-width:0!important;box-sizing:border-box!important}
}

/* V35 — zawsze jeden wiersz: miejscowość | +km | wyszukaj.
   Żadna szerokość selecta ani stare style nie mogą wypchnąć lupy poza ekran. */
@media(max-width:690px){
 #ld2SearchForm .ld2-bar{
  grid-template-columns:minmax(0,1fr) clamp(74px,22vw,88px) 48px!important;
  column-gap:7px!important;row-gap:9px!important;
  width:100%!important;max-width:100%!important;min-width:0!important;
 }
 #ld2SearchForm .ld2-bar > .ld2-query{
  grid-column:1/-1!important;grid-row:1!important;
 }
 #ld2SearchForm .ld2-bar > .ld2-location{
  grid-column:1/3!important;grid-row:2!important;
  width:100%!important;min-width:0!important;max-width:100%!important;
 }
 #ld2SearchForm .ld2-bar:has(> .ld2-radius:not([hidden])) > .ld2-location{
  grid-column:1!important;
 }
 #ld2SearchForm .ld2-bar > .ld2-radius:not([hidden]){
  grid-column:2!important;grid-row:2!important;
  width:100%!important;min-width:0!important;max-width:100%!important;
  display:flex!important;align-items:center!important;
 }
 #ld2SearchForm .ld2-bar > .ld2-radius[hidden]{display:none!important}
 #ld2SearchForm .ld2-bar > .ld2-radius select,
 #ld2SearchForm .ld2-bar > .ld2-radius .ld2-pretty-wrap,
 #ld2SearchForm .ld2-bar > .ld2-radius .ld2-pretty-button{
  box-sizing:border-box!important;width:100%!important;min-width:0!important;
  max-width:100%!important;overflow:hidden!important;
 }
 #ld2SearchForm .ld2-bar > .ld2-radius .ld2-pretty-button{
  display:flex!important;align-items:center!important;justify-content:center!important;
  padding:0 3px!important;white-space:nowrap!important;font-size:12px!important;
  text-overflow:ellipsis!important;min-height:46px!important;
 }
 #ld2SearchForm .ld2-bar > .ld2-submit{
  grid-column:3!important;grid-row:2!important;
  width:48px!important;min-width:48px!important;max-width:48px!important;
  height:48px!important;min-height:48px!important;max-height:48px!important;
  place-self:center end!important;position:static!important;
 }
 #ld2SearchForm .ld2-bar > .ld2-submit > .ld2-mobile-search-submit{
  width:48px!important;min-width:48px!important;max-width:48px!important;
  height:48px!important;min-height:48px!important;max-height:48px!important;
 }
}

/* Bardzo wąskie telefony: zachowaj tekst i checkboxy, schowaj tylko dekoracyjne ikony. */
@media(max-width:390px){
  #ld2SearchForm .ld2-filter-toprow{column-gap:5px!important}
  #ld2SearchForm .ld2-filter-toprow .ld2-quick-options{gap:4px!important}
  #ld2SearchForm .ld2-filter-toprow .ld2-quick-option{padding:7px 5px!important;gap:3px!important}
  #ld2SearchForm .ld2-filter-toprow .ld2-quick-option svg{display:none!important}
}

/* V38: na wąskim ekranie dodatkowe wzmocnienie C nie przesuwa głównego rzędu. */
@media(max-width:480px){
  #ld2SearchForm .ld2-filter-toprow:has(.ld2-tire-c-quick){
    grid-template-columns:minmax(0,1fr) max-content max-content!important;
  }
  #ld2SearchForm .ld2-filter-toprow:has(.ld2-tire-c-quick) .ld2-quick-options{display:contents!important}
  #ld2SearchForm .ld2-filter-toprow:has(.ld2-tire-c-quick) .ld2-quick-option:has(input[name="with_photo"]){grid-column:2;grid-row:1;justify-self:end;align-self:center}
  #ld2SearchForm .ld2-filter-toprow:has(.ld2-tire-c-quick) .ld2-delivery{grid-column:3;grid-row:1;justify-self:end;align-self:center}
  #ld2SearchForm .ld2-filter-toprow .ld2-tire-c-quick{grid-column:1/-1;grid-row:2;justify-self:end;align-self:center}
  #ld2SearchForm .ld2-filter-toprow:has(.ld2-tire-c-quick) .ld2-chips{grid-row:3}
}
