/* UX фільтрів/пошуку/сортування на сторінках категорій.
   Селектори — по власних класах leader-*, без залежності від .section.catalogue,
   щоб не було «голих» браузерних кнопок, якщо DOM-структура шаблону відрізняється. */

.catalogue-sort-dropdown-list {
  display: none;
}

.leader-catalog-top-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-left: auto;
  overflow: visible;
}

.catalog__top-wrapper {
  overflow: visible;
}

.catalog__top-wrapper .h3.catalog.new {
  margin-right: auto;
}

.catalogue-sort-dropdown-wrapper,
.section.catalogue .catalogue-sort-dropdown-wrapper {
  position: relative;
}

.catalogue-sort-dropdown-list,
.catalogue-sort-dropdown-list.w-dropdown-list,
.section.catalogue .catalogue-sort-dropdown-list,
.section.catalogue .catalogue-sort-dropdown-list.w-dropdown-list {
  display: none;
  background: transparent;
  min-width: 0;
}

.catalogue-sort-dropdown-wrapper.open .catalogue-sort-dropdown-list,
.catalogue-sort-dropdown-list.w--open,
.section.catalogue .catalogue-sort-dropdown-wrapper.open .catalogue-sort-dropdown-list,
.section.catalogue .catalogue-sort-dropdown-list.w--open {
  display: flex !important;
  flex-direction: column;
  align-items: stretch;
  gap: 2px;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  left: auto;
  z-index: 80;
  width: max-content;
  min-width: 280px;
  max-width: min(360px, calc(100vw - 32px));
  margin: 0;
  padding: 8px;
  background: #fff !important;
  border: 1px solid #e4e4ea;
  border-radius: 16px;
  box-shadow: 0 16px 40px rgba(18, 19, 35, 0.14);
}

.catalogue-sort-dropdown-list .item_sort,
.section.catalogue .catalogue-sort-dropdown-list .item_sort {
  width: 100%;
  padding: 0;
  text-decoration: none;
}

.catalogue-sort-dropdown-list .catalogue-sort-radio-wrapper,
.section.catalogue .catalogue-sort-dropdown-list .catalogue-sort-radio-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin: 0;
  padding: 10px 14px;
  border-radius: 12px;
  cursor: pointer;
}

.catalogue-sort-dropdown-list .catalogue-sort-radio-img,
.catalogue-sort-dropdown-list .w-form-formradioinput,
.section.catalogue .catalogue-sort-dropdown-list .catalogue-sort-radio-img,
.section.catalogue .catalogue-sort-dropdown-list .w-form-formradioinput {
  display: none !important;
}

.catalogue-sort-dropdown-list .s-text-dropdown,
.catalogue-sort-dropdown-list .s-text-dropdown.drop-down-list,
.catalogue-sort-dropdown-list .w-form-label,
.section.catalogue .catalogue-sort-dropdown-list .s-text-dropdown,
.section.catalogue .catalogue-sort-dropdown-list .s-text-dropdown.drop-down-list,
.section.catalogue .catalogue-sort-dropdown-list .w-form-label {
  display: block;
  width: 100%;
  margin: 0;
  color: #121323;
  font-family: Inter, Arial, sans-serif;
  font-size: 14px;
  font-weight: 500;
  line-height: 140%;
  white-space: nowrap;
}

.catalogue-sort-dropdown-list .catalogue-sort-radio-wrapper:hover,
.catalogue-sort-dropdown-list .catalogue-sort-radio-wrapper.active-sort,
.catalogue-sort-dropdown-list .item_sort.active-sort .catalogue-sort-radio-wrapper,
.section.catalogue .catalogue-sort-dropdown-list .catalogue-sort-radio-wrapper:hover,
.section.catalogue .catalogue-sort-dropdown-list .catalogue-sort-radio-wrapper.active-sort,
.section.catalogue .catalogue-sort-dropdown-list .item_sort.active-sort .catalogue-sort-radio-wrapper {
  background: #fff5f5;
}

.catalogue-sort-dropdown-list .catalogue-sort-radio-wrapper.active-sort .s-text-dropdown,
.catalogue-sort-dropdown-list .item_sort.active-sort .s-text-dropdown,
.section.catalogue .catalogue-sort-dropdown-list .catalogue-sort-radio-wrapper.active-sort .s-text-dropdown,
.section.catalogue .catalogue-sort-dropdown-list .item_sort.active-sort .s-text-dropdown {
  color: #c61717;
  font-weight: 600;
}

.leader-catalog-top-actions .catalogue-sort-dropdown-toggle,
.leader-catalog-instock,
.leader-catalog-quick button,
.leader-catalog-search input {
  box-sizing: border-box;
  appearance: none;
  -webkit-appearance: none;
  font-family: Inter, Arial, sans-serif;
  font-size: 14px;
  font-weight: 500;
  line-height: 140%;
  color: #121323;
  border: 1px solid #e4e4ea;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(18, 19, 35, 0.04);
}

.leader-catalog-top-actions .catalogue-sort-dropdown-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 44px;
  padding: 10px 16px;
}

.leader-catalog-top-actions .catalogue-sort-dropdown-toggle:hover,
.leader-catalog-instock:hover,
.leader-catalog-quick button:hover,
.leader-catalog-search input:hover {
  border-color: #d0d0d8;
}

.leader-catalog-top-actions .s-text-dropdown,
.leader-catalog-top-actions .s-text-dropdown.dropdowm {
  color: #121323;
  font-family: Inter, Arial, sans-serif;
  font-size: 14px;
  font-weight: 500;
  line-height: 140%;
}

.leader-catalog-top-actions .dropdown-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  opacity: 0.55;
}

.leader-catalog-instock {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 16px;
  cursor: pointer;
  user-select: none;
}

.leader-catalog-instock input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: #c61717;
}

.leader-catalog-instock:has(input:checked) {
  border-color: #c61717;
  background: #fff5f5;
  color: #c61717;
}

.leader-catalog-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 16px 0 12px;
}

.leader-catalog-search {
  flex: 1 1 240px;
  min-width: 200px;
}

.leader-catalog-search input {
  width: 100%;
  min-height: 44px;
  padding: 10px 18px;
  outline: none;
}

.leader-catalog-search input:focus {
  border-color: #c61717;
  box-shadow: 0 0 0 3px rgba(198, 23, 23, 0.12);
}

.leader-catalog-quick {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.leader-catalog-quick button {
  min-height: 44px;
  padding: 10px 16px;
  cursor: pointer;
}

.leader-catalog-quick button.is-active {
  border-color: #c61717;
  background: #c61717;
  color: #fff;
  box-shadow: 0 6px 16px rgba(198, 23, 23, 0.2);
}

.leader-catalog-empty {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin: 28px 0;
  padding: 24px;
  border: 1px dashed #e2e2e8;
  border-radius: 16px;
  background: #fafafb;
}

.leader-catalog-empty[hidden] {
  display: none;
}

.leader-catalog-empty-title {
  margin: 0;
  font: 700 18px/1.3 Inter, Arial, sans-serif;
  color: #121323;
}

.leader-catalog-empty-text {
  margin: 0 0 8px;
  font: 400 14px/1.5 Inter, Arial, sans-serif;
  color: #5b5c6b;
}

.leader-catalog-empty button {
  border: 0;
  border-radius: 999px;
  background: #c61717;
  color: #fff;
  padding: 10px 16px;
  font: 600 14px/1.2 Inter, Arial, sans-serif;
  cursor: pointer;
}

.leader-catalog-empty button:hover {
  background: #b01414;
}

.leader-catalog-empty-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  background: #c61717;
  color: #fff !important;
  padding: 10px 20px;
  font: 600 14px/1.2 Inter, Arial, sans-serif;
  text-decoration: none;
  transition: background 0.15s ease;
}

.leader-catalog-empty-cta:hover {
  background: #b01414;
  text-decoration: none;
}

.leader-catalog-empty.is-no-data {
  align-items: flex-start;
  padding: 32px 24px;
  border-style: solid;
  border-color: #f5d0d0;
  background: linear-gradient(180deg, #fff 0%, #fff7f7 100%);
}

/* Inline SVG-іконка в шапковому каталозі та на сторінці /catalog. */
.leader-nav-icon,
.leader-nav-icon.header-new-dropdown-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  color: currentColor;
  flex-shrink: 0;
}

.leader-nav-icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

/* Іконка категорії поруч із заголовком H3 на сторінці категорії. */
.leader-category-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin-right: 12px;
  vertical-align: middle;
  color: #c61717;
}

.leader-category-icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

/* Блок опису категорії. px і html-префікс, щоб глобальні h1/p з Webflow
   (38px і 12px на вузькому екрані) не ламали шкалу. */
html .leader-category-description {
  margin: 36px 0 8px;
  padding: 28px 0 0;
  border-top: 1px solid #eee;
  color: #3a3b4a;
  font-family: Inter, Arial, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.65;
}

html .leader-category-description :is(h1, h2, h3, h4, h5, h6) {
  margin: 28px 0 8px;
  color: #16171f;
  font-family: Inter, Arial, sans-serif;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

html .leader-category-description :is(h1, h2, h3, h4, h5, h6):first-child {
  margin-top: 0;
}

html .leader-category-description :is(h1, h2, h3, h4) strong {
  font-weight: inherit;
}

html .leader-category-description h1 {
  font-size: 24px;
}

html .leader-category-description h2 {
  font-size: 19px;
}

html .leader-category-description h3 {
  margin-top: 22px;
  font-size: 17px;
}

html .leader-category-description h4,
html .leader-category-description h5,
html .leader-category-description h6 {
  margin-top: 20px;
  font-size: 16px;
}

html .leader-category-description p,
html .leader-category-description li {
  font-size: 16px;
  font-weight: 400;
  line-height: 1.65;
  letter-spacing: 0;
}

html .leader-category-description p {
  margin: 0 0 12px;
}

html .leader-category-description ul,
html .leader-category-description ol {
  margin: 4px 0 14px;
  padding-left: 1.25em;
}

html .leader-category-description li {
  margin: 0 0 8px;
  padding-left: 0.15em;
}

html .leader-category-description li::marker {
  color: #8b8c99;
}

html .leader-category-description strong {
  font-weight: 600;
  color: #22232e;
}

html .leader-category-description a {
  color: #c61717;
  font-weight: 500;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.leader-category-description blockquote {
  margin: 12px 0;
  padding: 8px 16px;
  border-left: 3px solid #c61717;
  background: #fafafb;
  font-style: italic;
}

.leader-category-description code {
  padding: 2px 6px;
  border-radius: 4px;
  background: #f2f2f5;
  font-family: 'JetBrains Mono', Consolas, monospace;
  font-size: 13px;
}

.leader-category-description img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

.leader-catalog-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 24px 0;
}

.leader-catalog-pager button {
  border: 1px solid #ddd;
  background: #fff;
  border-radius: 8px;
  padding: 8px 14px;
  cursor: pointer;
}

.leader-catalog-pager button:disabled {
  opacity: 0.45;
  cursor: default;
}

@media screen and (max-width: 767px) {
  html .catalog__top-wrapper {
    align-items: stretch;
    row-gap: 14px;
    column-gap: 0;
  }

  html .leader-catalog-top-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    width: 100%;
    margin-left: 0;
    gap: 10px;
  }

  html .leader-catalog-top-actions .catalogue-sort-dropdown-wrapper {
    display: block;
    width: 100%;
    margin-left: 0;
    margin-right: 0;
  }

  html .leader-catalog-top-actions .catalogue-sort-dropdown-toggle {
    display: flex;
    width: 100%;
    padding: 12px 16px;
  }

  html .leader-catalog-instock {
    align-self: flex-start;
    width: fit-content;
  }

  html .catalogue-sort-dropdown-wrapper.open .catalogue-sort-dropdown-list,
  html .catalogue-sort-dropdown-list.w--open {
    left: 0;
    right: 0;
    width: 100%;
    min-width: 0;
    max-width: none;
  }

  html .leader-catalog-tools {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin: 4px 0 12px;
  }

  html .leader-catalog-search {
    flex: 1 1 100%;
    width: 100%;
    min-width: 0;
  }

  html .leader-catalog-quick {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    width: 100%;
    gap: 8px;
  }

  html .leader-catalog-quick button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    text-align: center;
  }
}

html .leader-card-kit {
  margin: 6px 0 0;
  color: #6b6b76;
  font-size: 12px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

html .leader-category-intro,
html .leader-chain-guide,
html .leader-mini-saw-note {
  max-width: 100%;
  min-width: 0;
  color: #3d3e50;
  font: 400 15px/1.65 Inter, Arial, sans-serif;
}

html .leader-category-intro {
  margin: 28px 0 8px;
}

html .leader-category-h1 {
  margin: 0 0 12px;
  color: #121323;
  font-size: 2.22222em;
  font-weight: 700;
  line-height: 1.2;
}

html .leader-category-intro p,
html .leader-chain-guide p,
html .leader-mini-saw-note {
  margin: 0 0 12px;
}

html .leader-category-intro a,
html .leader-chain-guide a,
html .leader-mini-saw-note a {
  color: #c61717;
  text-decoration: underline;
}

html .catalog__items-wrapper.new.is-after-intro {
  margin-top: 1.4em;
}

html .catalog__items-wrapper.is-after-intro .catalog__top-wrapper {
  justify-content: flex-end;
}

html .leader-chain-guide {
  margin: 48px 0 16px;
  padding-top: 8px;
}

html .leader-chain-guide h2,
html .leader-chain-guide h3 {
  margin: 28px 0 12px;
  color: #121323;
  font-weight: 700;
  line-height: 1.3;
}

html .leader-chain-guide h2 {
  font-size: 22px;
}

html .leader-chain-guide h3 {
  font-size: 18px;
}

html .leader-category-table-wrap {
  max-width: 100%;
  margin: 0 0 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

html .leader-category-table-wrap table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.45;
}

html .leader-category-table-wrap th,
html .leader-category-table-wrap td {
  border: 1px solid #e4e4ea;
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

html .leader-category-table-wrap th {
  background: #f6f6f8;
  color: #121323;
  font-weight: 600;
}

/* Опис категорії: обрізання з градієнтом і «Показати більше», як на leader-tools. На всіх екранах. */
html .leader-category-more {
  margin-top: 8px;
}

html .leader-category-more-clip {
  position: relative;
}

html .leader-category-more-clip.is-collapsed {
  max-height: 400px;
  overflow: hidden;
}

html .leader-category-more-clip.is-collapsed::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 120px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.72) 55%, #fff 100%);
  pointer-events: none;
}

html .leader-category-more-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin: 4px 0 16px;
}

html .leader-category-more-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 6px 0;
  border: 0;
  background: transparent;
  color: #c61717;
  font: 600 15px/1.2 Inter, Arial, sans-serif;
  cursor: pointer;
}

html .leader-category-more-toggle svg {
  width: 17px;
  height: 17px;
  flex: none;
  transition: transform 0.35s ease;
}

html .leader-category-more-toggle svg.is-open {
  transform: rotate(180deg);
}

html .leader-category-faq details {
  border-top: 1px solid #eee;
}

html .leader-category-faq details:last-child {
  border-bottom: 1px solid #eee;
}

html .leader-category-faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  list-style: none;
}

html .leader-category-faq summary::-webkit-details-marker {
  display: none;
}

html .leader-category-faq summary h3 {
  margin: 0;
  padding: 14px 0;
  font-size: 16px;
}

html .leader-category-faq summary::after {
  content: '+';
  color: #c61717;
  font-size: 22px;
  font-weight: 500;
  line-height: 1;
}

html .leader-category-faq details[open] summary::after {
  content: '–';
}

html .leader-category-faq details p {
  margin-top: 0;
}

html .leader-mini-saw-note {
  margin: 28px 0 8px;
  padding-top: 20px;
  border-top: 1px solid #eee;
}

@media screen and (max-width: 767px) {
  html .leader-category-h1 {
    font-size: 28px;
  }

  html .catalog__items-wrapper.new.is-after-intro {
    margin-top: 24px;
  }

  html .leader-category-description {
    margin-top: 28px;
    padding-top: 20px;
    font-size: 15px;
  }

  html .leader-category-description :is(h1, h2, h3, h4, h5, h6) {
    margin-top: 22px;
    margin-bottom: 6px;
  }

  html .leader-category-description :is(h1, h2, h3, h4, h5, h6):first-child {
    margin-top: 0;
  }

  html .leader-category-description h1 {
    font-size: 20px;
  }

  html .leader-category-description h2 {
    font-size: 17px;
  }

  html .leader-category-description h3,
  html .leader-category-description h4,
  html .leader-category-description h5,
  html .leader-category-description h6 {
    margin-top: 18px;
    font-size: 16px;
  }

  html .leader-category-description p,
  html .leader-category-description li {
    font-size: 15px;
    line-height: 1.6;
  }

  html .leader-category-description p {
    margin-bottom: 10px;
  }

  html .leader-category-description li {
    margin-bottom: 6px;
  }

  html .leader-category-more-clip.is-collapsed {
    max-height: 320px;
  }

  html .leader-category-more-toggle {
    font-size: 14px;
  }
}
