/* ============================================
   Category Sidebar — Hierarchical navigation
   Uses same visual style as .shop-categories
   ============================================ */

.category-sidebar {
  list-style: none;
  padding: 0;
  margin: -4px 0 0;
}

.category-sidebar__item {
  border-bottom: 1px solid #f0f0f0;
}

.category-sidebar__item:last-child {
  border-bottom: none;
}

.category-sidebar__row {
  display: flex;
  align-items: center;
}

.category-sidebar__link {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  text-decoration: none;
  color: #555;
  font-size: 14px;
  text-transform: capitalize;
  transition: color 0.2s ease;
}

.category-sidebar__link:hover {
  color: #010096;
}

/* Active state — selected category */
.category-sidebar__item--active > .category-sidebar__row > .category-sidebar__link {
  color: #010096;
  font-weight: 600;
}

/* Ancestor state — parent of selected */
.category-sidebar__item--ancestor > .category-sidebar__row > .category-sidebar__link {
  color: #010096;
}

.category-sidebar__label {
  flex: 1;
}

/* Count badge — matches .shop-categories li a span */
.category-sidebar__count {
  float: none;
  margin-left: auto;
  width: 30px;
  height: 20px;
  line-height: 20px;
  text-align: center;
  border-radius: 20px;
  font-size: 11px;
  background: #f0f0f0;
  color: #555;
  transition: all 0.2s ease;
}

.category-sidebar__link:hover .category-sidebar__count,
.category-sidebar__item--active > .category-sidebar__row > .category-sidebar__link .category-sidebar__count {
  background-color: #010096;
  color: #fff;
}

/* Toggle button */
.category-sidebar__toggle {
  all: unset;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  color: #999;
  font-size: 11px;
  transition: background 0.15s ease, color 0.15s ease;
}

.category-sidebar__toggle:hover {
  background: #f5f5f5;
  color: #010096;
}

/* Nested levels */
.category-sidebar__children {
  list-style: none;
  padding: 0 0 0 14px;
  margin: 0;
  border-left: 2px solid #f0f0f0;
}

.category-sidebar__item--level-1 {
  border-bottom: none;
}

.category-sidebar__item--level-1 > .category-sidebar__row > .category-sidebar__link {
  padding: 7px 0;
  font-size: 13px;
}

.category-sidebar__item--level-2 {
  border-bottom: none;
}

.category-sidebar__item--level-2 > .category-sidebar__row > .category-sidebar__link {
  padding: 5px 0;
  font-size: 12px;
  color: #777;
}

.category-sidebar__item--level-2 > .category-sidebar__row > .category-sidebar__link:hover {
  color: #010096;
}
