/* Stoppball NOVA Filterbar v5.1 – JTL-Shop 5.3, Child-Template */
.stoppball-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin: 14px 0 18px;
}
.stoppball-dropdown { position: relative; }
.stoppball-button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    text-align: left;
    min-width: 150px;
    min-height: 42px;
    padding: 9px 12px;
    border-radius: 6px;
}
.stoppball-button.is-selected {
    font-weight: 600;
    border-color: #5f6570;
    background: #f5f6f8;
}
.stoppball-button-label { overflow-wrap: anywhere; }
.stoppball-dropdown-menu {
    min-width: 238px;
    max-height: min(390px, 65vh);
    overflow-y: auto;
    padding: 6px 0;
    border: 1px solid #d9dce1;
    border-radius: 7px;
    box-shadow: 0 10px 22px rgba(0,0,0,.10);
}
.stoppball-option { display: flex; align-items: center; gap: 9px; white-space: normal; }
.stoppball-option i { flex: 0 0 16px; }
.stoppball-option.is-active { background: #eff2f5; font-weight: 600; }
.stoppball-dropdown-menu .dropdown-item { padding: 9px 12px; white-space: normal; }
.stoppball-dropdown-menu .dropdown-item:hover { background: #f3f4f6; }
.stoppball-price-menu { width: 320px; max-width: calc(100vw - 24px); }
.stoppball-price-panel { padding: 14px; }
.stoppball-price-presets { margin-top: 12px; }
.stoppball-price-presets .dropdown-item { display: flex; justify-content: space-between; gap: 8px; }
.stoppball-remove-link { border-top: 1px solid #e6e7eb; margin-top: 8px; }
.stoppball-native-price { margin: 10px 5px 20px; }
.stoppball-native-price .price-range-slide { margin: 24px 5px 12px; }
.stoppball-slider-menu { width: 270px; padding: 12px; }
.stoppball-slider-heading { display: block; margin-bottom: 12px; }
.stoppball-slider-current { white-space: nowrap; }
.stoppball-slider-range { display: block; width: 100%; margin: 12px 0; accent-color: #444; cursor: pointer; }
.stoppball-slider-limits { display: flex; justify-content: space-between; font-size: 12px; color: #68707a; }
.stoppball-slider-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.stoppball-dropdown-menu .badge { flex: 0 0 auto; }

/* Der Bereich bleibt unauffällig, solange er noch an seiner Originalposition steht. */
@media (min-width: 768px) {
    #stoppball-filterbar {
        position: relative;
        z-index: 12;
    }
    /* JS verschiebt die Leiste beim Fixieren direkt unter <body>.
       So blockieren verschachtelte overflow- und transform-Container nicht. */
    #stoppball-filterbar.stoppball-is-fixed {
        position: fixed !important;
        top: var(--stoppball-fixed-top, 8px) !important;
        left: var(--stoppball-fixed-left, 0px) !important;
        width: var(--stoppball-fixed-width, 100%) !important;
        max-width: none;
        z-index: 1010; /* Unter NOVA sticky-header (1020), ueber regulärem Shop-Inhalt. */
        margin: 0;
        padding: 10px 12px;
        background: #fff;
        border: 1px solid #e3e5e8;
        border-radius: 8px;
        box-shadow: 0 4px 16px rgba(0,0,0,.12);
        box-sizing: border-box;
    }
    #stoppball-filterbar.stoppball-is-fixed .stoppball-dropdown-menu {
        max-height: min(390px, calc(100vh - var(--stoppball-fixed-top, 8px) - 96px));
        overflow-y: auto;
    }
    .stoppball-filter-placeholder { display: block; }
}

/* Leere Filter (auch bei dynamischem Austausch) erhalten nie ein sichtbares Feld. */
#stoppball-filterbar:not(:has(.stoppball-dropdown)) { display: none !important; }

/* Mobile: Original-NOVA-Filter und Sortierung bleiben erhalten. */
@media (max-width: 767.98px) {
    #stoppball-filterbar { display: none !important; }
    .stoppball-filter-placeholder { display: none !important; }
}


/* Zweispaltige Kategorienbeschreibung direkt vor den Produktslidern. */
/* In NOVA / NOVAChild unter Benutzerdefiniertes CSS, Sass oder Scss einfuegen. */
.nova-category-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(1.5rem, 3vw, 3rem);
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 1100px;
    margin: 3rem auto;
}

.nova-category-grid__text,
.nova-category-grid__media {
    min-width: 0;
}

.nova-category-grid__media {
    display: flex;
    align-items: center;
    justify-content: center;
}

.nova-category-grid__media img {
    display: block;
    width: 100%;
    max-width: 480px;
    height: auto;
    object-fit: contain;
}

.nova-category-grid > :only-child {
    grid-column: 1 / -1;
    justify-self: center;
    width: 100%;
    max-width: 740px;
}

@media (max-width: 767.98px) {
    .nova-category-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 1.5rem;
        margin: 2rem auto;
    }
    .nova-category-grid > :only-child {
        grid-column: auto;
    }
}
