/* ═══════════════════════════════════════════════════════
   CATALOG PAGE STYLES (catalog.html + catalog-category.html)
   БЭМ-блоки:
     .breadcrumbs          — хлебные крошки (общий стиль)
     .catalog-page-header  — шапка страницы каталога (h1 + breadcrumbs)
     .catalog-section      — аккордеон категорий (catalog.html)
     .catalog-column       — колонка ссылок внутри раздела
     .catalog-materials    — блок «Расходные материалы»
     .cat-promo            — промо-баннер (catalog-category.html)
     .cat-layout           — сетка фильтры + товары
     .cat-filters          — панель фильтров
     .cat-toolbar          — строка над сеткой
     .cat-grid             — сетка карточек
     .cat-more             — кнопка «ещё» + пагинация
     .cat-also             — «Смотрите также»
     .cat-seo              — SEO-текст
═══════════════════════════════════════════════════════ */

/* ==========================================
   HEADER
========================================== */

.catalog-menu__title {
    margin-top: 26px;
    font-size: 42px;
    font-weight: 400;
    color: #202020;
    line-height: 1.1;
}
.catalog-category-page-header__title {
    font-size: 44px;
    font-weight: 400;
    color: #202020;
    line-height: 1.1;
}
.catalog-page-header-mobile__title {
  display: none;
}


/* ==========================================
   BREADCRUMBS
========================================== */

.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 14px;
    font-weight: 200;
}

.breadcrumbs a {
    color: #909090;
    text-decoration: none;
}

.breadcrumbs span {
    color: #909090;
}

.breadcrumbs__arrow {
    font-size: 18px;
}


/* ==========================================
   SECTION
========================================== */

.catalog-section {
    background: var(--white);
}


/* ==========================================
   HEADER
========================================== */

.catalog-section__header {
    width: 100%;
    border: none;
    background: transparent;
    cursor: pointer;
    border-bottom: 1px solid #ECECEC;

    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 30px 0;

    text-align: left;
}
.catalog-section__title {
    font-size: 24px;
    font-weight: 500;
}

.catalog-section__icon {
    width: 30px;
    text-align: center;

    font-size: 40px;
    font-weight: 300;
    color: #5B21B6;
    line-height: 1;

    transition: .25s;
}


/* ==========================================
   CONTENT
========================================== */

.catalog-section__content {
    display: none;
    padding-top: 28px;
    padding-bottom: 45px;

    grid-template-columns: repeat(2, minmax(280px, 420px));
    column-gap: 272px;
}

.catalog-section--opened .catalog-section__content {
    display: grid;
}

.catalog-section__show-all {
  display: none;
}

/* ==========================================
   COLUMNS
========================================== */

.catalog-column {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.catalog-column a {
    font-size: 16px;
    line-height: 1.35;
}

.catalog-column a:hover {
    color: var(--purple);
}


/* первый пункт каталога */
.catalog-column-accent {
    color: var(--purple);
}

.catalog-materials {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.catalog-materials__title {
    font-size: 15px;
    color: var(--black);
    text-decoration: none;
}

.catalog-materials__title:hover {
    color: var(--purple);
}

.catalog-materials__list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.catalog-materials__list a {
    font-size: 15px;
    color: #9A9A9A;
    line-height: 1.4;
    text-decoration: none;
}

.catalog-materials__list a:hover {
    color: var(--purple);
}

/* ==========================================
   OPEN / CLOSE
========================================== */

.catalog-section--opened .catalog-section__icon {
    font-size: 34px;
}
.catalog-section--opened .catalog-section__title {
    color: var(--purple);
}

.catalog-section__toggle{
    width:32px;
    height:32px;

    display:flex;
    justify-content:center;
    align-items:center;
}

.catalog-section__cross{
    display:none;
}

.catalog-section__plus{
    font-size:42px;
    line-height:1;
    color:var(--purple);
}

.catalog-section--opened .catalog-section__cross{
    display:block;
}

.catalog-section--opened .catalog-section__plus{
    display:none;
}

/* ─────────────────────────────────────────
   BREADCRUMBS
───────────────────────────────────────── */
.breadcrumbs { padding: 36px 0; }
.breadcrumbs__list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0;
  list-style: none;
}
.breadcrumbs__item {
  display: flex;
  align-items: center;
  font-size: 12px;
  color: var(--gray-text);
}
.breadcrumbs__item::after {
  content: '→';
  margin: 0 6px;
  color: #d1d5db;
  font-size: 11px;
}
.breadcrumbs__item:last-child::after { display: none; }
.breadcrumbs__link { color: var(--gray-text); }
.breadcrumbs__link:hover { color: var(--purple); }
.breadcrumbs__item--current { color: var(--black); }

.breadcrumbs__back-arrow {
  display: none;
  rotate: 180deg;
}


/* ─────────────────────────────────────────
   CAT PAGE: общая обёртка
───────────────────────────────────────── */
.cat-page { background: var(--gray-bg); margin-top: 118px}
.cat-white-zone {
  background: var(--white);
}
.cat-white-grey-zone {
  background: var(--white);
}
.catalog-page-header {
  padding: 32px 0px 0;
  margin-bottom: 55px;
}
.catalog-page-header__title {
  font-size: 44px;
  font-weight: 440;
  color: var(--black);
  line-height: 1.1;
}


/* ─────────────────────────────────────────
   ACCORDION (catalog.html — корень каталога)
───────────────────────────────────────── */
.cat-accordion {
  border-top: 1px solid var(--gray-border);
}
.cat-accordion__item {
  border-bottom: 1px solid var(--gray-border);
}
.cat-accordion__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 0;
  cursor: pointer;
  user-select: none;
  gap: 16px;
}
.cat-accordion__title {
  font-size: 18px;
  font-weight: 400;
  color: var(--black);
  transition: color 0.15s;
}
.cat-accordion__item--open .cat-accordion__title {
  color: var(--purple);
}
.cat-accordion__icon {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  line-height: 1;
  color: var(--gray-text);
  flex-shrink: 0;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
}
.cat-accordion__item--open .cat-accordion__icon-plus { display: none; }
.cat-accordion__item:not(.cat-accordion__item--open) .cat-accordion__icon-close { display: none; }

.cat-accordion__body {
  display: none;
  padding-bottom: 32px;
}
.cat-accordion__item--open .cat-accordion__body {
  display: block;
}

/* Подкатегории внутри открытого аккордеона — две колонки */
.cat-subcats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 80px;
}

.cat-subcats__group-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--black);
  margin-top: 24px;
  margin-bottom: 10px;
}
.cat-subcats__col > .cat-subcats__group-title:first-child {
  margin-top: 0;
}
.cat-subcats__link {
  display: block;
  font-size: 14px;
  color: var(--black);
  padding: 5px 0;
  line-height: 1.4;
}
.cat-subcats__link:hover { color: var(--purple); }
.cat-subcats__sublink {
  display: block;
  font-size: 13px;
  color: var(--gray-text);
  padding: 3px 0;
  line-height: 1.4;
}
.cat-subcats__sublink:hover { color: var(--purple); }

/* ─────────────────────────────────────────
   CATALOG LAYOUT: [sidebar | content]
───────────────────────────────────────── */
.cat-layout {
  display: grid;
  grid-template-columns: 255px 1fr;
  gap: 40px;
  align-items: start;
  padding-top: 30px;
}

.catalog-product-card {
    background: var(--white);
    border: 1px solid var(--gray-border);
    width: 255px;
}

.catalog-product-card {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  height: 100%;
}
.catalog-product-card__badges { 
  z-index: 5; 
  display: flex; 
  flex-wrap: wrap; 
  gap: 4px; 
  align-content: flex-start;
  max-width: 200px;
  position: absolute;
}
.catalog-product-card__image {
  /* height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af; */
  overflow: hidden;
}

.catalog-product-card__image img,
img.catalog-product-card__image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.catalog-product-card__name {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.35;
  flex: 1;
}
.catalog-product-card__category { font-size: 11px; color: #9ca3af; margin-top: auto;}

.catalog-product-card__sale {
  display: flex;
  gap: 12px;
}
.catalog-product-card__price-old {
  color: #9ca3af;
  text-decoration: line-through;
}
.catalog-product-card__price {
  font-size: 15px;
  font-weight: 600;
}
.catalog-product-card__price_line {
  display: flex;
  gap: 12px;
}

.catalog-product-card__actions {
  display: flex;
  gap: 12px;
  align-items: center;
}
.product-card__btn {
  flex: 1;
  border: none;
  padding: 10px;
  background: var(--purple);
  color: var(--white);
  font-size: 14px;
  font-weight: 600;
}
.product-card__btn--in-cart {
  background: var(--black);
  color: var(--white);
  border-color: transparent;
}
.product-card__btn:hover:not(.product-card__btn--in-cart) { background: var(--purple-btn); }

.product-card__icon-btn {
  width: 20px;
  height: 20px;
  border: none;
  background:none;
}
.product-card__icon-btn:hover { background: #f3f4f6; }
.product-card__icon-btn--liked { color: var(--purple-btn); }




/* ─────────────────────────────────────────
   FILTERS
───────────────────────────────────────── */
.cat-filters {
    background: var(--gray-bg);
    margin: 70px 0px 0px 0px;
    padding: 20px 20px;
}
.cat-filters__toggle {
  display: none;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  background: none;
  border: none;
  padding: 0 0 10px 0;
  font: inherit;
  cursor: pointer;
  border-bottom: 1px solid var(--black);
}
.cat-filters__toggle-label {
  font-size: 16px;
  font-weight: 400;
  color: var(--black);
}
.cat-filters__toggle-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--purple);
  font-weight: 700;
}
.cat-filters__toggle-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: var(--purple);
  color: #fff;
  border-radius: 12px;
  font-size: 12px;
}
.cat-filters__toggle-icon {
  display: inline-flex;
  width: 12px;
  height: 12px;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: transform .15s ease;
}
.cat-filters__body {
  display: block;
}
.cat-filters--collapsed .cat-filters__body {
  display: none;
}
.cat-filters--collapsed .cat-filters__toggle-icon {
  transform: rotate(0deg);
}
.cat-filters__group {
  margin-bottom: 28px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--gray-border);
}

.cat-filters__title {
  font-size: 16px;
  font-weight: 600;
  color: var(--black);
  margin-bottom: 14px;
}

/* Цена */
/* Двойной слайдер цены */
.cat-price-range { padding: 6px 0 0; }
.cat-price-range__track {
  position: relative;
  height: 1px;
  background: #ddd;
  margin: 14px 0 18px;
}
.cat-price-range__fill {
  position: absolute;
  height: 100%;
  background: var(--purple);
  left: 0%;
  right: 0%;
  pointer-events: none;
}
.cat-price-range__min { z-index: 3; }
.cat-price-range__max { z-index: 4; }
/* Оба ползунка накладываются поверх трека */
.cat-price-range__min,
.cat-price-range__max {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 100%;
  height: 4px;
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
  outline: none;
  pointer-events: none;
  margin: 0;
}
/* Бегунок — только он перехватывает клики */
.cat-price-range__min::-webkit-slider-thumb,
.cat-price-range__max::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--black);
  cursor: pointer;
  pointer-events: all;
  border: none;
  box-shadow: 0 1px 4px rgba(0,0,0,.25);
}
.cat-price-range__min::-moz-range-thumb,
.cat-price-range__max::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--black);
  cursor: pointer;
  pointer-events: all;
  border: none;
  box-shadow: 0 1px 4px rgba(0,0,0,.25);
}

.cat-price-range__labels {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.cat-price-range__label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}
.cat-price-range__label-text {
  font-size: 14px;
  color: var(--gray-text);
}
.cat-price-range__val--min,
.cat-price-range__val--max {
  display: block;
  font-size: 16px;
  color: var(--black);
  font-weight: 300;
  white-space: nowrap;
  border-bottom: 1px solid var(--black);
  padding-bottom: 3px;
}
/* Чекбоксы */
.cat-filters__check {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.cat-filters__check-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  color: var(--black);
  cursor: pointer;
}
.cat-filters__check-input {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  accent-color: var(--purple);
  cursor: pointer;
}
.cat-filters__check-count {
  color: var(--gray-text);
  font-size: 16px;
  margin-left: 0;
}

/* Сброс фильтров */
.cat-filters__reset {
  display: block;
  width: 100%;
  background: var(--gray-border);
  border: none;
  color: var(--purple);
  font-size: 14px;
  font-weight: 400;
  cursor: pointer;
  padding: 12px 16px;
  margin-top: 24px;
  text-align: center;
  transition: background .15s, transform .15s;
}
.cat-filters__reset:hover {
  background: rgba(139, 92, 246, 0.18);
}


/* ─────────────────────────────────────────
   TOOLBAR
───────────────────────────────────────── */
.cat-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 30px;
  gap: 12px;
  position: relative;
}

.cat-toolbar__sort {
  width: 255px;
  border-bottom: 1px solid #202020;
}

/* Верхняя строка */

.cat-sort__current {
    width: 100%;
    height: 36px;

    display: flex;
    justify-content: space-between;
    align-items: center;

    padding-bottom: 4px;

    background: none;
    border: none;
    /* border-bottom: 1px solid #202020; */
    font-size: 16px;
}

.cat-sort__current img {
    transition: .25s;
}

/* Выпадающее меню */

.cat-sort__dropdown {
    position: absolute;
    display: none;
    right: auto;
    left: auto;
    top: auto;

    width: inherit;

    background: #fff;
    border: 1px solid #ECECEC;

    z-index: 10;

    margin-right: 40px;
    margin-top: 1px;
}

/* Открыто */

.cat-sort--open .cat-sort__dropdown {
    display: block;
}

.cat-sort--open .cat-sort__current img {
    transform: rotate(180deg);
}

/* Пункты */

.cat-sort__item {
    width: 100%;

    background: var(--white);
    border: none;

    text-align: left;

    padding: 8px;

    font-size: 16px;

    cursor: pointer;
}

.cat-sort__item:hover, .cat-sort__item:focus-visible  {
    background: var(--gray-bg);
    color: var(--purple);
    outline: none;
}

.cat-sort__item--active {
    color: var(--purple);
}


/* ─────────────────────────────────────────
   CATALOG PRODUCT GRID
───────────────────────────────────────── */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  margin-bottom: 30px;
  justify-items: center;
}

.cat-product-card__price {
  font-size: 18px;
}


/* ─────────────────────────────────────────
   ПОКАЗАТЬ ЕЩЁ + ПАГИНАЦИЯ
───────────────────────────────────────── */
.cat-more {
    display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  margin-bottom: 60px;
}
.cat-more__btn {
  padding: 14px 60px;
  border: none;
  background:var(--purple);
  color: var(--white);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.cat-more__btn:hover {
  background: var(--purple);
  color: #fff;
}
.cat-pagination {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: flex-end;
}
.cat-pagination__btn {
  width: 32px;
  height: 32px;
  border: none;
  background: none;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--black);
  transition: background .15s;
}

/* .cat-pagination__btn--active {

} */

.cat-pagination__btn:hover:not(.cat-pagination__btn--active) {
  background: #f3f4f6;
}


/* ─────────────────────────────────────────
   СМОТРИТЕ ТАКЖЕ
───────────────────────────────────────── */
.cat-also { 
  padding: 60px 0 56px; 
  border-bottom: 1px solid var(--gray-border);
}
.cat-also__grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}


/* ─────────────────────────────────────────
   SEO BLOCK (общий для обеих страниц)
───────────────────────────────────────── */
.cat-seo {
  background: var(--gray-bg);
  padding: 40px 0 40px;
  margin-top: 40px;
}
.cat-seo__inner {
  max-width: 1160px;
}
.cat-seo__title {
  font-size: 32px;
  font-weight: 400;
  color: var(--black);
  margin-bottom: 14px;
  margin-top: 36px;
}
.cat-seo__title:first-child { margin-top: 0; }
.cat-seo__text {
  font-size: 16px;
  color: var(--gray-dark);
  line-height: 1.75;
}
.cat-seo__text-space {
  margin-bottom: 12px;
}
.cat-seo__list {
    list-style: disc;
  font-size: 14px;
  color: var(--gray-dark);
  line-height: 1.75;
  padding-left: 18px;
  margin-bottom: 12px;
}
.cat-seo__more-btn {
  background: none;
  border: none;
  color: var(--purple);
  font-size: 14px;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  font-family: inherit;
  margin-top: 8px;
  display: inline-block;
}
.cat-seo__more-btn:hover { text-decoration: underline; }
.cat-seo__more-text {
  display: none;
  margin-top: 12px;
}
.cat-seo__more-text.active {
  display: block;
}