/* =========================================================
   Founárna – kategoriové parametrické filtry
   Specializované filtry napříč kategoriemi:
   audio, kryty, pouzdra, šňůrky, kabely, powerbanky,
   držáky, řemínky a ochranná skla
   v: 20260710cf3
   ========================================================= */


/* Pojistka proti zobrazení obecných telefonních filtrů v okamžiku,
   kdy je stránka rozpoznaná jako specializovaná kategorie. */
body.fn-category-facets-ready:not(.type-product) #content .fn-model-filter-sidebar[data-fn-category-facets] .fn-model-filter-section--brands,
body.fn-category-facets-ready:not(.type-product) #content .fn-model-filter-sidebar[data-fn-category-facets] .fn-model-filter-section--types,
body.fn-category-facets-ready:not(.type-product) #content .fn-model-filter-sidebar[data-fn-category-facets] .fn-model-filter-section--generic,
body.fn-category-facets-ready:not(.type-product) #content .fn-model-filter-sidebar[data-fn-category-facets] .fn-model-filter-section--quick {
  display: none !important;
}

body.fn-category-facets-ready:not(.type-product) #content .products-block,
body.fn-category-facets-ready:not(.type-product) #content .products {
  grid-auto-flow: row dense !important;
}

body.founarna-category-colorful:not(.type-product) #content .fn-category-facet-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
}

body.founarna-category-colorful:not(.type-product) #content .fn-category-facet-option {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  min-height: 38px;
  padding: 8px 9px;
  border: 1px solid rgba(205, 221, 241, .82);
  border-radius: 13px;
  background: rgba(255, 255, 255, .78);
  color: #435069;
  text-decoration: none;
  font-size: 12px;
  line-height: 1.2;
  font-weight: 850;
  box-sizing: border-box;
  transition: border-color .18s ease, background-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

body.founarna-category-colorful:not(.type-product) #content .fn-category-facet-option:hover,
body.founarna-category-colorful:not(.type-product) #content .fn-category-facet-option:focus-visible {
  border-color: rgba(100, 191, 242, .72);
  background: rgba(255, 255, 255, .98);
  transform: translateY(-1px);
}

body.founarna-category-colorful:not(.type-product) #content .fn-category-facet-option.is-active {
  border-color: rgba(233, 88, 170, .68);
  background:
    radial-gradient(circle at 0 0, rgba(233, 88, 170, .13), transparent 68%),
    rgba(255, 255, 255, .98);
  color: #182033;
  box-shadow: inset 3px 0 0 rgba(233, 88, 170, .86);
}

body.founarna-category-colorful:not(.type-product) #content .fn-category-facet-check {
  position: relative;
  display: inline-flex;
  width: 20px;
  height: 20px;
  align-items: center;
  justify-content: center;
  border: 1.5px solid rgba(145, 163, 184, .72);
  border-radius: 6px;
  background: #fff;
  box-sizing: border-box;
}

body.founarna-category-colorful:not(.type-product) #content .fn-category-facet-option.is-active .fn-category-facet-check {
  border-color: rgba(233, 88, 170, .88);
  background: rgba(233, 88, 170, .92);
}

body.founarna-category-colorful:not(.type-product) #content .fn-category-facet-option.is-active .fn-category-facet-check::after {
  content: "";
  width: 8px;
  height: 4px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: translateY(-1px) rotate(-45deg);
}

body.founarna-category-colorful:not(.type-product) #content .fn-category-facet-label {
  min-width: 0;
  overflow-wrap: anywhere;
}

body.founarna-category-colorful:not(.type-product) #content .fn-category-facet-count {
  display: inline-flex;
  min-width: 24px;
  height: 24px;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(100, 191, 242, .13);
  color: #536177;
  font-size: 10px;
  line-height: 1;
  font-weight: 900;
  box-sizing: border-box;
}

body.founarna-category-colorful:not(.type-product) #content .fn-category-facet-option.is-active .fn-category-facet-count {
  background: rgba(233, 88, 170, .13);
  color: #9f2f70;
}

body.founarna-category-colorful:not(.type-product) #content .fn-category-facet-product-hidden {
  display: none !important;
}

body.founarna-category-colorful:not(.type-product) #content .fn-category-facet-subcategory-hidden {
  display: none !important;
}

body.founarna-category-colorful:not(.type-product) #content .fn-category-facet-no-results {
  margin: 16px 0 22px;
  padding: 18px 20px;
  border: 1px solid rgba(255, 197, 31, .54);
  border-radius: 18px;
  background: rgba(255, 250, 230, .86);
  color: #4b5568;
  text-align: center;
  font-size: 14px;
  line-height: 1.45;
  font-weight: 800;
}

/* Při vlastním filtrování se stránkování schová. Odkazy filtru
   zároveň nastaví 36 produktů na stránku, což pokrývá současné
   dotčené kategorie. */
body.fn-category-facets-active:not(.type-product) #content .pagination,
body.fn-category-facets-active:not(.type-product) #content .pagination-wrapper,
body.fn-category-facets-active:not(.type-product) #content .pagination-count {
  display: none !important;
}

@media (max-width: 1180px) {
  body.founarna-category-colorful:not(.type-product) #content .fn-category-facet-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  body.founarna-category-colorful:not(.type-product) #content .fn-category-facet-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  body.founarna-category-colorful:not(.type-product) #content .fn-category-facet-option {
    grid-template-columns: 18px minmax(0, 1fr) auto;
    min-height: 36px;
    gap: 7px;
    padding: 7px 8px;
    border-radius: 11px;
    font-size: 11px;
  }

  body.founarna-category-colorful:not(.type-product) #content .fn-category-facet-check {
    width: 18px;
    height: 18px;
    border-radius: 5px;
  }

  body.founarna-category-colorful:not(.type-product) #content .fn-category-facet-count {
    min-width: 22px;
    height: 22px;
    padding: 0 5px;
    font-size: 9px;
  }
}

@media (max-width: 390px) {
  body.founarna-category-colorful:not(.type-product) #content .fn-category-facet-list {
    grid-template-columns: 1fr;
  }
}

/* Na specializovaných kategoriích je jeden společný reset nahoře.
   Duplicitní reset v nativní sekci Cena/Skladem se proto neschovává celý,
   pouze jeho tlačítko. */
body.fn-category-facets-ready:not(.type-product) #content .fn-model-filter-sidebar[data-fn-category-facets] .fn-model-filter-section--native .fn-filter-reset {
  display: none !important;
}


/* Při prvním použití vlastního filtru u rozsáhlé kategorie skript
   přes vestavěné tlačítko Shoptetu dotáhne další produktové karty.
   Stránka se neobnoví a uživatel vidí krátkou stavovou informaci. */
body.fn-category-facets-loading-all #content .fn-model-filter-main::after {
  content: "Načítám všechny produkty pro filtr…";
  position: fixed;
  z-index: 9999;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  max-width: calc(100vw - 32px);
  padding: 10px 18px;
  border: 1px solid rgba(205, 221, 241, .9);
  border-radius: 999px;
  background: rgba(255, 255, 255, .97);
  color: #263248;
  box-shadow: 0 12px 34px rgba(31, 41, 55, .14);
  font-size: 13px;
  line-height: 1.2;
  font-weight: 900;
  white-space: nowrap;
  box-sizing: border-box;
}

@media (max-width: 767px) {
  body.fn-category-facets-loading-all #content .fn-model-filter-main::after {
    bottom: 14px;
    min-height: 38px;
    padding: 9px 15px;
    font-size: 12px;
  }
}
