/* 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 {
  display: none;
}

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 */
.category-filter-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
  gap: 12px;
  padding: 24px 0;
  margin-bottom: 24px;
}

.cfn-item {
  position: relative;
}

.cfn-btn {
  display: inline-block;
  padding: 18px 36px;
  background: #1D1D1B;
  color: #FFFFFF;
  font-family: "DM Sans", sans-serif;
  font-size: 1.3rem;
  font-weight: 600;
  text-decoration: none;
  border: 2px solid #1D1D1B;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  white-space: nowrap;
  cursor: pointer;
}

.cfn-btn:hover,
.cfn-item:hover .cfn-btn {
  background: #D61118;
  border-color: #D61118;
  color: #FFFFFF;
  text-decoration: none;
}

/* 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;
}

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

  .cfn-btn {
    padding: 10px 16px;
    font-size: 1rem;
  }

  .cfn-dropdown {
    position: fixed;
    left: 16px;
    right: 16px;
    top: auto;
    min-width: unset;
    width: calc(100% - 32px);
  }
}
