/* ==========================================================================
   A4F sitewide styles
   Voorheen dynamisch via document.createElement('style') ingespoten door
   Footer > Miscellaneous HTML. Nu een los, cachebaar bestand.
   Referentie in Miscellaneous HTML:
   <link rel="stylesheet" href="https://www.all4fysio.nl/media/a4f/brand-tree.css">
   ========================================================================== */

/* --- Categorie-paginatitel: kleiner + minder witruimte, sitewide --------- */
div:has(> h1.page-title){margin-top:8px !important;margin-bottom:8px !important;}
h1.page-title{font-size:22px !important;line-height:1.3 !important;}

/* --- Toolbar (sorteren/aantal) compacter op mobiel ------------------------ */
@media (max-width:639px){
  .toolbar.toolbar-products{
    display:flex !important;flex-wrap:nowrap !important;align-items:center !important;
    gap:8px !important;margin-bottom:10px !important;width:100% !important;
  }
  .toolbar.toolbar-products .modes{display:none !important;}
  .toolbar.toolbar-products .toolbar-amount{
    order:1 !important;margin:0 !important;padding:0 !important;
    flex:1 1 0% !important;min-width:0 !important;max-width:none !important;
    font-size:13px !important;white-space:nowrap !important;overflow:hidden !important;
    text-overflow:ellipsis !important;
  }
  .toolbar.toolbar-products .toolbar-sorter{
    order:2 !important;margin:0 !important;padding:0 !important;
    flex:0 0 auto !important;display:flex !important;align-items:center !important;
    flex-wrap:nowrap !important;white-space:nowrap !important;
  }
  .toolbar.toolbar-products .sorter-label{display:none !important;}
  .toolbar.toolbar-products .sorter-options{
    margin:0 6px 0 0 !important;padding:6px 8px !important;font-size:13px !important;
    width:auto !important;min-width:0 !important;max-width:120px !important;flex:0 1 auto !important;
  }
  .toolbar.toolbar-products .sort-asc{
    width:26px !important;height:26px !important;display:flex !important;
    align-items:center !important;justify-content:center !important;flex-shrink:0 !important;
  }
  .toolbar.toolbar-products .sort-asc svg{width:16px !important;height:16px !important;}
}

/* --- Verberg het native "Categorie"-filterblok; onze pillenrij vervangt het */
.filter-option:has(ol[aria-label="Categorie filter options"]){
  display:none !important;
}

/* --- Ruimte rond het pillenblok / categorie-omschrijving ------------------ */
.catalog-product-list.py-8{padding-top:8px !important;}
#category-view-container.category-view.container{
  padding-top:8px !important;padding-bottom:0 !important;
  margin-top:0 !important;margin-bottom:0 !important;
}

/* --- Brand-tree pillenwidget zelf ------------------------------------------ */
.category-description,
.category-description__content,
.category-description [data-content-type="html"]{
  width:100% !important;max-width:100% !important;float:none !important;
  margin:0 !important;padding:0 !important;
}
#a4f-brand-tree-slot{width:100% !important;max-width:none !important;float:none !important;display:block !important;}
.a4f-bt{margin:0;width:100%;box-sizing:border-box;min-height:46px;display:flex;align-items:center;}
.a4f-bt *{box-sizing:border-box;}
.a4f-bt__loading{display:flex;gap:8px;width:100%;}
.a4f-bt__skel{
  display:block;height:38px;width:100%;border-radius:999px;
  background:linear-gradient(90deg,#ebedf1 25%,#f5f6f8 37%,#ebedf1 63%);background-size:400% 100%;
  animation:a4fBtShimmer 1.4s ease infinite;
}
@keyframes a4fBtShimmer{0%{background-position:100% 50%}100%{background-position:0 50%}}
.a4f-bt__slider{position:relative;display:none;width:100%;}
.a4f-bt__slider.a4f-bt__slider--visible{display:block;}
.a4f-bt__viewport{
  overflow-x:auto;overflow-y:hidden;scroll-behavior:smooth;
  -webkit-overflow-scrolling:touch;scrollbar-width:none;
}
.a4f-bt__viewport::-webkit-scrollbar{display:none;}
.a4f-bt__pills{display:flex;gap:8px;width:max-content;padding:2px 4px;}
.a4f-bt__pill{
  display:inline-flex;align-items:center;gap:6px;white-space:nowrap;
  padding:10px 16px;border-radius:999px;border:1.5px solid #e2e4ea;background:#fff;
  font-size:14px;font-weight:600;color:#14171f !important;text-decoration:none !important;
  transition:border-color .15s ease,background .15s ease;
}
.a4f-bt__pill:hover{border-color:#29a8e5;background:#f7fcff;}
.a4f-bt__pill-count{font-size:12px;font-weight:600;color:#9299a6;}
.a4f-bt__nav{
  position:absolute;top:50%;transform:translateY(-50%);width:34px;height:34px;
  border-radius:999px;background:#fff;border:1px solid #e2e4ea;box-shadow:0 2px 8px rgba(20,23,31,.10);
  display:flex;align-items:center;justify-content:center;color:#14171f;cursor:pointer;
}
.a4f-bt__nav:hover{background:#fafafa;}
.a4f-bt__nav--prev{left:-14px;}
.a4f-bt__nav--next{right:-14px;}
.a4f-bt__nav--hidden{display:none !important;}
@media (max-width:639px){.a4f-bt__nav{display:none !important;}}

/* --- Filter "meer/minder tonen" inklap-functionaliteit --------------------- */
/* Inklappen gebeurt ALLEEN op lijsten die het script markeert (a4f-fold-on),
   zodat native filters (Blessure/Aandoening, Kleur) onaangeroerd blijven. */
.filter-content ol.items.a4f-fold-on > li:nth-of-type(n+9){display:none;}
.filter-content ol.items.a4f-fold-on.a4f-show-all > li:nth-of-type(n+9){display:revert;}
.filter-content ol.items.a4f-fold-on > li.item:has(.bg-blue){display:revert;}
.filter-content .field.search.a4f-search-on{display:block !important;}

.a4f-fold-toggle{
  display:inline-flex;align-items:center;gap:6px;
  margin:8px 0 2px;padding:2px 0;
  background:none;border:0;cursor:pointer;
  font:inherit;font-size:14px;font-weight:400;line-height:1.3;
  color:inherit;text-decoration:underline;
}
.a4f-fold-toggle:hover{text-decoration:underline;opacity:.8;}
.a4f-fold-toggle svg{width:16px;height:16px;transition:transform .2s ease;}
.a4f-fold-toggle[aria-expanded="true"] svg{transform:rotate(180deg);}
.a4f-fold-toggle[hidden]{display:none;}
