/* HomeSystem – horný blok kategórie (hs-kategoria.css v4)
   Nahrať cez FTP do user/documents/, načítať v Záhlaví (kvôli bez preblikávania).
   Farby a písma podľa dizajnového systému HomeSystem. */

.hs-kb {
  --hs-brand: #239ceb;
  --hs-deep: #136fb0;
  --hs-tint: #f3f9fe;
  --hs-line: #e3eef7;
  --hs-ink: #1f1f1f;
  --hs-text: #4d4d4d;
  --hs-muted: #6b6b6b;
  --hs-yellow: #ffc807;
  --hs-yellow-hover: #f2b800;
  --hs-lime: #c8f25a;
  --hs-pink: #f986c5;
  --hs-red: #cc0000;
  --hs-green: #006b00;
  margin: 18px 0 22px;
  font-family: "Source Sans 3", "Source Sans Pro", Arial, sans-serif;
  color: var(--hs-text);
}
.hs-kb *, .hs-kb *::before, .hs-kb *::after { box-sizing: border-box; }

/* starý obrázkový baner v popise kategórie skryť */
.type-category .category-top-description p:has(> img),
.type-category .category-top-description p:has(> a > img) { display: none; }

/* ---------- pás ---------- */
.hs-kb-pas { position: relative; padding-bottom: 10px; }
.hs-kb-pas::before {
  content: ""; position: absolute; inset: 0;
  background: var(--hs-brand); border-radius: 16px;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 90%);
}
.hs-kb-pas-in {
  position: relative; overflow: hidden;
  background: var(--hs-deep); border-radius: 16px;
  clip-path: polygon(0 0, 100% 0, 100% 86%, 0 100%);
  padding: 18px 18px 36px;
  display: grid; grid-template-columns: 72px 220px minmax(0, 1fr); gap: 20px; align-items: center;
}
.hs-kb-lavo { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.hs-kb-lavo > * { position: relative; z-index: 1; }

.hs-kb-stitok {
  background: var(--hs-yellow); color: var(--hs-ink);
  font: 700 13px/1 "Exo 2", Arial, sans-serif; padding: 6px 10px; border-radius: 6px;
}
.hs-kb-stitok-lime { background: var(--hs-lime); }
.hs-kb .hs-kb-nadpis {
  margin: 0; padding: 0; border: 0; text-transform: none;
  font: 800 24px/1.1 "Exo 2", Arial, sans-serif; color: #fff;
}
.hs-kb-text { margin: 0; font-size: 14px; line-height: 1.4; color: #fff; }
.hs-kb .hs-kb-cta {
  display: inline-flex; align-items: center; min-height: 44px; margin-top: 2px; padding: 0 18px;
  background: var(--hs-yellow); color: var(--hs-ink); border: 0; border-radius: 8px; cursor: pointer;
  font: 700 16px/1.2 "Exo 2", Arial, sans-serif; text-decoration: none; white-space: nowrap;
}
.hs-kb .hs-kb-cta:hover { background: var(--hs-yellow-hover); color: var(--hs-ink); text-decoration: none; }

/* ---------- rad kariet ---------- */
.hs-kb-rad { position: relative; min-width: 0; }
.hs-kb-karty {
  list-style: none; margin: 0; padding: 0;
  display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.hs-kb-karty::-webkit-scrollbar { display: none; }
.hs-kb-polozka { flex: 0 0 206px; scroll-snap-align: start; margin: 0; padding: 0; }
.hs-kb-polozka::before { content: none !important; }
.hs-kb .hs-kb-karta {
  height: 100%; min-height: 84px; width: 100%;
  display: flex; gap: 10px; align-items: center; padding: 10px;
  background: #fff; border: 0; border-radius: 12px; text-decoration: none; color: var(--hs-ink); text-align: left;
}
.hs-kb .hs-kb-karta:hover { text-decoration: none; }
.hs-kb .hs-kb-karta:hover .hs-kb-nazov { color: var(--hs-deep); text-decoration: underline; }
.hs-kb-foto {
  position: relative; flex: 0 0 64px; height: 64px; border-radius: 10px; background: var(--hs-tint);
  display: flex; align-items: center; justify-content: center;
}
.hs-kb-foto img { width: 56px; height: 56px; object-fit: contain; }
.hs-kb-pct {
  position: absolute; top: -6px; left: -6px; z-index: 1;
  background: var(--hs-yellow); color: var(--hs-ink);
  font: 800 12px/1 "Exo 2", Arial, sans-serif; padding: 4px 6px; border-radius: 6px; white-space: nowrap;
}
.hs-kb-pct-velka { background: var(--hs-red); color: #fff; }
.hs-kb-info { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.hs-kb-nazov {
  font-weight: 600; font-size: 13px; line-height: 1.3; color: var(--hs-ink);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.hs-kb-ceny { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.hs-kb-cena { font: 800 17px/1.1 "Exo 2", Arial, sans-serif; color: var(--hs-ink); white-space: nowrap; }
.hs-kb-povodna { font-size: 12px; color: var(--hs-muted); white-space: nowrap; }
.hs-kb-dost { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; color: var(--hs-deep); }
.hs-kb-dost::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.hs-kb-dost-ok { color: var(--hs-green); }
.hs-kb-dost-no { color: var(--hs-red); }

.hs-kb-koniec { display: none; flex-basis: 128px; }
.hs-kb .hs-kb-karta-cta {
  flex-direction: column; align-items: flex-start; justify-content: center; gap: 4px; cursor: pointer;
  background: var(--hs-yellow); font: 700 15px/1.2 "Exo 2", Arial, sans-serif; color: var(--hs-ink);
}

.hs-kb .hs-kb-sipka {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 44px; height: 44px; border-radius: 50%; border: 0; padding: 0; cursor: pointer;
  background: #fff; color: var(--hs-deep); display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .18);
}
.hs-kb .hs-kb-sipka[hidden] { display: none; }
.hs-kb-sipka-spat { left: -8px; }
.hs-kb-sipka-dalej { right: -8px; }

/* ---------- rýchle odkazy ---------- */
.hs-kb-cipy { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.hs-kb .hs-kb-cip {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; margin: 0;
  background: var(--hs-tint); border: 1px solid var(--hs-line); border-radius: 8px; cursor: pointer;
  font: 600 14px/1.2 "Source Sans 3", "Source Sans Pro", Arial, sans-serif; color: var(--hs-ink);
  text-decoration: none; white-space: nowrap;
}
.hs-kb .hs-kb-cip:hover { border-color: var(--hs-brand); color: var(--hs-ink); text-decoration: none; }
.hs-kb .hs-kb-cip-akcia { padding-left: 6px; background: #fff8dc; border-color: #ffe27a; }
.hs-kb .hs-kb-cip-akcia[aria-pressed="true"] { background: var(--hs-yellow); border-color: var(--hs-yellow); }
.hs-kb-cip-ikona {
  width: 26px; height: 26px; border-radius: 50%; background: var(--hs-yellow);
  display: inline-flex; align-items: center; justify-content: center;
  font: 800 14px/1 "Exo 2", Arial, sans-serif; color: var(--hs-ink);
}
.hs-kb .hs-kb-cip-clanok { background: #fff; border-color: #c9d9e8; color: var(--hs-deep); }

.hs-kb a:focus-visible, .hs-kb button:focus-visible, .hs-kb-viac:focus-visible {
  outline: 3px solid var(--hs-deep); outline-offset: 2px;
}
.hs-kb-pas-in a:focus-visible, .hs-kb-pas-in button:focus-visible { outline-color: #fff; }

/* „V akcii“ – vo výpise len zľavnené */
#products.hs-kb-len-akcie .product:not(.hs-kb-zlava) { display: none; }

/* ---------- PC: väčšie karty (zvislé) ---------- */
@media (min-width: 768px) {
  .hs-kb-pas-in { grid-template-columns: 84px 232px minmax(0, 1fr); gap: 24px; padding: 24px 24px 52px; }
  .hs-kb .hs-kb-nadpis { font-size: 28px; }
  .hs-kb-text { font-size: 15px; }
  .hs-kb-lavo { gap: 12px; padding-left: 6px; }
  .hs-kb-polozka { flex-basis: 190px; }
  .hs-kb-karty { gap: 14px; }
  .hs-kb .hs-kb-karta { flex-direction: column; align-items: stretch; gap: 10px; padding: 12px; }
  .hs-kb-foto { flex: 0 0 auto; height: 130px; }
  .hs-kb-foto img { width: 112px; height: 112px; }
  .hs-kb-pct { top: 8px; left: 8px; font-size: 14px; padding: 5px 8px; }
  .hs-kb-info { flex: 1 1 auto; gap: 8px; }
  .hs-kb-nazov { font-size: 14px; line-height: 1.35; min-height: 2.7em; }
  .hs-kb-cena { font-size: 20px; }
  .hs-kb-povodna { font-size: 13px; }
}

/* farebné bubliny – vlastný stĺpec vľavo, aby nikdy neboli cez text */
.hs-kb-dekor { position: relative; align-self: stretch; min-height: 160px; pointer-events: none; }
.hs-kb-gulka { position: absolute; display: block; }
.hs-kb-gulka-1 { left: -58px; bottom: -70px; width: 150px; height: 130px; background: #f986c5; border-radius: 58% 42% 55% 45% / 52% 60% 40% 48%; }
.hs-kb-gulka-2 { left: -10px; top: -6px; width: 74px; height: 66px; background: #c8f25a; border-radius: 45% 55% 40% 60% / 60% 45% 55% 40%; }
.hs-kb-gulka-3 { left: 46px; top: 46%; width: 26px; height: 24px; background: #ffc807; border-radius: 50% 45% 55% 50%; }

/* ---------- podkategórie v štýle rýchlych odkazov ---------- */
.type-category .category-top .subcategories {
  display: grid !important; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px;
  margin: 0 0 22px !important; padding: 0 !important; list-style: none;
}
.type-category .category-top .subcategories::before,
.type-category .category-top .subcategories::after { content: none !important; display: none !important; }
.type-category .category-top .subcategories > li {
  width: auto !important; max-width: none !important; float: none !important; flex: none !important;
  margin: 0 !important; padding: 0 !important;
}
.type-category .category-top .subcategories > li > a {
  display: flex !important; align-items: center; gap: 10px;
  height: 100%; min-height: 48px; margin: 0 !important; padding: 6px 12px 6px 8px !important;
  background: #f3f9fe; border: 1px solid #e3eef7 !important; border-radius: 8px;
  color: #1f1f1f !important; text-decoration: none !important; text-align: left;
  font: 600 14px/1.25 "Source Sans 3", "Source Sans Pro", Arial, sans-serif;
}
.type-category .category-top .subcategories > li > a:hover { border-color: #239ceb !important; }
.type-category .category-top .subcategories > li > a:focus-visible { outline: 3px solid #136fb0; outline-offset: 2px; }
.type-category .category-top .subcategories .image {
  flex: 0 0 34px; width: 34px !important; height: 34px !important; margin: 0 !important;
  border-radius: 6px; background: #fff; overflow: hidden;
  display: flex !important; align-items: center; justify-content: center;
}
.type-category .category-top .subcategories .image img {
  max-width: 30px !important; max-height: 30px !important; width: auto !important; height: auto !important; object-fit: contain;
}
.type-category .category-top .subcategories .text {
  display: block; flex: 1 1 auto; min-width: 0; padding: 0 !important; text-align: left !important; white-space: normal; color: inherit;
}

/* ---------- mobil ---------- */
.hs-kb-viac { display: none; }
@media (max-width: 767px) {
  .hs-kb { margin: 14px 0 16px; }
  .hs-kb-pas-in { display: flex; flex-direction: column; align-items: stretch; gap: 12px; padding: 14px 0 26px 14px; border-radius: 14px; clip-path: polygon(0 0, 100% 0, 100% 93%, 0 100%); }
  .hs-kb-pas::before { border-radius: 14px; clip-path: polygon(0 0, 100% 0, 100% 100%, 0 95%); }
  .hs-kb-lavo { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding-right: 70px; }
  .hs-kb-dekor { position: absolute; top: 0; right: 0; width: 70px; height: 60px; min-height: 0; }
  .hs-kb-gulka-1 { left: auto; right: -34px; top: -36px; bottom: auto; width: 96px; height: 82px; }
  .hs-kb-gulka-2, .hs-kb-gulka-3 { display: none; }
  .hs-kb-stitok { font-size: 12px; padding: 5px 8px; }
  .hs-kb .hs-kb-nadpis { flex: 1 1 200px; font-size: 19px; line-height: 1.15; }
  .hs-kb-text, .hs-kb .hs-kb-cta { display: none; }
  .hs-kb-karty { gap: 10px; padding-right: 14px; }
  .hs-kb-polozka { flex-basis: 232px; }
  .hs-kb-koniec { display: block; }
  .hs-kb .hs-kb-sipka { display: none; }
  .hs-kb-cipy { flex-wrap: nowrap; overflow-x: auto; margin: 14px -10px 0; padding: 0 10px; scrollbar-width: none; }
  .hs-kb-cipy::-webkit-scrollbar { display: none; }
  .hs-kb .hs-kb-cip { flex: 0 0 auto; min-height: 44px; }

  .type-category .category-top .subcategories { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 0 !important; }
  .type-category .category-top .subcategories > li > a { gap: 8px; padding: 6px 8px 6px 6px !important; font-size: 13px; }
  .type-category .category-top .subcategories.hs-kb-zbalene > li:nth-child(n+5) { display: none !important; }
  .hs-kb-viac {
    display: flex; align-items: center; justify-content: center; width: 100%; min-height: 44px; margin: 8px 0 16px;
    background: #fff; border: 1px solid #e3eef7; border-radius: 12px; color: #136fb0; cursor: pointer;
    font: 600 14px/1.2 "Source Sans 3", "Source Sans Pro", Arial, sans-serif;
  }
}
@media (prefers-reduced-motion: reduce) {
  .hs-kb-karty { scroll-behavior: auto; }
}
