/* =========================================================
   Category Swipe Filter – v1.0.1
   ========================================================= */

.csf-wrapper {
    width: 100%;
    position: relative;
    /* kein overflow:hidden – verhindert abgeschnittene Boxen */
}

/* Scrollbarer Track */
.csf-track-outer {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
    -ms-overflow-style: none;
}
.csf-track-outer::-webkit-scrollbar { display: none; }

.csf-track {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    padding: 4px 16px 12px 4px;
    width: max-content;
}

/* ── Filter Item ─────────────────────── */
.csf-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    min-height: 44px;
    border: none;
    border-radius: 16px;
    cursor: pointer;
    white-space: nowrap;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.2;
    background-color: transparent;
    color: #333;
    box-shadow: 0 1px 3px rgba(0,0,0,.08);
    scroll-snap-align: start;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    transition:
        background-color 180ms cubic-bezier(0.16, 1, 0.3, 1),
        color            180ms cubic-bezier(0.16, 1, 0.3, 1),
        transform        120ms cubic-bezier(0.16, 1, 0.3, 1),
        box-shadow       180ms cubic-bezier(0.16, 1, 0.3, 1);
}

.csf-item:active {
    transform: scale(0.96);
}

.csf-item.csf-active {
    background-color: #1a4fba;
    color: #fff;
    box-shadow: 0 2px 10px rgba(26,79,186,.35);
}

/* Icon */
.csf-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    line-height: 0;
}
.csf-icon svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
    flex-shrink: 0;
}

/* ── Desktop: umbrechen statt scrollen ── */
@media (min-width: 768px) {
    .csf-track-outer { overflow-x: visible; }
    .csf-track { flex-wrap: wrap; width: auto; }
    .csf-item:hover:not(.csf-active) {
        background-color: rgba(0,0,0,.06);
        box-shadow: 0 2px 6px rgba(0,0,0,.10);
    }
}

/* Loading State */
.csf-loading .csf-track {
    opacity: .5;
    pointer-events: none;
    transition: opacity 200ms;
}
