/* =========================================
   KATEGORIE – FILTER/STEUERUNG (MOBILE FIRST)
   ========================================= */

/* Unverändert (Informationsreduktion) */
#filterBody .pf-footer{ visibility: hidden; }
.listing-meta{ display:none; }
span.option_count { display: none; }

.filter-category-info {
  display: none; /* Desktop standardmäßig ausblenden */
}
/* ========== DEVELOPER: BEGIN Chips-Styling ========== */
.filterOption > .filter-selected {
  display: none !important;
}


/* -----------------------------------------
   VIEWPORT ≤ 767px (nur Handy)
   ----------------------------------------- */
@media (max-width:1023px){

    #layout_logo {
    position: sticky;
        top: 0;
}

  /* --- Container Filter-Button + Shortcuts --- */
  .vps{
    display:flex;
    align-items:center;    
    flex-wrap:wrap;
      padding: 15px 0 15px 0;   
    position:sticky;
    top:var(--sticky-top, 0px);   /* via JS gesetzt */
    z-index:601;
    background:#fff;       /* Hintergrund liefert ::after */
    box-shadow:none;
  }

  /* Vollbreite Hintergrundfläche nur im Sticky-State */
  .vps.is-stuck::after{
    content:"";
    position:absolute;
    left:50%; transform:translateX(-50%);
    top:0;
    width:100vw;
    height:100%;
    background:#fff;
    border-bottom:1px solid #eaeaea;
    box-shadow:0 1px 0 rgba(0,0,0,.06);
    z-index:-1;
  }

  /* Filter-Button (Pill) */
  .vps .vps-sort{
    position:relative;          /* nötig für Tap-Zone */
    flex:0 0 auto;
    display:inline-flex;
    align-items:center;
    gap:8px;
    padding:10px 14px;          /* optische Höhe */
    border:2px solid #e6e6ea;
    border-radius:16px;
    background:#fff;
    font-size:15px;
    font-weight:600;
    line-height:1.2;
    color:#1f1f1f;
    cursor:pointer;
    user-select:none;
    transition:border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
  }
  .vps .vps-sort i{
    font-size:15px; color:#1f1f1f;
    display:inline-block; transform:translateY(0.5px);
  }
  .vps .vps-sort:hover{ border-color:#515151; }

  .vps .vps-sort.has-active{
    border:2px solid #3b3b3b;
    background:#f7f7f7;
    box-shadow:0 1px 0 rgba(0,0,0,.04);
  }

  .vps .vps-sort:focus-visible{
    outline:0;
    box-shadow:0 0 0 3px rgba(0,0,0,.12), inset 0 0 0 1px #1f1f1f;
  }

  /* Unsichtbare Tap-Zone (44px) für .vps-sort */
  .vps .vps-sort::before{
    content:"";
    position:absolute;
    top:50%; left:-8px; right:-8px; height:44px;
    transform:translateY(-50%);
    background:transparent;
    border-radius:20px;
  }

  /* Badge am Button */
  .vps .vps-sort .filter-badge{
    display:inline-flex; align-items:center; justify-content:center;
    min-width:22px; height:22px; padding:0 6px;
    border-radius:15px; font-size:12px; font-weight:700;
    background:#1a1a1a; color:#fff; margin-left:8px;
  }

  /* --- Shortcuts (Farbe/Grösse/Material) --- */
  .vps #active-filters{
    flex:1 1 auto;
    min-width:0;
    display:flex;
    align-items:center;   
    flex-wrap:wrap;
    margin:0;
    border:none;
    padding:0;
        padding-left: 20px;
  gap: 20px;
  }

  .vps #active-filters .af-chip.is-empty{
    border:2px solid #e6e6ea;
    background:#fff;
  }

  .vps #active-filters .af-chip{
    position:relative;           /* nötig für Tap-Zone */
    display:inline-flex;
    align-items:center;
    gap:7px;
    padding:10px 14px;           /* optische Höhe */
    border:2px solid #3b3b3b;
    border-radius:16px;
    background:#fff;
    font-size:15px;
    font-weight:600;
    line-height:1.2;
    color:#1f1f1f;
    white-space:nowrap;
    transition:border-color .2s ease, background-color .2s ease, box-shadow .2s ease;
  }
  .vps #active-filters .af-chip:hover{ border-color:#515151; }
  .vps #active-filters .af-chip .af-x{ font-size:16px; line-height:1; }
  .af-x i.fa{
    font-size:16px;
    display:inline-block; transform:translateY(0.5px);
  }

  .vps #active-filters .af-chip:not(.is-empty){
    background:#f7f7f7;
    box-shadow:0 1px 0 rgba(0,0,0,.04);
  }
  .vps #active-filters .af-chip:focus-visible{
    outline:0;
    box-shadow:0 0 0 3px rgba(0,0,0,.12), inset 0 0 0 1px #1f1f1f;
  }

  /* Unsichtbare Tap-Zone (44px) für .af-chip */
  .vps #active-filters .af-chip::before{
    content:"";
    position:absolute;
    top:50%; left:-8px; right:-8px; height:44px;
    transform:translateY(-50%);
    background:transparent;
    border-radius:20px;
  }

  .vps #active-filters .reset-all{
    font-size:14px;
    font-weight:600;
    text-decoration:underline;
    white-space:nowrap;
  }

.filterReset {
    margin-bottom: 0;
        background-color: #f9f9f9;
        position: sticky;
        top: 66px;
        z-index: 500;
        border-bottom: 1px solid #cecece!important;
        padding: 20px 0;
}

  /* --- Filter als Fullscreen-Overlay --- */
  #productFilter{
    position:fixed !important;
    top:130px !important; left:0 !important; right:0 !important; bottom:0 !important;
    margin:0 !important; z-index:1005 !important;
    background:#fff; border:0; border-radius:0;
    overflow:hidden; overflow-y:scroll;
    -webkit-overflow-scrolling:touch; overscroll-behavior:contain;
  }

  #layout_content.vpa-sort #productFilter #filterBody{
    height:100%; overflow:auto;
    -webkit-overflow-scrolling:touch; overscroll-behavior:contain;
    padding:8px 12px 96px;
  }

  #productFilter.hidden{ display:none !important; }

  /* Sticky-Footer im Filter */
  #productFilter .pf-footer{
    visibility:visible; position:sticky; bottom:0; left:0; right:0;
    background:#fff; border-top:1px solid #e6e6ea; padding:12px 16px; z-index:1;margin-top: 0px;
  }

  #productFilter .pf-footer .vps-sort.pf-close-cta{
    display:flex; align-items:center; justify-content:center; gap:10px;
    width:100%; min-height:44px; padding:12px 16px;
    border:0; border-radius:10px; cursor:pointer;
    background:#1a1a1a; color:#fff; font-weight:700; line-height:1;
    box-sizing:border-box; box-shadow:none; text-align:center;
    transition:background-color .2s ease,color .2s ease;
  }
  #productFilter .pf-footer .vps-sort.pf-close-cta:hover{ background:#1a1a1a; }
  #productFilter .pf-footer .vps-sort.pf-close-cta i{ font-size:16px; line-height:1; }

  /* Body-Scroll sperren wenn Overlay offen */
  body:has(#layout_content.vpa-sort){
      position:fixed; inset:0; width:100%; overflow:hidden; 
    }
  html:has(#layout_content.vpa-sort){
      overflow:hidden; 
    }
#productFilter .box_category_header {
    display: none;
}
     .filter-category-info {
    display: flex;
    align-items: center;
    gap: .5rem;
    position: sticky;
    top: 0;
    padding: 0px 14px;
    background: #fff;
    border-bottom: 1px solid #e6e6e6;
    font-size: 16px;
    line-height: 1;
    font-weight: 500;
    font-variation-settings: 'wght' 400;
    z-index: 2;
         height: 65px
  }
  .filter-category-info .fci-title {
       font-size: 16px;
    font-weight: bold;
              font-family: Verdana, Geneva, sans-serif;
  }
  .filter-category-info .fci-dot {
        display: inline-block;
    margin: 0 .25rem;
    opacity: .6;
  }
  .filter-category-info .fci-count {
    opacity: .8;
    font-weight: normal;
  }
     .filterOption > .filter-selected {
    display: flex !important;
    flex-wrap: wrap;           /* Umbrechen */
    gap: 8px;                  /* Abstand zwischen den Chips */
    margin: 8px 15px 10px;
    padding: 4px 0;
  }

  .filterOption > .filter-selected .fo-chip {
    display: inline-flex;
    align-items: center;
    padding: 7px 12px;
    border-radius: 10px;
    background: #f2f2f2;
    font-size: 15px;
    line-height: 1.2;
    white-space: nowrap;       /* Inhalt bleibt in einer Zeile */
      border: none;
  }
    .filter-selected.hidden {
    display: none!important;
}
    span.fo-chip-x {
    margin-left: 5px;
}
      .filterOption > .filter-selected .fo-clear {
    margin-left: 8px;
    border: 0;
    background: none;
    padding: 0;
    color: #333;
    font-size: 15px;
    text-decoration: underline;
    cursor: pointer;
  }
}
/* -----------------------------------------
   FEIN-TUNING XS – kompakte Buttons
   ----------------------------------------- */
@media (max-width:490px){
        .vps #active-filters .af-chip {  
    gap: 7px;
    padding: 10px 7px; 
}
          .vps #active-filters{
    justify-content:space-evenly;
  }
      }
@media (max-width:460px){

      .vps #active-filters{
    justify-content:space-evenly;
  }
  .vps .vps-sort{
    font-size:14px!important;
    font-weight:600!important; 
    padding:9px 10px; /* optisch kompakter, Tap-Zone bleibt via ::before */
  }
  .vps #active-filters .af-chip{
    padding:9px 10px!important;
    font-size:15px!important;
    font-weight:600!important;
    gap:6px!important;
  }
}

@media (max-width:435px){
  .vps .vps-sort{
    font-size:14px!important;
    font-weight:600!important;
    gap:8px!important;
    padding:9px 9px;
  }

  .vps #active-filters .af-chip {
    font-size:14px!important;
  }
}

@media (max-width:400px){
  .vps #active-filters .af-chip .af-x{ display:none; }
}

@media (max-width:350px){
    .vps {
    gap: unset;   
}
    .vps .vps-sort {
    font-size: 14px!important;  
}
    .vps #active-filters .af-chip {  
    font-size: 14px!important;
    padding: 9px 8px !important;
}
      }

/* -----------------------------------------
   SYSTEM – Bewegungsreduktion & Safe-Areas
   ----------------------------------------- */
@media (prefers-reduced-motion: reduce){
  .vps .vps-sort,
  .vps #active-filters .af-chip{
    transition:none !important;
  }
}

@supports (padding:max(0px)){
  #layout_content.vpa-sort #productFilter #filterBody{
    padding-bottom:max(96px, env(safe-area-inset-bottom));
  }
}
