/* ═══════════════════════════════════════════
   TOOLBAR
   ═══════════════════════════════════════════ */
.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.toolbar-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.toolbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}
.filter-mobile-toggle {
    display: none;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    background: #fff;
}
.result-count {
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
}
.active-filters {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.active-filter-tag {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: var(--primary-light);
    border: 1px solid var(--primary-20);
    border-radius: 20px;
    font-size: 12px;
    color: var(--primary-dark);
    font-weight: 500;
    animation: fadeIn 0.2s ease;
}
.active-filter-tag button {
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 14px;
    line-height: 1;
    color: var(--primary);
    transition: var(--transition);
}
.active-filter-tag button:hover {
    background: var(--primary);
    color: #fff;
}

.sort-select {
    display: flex;
    align-items: center;
    gap: 8px;
}
.sort-select label {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
}
.sort-select select {
    padding: 8px 32px 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--text);
    background: #fff url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%238e9fb3' fill='none' stroke-width='1.5'/%3E%3C/svg%3E") right 12px center no-repeat;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
    outline: none;
}
.sort-select select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-10);
}
/*
 * A kapcsoló csak akkor látszik, ha a fejléc-szkript beállította a nézetet a
 * `<html>`-en — JS nélkül így nincs halott gomb (a téma egészére érvényes szabály).
 */
.view-toggle {
    display: none;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}
.view-btn {
    padding: 8px 10px;
    color: var(--text-muted);
    background: #fff;
    transition: var(--transition);
    display: flex;
    align-items: center;
}
.view-btn + .view-btn { border-left: 1px solid var(--border); }
.view-btn:hover { color: var(--text); }
[data-product-view] .view-toggle { display: flex; }
/* Az aktív gomb is az attribútumból — szűrés után a frissen kirajzolt gomb így is jó. */
[data-product-view="grid"] .view-btn[data-view="grid"],
[data-product-view="list"] .view-btn[data-view="list"] {
    background: var(--btn-gradient);
    color: #fff;
}

/* ═══════════════════════════════════════════
   AKTÍV SZŰRŐ JELVÉNY — link változat
   A demóban span + button volt. Itt link, mert a szűrő eltávolítása
   szerveroldali navigációval történik, így JS nélkül is működik.
   ═══════════════════════════════════════════ */
a.active-filter-tag {
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
}
a.active-filter-tag:hover {
    background: var(--primary-20);
    border-color: var(--primary);
    color: var(--primary-dark);
}
a.active-filter-tag:focus-visible {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-10);
}
.active-filter-remove {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    color: var(--primary);
    flex-shrink: 0;
    transition: var(--transition);
}
a.active-filter-tag:hover .active-filter-remove {
    background: var(--primary);
    color: #fff;
}
