/* ==========================================================================
   Listing kategorii / sklep / wyniki (woocommerce/archive-product.php)
   Przebudowa UX wizualna, blok 5. Filtry FiboFilters: tylko wygląd (bez zmiany logiki).
   ========================================================================== */

/* kontener: lewa krawędź = logo w headerze (1312 + 16 px) */
main > .wrapper:has(> .shop-wrapper) { padding-inline: 0; }
.shop-wrapper {
    box-sizing: border-box;
    width: 100%;
    max-width: var(--sb-wrap);
    margin: 24px auto var(--sb-section-gap);
    padding-inline: var(--sb-gutter);
}

/* H1 kategorii (styl z klasy zamiast inline) */
.sb-listing-title {
    margin: 0 0 12px;
    font-size: 36px;
    line-height: 1.12;
    letter-spacing: .2px;
    text-transform: none;
}

/* lead (opis górny ACF): 2 linie + „Czytaj więcej”, akapity normalnie (bez display:inline) */
section.archive-category-desc.sb-listing-lead {
    max-width: none;   /* pełna szerokość kontenera (uwaga SEO 2026-11-20), było 760 px */
    margin: 0 0 20px;
    padding: 0;
}
section.archive-category-desc.sb-listing-lead .desc {
    font: 15px/1.6 var(--sb-font);
    color: var(--sb-body);
}
section.archive-category-desc.sb-listing-lead p {
    display: block;
    margin: 0 0 .6em;
    font: inherit;
    line-height: inherit;
    color: inherit;
}
section.archive-category-desc.sb-listing-lead :is(strong, b) { font-family: var(--sb-font-bold); font-weight: 400; color: var(--sb-text); }
section.archive-category-desc.sb-listing-lead [style*="font-weight"] { font-weight: inherit !important; }
section.archive-category-desc.sb-listing-lead .sb-more-btn { margin-top: 4px; font-size: 14px; }
section.archive-category-desc.sb-listing-lead [data-sb-more].is-collapsed { -webkit-mask-image: linear-gradient(#000 40%, transparent); mask-image: linear-gradient(#000 40%, transparent); }

/* filtry: chipy */
.fibofilters-horizontal-filters-container { max-width: none; }
.fibofilters-horizontal-filters-container .fibofilters-horizontal-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-bottom: 12px;
}
.fibofilters-horizontal-filters .fibofilters-filter-button {
    display: inline-flex;
    align-items: center;
    height: 36px;
    margin: 0;
    padding: 0 14px;
    background: #fff;
    border: 1px solid var(--sb-line-strong);
    border-radius: var(--sb-pill);
    box-shadow: none;
    font: 14px/1 var(--sb-font);
    letter-spacing: 0;
    color: var(--sb-text);
    text-shadow: none;
    transition: border-color .2s, background-color .2s, color .2s;
}
.fibofilters-horizontal-filters .fibofilters-filter-button::before { display: none; }
.fibofilters-horizontal-filters .fibofilters-filter-button:hover {
    background: #fff;
    border-color: var(--sb-accent);
    box-shadow: none;
    text-shadow: none;
    color: var(--sb-accent);
}
.fibofilters-horizontal-filters .fibofilters-filter-button.fibofilters-filter-button-selected,
.fibofilters-horizontal-filters .fibofilters-filter-button[aria-expanded="true"] {
    background: var(--sb-accent-soft);
    border-color: var(--sb-accent);
    box-shadow: none;
    color: var(--sb-accent);
    font-weight: 400;
    font-family: var(--sb-font-bold);
}
.fibofilters-horizontal-filters .js-fibofilters-filter-button-all-filters {
    border-color: var(--sb-text);
    font-family: var(--sb-font-bold);
}
.fibofilters-horizontal-filters .js-fibofilters-filter-button-all-filters svg { margin: 0 0 0 8px; transform: none; }

/* zastosowane filtry: chipy akcentowe, „Wyczyść” jako link */
.fibofilters-applied-filters .fibofilters-applied-filter {
    gap: 6px;
    margin: 0 6px 8px 0;
    padding: 6px 12px;
    background: var(--sb-accent-soft);
    border-radius: var(--sb-pill);
    box-shadow: none;
    font: 14px/1.3 var(--sb-font);
    color: var(--sb-accent);
}
.fibofilters-applied-filters .fibofilters-applied-filter strong { font-family: var(--sb-font-bold); font-weight: 400; }
.fibofilters-applied-filters .fibofilters-applied-filter--clear-all {
    background: none;
    padding-inline: 4px;
    color: var(--sb-text);
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* pasek: liczba wyników + sortowanie (nieucięte) */
.sb-shop-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 16px;
    margin: 4px 0 16px;
}
.sb-shop-toolbar .woocommerce-result-count {
    margin: 0;
    font: 14px/1.4 var(--sb-font);
    color: var(--sb-muted);
}
.shop-wrapper .sb-shop-toolbar form.woocommerce-ordering {
    float: none;
    max-width: none;
    margin: 0 0 0 auto;
}
.shop-wrapper .sb-shop-toolbar form.woocommerce-ordering > select {
    width: auto;
    max-width: 100%;
    height: 36px;
    margin: 0;
    padding: 0 34px 0 14px;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2322262a' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center;
    border: 1px solid var(--sb-line-strong);
    border-radius: var(--sb-pill);
    box-shadow: none;
    font: 14px/1 var(--sb-font);
    color: var(--sb-text);
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}
.shop-wrapper .sb-shop-toolbar form.woocommerce-ordering > select:hover { border-color: var(--sb-accent); }

/* siatka: 4 kolumny przy 1312 px */
@media (min-width: 1200px) {
    .shop-wrapper .woocommerce .products { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.shop-wrapper .woocommerce .products { margin-block-start: 0; }

/* paginacja (też blog: .sb-pagination) */
.shop-wrapper nav.woocommerce-pagination ul,
.sb-pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin: 32px 0 0;
    padding: 0;
    border: 0;
}
.shop-wrapper nav.woocommerce-pagination ul > li { border: 0; margin: 0; }
.shop-wrapper nav.woocommerce-pagination ul > li > :is(a, span),
.sb-pagination > .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-width: 40px;
    height: 40px;
    inline-size: auto;
    block-size: 40px;
    padding: 0 8px;
    background: #fff;
    border: 1px solid var(--sb-line);
    border-radius: var(--sb-radius-s);
    font: 15px/1 var(--sb-font);
    color: var(--sb-text);
    transition: border-color .2s, color .2s;
}
.shop-wrapper nav.woocommerce-pagination ul > li > a:hover,
.sb-pagination > a.page-numbers:hover { border-color: var(--sb-accent); color: var(--sb-accent); background: #fff; }
.shop-wrapper nav.woocommerce-pagination ul span.page-numbers.current,
.sb-pagination > .page-numbers.current {
    background: var(--sb-accent);
    border-color: var(--sb-accent);
    color: #fff;
    font-family: var(--sb-font-bold);
}
.shop-wrapper nav.woocommerce-pagination ul span.page-numbers.dots,
.sb-pagination > .page-numbers.dots { border-color: transparent; background: none; }

/* opis dolny (sb-prose w 15-prose.css): oddzielony od paginacji.
   Pełna szerokość kontenera (uwaga SEO 2026-11-20, było 760 px) - tekst, FAQ, tabele i obrazy od lewej krawędzi siatki. */
.shop-wrapper .term-description {
    margin-top: 48px;
    padding-top: 40px;
    border-top: 1px solid var(--sb-line);
    max-width: none;
    line-height: 1.75;
}
.shop-wrapper .term-description > * { max-width: none; }
.shop-wrapper .term-description h2 { font-size: 26px; margin: 2em 0 .6em; }
.shop-wrapper .term-description > h2:first-child { margin-top: 0; }
/* FAQ: globalne `main section { margin: auto; padding-inline }` centrowało je w kolumnie 760 px - wyrównane do opisu */
.shop-wrapper .term-description .non_faq_section { margin: 2.5em 0 0; padding-inline: 0; }
.shop-wrapper .term-description .non_faq_title { margin: 0 0 .4em; }
.shop-wrapper .term-description .non_faq_item:first-of-type { border-top: 1px solid var(--sb-line); }
.shop-wrapper .term-description .non_faq_answer { max-width: none; padding-right: 32px; }
/* obrazy i kolumny wstawione w opis (dziś żaden opis ich nie ma - zabezpieczenie na przyszłość) */
.shop-wrapper .term-description img { max-width: 100%; }
.shop-wrapper .term-description :is(.alignleft, .alignright) { max-width: 50%; margin-block: .4em 1em; }
.shop-wrapper .term-description .alignleft { float: left; margin-right: 32px; }
.shop-wrapper .term-description .alignright { float: right; margin-left: 32px; }
.shop-wrapper .term-description .aligncenter { margin-inline: auto; }
.shop-wrapper .term-description :is(h2, h3, .non_faq_section, table) { clear: both; }
.shop-wrapper .term-description::after { content: ""; display: block; clear: both; }
.shop-wrapper .term-description .wp-block-columns { display: flex; gap: 32px; margin: 1.5em 0; }
.shop-wrapper .term-description .wp-block-column { flex: 1 1 0; min-width: 0; }
@media (min-width: 1200px) {
    .shop-wrapper .term-description { font-size: 17px; }
}

@media (max-width: 767px) {
    .shop-wrapper { margin-top: 12px; }
    .sb-listing-title { font-size: 28px; }
    .fibofilters-horizontal-filters .fibofilters-filter-button { height: 34px; padding: 0 12px; font-size: 13px; }
    /* telefon: 5 pierwszych filtrów + „Wszystkie filtry” (reszta dostępna w panelu); wybrane zawsze widoczne */
    .fibofilters-horizontal-filters .fibofilters-filter-button:nth-child(n+6):not(.js-fibofilters-filter-button-all-filters):not(.fibofilters-filter-button-selected) { display: none; }
    .sb-shop-toolbar { margin-bottom: 12px; }
    .shop-wrapper .sb-shop-toolbar form.woocommerce-ordering { width: auto; }
    .shop-wrapper .term-description { margin-top: 32px; padding-top: 28px; }
    .shop-wrapper .term-description h2 { font-size: 22px; }
    .shop-wrapper .term-description { line-height: 1.7; }
    .shop-wrapper .term-description :is(.alignleft, .alignright) { float: none; max-width: 100%; margin-inline: 0; }
    .shop-wrapper .term-description .wp-block-columns { flex-direction: column; gap: 0; }
}
