/* Category customizations - category-v1.css */

/* Fix: dkLab centers #filters with auto-margins when few filters fit in narrow width,
   causing misalignment with the full-width #category-header sort bar below it. */
#dkLabTopFilters > #filters {
  margin-left: 12px !important;
  margin-right: 12px !important;
}

body.category-pasky .category-content-wrapper,
body.category-zdroje-a-rizeni .category-content-wrapper,
body.category-domaci-osvetleni .category-content-wrapper,
body.category-venkovni-osvetleni .category-content-wrapper,
body.category-pracovni-osvetleni .category-content-wrapper,
body.category-chytra-domacnost .category-content-wrapper,
body:has(.subcategories) .category-content-wrapper {
  display: none;
}

body.subtype-category-parametric .category-content-wrapper {
  display: block !important;
}

body.category-pasky .category-top,
body.category-zdroje-a-rizeni .category-top,
body.category-domaci-osvetleni .category-top,
body.category-venkovni-osvetleni .category-top,
body.category-pracovni-osvetleni .category-top,
body.category-chytra-domacnost .category-top {
  display: none;
}

.breadcrumbs h1[itemprop="name"] {
  font-size: 3rem;
  font-weight: 700;
  line-height: 1.2;
}

body.type-category .category-perex span {
  display: inline !important;
}

body.type-category .category-perex a {
  display: inline !important;
}

/* Category filter nav — obrázkové dlaždice */
/* Blok dlaždic centrovaný jako celek, dlaždice uvnitř vlevo —
   neúplná poslední řada sedí pod prvním sloupcem */
.category-filter-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: stretch;
  width: fit-content;
  max-width: 100%;
  gap: 16px;
  padding: 24px 0;
  margin: 0 auto 8px;
}

.cfn-item {
  position: relative;
  width: 224px;
}

.cfn-btn {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 0;
  background: #FFFFFF;
  color: #FFFFFF;
  font-family: "DM Sans", sans-serif;
  font-size: 1.15rem;
  font-weight: 600;
  text-decoration: none;
  border: 2px solid #1D1D1B;
  border-radius: 10px;
  transition: border-color 0.15s, box-shadow 0.15s;
  cursor: pointer;
  overflow: hidden;
}

.cfn-btn:hover,
.cfn-item:hover .cfn-btn {
  border-color: #D61118;
  box-shadow: 0 4px 14px rgba(29, 29, 27, 0.18);
  color: #FFFFFF;
  text-decoration: none;
}

.cfn-img {
  display: block;
  position: relative;
  /* Upload thumby (224×168) mají uvnitř letterbox — fotka je ~3:2 s bílými
     pruhy nahoře/dole. Okno 3:2 + přesah obrázku (inset -6px) je ořízne. */
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: #FFFFFF;
}

/* Absolute fill přes min-* — pevnou height z cizí CSS layer nelze přebít,
   min-height má ale v použité hodnotě přednost (viz subcategories níže) */
.cfn-img img {
  position: absolute;
  inset: -6px;
  width: calc(100% + 12px) !important;
  min-width: calc(100% + 12px) !important;
  min-height: calc(100% + 12px) !important;
  max-height: none !important;
  object-fit: cover !important;
  display: block;
}

/* Dlaždice bez obrázku kategorie — decentní placeholder se symbolem žárovky */
.cfn-img--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f4f4f4;
}

.cfn-img--placeholder::before {
  content: "";
  width: 56px;
  height: 56px;
  background-color: #1D1D1B;
  opacity: 0.35;
  -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="1.6" stroke-linecap="round"><path d="M9 18h6M10 21h4M12 3a6 6 0 0 0-3.6 10.8c.7.55 1.1 1.3 1.2 2.2h4.8c.1-.9.5-1.65 1.2-2.2A6 6 0 0 0 12 3z"/></svg>') center / contain no-repeat;
  mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="1.6" stroke-linecap="round"><path d="M9 18h6M10 21h4M12 3a6 6 0 0 0-3.6 10.8c.7.55 1.2 2.2 1.2 2.2h4.8s.5-1.65 1.2-2.2A6 6 0 0 0 12 3z"/></svg>') center / contain no-repeat;
}

.cfn-label {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-grow: 1;
  text-align: center;
  padding: 12px 14px;
  background: #1D1D1B;
  color: #FFFFFF;
  transition: background 0.15s;
}

.cfn-btn:hover .cfn-label,
.cfn-item:hover .cfn-label {
  background: #D61118;
}

/* Nadpis nad odkrytým výpisem produktů na rozcestníku */
/* Typografie jako H1 (Exo 2) + červený akcent v barvách brandu */
.cfn-products-heading {
  display: block;
  width: 100%;
  font-family: "Exo 2", sans-serif;
  font-size: 2.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-align: center;
  color: #1D1D1B;
  margin: 28px 0 16px;
}

.cfn-products-heading::after {
  content: "";
  display: block;
  width: 48px;
  height: 3px;
  margin: 8px auto 0;
  background: #D61118;
}

/* Dlaždice podkategorií na sub-rozcestnících (nativní Shoptet ul.subcategories)
   — stejný vizuál jako cfn dlaždice výše */
body.type-category ul.subcategories.with-image {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: stretch;
  width: fit-content;
  max-width: 100%;
  gap: 16px;
  padding: 24px 0 8px;
  margin: 0 auto;
  list-style: none;
}

/* !important nutné — VSE css má `.subcategories.with-image li.col-* { flex:0 1 8% !important; width:auto !important }` */
body.type-category ul.subcategories.with-image li {
  width: 224px !important;
  max-width: none;
  flex: 0 0 224px !important;
  padding: 0 !important;
  margin: 0 !important;
  float: none;
}

body.type-category ul.subcategories.with-image li a {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: none;
  height: 100%;
  margin: 0;
  padding: 0;
  background: #FFFFFF;
  border: 2px solid #1D1D1B;
  border-radius: 10px !important;
  text-decoration: none;
  overflow: hidden;
  transition: border-color 0.15s, box-shadow 0.15s;
}

body.type-category ul.subcategories.with-image li a:hover {
  border-color: #D61118;
  box-shadow: 0 4px 14px rgba(29, 29, 27, 0.18);
  text-decoration: none;
}

/* !important nutné — VSE css má `.subcategories.with-image .image { height:70px !important; display:inline-block !important; ... }` */
body.type-category ul.subcategories.with-image li a .image {
  display: block !important;
  width: 100%;
  max-width: none;
  height: auto !important;
  aspect-ratio: 3 / 2; /* skutečný poměr fotky v thumbu (letterbox se ořeže, viz .cfn-img) */
  overflow: hidden !important;
  border-radius: 0 !important;
  line-height: normal !important;
  background: #FFFFFF;
  margin: 0;
}

/* Cizí stylesheet (CSS layer) vnucuje pevnou height s !important, kterou
   nelze přebít ani inline stylem. min-height/min-width ale nikdo nenastavuje
   a v použité hodnotě mají před height přednost → absolute fill přes min-*. */
body.type-category ul.subcategories.with-image li a .image {
  position: relative !important;
}

body.type-category #content-wrapper ul.subcategories.with-image li a .image img,
body.type-category ul.subcategories.with-image li a .image img {
  position: absolute !important;
  inset: -6px !important;
  width: calc(100% + 12px) !important;
  min-width: calc(100% + 12px) !important;
  min-height: calc(100% + 12px) !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: cover !important;
  display: block !important;
  margin: 0 !important;
}

body.type-category ul.subcategories.with-image li a .text {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-grow: 1;
  width: 100%;
  max-width: none;
  text-align: center;
  padding: 12px 14px;
  margin: 0;
  background: #1D1D1B;
  color: #FFFFFF !important;
  font-family: "DM Sans", sans-serif;
  font-size: 1.15rem !important;
  font-weight: 600;
  line-height: 1.3;
  transition: background 0.15s;
}

body.type-category ul.subcategories.with-image li a:hover .text {
  background: #D61118;
}

/* Dropdown */
.cfn-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 200;
  background: #FFFFFF;
  border: 2px solid #1D1D1B;
  min-width: 286px;
  flex-direction: column;
}

.cfn-item.cfn-has-sub:hover .cfn-dropdown {
  display: flex;
}

.cfn-dropdown a {
  display: block;
  padding: 12px 21px;
  color: #1D1D1B;
  font-family: "DM Sans", sans-serif;
  font-size: 1.125rem;
  text-decoration: none;
  border-bottom: 1px solid #e8e8e8;
  white-space: nowrap;
}

.cfn-dropdown a:last-child {
  border-bottom: none;
}

.cfn-dropdown a:hover {
  background: #D61118;
  color: #FFFFFF;
}

/* Sub-subcategory flyout */
.cfn-sub-item {
  position: relative;
}

.cfn-sub-item > a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.cfn-sub-item.cfn-has-subsub > a::after {
  content: "›";
  font-size: 1.2em;
  line-height: 1;
  flex-shrink: 0;
}

.cfn-subsub {
  display: none;
  position: absolute;
  left: 100%;
  top: -2px;
  z-index: 201;
  background: #FFFFFF;
  border: 2px solid #1D1D1B;
  min-width: 286px;
  flex-direction: column;
}

.cfn-sub-item.cfn-has-subsub:hover .cfn-subsub {
  display: flex;
}

/* Sub-sub-subcategory flyout (level 3) */
.cfn-subsub-item {
  position: relative;
}

.cfn-subsub-item > a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.cfn-subsub-item.cfn-has-subsubsub > a::after {
  content: "›";
  font-size: 1.2em;
  line-height: 1;
  flex-shrink: 0;
}

.cfn-subsubsub {
  display: none;
  position: absolute;
  left: 100%;
  top: -2px;
  z-index: 202;
  background: #FFFFFF;
  border: 2px solid #1D1D1B;
  min-width: 260px;
  flex-direction: column;
}

.cfn-subsub-item.cfn-has-subsubsub:hover .cfn-subsubsub {
  display: flex;
}

/* Scroll lock při otevřeném cfn menu (přidáno JS) */
body.cfn-menu-open {
  overflow: hidden;
}

/* Mobile */
@media (max-width: 767px) {
  .category-filter-nav {
    gap: 10px;
  }

  .cfn-item {
    width: calc(50% - 5px);
  }

  .cfn-btn {
    font-size: 1rem;
  }

  .cfn-label {
    padding: 10px 8px;
  }

  .cfn-products-heading {
    font-size: 1.7rem;
  }

  .cfn-dropdown {
    position: fixed;
    left: 16px;
    right: 16px;
    top: auto;
    min-width: unset;
    width: calc(100% - 32px);
    max-height: 70vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: pan-y;
  }

  /* Scroll hint — gradient + šipka dole */
  .cfn-dropdown.cfn-has-scroll::after {
    content: "▼";
    position: sticky;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    height: 36px;
    background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, rgba(255,255,255,0.95) 60%);
    color: #D61118;
    font-size: 0.75rem;
    pointer-events: none;
  }

  /* Sub-submenu a sub-sub-submenu: expandovat inline dolů místo flyoutu doprava */
  .cfn-subsub,
  .cfn-subsubsub {
    position: static !important;
    left: auto !important;
    top: auto !important;
    width: 100%;
    min-width: unset;
    border: none;
    border-left: 3px solid #D61118;
    padding-left: 8px;
    margin-top: 0;
    box-shadow: none;
  }

  /* Na mobilu: hlavní dropdown i subsub přes JS třídy, ne :hover */
  .cfn-item.cfn-has-sub:hover .cfn-dropdown {
    display: none !important;
  }

  .cfn-item.cfn-has-sub.cfn-is-open .cfn-dropdown {
    display: flex !important;
  }

  /* Portal pattern: dropdown přesunutý pod <body> — zobrazení přes třídu */
  .cfn-dropdown[data-cfn-portal] {
    display: none;
  }

  .cfn-dropdown[data-cfn-portal].cfn-portal-open {
    display: flex !important;
    max-height: none;
  }

  .cfn-sub-item.cfn-has-subsub:hover .cfn-subsub,
  .cfn-subsub-item.cfn-has-subsubsub:hover .cfn-subsubsub {
    display: none;
  }

  .cfn-sub-item.cfn-has-subsub.is-open > .cfn-subsub,
  .cfn-subsub-item.cfn-has-subsubsub.is-open > .cfn-subsubsub {
    display: flex;
  }

  /* Šipka vpravo → šipka dolů/nahoru na mobilu */
  .cfn-sub-item.cfn-has-subsub > a::after,
  .cfn-subsub-item.cfn-has-subsubsub > a::after {
    content: "↓";
  }

  .cfn-sub-item.cfn-has-subsub.is-open > a::after,
  .cfn-subsub-item.cfn-has-subsubsub.is-open > a::after {
    content: "↑";
  }
}

/* =========================================================
   Skrýt .category-content-wrapper na podkategoriích
   Shoptet přidává body class: in-{slug}
   ========================================================= */
body.in-domaci-osvetleni-podle-mistnosti .category-content-wrapper,
body.in-obyvaci-pokoj .category-content-wrapper,
body.in-led-bodovky-do-obyvaciho-pokoje .category-content-wrapper,
body.in-loznice .category-content-wrapper,
body.in-led-bodovky-do-loznice .category-content-wrapper,
body.in-kuchyne .category-content-wrapper,
body.in-led-bodovky-do-kuchyne .category-content-wrapper,
body.in-chodba-a-schodiste .category-content-wrapper,
body.in-detsky-pokoj .category-content-wrapper,
body.in-led-bodovky-do-detskeho-pokoje .category-content-wrapper,
body.in-pracovna .category-content-wrapper,
body.in-led-bodovky-do-pracovny .category-content-wrapper,
body.in-domaci-osvetleni-podle-typu .category-content-wrapper,
body.in-domaci-osvetleni-podle-parametru .category-content-wrapper,
body.in-domaci-osvetleni-podle-prikonu .category-content-wrapper,
body.in-domaci-led-osvetleni-podle-barvy-svetla .category-content-wrapper,
body.in-domaci-led-osvetleni-podle-napeti .category-content-wrapper,
body.in-domaci-led-osvetleni-podle-ip-kryti .category-content-wrapper,
body.in-domaci-led-osvetleni-podle-svitivosti .category-content-wrapper,
body.in-domaci-osvetleni-ostatni .category-content-wrapper,
body.in-led-profily-a-difuzory-pro-domaci-osvetleni .category-content-wrapper,
body.in-venkovni-led-osvetleni-podle-mista-pouziti .category-content-wrapper,
body.in-fasada-domu .category-content-wrapper,
body.in-venkovni-led-osvetleni-terasy-a-pergoly .category-content-wrapper,
body.in-venkovni-led-osvetleni-zahrady .category-content-wrapper,
body.in-venkovni-led-osvetleni-prijezdove-cesty .category-content-wrapper,
body.in-venkovni-led-osvetleni-garaze .category-content-wrapper,
body.in-venkovni-led-osvetleni-podle-typu-svitidla .category-content-wrapper,
body.in-venkovni-led-osvetleni-podle-parametru .category-content-wrapper,
body.in-venkovni-led-osvetleni-podle-prikonu .category-content-wrapper,
body.in-venkovni-led-osvetleni-podle-barvy-svetla .category-content-wrapper,
body.in-venkovni-led-osvetleni-podle-napeti .category-content-wrapper,
body.in-venkovni-led-osvetleni-podle-ip-kryti .category-content-wrapper,
body.in-venkovni-led-osvetleni-podle-svitivosti .category-content-wrapper,
body.in-venkovni-led-osvetleni-ostatni .category-content-wrapper,
body.in-led-profily-a-difuzory-pro-venkovni-osvetleni .category-content-wrapper,
body.in-pracovni-led-osvetleni-podle-mistnosti .category-content-wrapper,
body.in-pracovni-led-osvetleni-do-dilny .category-content-wrapper,
body.in-pracovni-led-osvetleni-do-vyroby-a-prumyslu .category-content-wrapper,
body.in-pracovni-led-osvetleni-do-skladu .category-content-wrapper,
body.in-pracovni-led-osvetleni-do-kancelare .category-content-wrapper,
body.in-pracovni-led-osvetleni-podle-parametru .category-content-wrapper,
body.in-pracovni-led-osvetleni-podle-prikonu .category-content-wrapper,
body.in-pracovni-led-osvetleni-podle-barvy-svetla .category-content-wrapper,
body.in-pracovni-led-osvetleni-podle-napeti .category-content-wrapper,
body.in-pracovni-led-osvetleni-podle-ip-kryti .category-content-wrapper,
body.in-pracovni-led-osvetleni-podle-svitivosti .category-content-wrapper,
body.in-ostatni-pro-pracovni-led-osvetleni .category-content-wrapper,
body.in-chytra-domacnost-podle-typu .category-content-wrapper,
body.in-chytra-domacnost-podle-protokolu .category-content-wrapper,
body.in-chytra-domacnost-podle-vyrobce .category-content-wrapper,
body.in-zdroje-a-rizeni-podle-mista-pouziti .category-content-wrapper,
body.in-led-zdroje-a-rizeni-podle-napeti .category-content-wrapper,
body.in-led-zdroje-a-rizeni-podle-ovladani .category-content-wrapper,
body.in-doplnky-pro-led-zdroje-a-rizeni .category-content-wrapper,
body.in-led-pasky-podle-barvy .category-content-wrapper,
body.in-led-pasky-podle-svitivosti .category-content-wrapper,
body.in-led-pasky-podle-sily .category-content-wrapper,
body.in-led-pasky-podle-cri .category-content-wrapper,
body.in-led-pasky-podle-kryti-ip .category-content-wrapper {
  display: none !important;
}

/* =========================================================
   Skrýt ul.subcategories.with-image na leaf kategoriích
   ========================================================= */
body.in-domaci-svitidla-1-10w ul.subcategories.with-image,
body.in-domaci-svitidla-10-20w ul.subcategories.with-image,
body.in-domaci-svitidla-20-30w ul.subcategories.with-image,
body.in-domaci-svitidla-30-40w ul.subcategories.with-image,
body.in-domaci-svitidla-40-50w ul.subcategories.with-image,
body.in-domaci-rgbw ul.subcategories.with-image,
body.in-domaci-rgb ul.subcategories.with-image,
body.in-domaci-cct ul.subcategories.with-image,
body.in-domaci-tepla-bila ul.subcategories.with-image,
body.in-domaci-denni-bila ul.subcategories.with-image,
body.in-domaci-studena-bila ul.subcategories.with-image,
body.in-domaci-svitidla-12v ul.subcategories.with-image,
body.in-domaci-svitidla-24v ul.subcategories.with-image,
body.in-domaci-svitidla-230v ul.subcategories.with-image,
body.in-domaci-svitidla-ip20 ul.subcategories.with-image,
body.in-domaci-svitidla-do-ip65 ul.subcategories.with-image,
body.in-domaci-svitidla-nad-ip65 ul.subcategories.with-image,
body.in-domaci-svitidla-do-500lm ul.subcategories.with-image,
body.in-domaci-svitidla-do-1000lm ul.subcategories.with-image,
body.in-domaci-svitidla-do-2000lm ul.subcategories.with-image,
body.in-domaci-svitidla-nad-2000lm ul.subcategories.with-image,
body.in-venkovni-svitidla-1-20w ul.subcategories.with-image,
body.in-venkovni-svitidla-20-40w ul.subcategories.with-image,
body.in-venkovni-svitidla-40-60w ul.subcategories.with-image,
body.in-venkovni-svitidla-60-80w ul.subcategories.with-image,
body.in-venkovni-svitidla-80-100w ul.subcategories.with-image,
body.in-venkovni-svitidla-100-200w ul.subcategories.with-image,
body.in-venkovni-svitidla-studena-bila ul.subcategories.with-image,
body.in-venkovni-svitidla-denni-bila ul.subcategories.with-image,
body.in-venkovni-svitidla-tepla-bila ul.subcategories.with-image,
body.in-venkovni-svitidla-cct ul.subcategories.with-image,
body.in-venkovni-svitidla-rgb ul.subcategories.with-image,
body.in-venkovni-svitidla-rgbw ul.subcategories.with-image,
body.in-venkovni-svitidla-12v ul.subcategories.with-image,
body.in-venkovni-svitidla-24v ul.subcategories.with-image,
body.in-venkovni-svitidla-230v ul.subcategories.with-image,
body.in-venkovni-svitidla-ip20 ul.subcategories.with-image,
body.in-venkovni-svitidla-ip65 ul.subcategories.with-image,
body.in-venkovni-svitidla-ip65-a-vyssi ul.subcategories.with-image,
body.in-venkovni-svitidla-do-1000lm ul.subcategories.with-image,
body.in-venkovni-svitidla-do-3000lm ul.subcategories.with-image,
body.in-venkovni-svitidla-do-8000lm ul.subcategories.with-image,
body.in-venkovni-svitidla-nad-8000lm ul.subcategories.with-image,
body.in-pracovni-svitidla-1-20w ul.subcategories.with-image,
body.in-pracovni-svitidla-20-50w ul.subcategories.with-image,
body.in-pracovni-svitidla-50-100w ul.subcategories.with-image,
body.in-pracovni-svitidla-100-200w ul.subcategories.with-image,
body.in-pracovni-svitidla-studena-bila ul.subcategories.with-image,
body.in-pracovni-svitidla-denni-bila ul.subcategories.with-image,
body.in-pracovni-svitidla-tepla-bila ul.subcategories.with-image,
body.in-pracovni-svitidla-cct ul.subcategories.with-image,
body.in-pracovni-svitidla-rgb ul.subcategories.with-image,
body.in-pracovni-svitidla-rgbw ul.subcategories.with-image,
body.in-pracovni-svitidla-12v ul.subcategories.with-image,
body.in-pracovni-svitidla-24v ul.subcategories.with-image,
body.in-pracovni-svitidla-230v ul.subcategories.with-image,
body.in-pracovni-svitidla-ip20 ul.subcategories.with-image,
body.in-pracovni-svitidla-do-ip65 ul.subcategories.with-image,
body.in-pracovni-svitidla-ip65-a-vyssi ul.subcategories.with-image,
body.in-pracovni-svitidla-do-1-500lm ul.subcategories.with-image,
body.in-pracovni-svitidla-do-3-000lm ul.subcategories.with-image,
body.in-pracovni-svitidla-do-8-000lm ul.subcategories.with-image,
body.in-pracovni-svitidla-do-18-000lm ul.subcategories.with-image,
body.in-pracovni-svitidla-nad-18-000lm ul.subcategories.with-image {
  display: none !important;
}

/* =========================================================
   Skrýt .category-top na leaf kategoriích pásky
   ========================================================= */
body.in-led-pasky-do-500lm .category-top,
body.in-led-pasky-do-1000lm .category-top,
body.in-led-pasky-do-2000lm .category-top,
body.in-led-pasky-nad-2000lm .category-top,
body.in-led-pasky-studena-bila .category-top,
body.in-led-pasky-denni-bila .category-top,
body.in-led-pasky-tepla-bila .category-top,
body.in-led-pasky-cct-nastavitelna-bila .category-top,
body.in-led-pasky-rgb .category-top,
body.in-led-pasky-rgbw .category-top,
body.in-barevne-pasky .category-top,
body.in-led-pasky-ultrafialova .category-top,
body.in-led-pasky-12v .category-top,
body.in-led-pasky-24v .category-top,
body.in-led-pasky-230v .category-top,
body.in-led-pasky-s-krytim-ip20 .category-top {
  display: none !important;
}

/* =========================================================
   Karta produktu ve výpisu kategorií
   ========================================================= */

/* Názvy čitelně — CAPS nechává všechny karty splývat */
body.type-category .products-block .product a.name,
body.type-category .products-block .product a.name span {
  text-transform: none !important;
}

/* Cena: s DPH černě, tučně a větší (primární), "bez DPH" menší šedě POD ní.
   Červenou necháváme jen pro akce/CTA, ať zase funguje jako signál. */
body.type-category .products-block .product .prices .col-xs-8 {
  display: flex !important;
  flex-direction: column-reverse !important;
}

body.type-category .products-block .product .price-final,
body.type-category .products-block .product .price-final strong {
  color: #1D1D1B !important;
  font-size: 17px !important;
  font-weight: 800 !important;
}

body.type-category .products-block .product .price-additional {
  color: #8a8a8a !important;
  font-size: 12px !important;
  margin-top: 2px !important;
}

/* 4 sloupce na desktopu — 3 karty jsou zbytečně řídké */
@media (min-width: 1200px) {
  body.type-category .products-block {
    grid-template-columns: repeat(4, 1fr) !important;
  }
}
body.type-category .products-block .product .inner {
  border: 1px solid #e5e5e5;
  padding: 10px 10px 16px;
  transition: border-color 0.15s, box-shadow 0.15s;
  height: 100%;
}

body.type-category .products-block .product .inner:hover {
  border-color: #1D1D1B;
  box-shadow: 0 6px 18px rgba(29, 29, 27, 0.14);
}

/* Badge dostupnosti (vkládá category-v1.js) */
.br-stock {
  display: inline-block;
  margin: 6px auto 2px;
  font-family: "DM Sans", sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
}

.br-stock--in {
  color: #2E7D32;
}

.br-stock--in::before {
  content: "✓ ";
}

.br-stock--out {
  color: #757575;
}

/* Hover CTA na obrázku produktu (jen zařízení s myší) */
@media (hover: hover) and (pointer: fine) {
  body.type-category .products-block .product .img {
    position: relative;
  }

  body.type-category .products-block .product .img > a::after {
    content: "Zobrazit detail";
    position: absolute;
    left: 50%;
    bottom: 10px;
    transform: translateX(-50%) translateY(8px);
    background: #D61118;
    color: #FFFFFF;
    padding: 8px 20px;
    font-family: "DM Sans", sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s, transform 0.15s;
  }

  body.type-category .products-block .product .inner:hover .img > a::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* =========================================================
   Rozcestníky: odkryj nativní výpis produktů z podkategorií.
   Musí být až ZA všemi .in-* display:none !important pravidly,
   aby v kaskádě vyhrálo (stejná specificita, oba !important).
   ========================================================= */
body.cfn-show-products .category-content-wrapper {
  display: block !important;
}

@media (max-width: 767px) {
  body.type-category ul.subcategories.with-image {
    gap: 10px;
  }

  body.type-category ul.subcategories.with-image li {
    width: calc(50% - 5px) !important;
    flex: 0 0 calc(50% - 5px) !important;
  }

  body.type-category ul.subcategories.with-image li a .text {
    font-size: 1rem;
    padding: 10px 8px;
  }
}

/* ============================================================
   Štítky produktů (Akce/Novinka/Tip) + sbalený SEO perex
   ============================================================ */

body.type-category .products-block .flags {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

body.type-category .products-block .flag {
  display: inline-block;
  padding: 3px 9px;
  font-family: "DM Sans", sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  line-height: 1.3;
  color: #FFFFFF;
  background: #1D1D1B;
  border-radius: 4px;
}

body.type-category .products-block .flag.flag-discount,
body.type-category .products-block .flag.flag-action {
  background: #D61118;
}

body.type-category .products-block .flag.flag-new {
  background: #1D1D1B;
}

body.type-category .products-block .flag.flag-tip {
  background: #FFFFFF;
  color: #1D1D1B;
  border: 1px solid #1D1D1B;
}

/* --- Sbalený perex --- */
.category-perex.br-perex-clamp {
  max-height: 88px;
  overflow: hidden;
  position: relative;
}

.category-perex.br-perex-clamp::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 32px;
  background: linear-gradient(rgba(255, 255, 255, 0), #FFFFFF);
  pointer-events: none;
}

.br-perex-toggle {
  display: block;
  margin: 4px auto 12px;
  padding: 2px 6px;
  background: none;
  border: 0;
  font-family: "DM Sans", sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: #D61118;
  cursor: pointer;
  text-decoration: underline;
}

.br-perex-toggle:hover {
  text-decoration: none;
}

/* Barevná kolečka variant ve výpisu: Shoptet centruje jen s třídou
   .justified, kterou JS přidává podle šířky měřené před naším přepnutím
   na 4 sloupce — občas tak chybí a kolečka uskočí doleva. Auto-marginy
   centrují vždy; při přetečení (šipky) se samy vynulují. */
body.type-category .products-block .widget-parameter-wrapper .widget-parameter-list {
  margin-left: auto !important;
  margin-right: auto !important;
}
