/* Odbicie Stylu – filtry (Moduł 3). Tylko nakładki na gotowy komponent motywu
   (.listing-filters / .filter-box / .check-group / .filter-box__price). */

.listing-filters.is-loading { opacity: .55; pointer-events: none; }

/* Przycisk "Wyczyść" jako <button> – zdejmij domyślną chromę przeglądarki. */
.listing-filters .btn-clear {
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
    font-family: inherit;
}

/* Licznik produktów przy opcji – wyrównany do prawej, wyszarzony. */
.listing-filters .check-group label .odf-count {
    float: right;
    margin-left: 8px;
    color: #949494;
    font-size: 12px;
}

/* Opcja niedostępna w bieżącym zawężeniu. */
.listing-filters .item.odf-disabled { opacity: .4; }
.listing-filters .item.odf-disabled .check-group label { cursor: default; }
.listing-filters .item.odf-disabled .check-group label:hover { background: none; }

/* Zakres rozmiaru – nadpisz jednostkę "zł" na "cm". */
.listing-filters .filter-box--range[data-unit="cm"] .filter-box__price .inp-group::after {
    content: 'cm';
}

/* Komunikat o braku wyników. */
.odf-empty { padding: 40px 0; color: #666; font-size: 16px; }

/* Paginacja AJAX (prev/next). */
.odf-pagination { display: flex; align-items: center; gap: 12px; }
.odf-page-info { font-size: 14px; color: #555; }
.btn-pagination[disabled] { opacity: .35; cursor: default; }

/* ---------- Mobile: drawer (motyw chowa .listing-aside poniżej 1100px) ---------- */

/* Przycisk "Filtry" – tylko na mobile. */
.odf-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: calc(100% - 32px);
    margin: 0 16px 16px;
    padding: 12px;
    background: #1a1a1a;
    color: #fff;
    border: 0;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}
.odf-toggle::before {
    content: '';
    width: 18px; height: 18px;
    background: no-repeat center/contain
        url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'><path d='M3 5h18v2l-7 7v5l-4 2v-7L3 7z'/></svg>");
}

.odf-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 9998;
}
.odf-overlay.is-open { display: block; }

.odf-drawer {
    position: fixed; top: 0; left: 0; bottom: 0;
    width: 88%; max-width: 360px;
    background: #fff;
    z-index: 9999;
    transform: translateX(-100%);
    transition: transform .28s ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.odf-drawer.is-open { transform: translateX(0); }
.odf-drawer__head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px; border-bottom: 1px solid #ebebeb;
    font-size: 18px; font-weight: 600;
}
.odf-drawer__close {
    background: none; border: 0; font-size: 28px; line-height: 1;
    cursor: pointer; color: #1a1a1a; padding: 0 4px;
}
body.odf-noscroll { overflow: hidden; }

@media (max-width: 1100px) {
    .odf-toggle { display: flex; }
}

/* Replika stylów komponentu filtrów wewnątrz drawera (motyw scopuje je przez
   .listing-aside, którego tu nie ma). Wartości zgodne z motywem. */
.odf-drawer .listing-filters { padding: 16px 16px 0; }
.odf-drawer .listing-filters__header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.odf-drawer .listing-filters__header .title { font-size: 22px; line-height: 28px; color: #000; font-weight: 600; }
.odf-drawer .filter-box { margin-bottom: 24px; }
.odf-drawer .filter-box__header { margin-bottom: 8px; }
.odf-drawer .filter-box__header .filter-name { font-size: 16px; line-height: 24px; color: #000; font-weight: 600; }
.odf-drawer .filter-box__list { margin-left: -16px; margin-right: -16px; }
.odf-drawer .check-group input { display: none; }
.odf-drawer .check-group input:checked + label::before { border-color: #1a1a1a; }
.odf-drawer .check-group input:checked + label::after { opacity: 1; }
.odf-drawer .check-group label { display: block; padding: 8px 16px 8px 45px; font-size: 13px; line-height: 20px; position: relative; cursor: pointer; color: #1a1a1a; }
.odf-drawer .check-group label::before { content: ''; display: block; position: absolute; left: 15px; top: 50%; width: 20px; height: 20px; border-radius: 2px; transform: translateY(-50%); border: 1px solid #ccc; }
.odf-drawer .check-group label::after { content: ''; display: block; position: absolute; left: 20px; top: 50%; width: 12px; height: 12px; transform: translateY(-50%); border-radius: 2px; background: #1a1a1a; opacity: 0; }
.odf-drawer .check-group label:hover { background: #f5f5f5; }
.odf-drawer .filter-box__price { display: flex; align-items: center; margin: 4px 0; }
.odf-drawer .filter-box__price .inp-group { flex: 1; position: relative; }
.odf-drawer .filter-box__price .inp-group::after { content: 'zł'; position: absolute; top: 50%; transform: translateY(-45%); right: 10px; font-size: 13px; color: #949494; }
.odf-drawer .filter-box--range[data-unit="cm"] .filter-box__price .inp-group::after { content: 'cm'; }
.odf-drawer .filter-box__price .inp-group input { padding: 5px 25px; width: 100%; font-size: 14px; line-height: 20px; color: #1a1a1a; border-radius: 512px; text-align: center; border: 1px solid #ccc; -moz-appearance: textfield; }
.odf-drawer .filter-box__price .separator { margin: 0 5px; display: inline-block; width: 10px; height: 1px; background: #ccc; }
