/* Abordazh — category tree (ps_categorytree) on brand/category pages, restyled to match
   the faceted filter (abz-facets.css). Parent categories = 48px accordion sections with a
   chevron; leaf subcategories = filter-style value rows WITHOUT checkboxes. IBM Plex Sans 16/24. */

.ps-categorytree.category-tree.left-block {
  --abzct-border: #dcdcdc;
  --abzct-ink:    #001400;
  --abzct-title:  #051e05;
  --abzct-muted:  #7a857a;
  --abzct-hover:  #f6f8f6;
  font-family: var(--font-body, "IBM Plex Sans", system-ui, sans-serif);
  color: var(--abzct-ink);
  background: #fff;
  border: 1px solid var(--abzct-border);
  border-radius: 4px;
  overflow: hidden;
  padding: 0;
}
.ps-categorytree * { box-sizing: border-box; }

/* ---------------- TITLE BAND (48px) ---------------- */
.ps-categorytree .left-block__title {
  display: block;
  height: 48px; line-height: 48px; margin: 0; padding: 0 20px;
  font-size: 16px; font-weight: 700; letter-spacing: .2px; white-space: nowrap;
  color: var(--abzct-title);
  border-bottom: 1px solid var(--abzct-border);
}
.ps-categorytree .left-block__title-link {
  color: var(--abzct-title); text-decoration: none;
}
.ps-categorytree .left-block__title-link:hover { color: var(--abzct-title); }
.ps-categorytree .abzct-ic {
  display: inline-block; flex: none; width: 22px; height: 22px;
  vertical-align: middle; margin-right: 10px; margin-top: -3px; color: var(--abzct-title);
}
.ps-categorytree .abzct-ic svg { display: block; width: 100%; height: 100%; }

/* ---------------- ACCORDION WRAPPER ---------------- */
.ps-categorytree .accordion--category { border: 0; background: transparent; }
.ps-categorytree nav { display: block; }
.ps-categorytree ul.category-tree__list { list-style: none; margin: 0; padding: 0; row-gap: 0; }
.ps-categorytree .category-tree__item { margin: 0; padding: 0; }
.ps-categorytree .accordion-collapse { border: 0; }
.ps-categorytree .accordion-body { padding: 4px 20px 12px; margin: 0; }

/* top-level sections divided by a hairline (like the filter's accordion items) */
.ps-categorytree ul.category-tree__list[data-depth="0"] > li.category-tree__item {
  border-bottom: 1px solid var(--abzct-border);
}
.ps-categorytree ul.category-tree__list[data-depth="0"] > li.category-tree__item:last-child {
  border-bottom: 0;
}

/* ---------------- HEADER ROWS ---------------- */
.ps-categorytree .category-tree__item-header {
  display: flex; align-items: center; gap: 8px;
  padding: 0 20px;
}
.ps-categorytree .category-tree__item-link {
  flex: 1 1 auto; min-width: 0;
  color: var(--abzct-ink); text-decoration: none;
  font-size: 16px; line-height: 24px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* TOP-LEVEL categories (depth 0) — all identical 48px bold bands (with or without children) */
.ps-categorytree ul.category-tree__list[data-depth="0"] > li > .category-tree__item-header {
  min-height: 48px;
}
.ps-categorytree ul.category-tree__list[data-depth="0"] > li > .category-tree__item-header > .category-tree__item-link {
  font-weight: 700;
}
.ps-categorytree ul.category-tree__list[data-depth="0"] > li > .category-tree__item-header:hover > .category-tree__item-link {
  color: var(--abzct-title);
}

/* SUBCATEGORIES (depth >= 1) — filter-style value rows (no checkbox): 24px, no extra padding */
.ps-categorytree ul.category-tree__list:not([data-depth="0"]) > li > .category-tree__item-header {
  padding: 0;
}
.ps-categorytree ul.category-tree__list:not([data-depth="0"]) > li > .category-tree__item-header > .category-tree__item-link {
  font-weight: 400;
}
.ps-categorytree ul.category-tree__list:not([data-depth="0"]) > li > .category-tree__item-header:hover {
  background: var(--abzct-hover);
}
.ps-categorytree ul.category-tree__list:not([data-depth="0"]) > li > .category-tree__item-header:hover > .category-tree__item-link {
  color: var(--abzct-title);
}

/* ---------------- CHEVRON TOGGLE (reset Bootstrap accordion-button) ---------------- */
.ps-categorytree .category-tree__item-header .accordion-button {
  flex: none; width: 24px; height: 24px; padding: 0; margin: 0;
  border: 0; border-radius: 0;
  background: transparent !important; box-shadow: none !important;
  overflow: visible;
}
.ps-categorytree .category-tree__item-header .accordion-button:focus { box-shadow: none !important; outline: none; }
.ps-categorytree .category-tree__item-header .accordion-button::after {
  width: 16px; height: 16px; margin: 0 0 0 auto; background-size: 16px 16px;
  background-position: center; background-repeat: no-repeat;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 6l5 5 5-5' fill='none' stroke='%23001400' stroke-width='1.3'/%3E%3C/svg%3E") !important;
  transition: transform .18s ease;
}
