/**
 * Left-column category tree — InFront layout, Sintech brand colours.
 */

#left-column .block-categories,
.block-categories {
  --ift-tree-ink: #1a1a1a;
  --ift-tree-muted: #6b7280;
  --ift-tree-brand-dark: #8b0c21;
  --ift-tree-brand: #c8102e;
  --ift-tree-brand-2: #e85a6b;
  --ift-tree-line: #e8eaed;
  --ift-tree-wash: #f5f6f8;
  background: var(--ift-tree-wash) !important;
  border: 1px solid var(--ift-tree-line) !important;
  border-radius: 12px !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin-bottom: 1.5rem !important;
  width: 100%;
  overflow: hidden;
}

#left-column .block-categories .block-title,
.block-categories .block-title {
  position: relative;
  padding: 0.85rem 1rem !important;
  margin: 0 !important;
  border-bottom: none !important;
  background: var(--ift-tree-ink);
}

#left-column .block-categories .block-title::after,
.block-categories .block-title::after {
  content: "";
  display: block;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  border-radius: 0;
  background: linear-gradient(
    90deg,
    var(--ift-tree-brand-dark),
    var(--ift-tree-brand) 55%,
    var(--ift-tree-brand-2)
  );
}

#left-column .block-categories .block-title a.back-to-parent,
.block-categories .block-title a.back-to-parent {
  color: #f8fafc !important;
  text-decoration: none !important;
  font-size: 0.75rem !important;
  font-weight: 800 !important;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

#left-column .block-categories .block-title a.back-to-parent:hover,
.block-categories .block-title a.back-to-parent:hover {
  color: #fda4af !important;
}

#left-column .block-categories .block-title a.back-to-parent i,
.block-categories .block-title a.back-to-parent i {
  display: inline-block !important;
  margin-right: 0 !important;
  font-size: 0.7rem !important;
  color: #fb7185 !important;
}

#left-column .block-categories .category-top-menu.block-content,
.block-categories .category-top-menu.block-content {
  padding: 0.35rem 0 !important;
  background: #fff;
}

#left-column .block-categories .category-sub-menu,
.block-categories .category-sub-menu {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
  display: block;
}

#left-column .block-categories .category-sub-menu li.category-tree-item + li.category-tree-item,
.block-categories .category-sub-menu li.category-tree-item + li.category-tree-item {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

#left-column .block-categories .category-sub-menu li.category-tree-item + li.category-tree-item::before,
.block-categories .category-sub-menu li.category-tree-item + li.category-tree-item::before {
  display: none !important;
  content: none !important;
  border: 0 !important;
}

#left-column .block-categories .category-tree-item,
.block-categories .category-tree-item {
  border-bottom: 1px solid var(--ift-tree-line);
}

#left-column .block-categories .category-tree-item:last-child,
.block-categories .category-tree-item:last-child {
  border-bottom: 0;
}

#left-column .block-categories .category-tree-item .collapse,
.block-categories .category-tree-item .collapse {
  border-left: none !important;
  margin: 0 !important;
  padding: 0 0 0.25rem 0.85rem !important;
  background: #fafbfc !important;
  border-radius: 0 !important;
  box-shadow: inset 3px 0 0 rgba(200, 16, 46, 0.35);
}

#left-column .block-categories .category-tree-item .collapse .category-tree-item,
.block-categories .category-tree-item .collapse .category-tree-item {
  border-bottom-color: #eef2f7;
}

#left-column .block-categories .category-tree-node-wrapper,
.block-categories .category-tree-node-wrapper {
  transition: background-color 0.15s ease, color 0.15s ease;
  border-radius: 0 !important;
  margin-bottom: 0 !important;
  cursor: pointer;
  min-height: 2.5rem;
  display: flex !important;
  align-items: center;
  width: 100%;
  position: relative;
  padding: 0.45rem 0.85rem 0.45rem 1rem !important;
  gap: 0.35rem;
  background: transparent !important;
  box-shadow: none !important;
}

#left-column .block-categories .category-tree-node-wrapper::before,
.block-categories .category-tree-node-wrapper::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45rem;
  bottom: 0.45rem;
  width: 3px;
  border-radius: 0 2px 2px 0;
  background: transparent;
  transition: background 0.15s ease;
}

#left-column .block-categories .category-tree-node-wrapper:hover,
.block-categories .category-tree-node-wrapper:hover {
  background-color: #fafbfc !important;
}

#left-column .block-categories .category-tree-node-wrapper:hover::before,
.block-categories .category-tree-node-wrapper:hover::before {
  background: rgba(200, 16, 46, 0.45);
}

#left-column .block-categories .category-tree-item:has(> .collapse.show) > .category-tree-node-wrapper,
.block-categories .category-tree-item:has(> .collapse.show) > .category-tree-node-wrapper {
  background: #fafbfc !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

#left-column .block-categories .category-tree-item:has(> .collapse.show) > .category-tree-node-wrapper::before,
.block-categories .category-tree-item:has(> .collapse.show) > .category-tree-node-wrapper::before {
  background: linear-gradient(
    180deg,
    var(--ift-tree-brand-dark),
    var(--ift-tree-brand),
    var(--ift-tree-brand-2)
  );
}

#left-column .block-categories .category-tree-item:has(> .collapse.show) > .category-tree-node-wrapper a,
.block-categories .category-tree-item:has(> .collapse.show) > .category-tree-node-wrapper a {
  font-weight: 700 !important;
  color: var(--ift-tree-brand-dark) !important;
}

#left-column .block-categories .chevron-hat,
.block-categories .chevron-hat {
  margin-left: auto;
  flex-shrink: 0;
  color: var(--ift-tree-muted) !important;
  width: 1.25rem;
  height: 1.25rem;
  display: flex !important;
  align-items: center;
  justify-content: center;
  border-radius: 0;
  background: transparent !important;
  transition: transform 0.2s ease, color 0.15s ease;
}

#left-column .block-categories .category-tree-node-wrapper:hover .chevron-hat,
.block-categories .category-tree-node-wrapper:hover .chevron-hat {
  color: var(--ift-tree-brand) !important;
  background: transparent !important;
}

#left-column .block-categories .category-tree-item:has(> .collapse.show) > .category-tree-node-wrapper .chevron-hat,
.block-categories .category-tree-item:has(> .collapse.show) > .category-tree-node-wrapper .chevron-hat {
  transform: rotate(180deg);
  color: var(--ift-tree-brand-dark) !important;
  background: transparent !important;
}

#left-column .block-categories .category-tree-node-wrapper.active,
.block-categories .category-tree-node-wrapper.active {
  background: rgba(200, 16, 46, 0.1) !important;
  box-shadow: none !important;
}

#left-column .block-categories .category-tree-node-wrapper.active::before,
.block-categories .category-tree-node-wrapper.active::before {
  background: linear-gradient(
    180deg,
    var(--ift-tree-brand-dark),
    var(--ift-tree-brand),
    var(--ift-tree-brand-2)
  );
}

#left-column .block-categories .category-tree-node-wrapper.active a,
#left-column .block-categories .category-tree-node-wrapper.active a .text-muted,
.block-categories .category-tree-node-wrapper.active a,
.block-categories .category-tree-node-wrapper.active a .text-muted {
  color: var(--ift-tree-ink) !important;
  font-weight: 800 !important;
}

#left-column .block-categories .category-tree-node-wrapper.active .text-muted,
.block-categories .category-tree-node-wrapper.active .text-muted {
  background: transparent !important;
  border-color: transparent !important;
  color: var(--ift-tree-brand-dark) !important;
  box-shadow: none !important;
}

#left-column .block-categories .category-tree-node-wrapper.active .chevron-hat,
.block-categories .category-tree-node-wrapper.active .chevron-hat {
  color: var(--ift-tree-brand-dark) !important;
  background: transparent !important;
}

#left-column .block-categories .category-item-link,
.block-categories .category-item-link {
  display: flex !important;
  align-items: baseline;
  flex-wrap: wrap;
  padding: 0 !important;
  color: #334155 !important;
  text-decoration: none !important;
  flex-grow: 1;
  min-width: 0;
  font-size: 0.8125rem !important;
  font-weight: 600 !important;
  line-height: 1.35 !important;
  letter-spacing: -0.01em;
}

#left-column .block-categories .category-item-link:hover,
.block-categories .category-item-link:hover {
  color: var(--ift-tree-brand-dark) !important;
}

#left-column .block-categories .category-item-link .text-muted,
.block-categories .category-item-link .text-muted {
  font-size: 0.6875rem !important;
  margin-left: 0.35rem !important;
  color: var(--ift-tree-muted) !important;
  background: transparent !important;
  border: 0 !important;
  padding: 0 !important;
  border-radius: 0 !important;
  font-weight: 700 !important;
  letter-spacing: 0.02em;
  line-height: 1.2;
  box-shadow: none !important;
  font-variant-numeric: tabular-nums;
}

#left-column .block-categories .category-item-link::before,
#left-column .block-categories .category-item-link::after,
#left-column .block-categories .category-sub-link::before,
#left-column .block-categories .category-sub-link::after,
.block-categories .category-item-link::before,
.block-categories .category-item-link::after,
.block-categories .category-sub-link::before,
.block-categories .category-sub-link::after {
  display: none !important;
  content: none !important;
}

/* Keep nav links clickable without also toggling collapse */
#left-column .block-categories .category-item-link,
.block-categories .category-item-link {
  position: relative;
  z-index: 1;
}
