.ingco-categories-hierarchy {
  font-family: inherit;
  padding: 0 !important;
  margin: 0 !important;
}

.ingco-cat-item {
  list-style: none;
  margin: 2px 0 !important;
  padding: 0 !important;
  display: list-item;
  align-items: center;
}

/* PODKATEGORIJE SKRIVENE po default, SAMO klik */
.ingco-cat-item ul,
.ingco-cat-level-1,
.ingco-cat-level-2,
.ingco-cat-level-3 {
  margin: 2px 0 0 16px !important;
  padding: 0 !important;
  display: none !important;
  list-style: none;
  transition: all 0.2s ease;
}

/* SAMO KLIK (.open class) */
.ingco-cat-item.open > ul {
  display: block !important;
}

.ingco-cat-item .cat-link {
  text-decoration: none;
  color: inherit;
  flex: 1;
  margin-right: 12px !important;
  padding: 6px 10px !important;
  border-radius: 3px !important;
  line-height: 1.2 !important;
  transition: all 0.2s;
  cursor: pointer;
}

.ingco-cat-item:hover .cat-link {
  background: rgba(0, 115, 170, 0.08) !important;
}

/* AKTIVNA KATEGORIJA (otvorena) - tamnija boja */
.ingco-cat-item.open > .cat-link {
  background: rgba(0, 170, 249, 0.08) !important;
  background-color: red;
}

/* GLAVNE KATEGORIJE: 15px normal */
.ingco-cat-level-0 .cat-link {
  font-size: 15px !important;
  font-weight: 400 !important;
}

.cat-count {
  font-size: 11px !important;
  opacity: 0.7;
  margin-left: 6px;
}

/* IKONICA - VIDLJIVA UVEK, ROTACIJA SAMO KAD JE OTVORENO */
.ingco-cat-item .toggle-icon {
  font-size: 20px !important;
  margin-left: auto !important;
  opacity: 0.8;
  font-weight: bold;
  transition: all 0.2s;
  flex-shrink: 0;
  padding: 1px 10px 1px 10px;
  border-radius: 35px 35px;
  background: rgba(0, 115, 170, 0.1);
  transform: rotate(0deg); /* default: not rotated */
}

/* SAMO DIREKTNA IKONICA U OTVORENOJ KATEGORIJI SE ROTIRA */
.ingco-cat-item.open > .cat-link > .toggle-icon {
  transform: rotate(180deg) !important;
  background: rgba(0, 115, 170, 0.3);
}

/* Reset: icons inside the opened list (descendants) should remain unrotated
   unless their own .ingco-cat-item also has the .open class */
.ingco-cat-item.open > ul .toggle-icon {
  transform: rotate(0deg) !important;
}

/* Indentacija */
.ingco-cat-level-0 ul {
  margin-left: 16px !important;
}
.ingco-cat-level-1 ul {
  margin-left: 16px !important;
}

.widget-categories .ingco-categories-hierarchy {
  padding: 0 4px !important;
  margin: 4px 0 !important;
}

/* Naziv + count striktno LEVO */
.ingco-cat-item .cat-link {
  display: block;
}

/* Layout: LEVO tekst+broj, DESNO ikona */
.ingco-cat-item .cat-link {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center;
  padding: 2px 0px 3px 0px !important;
}

/* LEVA strana: Naziv + mali broj */
.cat-link > span:first-child {
  flex-shrink: 1;
}

.cat-count {
  font-size: 0.85em !important;
  opacity: 0.8;
  margin-left: 4px !important;
  font-weight: normal;
}

/* DESNA strana: ▾ skroz desno */
.toggle-icon {
  margin-left: auto !important;
  font-size: 18px !important;
  padding: 2px 4px;
  flex-shrink: 0 !important;
}

/* Glavne kategorije 15px normal */
.ingco-cat-level-0 .cat-link {
  font-size: 15px !important;
  font-weight: 400 !important;
}

@media (max-width: 768px) {
  .ingco-cat-level-0 .ingco-cat-item:hover > ul {
    display: none !important;
  }
  .ingco-cat-item ul {
    display: none !important;
  }
}
