/* =========================================================
   HomeSystem – filtre v kategórii (hs-filtre.css v2 · 7. 11. 2026)
   obchod.homesystem.sk · Shoptet šablóna 11
   Nahrať cez FTP do user/documents/, načítať v ZÁHLAVÍ:
   <link rel="stylesheet" href="https://cdn.myshoptet.com/usr/obchod.homesystem.sk/user/documents/hs-filtre.css?v=2">
   HTML upravuje hs-filtre.js v2.
   Počítač (od 992 px): lišta filtrov nad produktmi s nadpisom a „V akcii“.
   Mobil: tlačidlá Filtre / Zoradiť, filtre a radenie v okne zdola.
   ========================================================= */
@keyframes hsFSip { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(3px); } }

/* ---------- spoločné ---------- */
.hs-fakcia {
  display: inline-flex; align-items: center; gap: 5px; cursor: pointer; white-space: nowrap;
  background: #fff8dc; border: 1px solid #ffd53d; color: var(--hsd-ink, #1f1f1f);
  font-family: 'Source Sans 3', Arial, sans-serif; font-weight: 700;
}
.hs-fakcia span { font-family: 'Exo 2', sans-serif; font-weight: 800; }
.hs-fakcia[aria-pressed="true"] { background: var(--hsd-yellow, #ffc807); border-color: #e0ae00; }
.hs-fakcia[aria-pressed="true"]:after { content: "✕"; margin-left: 4px; font-size: 12px; }

@media (min-width: 992px) {
  .hs-mbar, .hs-mcipy, .hs-shlava, .hs-spata, .hs-fclona, #category-header .hs-zhlava { display: none !important; }

  /* ľavý stĺpec bez filtrov (skrytý hneď v CSS, aby nepreblikli) */
  .type-category .sidebar .box-filters,
  .type-manufacturer-detail .sidebar .box-filters { display: none !important; }

  .hs-fbar {
    position: relative; display: flex !important; flex-wrap: wrap; gap: 8px; align-items: center;
    margin: 0 0 14px; padding: 14px 16px 16px; border-radius: 16px; background: var(--hsd-tint, #f3f9fe);
    border: 1px solid #d6e9f8; font-family: 'Source Sans 3', Arial, sans-serif;
  }
  .hs-fbar .filters-wrapper,
  .hs-fbar #filters,
  .hs-fbar #category-filter-hover,
  .hs-fbar .filter-sections { display: contents !important; }
  .hs-fbar .filters-unveil-button-wrapper,
  .hs-fbar .filter-close { display: none !important; }

  /* nadpis so šípkou */
  .hs-fbar .hs-fnadpis { order: 0; flex: 0 0 100%; display: flex; align-items: center; gap: 10px; margin: 0 0 4px; }
  .hs-fnadpis-sip {
    flex: 0 0 30px; width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    background: var(--hsd-yellow, #ffc807); font: 800 16px/1 'Exo 2', sans-serif; animation: hsFSip 1.6s ease-in-out infinite;
  }
  .hs-fnadpis strong { font: 800 18px/1.2 'Exo 2', sans-serif; color: var(--hsd-ink, #1f1f1f); }
  .hs-fnadpis-pod { font-size: 14px; color: var(--hsd-text, #4d4d4d); }

  .hs-fbar .filter-section,
  .hs-fbar .slider-wrapper.hs-fsec {
    position: relative; width: auto !important; margin: 0 !important; padding: 0 !important;
    border: 0 !important; background: none !important; float: none !important;
  }

  /* poradie tlačidiel */
  .hs-fbar .hs-fsec   { order: 4; }   /* ostatné parametre (musí byť pred konkrétnymi) */
  .hs-fbar .hs-f-p336 { order: 1; }   /* Kompatibilita so systémom */
  .hs-fbar .hs-f-p339 { order: 2; }   /* Komunikácia */
  .hs-fbar .hs-f-p134 { order: 3; }   /* Typ zariadenia */
  .hs-fbar .hs-f-cena { order: 6; }
  .hs-fbar .hs-f-manufacturer { order: 7; }
  .hs-fbar .hs-fakcia-lista { order: 8; }
  .hs-fbar .hs-fbool  { order: 9; }
  .hs-fbar .filter-section-count { order: 10; margin-left: auto !important; font-size: 14px; color: var(--hsd-text, #4d4d4d); }
  .hs-fbar .filter-section-count a { font-weight: 700; color: var(--hsd-deep, #136fb0); margin-right: 10px; }

  /* tlačidlo */
  .hs-fbtn {
    display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 12px;
    border-radius: 10px; border: 1px solid #c9dcec; background: #fff; color: var(--hsd-ink, #1f1f1f);
    font: 600 15px/1 'Source Sans 3', Arial, sans-serif; cursor: pointer; white-space: nowrap;
  }
  .hs-f-p336 .hs-fbtn, .hs-f-p339 .hs-fbtn { border: 2px solid var(--hsd-brand, #239ceb); padding: 0 11px; }
  .hs-fbtn:after {
    content: ""; width: 7px; height: 7px; margin-left: 2px;
    border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translateY(-2px); transition: transform .15s ease;
  }
  .hs-fsec.hs-open .hs-fbtn:after { transform: rotate(-135deg) translateY(-2px); }
  .hs-fbtn:hover, .hs-fsec.hs-open .hs-fbtn { border-color: var(--hsd-brand, #239ceb); }
  .hs-fbtn b {
    display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 5px;
    border-radius: 10px; background: var(--hsd-deep, #136fb0); color: #fff; font-size: 12px;
  }
  .hs-fsec.hs-on .hs-fbtn { border-color: var(--hsd-deep, #136fb0); box-shadow: inset 0 0 0 1px var(--hsd-deep, #136fb0); }

  /* V akcii v lište */
  .hs-fbar .hs-fakcia-lista { height: 38px; padding: 0 12px; border-radius: 10px; font-size: 15px; font-weight: 600; }
  .hs-fbar .hs-fakcia-lista:hover { border-color: #e0ae00; }

  /* panel */
  .hs-fpanel {
    display: none; position: absolute; left: 0; top: 44px; z-index: 60;
    min-width: 240px; max-width: 360px; max-height: 380px; overflow: auto; box-sizing: border-box;
    padding: 10px 14px; border-radius: 12px; background: #fff;
    border: 1px solid var(--hsd-line, #e3eef7); box-shadow: 0 14px 30px rgba(13, 90, 143, .16);
  }
  .hs-fsec.hs-open .hs-fpanel { display: block; }
  .hs-fpanel form, .hs-fpanel fieldset { margin: 0; padding: 0; border: 0; }
  .hs-fpanel fieldset > div { float: none !important; width: auto !important; display: block !important; margin: 0 !important; }
  .hs-fpanel .filter-label {
    display: block !important; position: relative; padding: 5px 0 5px 26px !important;
    white-space: nowrap; font-size: 15px; cursor: pointer;
  }
  .hs-fpanel .filter-label:hover { color: var(--hsd-deep, #136fb0); }
  .hs-fpanel .filter-label.disabled { opacity: .45; cursor: default; }
  .hs-fpanel .filter-count { margin-left: 4px; }
  .hs-f-cena .hs-fpanel { width: 320px; max-width: none; overflow: visible; padding: 14px 18px 18px; }
  .hs-f-cena .hs-fpanel h4 { display: none; }

  /* Skladom – priamo zaškrtávacie pole v lište */
  .hs-fbar .hs-fbool {
    display: flex !important; align-items: center; height: 38px; padding: 0 12px !important;
    border-radius: 10px; border: 1px solid #c9dcec !important; background: #fff !important; box-sizing: border-box;
  }
  .hs-fbar .hs-fbool h4 { display: none; }
  .hs-fbar .hs-fbool form,
  .hs-fbar .hs-fbool fieldset { margin: 0; padding: 0; border: 0; display: flex; gap: 14px; }
  .hs-fbar .hs-fbool fieldset > div { float: none !important; width: auto !important; margin: 0 !important; }
  .hs-fbar .hs-fbool .filter-label { display: block !important; position: relative; padding: 0 0 0 24px !important; white-space: nowrap; font-weight: 600; }
  .hs-fbar .hs-fbool .filter-count { margin-left: 4px; }
}

/* ---------- mobil a tablet ---------- */
@media (max-width: 991px) {
  /* tlačidlá nad produktmi */
  .hs-mbar {
    position: sticky; top: 50px; z-index: 50; display: flex; gap: 8px; margin: 4px 0 8px; padding: 8px 0;
    background: #fff;
  }
  .hs-mbar button {
    flex: 1 1 0; min-width: 0; height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    border-radius: 12px; font: 700 15px/1 'Exo 2', sans-serif; white-space: nowrap; cursor: pointer;
  }
  .hs-mfiltre { border: 0; background: var(--hsd-brand, #239ceb); color: #fff; }
  .hs-mfiltre b {
    min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; box-sizing: border-box;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--hsd-yellow, #ffc807); color: #1f1f1f; font-size: 12px;
  }
  .hs-mfiltre b[hidden] { display: none; }
  .hs-mzorad { border: 1px solid #c9dcec; background: #fff; color: var(--hsd-ink, #1f1f1f); }

  /* štítky pod tlačidlami */
  .hs-mcipy { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
  .hs-mcipy[hidden] { display: none; }
  .hs-mcip, .hs-mcipy .hs-fakcia, .hs-mzrus {
    height: 32px; padding: 0 11px; border-radius: 999px; font-size: 13.5px; cursor: pointer;
  }
  .hs-mcip { border: 0; background: var(--hsd-deep, #136fb0); color: #fff; font-family: 'Source Sans 3', Arial, sans-serif; font-weight: 600; }
  .hs-mzrus { border: 0; background: none; color: var(--hsd-deep, #136fb0); font-weight: 700; padding: 0 4px; }

  /* tmavé pozadie */
  .hs-fclona { display: none; position: fixed; inset: 0; z-index: 10040; background: rgba(31, 31, 31, .45); }
  html.hs-fs-open .hs-fclona, html.hs-zs-open .hs-fclona { display: block; }
  html.hs-fs-open, html.hs-fs-open body, html.hs-zs-open, html.hs-zs-open body { overflow: hidden !important; }

  /* okno s filtrami */
  .hs-fbar {
    position: fixed !important; left: 0; right: 0; bottom: 0; z-index: 10050; display: block !important;
    max-height: 86vh; margin: 0 !important; padding: 0 !important; overflow-y: auto; overscroll-behavior: contain;
    background: #fff; border-radius: 20px 20px 0 0; box-shadow: 0 -10px 30px rgba(0, 0, 0, .18);
    transform: translateY(105%); visibility: hidden; transition: transform .25s ease, visibility 0s linear .25s;
    font-family: 'Source Sans 3', Arial, sans-serif;
  }
  html.hs-fs-open .hs-fbar { transform: none; visibility: visible; transition: transform .25s ease; }
  .hs-fbar .hs-fnadpis, .hs-fbar .hs-fakcia-lista, .hs-fbar .filters-unveil-button-wrapper,
  .hs-fbar .filter-close, .hs-fbar .filter-section-count { display: none !important; }
  .hs-fbar .filters-wrapper { display: block !important; margin: 0 !important; padding: 0 !important; border: 0 !important; background: none !important; }
  .hs-fbar #filters { display: flex !important; flex-direction: column; margin: 0 !important; padding: 0 16px !important; border: 0 !important; background: none !important; }
  .hs-fbar .filter-sections, .hs-fbar .filter-sections > div:not(.filter-section) { display: contents !important; }

  .hs-shlava {
    position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; align-items: center;
    padding: 12px 16px; background: #fff; border-bottom: 1px solid var(--hsd-line, #e3eef7); border-radius: 20px 20px 0 0;
  }
  .hs-shlava strong { font: 800 19px/1.2 'Exo 2', sans-serif; color: var(--hsd-ink, #1f1f1f); }
  .hs-szavri {
    width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--hsd-tint, #f3f9fe);
    color: var(--hsd-ink, #1f1f1f); font-size: 15px; cursor: pointer;
  }

  .hs-fbar .filter-section, .hs-fbar .slider-wrapper.hs-fsec {
    width: auto !important; float: none !important; margin: 0 !important; padding: 0 !important;
    border: 0 !important; border-bottom: 1px solid var(--hsd-line, #e3eef7) !important; background: none !important;
  }
  .hs-fbar .hs-fsec   { order: 4; }
  .hs-fbar .hs-f-p336 { order: 1; }
  .hs-fbar .hs-f-p339 { order: 2; }
  .hs-fbar .hs-f-p134 { order: 3; }
  .hs-fbar .hs-f-cena { order: 6; }
  .hs-fbar .hs-f-manufacturer { order: 7; }
  .hs-fbar .hs-fbool  { order: 9; border-bottom: 0 !important; }

  .hs-fbtn {
    display: flex; width: 100%; align-items: center; gap: 8px; padding: 14px 0; border: 0; background: none;
    color: var(--hsd-ink, #1f1f1f); font: 700 16px/1.2 'Exo 2', sans-serif; text-align: left; cursor: pointer;
  }
  .hs-fbtn span { margin-right: auto; }
  .hs-fbtn b {
    min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; box-sizing: border-box;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--hsd-deep, #136fb0); color: #fff; font-size: 12px;
  }
  .hs-fbtn:after {
    content: ""; width: 8px; height: 8px; margin: 0 4px 0 6px;
    border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translateY(-3px); transition: transform .15s ease;
  }
  .hs-fsec.hs-open .hs-fbtn:after { transform: rotate(-135deg) translate(-2px, -2px); }
  .hs-fpanel { display: none; padding: 0 0 14px; }
  .hs-fsec.hs-open .hs-fpanel { display: block; }
  .hs-fpanel form, .hs-fpanel fieldset { margin: 0; padding: 0; border: 0; }
  .hs-fpanel fieldset { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; }
  .hs-fpanel fieldset > div { float: none !important; width: auto !important; margin: 0 !important; }
  .hs-fpanel fieldset > input[type=hidden], .hs-fpanel .advanced-filters-wrapper:empty { display: none !important; }
  .hs-fpanel .advanced-filters-wrapper { grid-column: 1 / -1; }
  /* Heureka „Overené zákazníkmi“ nesmie prekrývať okná */
  html.hs-fs-open [id^="hw-"][id$="left"], html.hs-zs-open [id^="hw-"][id$="left"],
  html.hs-fs-open #heurekaTableft, html.hs-zs-open #heurekaTableft { display: none !important; }
  .hs-fpanel .filter-label {
    display: block !important; position: relative; padding: 8px 0 8px 26px !important; font-size: 15px; line-height: 1.3;
  }
  .hs-fpanel .filter-label.disabled { opacity: .45; }
  .hs-fpanel .filter-count { margin-left: 3px; color: #8c8c8c; font-size: 13px; }
  .hs-f-cena .hs-fpanel { padding: 4px 6px 18px; }
  .hs-f-cena .hs-fpanel h4 { display: none; }
  .hs-fbar .hs-fbool { padding: 12px 0 !important; }
  .hs-fbar .hs-fbool h4 { display: none; }
  .hs-fbar .hs-fbool form, .hs-fbar .hs-fbool fieldset { margin: 0; padding: 0; border: 0; }
  .hs-fbar .hs-fbool .filter-label { display: block !important; position: relative; padding: 4px 0 4px 26px !important; font: 700 16px/1.3 'Exo 2', sans-serif; }

  .hs-spata {
    position: sticky; bottom: 0; z-index: 2; padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: #fff; border-top: 1px solid var(--hsd-line, #e3eef7);
  }
  .hs-szobraz {
    width: 100%; height: 50px; border: 0; border-radius: 12px; background: #2e8b3a; color: #fff;
    font: 700 16px/1 'Exo 2', sans-serif; cursor: pointer;
  }

  /* radenie – skryté, otvára sa ako okno zdola */
  #category-header.hs-zsheet {
    position: fixed !important; left: 0; right: 0; bottom: 0; z-index: 10050; display: block !important;
    margin: 0 !important; padding: 0 0 calc(14px + env(safe-area-inset-bottom)) !important;
    background: #fff !important; border-radius: 20px 20px 0 0; box-shadow: 0 -10px 30px rgba(0, 0, 0, .18);
    transform: translateY(105%); visibility: hidden; transition: transform .25s ease, visibility 0s linear .25s;
  }
  html.hs-zs-open #category-header.hs-zsheet { transform: none; visibility: visible; transition: transform .25s ease; }
  .hs-zsheet .listSorting { display: block !important; float: none !important; width: auto !important; margin: 0 !important; }
  .hs-zsheet .listSorting__controls { display: flex !important; flex-direction: column; margin: 0 !important; padding: 4px 16px !important; list-style: none; background: none !important; }
  .hs-zsheet .listSorting__controls li { margin: 0 !important; border-bottom: 1px solid var(--hsd-line, #e3eef7); }
  .hs-zsheet .listSorting__controls li:last-child { border-bottom: 0; }
  .hs-zsheet .listSorting__control {
    display: flex !important; width: 100%; justify-content: space-between; align-items: center; padding: 14px 4px !important;
    border: 0 !important; background: none !important; color: var(--hsd-ink, #1f1f1f) !important;
    font: 600 16px/1.2 'Source Sans 3', Arial, sans-serif !important; text-align: left;
  }
  .hs-zsheet .listSorting__control--current { color: var(--hsd-deep, #136fb0) !important; font-weight: 800 !important; }
  .hs-zsheet .listSorting__control--current:after { content: "✓"; }
  .hs-zsheet > :not(.hs-zhlava):not(.listSorting) { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  .hs-fnadpis-sip { animation: none; }
  .hs-fbar, #category-header.hs-zsheet { transition: none !important; }
}
