/* NGE Filtry Paneli — styles */

.nge-filtry {
    --nge-accent:      #1f7d3d;
    --nge-track-bg:    #f2f2f2;
    --nge-thumb-size:  12px;
    --nge-track-h:     12px;
}

/* ---- Karty sekcji ---- */

.nge-filtry__kat,
.nge-filtry__form-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    margin-bottom: 16px;
    margin-top: 0 !important;
    overflow: hidden;
    padding: 0 20px;
}

/* ---- Przyciski toggle nagłówków ---- */

.nge-filtry__kat-nagl,
.nge-filtry__form-nagl {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 16px 0;
    margin: 0 !important;
    background: none !important;
    border: none;
    color: #000000 !important;
    font: inherit;
    font-size: 1em;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
    box-shadow: none !important;
}

/* Chevron */
.nge-filtry__kat-nagl::after,
.nge-filtry__form-nagl::after {
    content: '▾';
    font-size: 1em;
    flex-shrink: 0;
    margin-left: 8px;
    transition: transform 0.3s ease;
    color: #000000;
}

.nge-filtry__kat-nagl[aria-expanded="true"]::after,
.nge-filtry__form-nagl[aria-expanded="true"]::after {
    transform: rotate(180deg);
}

/* ---- Animacja zawartości (max-height) ---- */
/* Padding NA DZIECIACH, nie na animowanych elementach — unika gap przy max-height:0 */

.nge-filtry__kat-lista,
.nge-filtry__form {
    overflow: hidden;
    max-height: 1200px;
    opacity: 1;
    transition: max-height 0.4s ease, opacity 0.3s ease;
    padding: 0;
    margin: 0;
}

.nge-filtry__kat-lista.--collapsed,
.nge-filtry__form.--collapsed {
    max-height: 0;
    opacity: 0;
    transition: max-height 0.3s ease, opacity 0.2s ease;
}

/* ---- Kategorie ---- */

.nge-filtry__kat-lista,
.nge-filtry__kat-sub-lista {
    list-style: none;
}

.nge-filtry__kat-lista > li,
.nge-filtry__kat-sub-lista > li {
    margin-bottom: 2px;
}

/* Ostatni element listy — dolny margines karty */
.nge-filtry__kat-lista > li:last-child {
    padding-bottom: 16px;
}

.nge-filtry__kat-link {
    display: flex;
    align-items: baseline;
    gap: 4px;
    padding: 3px 0;
    text-decoration: none;
    color: inherit;
    transition: color 0.15s;
    line-height: 1.3;
}

.nge-filtry__kat-link:hover {
    color: var(--nge-accent);
}

.nge-filtry__kat-link.--active {
    font-weight: 600;
    color: var(--nge-accent);
}

.nge-filtry__kat-count {
    font-size: 0.82em;
    color: #9ca3af;
    flex-shrink: 0;
}

/* Subkategorie */
.nge-filtry__kat-sub-lista {
    margin: 2px 0 4px 14px;
    padding: 0;
}

.nge-filtry__kat-sub-lista .nge-filtry__kat-link {
    font-size: 0.93em;
}

/* ---- Sekcje filtrów (padding wewnątrz formularza) ---- */

.nge-filtry__sekcja {
    margin-bottom: 20px;
}

.nge-filtry__sekcja-nagl {
    display: block;
    margin-bottom: 10px;
    font-size: 0.78em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: inherit;
}

/* Sekcje panelowe ukryte domyślnie */
.nge-filtry__panel-only {
    display: none;
}

.nge-filtry--panel .nge-filtry__panel-only {
    display: block;
}

/* ---- Display wartości suwaka ---- */

.nge-range__display {
    margin-bottom: 14px;
    font-size: 0.9em;
    line-height: 1;
}

/* ---- Tor suwaka ---- */

.nge-range__track {
    position: relative;
    height: var(--nge-track-h);
    border-radius: 50px;
    background: #f2f2f2;
    margin: calc(var(--nge-thumb-size) / 2 + 4px) 0;
}

/* ---- Inputs range ---- */

.nge-range__input {
    position: absolute !important;
    top: calc((var(--nge-track-h) - var(--nge-thumb-size)) / 2) !important;
    left: 0 !important;
    transform: none !important;
    width: 100% !important;
    height: var(--nge-thumb-size) !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
    background-color: transparent !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    pointer-events: none;
    outline: none !important;
    box-shadow: none !important;
    z-index: 2;
}

.nge-range__input::-webkit-slider-runnable-track {
    background: transparent !important;
    background-color: transparent !important;
    height: 100%;
    border: none !important;
    box-shadow: none !important;
}

.nge-range__input::-moz-range-track {
    background: transparent !important;
    background-color: transparent !important;
    height: var(--nge-track-h);
    border: none !important;
}

.nge-range__input::-webkit-slider-thumb {
    -webkit-appearance: none;
    width:  var(--nge-thumb-size);
    height: var(--nge-thumb-size);
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid #666;
    cursor: ew-resize;
    pointer-events: all;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
    transition: box-shadow 0.15s;
    position: relative;
    z-index: 3;
}

.nge-range__input::-webkit-slider-thumb:hover,
.nge-range__input:focus::-webkit-slider-thumb {
    box-shadow: 0 0 0 4px rgba(102, 102, 102, 0.18);
}

.nge-range__input::-moz-range-thumb {
    width:  var(--nge-thumb-size);
    height: var(--nge-thumb-size);
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid #666;
    cursor: ew-resize;
    pointer-events: all;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
    transition: box-shadow 0.15s;
}

.nge-range__input::-moz-range-thumb:hover,
.nge-range__input:focus::-moz-range-thumb {
    box-shadow: 0 0 0 4px rgba(102, 102, 102, 0.18);
}

/* ---- Akcje ---- */

.nge-filtry__akcje {
    padding-bottom: 20px;
    margin-top: 20px;
}

.nge-filtry__btn {
    display: block;
    width: 100%;
    background-color: var(--nge-accent);
    color: #ffffff;
    border: none;
    border-radius: 6px;
    padding: 12px 20px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: opacity 0.15s;
    line-height: 1.4;
}

.nge-filtry__btn:hover {
    opacity: 0.88;
}

.nge-filtry__reset {
    display: block;
    text-align: center;
    margin-top: 10px;
    font-size: 0.82em;
    color: #9ca3af;
    text-decoration: none;
    transition: color 0.15s;
}

.nge-filtry__reset:hover {
    color: #374151;
    text-decoration: underline;
}

/* ---- Stock checkbox ---- */

.nge-filtry__sekcja--stock {
    margin-bottom: 0;
}

.nge-filtry__stock-label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    cursor: pointer;
    font-size: 0.88em;
    line-height: 1.4;
}

.nge-filtry__stock-label input[type="checkbox"] {
    flex-shrink: 0;
    margin-top: 2px;
    cursor: pointer;
    accent-color: var(--nge-accent);
    width: 15px;
    height: 15px;
}

/* ---- Paginacja — override motywu Solarva ---- */

.elementor-pagination {
    display: flex !important;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 4px;
}

.elementor-pagination .page-numbers,
.elementor-pagination a.page-numbers {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: auto !important;
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    margin: 0 !important;
    text-decoration: none;
    color: #1a1a1a !important;
    font-weight: 500;
    background: none !important;
    background-color: transparent !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    transition: color 0.15s;
}

.elementor-pagination a.page-numbers:hover {
    color: #1f7d3d !important;
    background: none !important;
    background-color: transparent !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.elementor-pagination .page-numbers.current {
    color: #1f7d3d !important;
    font-weight: 700;
    background: none !important;
    background-color: transparent !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}
