/*
 * StarPythons Katalog-Filter v2 (Entwurf dev2, September 2026)
 * Balken mit Popovers, Chips, Panel von unten fuer schmale Bildschirme,
 * Nachladen-Knopf. Farben und Schrift kommen aus dem Theme (Roboto, #299738).
 * Alle Regeln sind auf .spf gescoped; #main davor, damit sie gegen die
 * Theme-Regeln (#main .filterform ..., #main button ...) gewinnen.
 */
.spf { --spf-accent: #299738; --spf-accent-dark: #21792d; --spf-accent-soft: #e6f3e8; --spf-ink: #212529; --spf-ink-2: #4d544c; --spf-muted: #7c837a;
       --spf-line: #dde2da; --spf-line-2: #c9d0c6; --spf-surface: #fff; --spf-surface-2: #f1f3ef; --spf-chip: #303030; --spf-chip-ink: #fff;
       --spf-shadow: 0 10px 30px rgba(20, 30, 20, .16); font-family: inherit; color: var(--spf-ink); }
.spf *, .spf *::before, .spf *::after { box-sizing: border-box; }
.spf .spf-n, .spf .spf-count, .spf .spf-badge, .spf-loadmore-text { font-variant-numeric: tabular-nums; }
.spf .spf-nojs { display: none; }
.spf:not(.spf-ready) .spf-nojs { display: flex; gap: 12px; align-items: center; padding: 10px 0; }
.spf:not(.spf-ready) .spf-panel { display: block; position: static; box-shadow: none; margin: 8px 0 0; }
.spf:not(.spf-ready) .spf-facets { flex-wrap: wrap; }
.spf:not(.spf-ready) .spf-facet { width: 100%; }

/* Balken */
#main .spf .spf-bar { position: sticky; top: 44px; z-index: 30; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 0; background: #fff; border-bottom: 1px solid var(--spf-line); }
#main .spf .spf-tools { display: flex; align-items: center; gap: 8px; margin-left: auto; }
#main .spf .spf-count { font-weight: 700; font-size: 17px; white-space: nowrap; margin-right: 6px; }
#main .spf .spf-count small { font-weight: 500; color: var(--spf-muted); font-size: 13px; margin-left: 4px; }
#main .spf .spf-facets { display: flex; gap: 8px; flex: 0 1 auto; flex-wrap: wrap; }
#main .spf .spf-facet { position: relative; }
#main .spf .spf-btn { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--spf-line-2); background: var(--spf-surface); color: var(--spf-ink);
  border-radius: 999px; padding: 8px 14px; font: inherit; font-size: 14px; line-height: 1.2; white-space: nowrap; cursor: pointer; margin: 0; transition: border-color .15s, background .15s; }
#main .spf .spf-btn:hover { border-color: var(--spf-ink-2); background: var(--spf-surface); }
#main .spf .spf-btn[aria-expanded="true"] { border-color: var(--spf-ink); background: var(--spf-surface-2); }
#main .spf .spf-btn svg { width: 12px; height: 12px; opacity: .6; transition: transform .15s; }
#main .spf .spf-btn[aria-expanded="true"] svg { transform: rotate(180deg); }
#main .spf .spf-btn.spf-mobile-only { display: none; }
#main .spf .spf-badge { background: var(--spf-chip); color: var(--spf-chip-ink); border-radius: 999px; min-width: 20px; height: 20px; padding: 0 6px; font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
#main .spf .spf-badge[hidden] { display: none; }
#main .spf .spf-search { display: flex; align-items: center; gap: 8px; border: 1px solid var(--spf-line-2); background: var(--spf-surface); border-radius: 999px; padding: 0 12px; height: 38px; min-width: 150px; margin: 0 4px 0 0; order: 0; }
#main .spf .spf-search svg { width: 15px; height: 15px; opacity: .55; flex: none; }
#main .spf .spf-search input[type="text"] { border: 0; background: transparent; outline: 0; width: 140px; padding: 0; margin: 0; height: 36px; font: inherit; font-size: 14px; box-shadow: none; }
#main .spf .spf-sort { display: flex; align-items: center; gap: 6px; white-space: nowrap; font-size: 14px; color: var(--spf-ink-2); margin: 0; }
#main .spf .spf-sort select { border: 1px solid var(--spf-line-2); background: var(--spf-surface); border-radius: 999px; padding: 8px 32px 8px 14px; margin: 0; width: auto; font: inherit; font-size: 14px; color: var(--spf-ink);
  appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'><path d='M2 4l4 4 4-4' fill='none' stroke='%23777' stroke-width='1.6'/></svg>"); background-repeat: no-repeat; background-position: right 12px center; }

/* Popover */
#main .spf .spf-panel { position: absolute; left: 0; top: calc(100% + 8px); z-index: 40; background: var(--spf-surface); border: 1px solid var(--spf-line); border-radius: 14px; box-shadow: var(--spf-shadow); width: 300px; display: none; flex-direction: column; overflow: hidden; text-align: left; }
#main .spf .spf-panel.spf-panel-wide { width: 340px; }
#main .spf .spf-panel.spf-open { display: flex; }
#main .spf .spf-panel-search { padding: 10px 12px; border-bottom: 1px solid var(--spf-line); }
#main .spf .spf-panel-search input[type="text"] { width: 100%; border: 1px solid var(--spf-line-2); border-radius: 8px; padding: 7px 10px; margin: 0; background: #f7f8f6; outline: 0; font: inherit; font-size: 14px; box-shadow: none; }
#main .spf .spf-list { padding: 6px; }
#main .spf .spf-list-scroll { max-height: 300px; overflow: auto; }
#main .spf .spf-panel-foot { border-top: 1px solid var(--spf-line); padding: 8px 12px; display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--spf-ink-2); }
#main .spf .spf-panel-foot button { border: 0; background: transparent; color: var(--spf-accent); font: inherit; font-size: 13px; font-weight: 500; padding: 4px 0; margin: 0; cursor: pointer; }
#main .spf .spf-opt { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; cursor: pointer; user-select: none; margin: 0; font-weight: 400; font-size: 14px; }
#main .spf .spf-opt:hover { background: var(--spf-surface-2); }
#main .spf .spf-opt input { width: 16px; height: 16px; margin: 0; flex: none; accent-color: var(--spf-accent); }
#main .spf .spf-opt .spf-lbl { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#main .spf .spf-n { color: var(--spf-muted); font-size: 13px; min-width: 28px; text-align: right; transition: color .2s; }
#main .spf .spf-n.spf-bump { color: var(--spf-accent); font-weight: 700; }
#main .spf .spf-zero { color: var(--spf-muted); cursor: not-allowed; }
#main .spf .spf-zero:hover { background: transparent; }
#main .spf .spf-zero .spf-n { opacity: .5; }
#main .spf .spf-seg { display: flex; gap: 6px; padding: 10px; }
#main .spf .spf-segbtn { flex: 1; border: 1px solid var(--spf-line-2); background: var(--spf-surface); border-radius: 10px; padding: 10px 8px; display: flex; flex-direction: column; align-items: center; gap: 2px; cursor: pointer; margin: 0; font-weight: 400; font-size: 14px; }
#main .spf .spf-segbtn input { position: absolute; opacity: 0; width: 0; height: 0; }
#main .spf .spf-segbtn .spf-n { min-width: 0; font-size: 12px; }
#main .spf .spf-segbtn.spf-on { border-color: var(--spf-accent); background: var(--spf-accent-soft); }
#main .spf .spf-segbtn.spf-zero { opacity: .45; }

/* Preis */
#main .spf .spf-pricebox { padding: 12px 14px 6px; }
#main .spf .spf-hist { display: flex; align-items: flex-end; gap: 2px; height: 46px; padding: 0 9px; margin-bottom: 2px; }
#main .spf .spf-hist i { flex: 1; display: block; background: var(--spf-line-2); border-radius: 2px 2px 0 0; min-height: 2px; transition: background .2s, height .25s; }
#main .spf .spf-hist i.spf-in { background: var(--spf-accent); }
#main .spf .spf-range { position: relative; height: 30px; }
#main .spf .spf-range .spf-track { position: absolute; left: 10px; right: 10px; top: 13px; height: 4px; background: var(--spf-line-2); border-radius: 2px; }
#main .spf .spf-range .spf-fill { position: absolute; top: 13px; height: 4px; background: var(--spf-accent); border-radius: 2px; }
#main .spf .spf-range input[type="range"] { position: absolute; left: 0; top: 0; width: 100%; height: 30px; margin: 0; padding: 0; -webkit-appearance: none; appearance: none; background: transparent; pointer-events: none; border: 0; box-shadow: none; }
#main .spf .spf-range input[type="range"]::-webkit-slider-runnable-track { height: 30px; background: transparent; }
#main .spf .spf-range input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; pointer-events: auto; width: 20px; height: 20px; margin-top: 5px; border-radius: 50%; background: var(--spf-surface); border: 2px solid var(--spf-accent); box-shadow: 0 1px 4px rgba(0, 0, 0, .25); cursor: grab; }
#main .spf .spf-range input[type="range"]::-moz-range-track { height: 30px; background: transparent; }
#main .spf .spf-range input[type="range"]::-moz-range-thumb { pointer-events: auto; width: 16px; height: 16px; border-radius: 50%; background: var(--spf-surface); border: 2px solid var(--spf-accent); box-shadow: 0 1px 4px rgba(0, 0, 0, .25); cursor: grab; }
#main .spf .spf-pio { display: flex; gap: 10px; align-items: center; margin: 6px 0 10px; font-size: 13px; color: var(--spf-ink-2); }
#main .spf .spf-pio label { flex: 1; display: flex; align-items: center; gap: 6px; border: 1px solid var(--spf-line-2); border-radius: 8px; padding: 5px 8px; background: #f7f8f6; margin: 0; font-weight: 400; }
#main .spf .spf-pio input[type="number"] { width: 100%; border: 0; background: transparent; outline: 0; text-align: right; font: inherit; font-size: 13px; color: var(--spf-ink); margin: 0; padding: 0; box-shadow: none; -moz-appearance: textfield; }
#main .spf .spf-pio input::-webkit-outer-spin-button, #main .spf .spf-pio input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
#main .spf .spf-quick { display: flex; gap: 6px; flex-wrap: wrap; }
#main .spf .spf-quick button { border: 1px solid var(--spf-line-2); background: var(--spf-surface); color: var(--spf-ink); border-radius: 999px; padding: 5px 11px; font: inherit; font-size: 12.5px; margin: 0; cursor: pointer; }
#main .spf .spf-quick button[aria-pressed="true"] { border-color: var(--spf-accent); background: var(--spf-accent-soft); }
#main .spf .spf-quick button:disabled { opacity: .45; cursor: not-allowed; }
#main .spf .spf-quick button .spf-n { min-width: 0; margin-left: 4px; }

/* Chips */
#main .spf .spf-chips { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 12px 0 4px; }
#main .spf .spf-chips:empty { display: none; }
#main .spf .spf-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--spf-chip); color: var(--spf-chip-ink); border: 0; border-radius: 999px; padding: 5px 10px 5px 12px; font: inherit; font-size: 13px; font-weight: 500; margin: 0; cursor: pointer; }
#main .spf .spf-chip svg { width: 12px; height: 12px; }
#main .spf .spf-chip.spf-chip-clear { background: transparent; color: var(--spf-accent); padding-left: 6px; }

/* Panel von unten */
#main .spf .spf-sheet-bg { position: fixed; inset: 0; background: rgba(0, 0, 0, .45); z-index: 1050; }
#main .spf .spf-sheet-bg[hidden] { display: none; }
#main .spf .spf-sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1051; background: var(--spf-surface); border-radius: 18px 18px 0 0; max-height: 88vh; display: flex; flex-direction: column; box-shadow: var(--spf-shadow); }
#main .spf .spf-sheet[hidden] { display: none; }
#main .spf .spf-sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px 10px; border-bottom: 1px solid var(--spf-line); font-size: 17px; }
#main .spf .spf-sheet-head button { border: 0; background: transparent; color: var(--spf-accent); font: inherit; font-size: 14px; font-weight: 500; margin: 0; cursor: pointer; }
#main .spf .spf-sheet-body { overflow: auto; flex: 1; }
#main .spf .spf-acc { border-bottom: 1px solid var(--spf-line); }
#main .spf .spf-acc-head { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 18px; border: 0; background: transparent; color: var(--spf-ink); font: inherit; font-size: 15px; font-weight: 500; text-align: left; margin: 0; cursor: pointer; }
#main .spf .spf-acc-head .spf-sel { color: var(--spf-muted); font-weight: 400; font-size: 13px; margin-left: auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 50%; }
#main .spf .spf-acc-head svg { width: 12px; height: 12px; opacity: .6; flex: none; transition: transform .15s; }
#main .spf .spf-acc[open] .spf-acc-head svg { transform: rotate(180deg); }
#main .spf .spf-acc .spf-panel { position: static; display: none; width: auto; border: 0; box-shadow: none; border-radius: 0; padding: 0 8px 8px; }
#main .spf .spf-acc[open] .spf-panel { display: block; }
#main .spf .spf-acc .spf-panel-foot { display: none; }
#main .spf .spf-sheet-foot { padding: 12px 18px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--spf-line); display: flex; gap: 10px; }
#main .spf .spf-sheet-apply { flex: 1; background: var(--spf-accent); color: #fff; border: 0; border-radius: 999px; padding: 13px; font: inherit; font-weight: 700; font-size: 15px; margin: 0; cursor: pointer; }
#main .spf .spf-sheet-apply:disabled { opacity: .5; cursor: not-allowed; }
#main .spf .spf-sheet-reset { border: 1px solid var(--spf-line-2); background: transparent; color: var(--spf-ink); border-radius: 999px; padding: 13px 16px; font: inherit; font-weight: 500; margin: 0; cursor: pointer; }

/* Liste: Nachladen, Leerzustand */
#main .module-netzhirsch-starpythons-list .spf-loadmore { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 14px 0 30px; color: #7c837a; font-size: 13px; }
#main .module-netzhirsch-starpythons-list .spf-loadmore-track { width: 160px; height: 3px; background: #dde2da; border-radius: 3px; overflow: hidden; }
#main .module-netzhirsch-starpythons-list .spf-loadmore-track i { display: block; height: 100%; background: #303030; width: 0; transition: width .25s; }
#main .module-netzhirsch-starpythons-list a.spf-loadmore-btn { display: inline-block; border: 1px solid #303030; color: #303030; background: transparent; border-radius: 999px; padding: 11px 26px; font-weight: 700; text-decoration: none; margin: 0; }
#main .module-netzhirsch-starpythons-list a.spf-loadmore-btn:hover { background: #303030; color: #fff; }
#main .module-netzhirsch-starpythons-list a.spf-loadmore-btn.spf-busy { opacity: .5; pointer-events: none; }
/* Seitenzahlen nur ohne JavaScript; das Skript setzt html.spf-js, sobald es laeuft */
html.spf-js .spf-nojs-only { display: none !important; }
#main .module-netzhirsch-starpythons-list .spf-empty { padding: 50px 0; text-align: center; color: #7c837a; }
#main .module-netzhirsch-starpythons-list .spf-empty strong { display: block; color: #212529; font-size: 18px; margin-bottom: 6px; }
#main .module-netzhirsch-starpythons-list .cc-list[aria-busy="true"] .content { opacity: .55; transition: opacity .15s; }
#main .module-netzhirsch-starpythons-list .cc-item { transition: transform .15s, box-shadow .15s; }
#main .module-netzhirsch-starpythons-list .cc-item:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(20, 30, 20, .14); }


/* Karten wie im Prototyp: weiße Fläche, feine Linie, ruhige Typografie. Schriftart bleibt die der Seite. */
#main .module-netzhirsch-starpythons-list .cc-item { background: #f4f6f3; border: 1px solid #e3e7e1; border-radius: 10px; overflow: hidden; }
#main .module-netzhirsch-starpythons-list .cc-title-image { background: #eceeea; }
#main .module-netzhirsch-starpythons-list .cc-item-info.spf-card-body { background: #f4f6f3; padding: 12px 14px 14px; gap: 4px; }
#main .module-netzhirsch-starpythons-list .cc-id-gender { font-size: 12px; color: #7c837a; margin: 0; }
#main .module-netzhirsch-starpythons-list .spf-card-sex { font-size: 14px; color: #4d544c; line-height: 1; }
#main .module-netzhirsch-starpythons-list h3.cc-category { font-size: 15px; font-weight: 500; line-height: 1.3; margin: 0 0 auto; min-height: 2.6em; color: #212529; }
#main .module-netzhirsch-starpythons-list .spf-card-bottom { margin-top: 8px; }
#main .module-netzhirsch-starpythons-list .spf-card-price { font-size: 17px; font-weight: 700; color: #212529; font-variant-numeric: tabular-nums; }
#main .module-netzhirsch-starpythons-list .cc-item-info-bottom .more { margin: 0; }
#main .module-netzhirsch-starpythons-list .cc-item-info-bottom a.more.details { background: #299738; color: #fff; border-radius: 999px; padding: 6px 14px; font-size: 13px; font-weight: 700; line-height: 1.3; text-decoration: none; margin: 0; }
#main .module-netzhirsch-starpythons-list .cc-item-info-bottom a.more.details:hover { background: #21792d; }
@media (max-width: 640px) {
  #main .module-netzhirsch-starpythons-list .cc-item-info.spf-card-body { padding: 10px 10px 12px; }
  #main .module-netzhirsch-starpythons-list h3.cc-category { font-size: 13.5px; }
  #main .module-netzhirsch-starpythons-list .spf-card-price { font-size: 15px; }
  #main .module-netzhirsch-starpythons-list .cc-item-info-bottom a.more.details { padding: 5px 10px; font-size: 12px; }
}

@media (min-width: 1200px) {
  #main .module-netzhirsch-starpythons-list .cc-list .row > .cc-entry { width: 25%; }
}

/* Schmale Bildschirme */
@media (max-width: 899px) {
  #main .spf .spf-facets { display: none; }
  #main .spf .spf-btn.spf-mobile-only { display: inline-flex; }
  #main .spf .spf-tools { flex: 0 0 auto; margin-left: 0; }
  #main .spf .spf-search { min-width: 0; flex: 1; order: 2; margin: 0; }
  #main .spf .spf-btn.spf-mobile-only { order: 1; }
  #main .spf .spf-tools { order: 3; }
  #main .spf .spf-search input[type="text"] { width: 100%; }
  #main .spf .spf-sort-label { display: none; }
  #main .spf .spf-count { display: none; }
  #main .spf .spf-sort select { padding: 8px 30px 8px 12px; max-width: 150px; }
}
@media (prefers-reduced-motion: reduce) { .spf *, #main .module-netzhirsch-starpythons-list * { transition: none !important; } }
