/* ============================================================
   Szerszámolcsón.hu – termekek.css
   Terméklistázó: layout, szűrő sidebar, lapozó, aktív szűrők
   ============================================================ */

/* ============================================================
   KATEGÓRIA SZEKCIÓ (termekek.php rács felett)
   ============================================================ */
.cat-section {
    margin-bottom: 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 16px;
    box-shadow: var(--sh-sm);
}

.cat-section-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 6px;
    margin-bottom: 4px;
}

.cat-section-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 10px 6px;
    border-radius: var(--r-sm);
    text-decoration: none;
    color: var(--text);
    font-size: 11px;
	min-width: 0;
    font-family: var(--fm);
    font-weight: 500;
    text-align: center;
    transition: var(--t);
}
.cat-section-item:hover { background: var(--gold-dim); color: var(--gold); }

.cat-section-img {
    width: 48px;
    height: 48px;
    border-radius: var(--r-xs);
    overflow: hidden;
    background: var(--surface-2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.cat-section-img img { width: 100%; height: 100%; object-fit: cover; display: block; }

.cat-section-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-4);
}
.cat-section-item:hover .cat-section-placeholder { color: var(--gold); }

.cat-section-name {
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
	overflow-wrap: anywhere;
}

/* "Összes kategória" toggle gomb */
.cat-section-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    padding: 6px 10px;
    border-radius: var(--r-sm);
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-3);
    font-family: var(--fm);
    font-size: 12px;
    cursor: pointer;
    transition: var(--t);
    width: 100%;
    justify-content: center;
}
.cat-section-toggle:hover { border-color: var(--gold); color: var(--gold); }
.cat-section-toggle.open .cat-toggle-icon { transform: rotate(180deg); }
.cat-toggle-icon { transition: transform .2s; }

/* ============================================================
   "KÖVETKEZŐ 18 TERMÉK" GOMB
   ============================================================ */
.load-more-wrap {
    display: flex;
    justify-content: center;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.load-more-btn {
    min-width: min(260px, 90%);
    max-width: 100%;
    padding: 12px 24px;
    font-family: var(--fd);
    font-weight: 700;
    font-size: 13px;
    letter-spacing: .5px;
}

/* ── Arany kitöltés CSAK ennek a gombnak ────────────────────────
   A gomb osztályai: .btn .btn--secondary .load-more-btn
   A .btn--secondary alapból átlátszó (base.css) – nem írjuk felül
   globálisan, mert az minden másodlagos gombot (pl. kívánságlista)
   aranyszínűvé tenne.

   Compound szelektort használunk: a .btn.load-more-btn
   specifikussága (0,2,0) magasabb, mint a .btn--secondary (0,1,0),
   így a sorrendtől függetlenül nyer. Hover-nél .btn.load-more-btn:hover
   (0,3,0) veri a .btn--secondary:hover (0,2,0) szabályt. */
.btn.load-more-btn {
    background: var(--gold);
    color: #fff;
    border-color: var(--gold);
}
[data-theme="dark"] .btn.load-more-btn { color: #000; }

.btn.load-more-btn:hover {
    background: var(--gold-h);
    border-color: var(--gold-h);
    color: #fff;
}
[data-theme="dark"] .btn.load-more-btn:hover { color: #000; }

/* ── Dupla chevron („van még lentebb") ──────────────────────────
   Miért ::after és nem <svg> a markupban?
     1) A .btn eleve `display: inline-flex; gap: 8px`, a ::before pedig
        abszolút pozicionált (shine effekt) – így a ::after automatikusan
        flex-elem lesz, 8px térközzel a felirat után. Nem kell markup.
     2) A load-more JS betöltés után átírja a gomb feliratát (változik a
        darabszám). Ha `textContent`-tel teszi, az KITÖRÖLNE minden
        gombon belüli elemet. A pszeudo-elem ezt túléli, mert nem a
        gomb DOM-tartalma.
     3) Így a PHP / JS / CSS teljesen szeparált marad.

   A nyíl maszkként (mask-image) van beállítva, a színe `currentColor` –
   ezért automatikusan követi a gomb szövegszínét világos/sötét témában.
   `aria` nem kell hozzá: a pszeudo-elem tartalma dekoratív, a
   képernyőolvasók nem olvassák fel. */
.btn.load-more-btn::after {
    content: '';
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    background: currentColor;
    -webkit-mask: var(--lm-chevron) center / contain no-repeat;
            mask: var(--lm-chevron) center / contain no-repeat;
}

/* A dupla chevron SVG data URI-ként. Külön változóban, hogy a
   -webkit- és a szabványos mask ne duplikálja a hosszú stringet. */
.btn.load-more-btn {
    --lm-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 6l6 6 6-6'/%3E%3Cpath d='M6 13l6 6 6-6'/%3E%3C/svg%3E");
}

/* Biztonsági háló: ha a böngésző nem tud mask-image-et, ne jelenjen
   meg egy tömör négyzet a nyíl helyén – inkább semmi. */
@supports not ((-webkit-mask: none) or (mask: none)) {
    .btn.load-more-btn::after { display: none; }
}

/* Finom fel-le mozgás. Csak translateY-t animálunk: nem indít újra-
   layoutot, GPU-barát, és nem tolja el a gomb szövegét.
   A .btn `overflow: hidden`-je nem vágja le, mert a mozgás (-2px..+3px)
   bőven a gomb 12px-es függőleges paddingjén belül marad. */
@keyframes load-more-bob {
    0%, 100% { transform: translateY(-2px); }
    50%      { transform: translateY(3px); }
}

/* Akadálymentesség: aki csökkentett mozgást kért az operációs
   rendszerében, annak a nyíl statikus marad (de látszik). */
@media (prefers-reduced-motion: no-preference) {
    .btn.load-more-btn::after {
        animation: load-more-bob 1.4s var(--ease, ease-in-out) infinite;
    }
}

/* Betöltés közben (JS letiltja a gombot) álljon meg a mozgás. */
.btn.load-more-btn:disabled::after { animation: none; }

/* ============================================================
   MOBIL SZŰRŐ BEZÁRÁS GOMB
   ============================================================ */
.filter-sidebar-close {
    display: none; /* csak mobil nézetben látszik */
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border: none;
    background: var(--surface-2);
    border-radius: var(--r-sm);
    cursor: pointer;
    color: var(--text-3);
    align-items: center;
    justify-content: center;
    transition: var(--t);
    z-index: 1;
}
.filter-sidebar-close:hover { background: var(--border); color: var(--text); }

@media (max-width: 768px) {
    .filter-sidebar { position: relative; } /* hogy az absolute close btn működjön */
    .filter-sidebar-close { display: flex; }
}

/* ============================================================
   FILTER OSZLOP WRAPPER
   A kategoriak.php bal oszlopában: subcat panel + sidebar egymás alatt
   ============================================================ */
.filter-col {
    display: flex;
    flex-direction: column;
    gap: 16px;
    /* Sticky viselkedés öröklése a sidebar-tól */
    align-self: start;
}

/* ============================================================
   ALKATEGÓRIA PANEL
   A filter sidebar felett jelenik meg ha van alkategória.
   Stílusa harmonizál a mega menü .mega-cat-item-jével.
   ============================================================ */
.subcat-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 16px;
    box-shadow: var(--sh-sm);
}

.subcat-panel-title {
    font-family: var(--fd);
    font-weight: 700;
    font-size: 11px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-3);
    margin-bottom: 12px;
}

.subcat-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
}

.subcat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-radius: var(--r-xs);
    text-decoration: none;
    color: var(--text);
    font-size: 12px;
    font-family: var(--fm);
    font-weight: 500;
    transition: var(--t);
    overflow: hidden;
}
.subcat-item:hover {
    background: var(--gold-dim);
    color: var(--gold);
}

.subcat-img {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: var(--r-xs);
    overflow: hidden;
    background: var(--surface-2);
    display: flex;
    align-items: center;
    justify-content: center;
}
.subcat-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.subcat-img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-4);
}
.subcat-item:hover .subcat-img-placeholder {
    color: var(--gold);
}

.subcat-name {
    flex: 1;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-width: 0;
}

/* ============================================================
   LAYOUT: sidebar + main kéthasábos
   ============================================================ */
.termekek-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 28px;
    padding: 24px 0 48px;
    align-items: start;
}

/* A filter-col (alkategória panel + sidebar) sticky viselkedése */
.filter-col,
.filter-sidebar {
    position: sticky;
    top: calc(var(--header-h) + 16px);
}

/* Ha filter-col wrapper van, a sidebar sticky-je öröklődik —
   de önmagában is sticky kell ha nincs wrapper (termekek.php) */

/* ============================================================
   SZŰRŐ SIDEBAR
   ============================================================ */
.filter-sidebar {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 20px;
    box-shadow: var(--sh-sm);
    max-height: calc(100vh - var(--header-h) - 32px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
    /* position: sticky és top a .filter-col wrapperből jön a kategoriak.php-ban.
       A termekek.php-ban (ahol nincs wrapper) itt marad sticky: */
    position: sticky;
    top: calc(var(--header-h) + 16px);
}

.filter-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
}

.filter-sidebar-title {
    font-family: var(--fd);
    font-weight: 800;
    font-size: 16px;
    text-transform: uppercase;
    color: var(--text);
}

.filter-clear-all {
    font-family: var(--fm);
    font-size: 9px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--red);
    text-decoration: none;
    transition: var(--t);
}
.filter-clear-all:hover { opacity: .75; }

.filter-section {
    margin-bottom: 22px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border-soft);
}
.filter-section:last-of-type { border-bottom: none; margin-bottom: 12px; }

.filter-section-title {
    font-family: var(--fd);
    font-weight: 700;
    font-size: 11px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-3);
    margin-bottom: 12px;
}

/* Kategória lista */
.filter-cat-list {
    display: flex;
    flex-direction: column;
    gap: 1px;
    /* Egyszerre 5 sor látható (~33px/sor), utána görgethető.
       Így az ár és egyéb szűrők nem szorulnak a képernyő aljára. */
    max-height: calc(5 * 33px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
    padding-right: 2px; /* scrollbar ne takarja a szöveget */
}

.filter-cat-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 10px;
    border-radius: var(--r-xs);
    font-size: 13px;
    color: var(--text-3);
    transition: var(--t);
    text-decoration: none;
}

.filter-cat-link:hover { background: var(--gold-dim); color: var(--gold); }
.filter-cat-link.active {
    background: var(--gold-dim);
    color: var(--gold);
    font-weight: 600;
}

.filter-cat-link--child {
    padding-left: 22px;
    font-size: 12px;
}

.filter-cat-sub {
    display: none;
    padding-left: 6px;
}
.filter-cat-sub.open { display: block; }

/* Ár szűrő – K kör (2026.11.22.): hisztogram + kétfogantyús csúszka + két mező (a csapágybolt mintájára).
   A kijelölt sávba eső oszlopok aranyak, a fogantyú húzásakor rugósan nő; a hisztogram a szűrő nyitásakor
   lépcsőzetesen „felnő” (lent, a nyitott szűrő animációinál). */
.filter-range { position: relative; padding-top: 4px; margin-bottom: 4px; }
.filter-hist {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 46px;
    margin: 0 9px;
}
.filter-hist i {
    flex: 1;
    height: var(--h);
    min-height: 2px;
    border-radius: 2px 2px 0 0;
    background: var(--border);
    transform-origin: bottom;
    transition: background .25s, opacity .25s;
}
.filter-hist i.is-in { background: rgba(var(--gold-rgb), .55); }
.filter-range.is-dragging .filter-hist i.is-in { background: var(--gold); }

.filter-range-sl { position: relative; height: 24px; margin: 0 9px; }
.filter-range-sl::before,
.filter-range-fill {
    content: "";
    position: absolute;
    top: 10px;
    height: 4px;
    border-radius: 4px;
}
.filter-range-sl::before { left: 0; right: 0; background: var(--surface-2); }
.filter-range-fill { left: 0; right: 0; background: var(--gold); box-shadow: 0 0 8px rgba(var(--gold-rgb), .35); }
.filter-range-sl input {
    position: absolute;
    inset: 0 -9px;
    width: calc(100% + 18px);
    height: 24px;
    margin: 0;
    background: none;
    pointer-events: none;
    -webkit-appearance: none;
    appearance: none;
}
.filter-range-sl input::-webkit-slider-runnable-track { height: 24px; background: none; }
.filter-range-sl input::-moz-range-track { background: none; }
.filter-range-sl input::-webkit-slider-thumb {
    -webkit-appearance: none;
    pointer-events: auto;
    width: 20px; height: 20px;
    margin-top: 2px;
    border-radius: 50%;
    border: 3px solid var(--gold);
    background: var(--surface);
    box-shadow: 0 2px 6px rgba(0,0,0,.22);
    cursor: grab;
    transition: transform .25s cubic-bezier(.34,1.56,.64,1), box-shadow .25s;
}
.filter-range-sl input::-moz-range-thumb {
    pointer-events: auto;
    width: 14px; height: 14px;
    border-radius: 50%;
    border: 3px solid var(--gold);
    background: var(--surface);
    box-shadow: 0 2px 6px rgba(0,0,0,.22);
    cursor: grab;
    transition: transform .25s cubic-bezier(.34,1.56,.64,1), box-shadow .25s;
}
.filter-range-sl input:active::-webkit-slider-thumb { cursor: grabbing; transform: scale(1.18); box-shadow: 0 0 0 7px rgba(var(--gold-rgb), .2), 0 2px 8px rgba(0,0,0,.25); }
.filter-range-sl input:active::-moz-range-thumb     { cursor: grabbing; transform: scale(1.18); box-shadow: 0 0 0 7px rgba(var(--gold-rgb), .2), 0 2px 8px rgba(0,0,0,.25); }
.filter-range-sl input:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px rgba(var(--gold-rgb), .35); }
.filter-range-sl input:focus-visible::-moz-range-thumb     { box-shadow: 0 0 0 4px rgba(var(--gold-rgb), .35); }
.filter-range-sl input:focus { outline: none; }

.filter-price-inputs {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}
.filter-price-field {
    display: flex;
    align-items: center;
    gap: 4px;
    height: 40px;
    padding: 0 10px;
    border-radius: var(--r-sm);
    border: 1.5px solid var(--border);
    background: var(--surface);
    transition: border-color .2s, box-shadow .2s;
}
.filter-price-field:focus-within { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(var(--gold-rgb), .15); }
.filter-price-field input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    padding: 0;
    background: transparent;
    color: var(--text);
    font: 700 14.5px/1 var(--fb);
    font-variant-numeric: tabular-nums;
}
.filter-price-field input::placeholder { color: var(--text-4); font-weight: 500; }
.filter-price-field span { flex-shrink: 0; font: 400 11.5px/1 var(--fm); color: var(--text-3); }
.filter-price-sep { color: var(--text-4); }
.filter-section-sub { font: 400 10.5px/1 var(--fm); letter-spacing: .5px; text-transform: none; color: var(--text-3); }
/* A keskeny (220 px-es) oldalsávban a mezőkben nincs hely az „Ft”-nek – a hétjegyű ár így kifér. */
@media (max-width: 1100px) and (min-width: 769px) {
    .filter-price-field { padding: 0 8px; }
    .filter-price-field span { display: none; }
}

/* Checkbox lista */
.filter-check-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ============================================================
   TERMÉKEK MAIN
   ============================================================ */
.termekek-main {}

.termekek-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.termekek-info {}

.termekek-heading {
    font-family: var(--fd);
    font-weight: 800;
    font-size: clamp(18px, 2vw, 26px);
    text-transform: uppercase;
    color: var(--text);
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
}

.termekek-count {
    font-family: var(--fm);
    font-size: 12px;
    color: var(--text-4);
    font-weight: 400;
    text-transform: none;
    letter-spacing: .5px;
}

.termekek-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sort-select-wrap { position: relative; }
.sort-select { min-width: 160px; }

/* Mobil szűrő gomb */
.filter-mob-toggle { display: none; }

.filter-active-badge {
    background: var(--gold);
    color: #fff;
    border-radius: 50%;
    width: 14px;
    height: 14px;
    font-size: 8px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
[data-theme="dark"] .filter-active-badge { color: #000; }

/* ============================================================
   AKTÍV SZŰRŐK
   ============================================================ */
.active-filters {
    display: flex;
    gap: 7px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.active-filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--gold-dim);
    border: 1px solid rgba(var(--gold-rgb),.3);
    border-radius: 20px;
    padding: 4px 10px 4px 12px;
    font-size: 12px;
    color: var(--gold);
    font-weight: 500;
}

.active-filter-remove {
    color: var(--gold);
    font-size: 16px;
    line-height: 1;
    text-decoration: none;
    transition: var(--t);
    flex-shrink: 0;
}
.active-filter-remove:hover { opacity: .6; }

/* ============================================================
   TERMÉK RÁCS
   ============================================================ */
.termekek-grid {
    grid-template-columns: repeat(3, 1fr);
}

.prod-short-desc {
    font-size: 11px;
    color: var(--text-3);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ============================================================
   LAPOZÓ
   ============================================================ */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.pagination-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--r-sm);
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-3);
    font-family: var(--fm);
    font-size: 12px;
    text-decoration: none;
    transition: var(--t);
}

.pagination-btn:hover {
    border-color: var(--gold);
    color: var(--gold);
    background: var(--gold-dim);
}

.pagination-btn--active {
    background: var(--gold);
    border-color: var(--gold);
    color: #fff;
    font-weight: 700;
}
[data-theme="dark"] .pagination-btn--active { color: #000; }

.pagination-dots {
    color: var(--text-4);
    font-family: var(--fm);
    font-size: 12px;
    padding: 0 4px;
}

/* ============================================================
   FORM CONTROL sm méret
   ============================================================ */
.form-control--sm {
    padding: 8px 11px;
    font-size: 13px;
    border-radius: var(--r-sm);
}

/* ============================================================
   RESZPONZÍV
   ============================================================ */

/* Nagy desktop (1280px+): 3 oszlop sidebar mellett */
.termekek-grid {
    grid-template-columns: repeat(3, 1fr);
}

/* Közepes desktop (1100px alatt): sidebar szűkül, 2 oszlop */
@media (max-width: 1100px) {
    .termekek-layout { grid-template-columns: 220px 1fr; gap: 20px; }
    .termekek-grid   { grid-template-columns: repeat(2, 1fr); }
    .subcat-grid     { grid-template-columns: 1fr; }
}

/* Tablet (768px alatt): sidebar overlay-be kerül, 2 oszlop marad */
@media (max-width: 768px) {
    .termekek-layout { grid-template-columns: 1fr; }

    .filter-mob-toggle { display: flex; }

    .filter-col {
        position: static; /* mobil overlay esetén ne sticky */
    }

    .filter-sidebar {
        position: fixed;
        top: 0; left: 0; right: 0; bottom: 0;
        z-index: 300;
        overflow-y: auto;
        max-height: none;
        border-radius: 0;
        transform: translateX(-100%);
        transition: transform .3s var(--ease);
    }

    .filter-sidebar.open {
        transform: translateX(0);
    }

    .subcat-panel {
        position: static; /* mobil overlay esetén ne sticky */
    }

    .termekek-grid { grid-template-columns: repeat(2, 1fr); }

    /* Mobilon 3 oszlop, soronként 3 kategória – nem lóg ki a viewportból */
    .cat-section-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    /* CSAK az első (látható) grid elemeit rejtjük el 7-től mobilon.
       A .cat-section-more lenyíló gridre NEM vonatkozik – ott mind látható.
       Selector: közvetlen gyerek grid a .cat-section-en belül. */
    .cat-section > .cat-section-grid .cat-section-item:nth-child(n+7) {
        display: none;
    }

    /* Lenyitva mobilon az első grid 7–10. eleme is jelenjen meg – különben
       4 kategória rejtve marad, és a "22 db" felirat nem egyezik a látható 18-cal.
       A .cat-section-toggle .open osztályára hangolva (a termekek.js rakja rá
       lenyitáskor). A :has() argumentuma +2 osztályt ad → magasabb specificitás,
       így nyitott állapotban felülírja a fenti display:none-t. */
    .cat-section:has(.cat-section-toggle.open) > .cat-section-grid .cat-section-item:nth-child(n+7) {
        display: flex;
    }

    /* A lenyíló részben minden elem látható */
    .cat-section-more .cat-section-grid .cat-section-item {
        display: flex;
    }
}

/* Kis mobil (520px alatt): 2 oszlop, kisebb gap */
@media (max-width: 520px) {
    .termekek-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .termekek-heading { font-size: 18px; }
}

/* ── C2 (2026.11.08): márkaszűrő – a „Márka: GEKO” címke arany, rugósan beugrik,
   egyszer végigfut rajta egy fénycsík (a márkakupon / kampánylevél érkezési pontja). */
.active-filter-tag--brand {
    position: relative;
    overflow: hidden;
    color: #fff;
    background: var(--gold);
    border-color: var(--gold);
    animation: brandTagIn .5s cubic-bezier(.34,1.56,.64,1) both;
}
.active-filter-tag--brand .active-filter-remove { color: #fff; }
.active-filter-tag--brand::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(105deg, transparent 30%, rgba(255,255,255,.5) 50%, transparent 70%);
    transform: translateX(-120%);
    animation: brandTagShine 1.3s .5s ease-out 1 both;
    pointer-events: none;
}
@keyframes brandTagIn    { from { opacity: 0; transform: scale(.75); } }
@keyframes brandTagShine { to { transform: translateX(120%); } }
@media (prefers-reduced-motion: reduce) {
    .active-filter-tag--brand, .active-filter-tag--brand::after { animation: none; }
    .active-filter-tag--brand::after { display: none; }
}

/* ============================================================
   SZŰRŐ – C2 javítókör (2026.11.08.) és K kör (2026.11.22.)
   C2: „Egy kicsit nagyobb betűmérettel … legyen egy márka alapú szűrő is.” K kör: „a szűrők minden
   oldalon automatikusan megnyílva jelenjenek meg”.
   - asztali nézetben a sáv alapból NYITVA érkezik (is-open a HTML-ben); a fejlécre kattintva a tartalom
     rugósan összecsukódik / lenyílik (grid 1fr ↔ 0fr), nyitva a szekciók lépcsőzetesen úsznak be, a
     sáv a képernyő magasságáig görgethető (a meglévő max-height + overflow);
   - a fejléc ikonjának csúszkái elmozdulnak (szerszámos „beállítás” mozdulat);
   - Márka: kereshető, görgethető rádiógomb-lista darabszámmal; a választott márka arany.
   Mobilon (≤ 768 px) a meglévő fiók nyitja, benne minden lenyitva.
   ============================================================ */
.filter-sidebar.is-collapsible { padding: 0; }
.filter-sidebar.is-collapsible .filter-sidebar-header { margin: 0; padding: 0; border-bottom: 1px solid transparent; transition: border-color .3s; }
.filter-sidebar.is-collapsible.is-open .filter-sidebar-header { border-bottom-color: var(--border); }

.filter-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    background: none;
    border: 0;
    border-radius: var(--r-md);
    cursor: pointer;
    text-align: left;
    color: var(--text);
    transition: background .2s;
}
.filter-toggle:hover { background: var(--gold-dim); }
.filter-toggle:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }
.filter-toggle-ic {
    flex-shrink: 0;
    width: 38px; height: 38px;
    display: grid; place-items: center;
    border-radius: 10px;
    color: var(--gold);
    background: var(--gold-dim);
}
.filter-toggle-ic circle { transform-box: fill-box; transform-origin: center; transition: transform .45s cubic-bezier(.34,1.56,.64,1); }
.filter-toggle:hover .ft-k1, .filter-sidebar.is-open .ft-k1 { transform: translateX(7px); }
.filter-toggle:hover .ft-k2, .filter-sidebar.is-open .ft-k2 { transform: translateX(-7px); }
.filter-toggle:hover .ft-k3, .filter-sidebar.is-open .ft-k3 { transform: translateX(9px); }
.filter-toggle-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.filter-toggle .filter-sidebar-title { font-size: 18px; line-height: 1.1; }
.filter-toggle-hint { font-size: 12.5px; color: var(--text-3); line-height: 1.35; }
.filter-toggle-count {
    flex-shrink: 0;
    min-width: 22px; height: 22px; padding: 0 6px;
    display: grid; place-items: center;
    border-radius: 99px;
    font: 700 12px/1 var(--fm);
    color: #fff;
    background: var(--gold);
    box-shadow: 0 0 0 0 rgba(var(--gold-rgb), .5);
    animation: filterCountPulse 2.4s ease-out infinite;
}
[data-theme="dark"] .filter-toggle-count { color: #000; }
@keyframes filterCountPulse { 0% { box-shadow: 0 0 0 0 rgba(var(--gold-rgb), .45); } 70%, 100% { box-shadow: 0 0 0 9px rgba(var(--gold-rgb), 0); } }
.filter-toggle-chev { flex-shrink: 0; color: var(--text-3); transition: transform .4s cubic-bezier(.34,1.56,.64,1), color .2s; }
.filter-sidebar.is-open .filter-toggle-chev { transform: rotate(180deg); color: var(--gold); }
.filter-toggle.has-active { box-shadow: inset 3px 0 0 var(--gold); }

.filter-body {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows .45s cubic-bezier(.2,.8,.2,1);
}
.filter-sidebar.is-open .filter-body { grid-template-rows: 1fr; }
.filter-body-inner { min-height: 0; overflow: hidden; padding: 0 18px; }
.filter-sidebar.is-open .filter-body-inner { padding-top: 16px; padding-bottom: 18px; }
.filter-sidebar.is-open .filter-section,
.filter-sidebar.is-open .filter-apply,
.filter-sidebar.is-open .filter-clear-all {
    animation: filterSecIn .5s cubic-bezier(.2,.8,.2,1) both;
    animation-delay: calc(var(--i, 0) * 60ms + 80ms);
}
@keyframes filterSecIn { from { opacity: 0; transform: translateY(8px); } }
.filter-sidebar.is-collapsible .filter-clear-all {
    display: inline-block;
    margin-bottom: 14px;
    font-size: 11px;
}

/* Nagyobb betűk a szűrőben */
.filter-sidebar.is-collapsible .filter-section-title { font-size: 13px; letter-spacing: 1.2px; color: var(--text-2); display: flex; align-items: center; gap: 8px; }
.filter-sidebar.is-collapsible .form-check-label { font-size: 15px; }
.filter-sidebar.is-collapsible .form-control--sm { font-size: 14.5px; }
.filter-sidebar.is-collapsible .filter-apply { font-size: 14px; }

/* K kör: az ársáv hisztogramja a szűrő nyitásakor lépcsőzetesen felnő; a csúszka mozgatása után az
   „Alkalmazás” gomb arany fénnyel jelez, hogy a szűrés még nem indult el. */
.filter-sidebar.is-open .filter-hist i {
    animation: filterHistUp .6s cubic-bezier(.34,1.56,.64,1) both;
    animation-delay: calc(var(--j, 0) * 18ms + 220ms);
}
@keyframes filterHistUp { from { transform: scaleY(0); opacity: 0; } }
.filter-apply.is-ready { animation: filterApplyReady 1.6s ease-out infinite; }
@keyframes filterApplyReady { 0% { box-shadow: 0 0 0 0 rgba(var(--gold-rgb), .5); } 70%, 100% { box-shadow: 0 0 0 10px rgba(var(--gold-rgb), 0); } }
.filter-section-count {
    font: 600 11px/1.6 var(--fm);
    letter-spacing: 0;
    padding: 0 7px;
    border-radius: 99px;
    color: var(--text-3);
    background: var(--surface-2);
}

/* Márka-lista */
.filter-brand-search { margin-bottom: 8px; }
.filter-brand-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-height: 272px;
    overflow-y: auto;
    padding-right: 4px;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
    overscroll-behavior: contain;
}
.filter-brand {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 10px;
    border-radius: var(--r-sm);
    cursor: pointer;
    font-size: 15px;
    color: var(--text-2);
    transition: background .15s, color .15s;
}
.filter-brand:hover { background: var(--gold-dim); color: var(--text); }
.filter-brand input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.filter-brand-dot {
    flex-shrink: 0;
    position: relative;
    width: 17px; height: 17px;
    border-radius: 50%;
    border: 2px solid var(--border);
    transition: border-color .2s;
}
.filter-brand-dot::after {
    content: "";
    position: absolute; inset: 3px;
    border-radius: 50%;
    background: var(--gold);
    transform: scale(0);
    transition: transform .35s cubic-bezier(.34,1.56,.64,1);
}
.filter-brand input:checked + .filter-brand-dot { border-color: var(--gold); }
.filter-brand input:checked + .filter-brand-dot::after { transform: scale(1); }
.filter-brand input:focus-visible + .filter-brand-dot { outline: 2px solid var(--gold); outline-offset: 2px; }
.filter-brand:has(input:checked) { background: var(--gold-dim); color: var(--gold); font-weight: 600; }
.filter-brand-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.filter-brand-db {
    flex-shrink: 0;
    font: 400 11.5px/1.6 var(--fm);
    padding: 0 7px;
    border-radius: 99px;
    color: var(--text-3);
    background: var(--surface-2);
}
.filter-brand--all .filter-brand-name { font-weight: 600; }
.filter-brand[hidden] { display: none; }
.filter-brand-empty { margin: 6px 10px; font-size: 13.5px; color: var(--text-3); }
.filter-brand.is-going { animation: filterBrandGo .5s ease both; }
@keyframes filterBrandGo { 50% { transform: scale(.97); } }

/* Mobil: a fiókban minden lenyitva (a „Szűrők” gomb a nyitó) */
@media (max-width: 768px) {
    .filter-sidebar.is-collapsible .filter-body { grid-template-rows: 1fr; }
    .filter-sidebar.is-collapsible .filter-body-inner { padding: 16px 18px 24px; }
    .filter-sidebar.is-collapsible .filter-toggle { pointer-events: none; padding-right: 60px; }
    .filter-sidebar.is-collapsible .filter-toggle-chev { display: none; }
    .filter-sidebar.is-collapsible .filter-sidebar-header { border-bottom-color: var(--border); }
    .filter-brand-list { max-height: 38vh; }
}

@media (prefers-reduced-motion: reduce) {
    .filter-body, .filter-toggle-chev, .filter-toggle-ic circle, .filter-brand-dot::after, .filter-hist i { transition: none; }
    .filter-range-sl input::-webkit-slider-thumb { transition: none; }
    .filter-range-sl input::-moz-range-thumb { transition: none; }
    .filter-sidebar.is-open .filter-section, .filter-sidebar.is-open .filter-apply, .filter-sidebar.is-open .filter-clear-all,
    .filter-toggle-count, .filter-brand.is-going, .filter-sidebar.is-open .filter-hist i, .filter-apply.is-ready { animation: none; }
}
