/* Контейнер списку підкатегорій */
.custom-cat-menu-wrapper {
    width: 100%;
    margin: 20px 0 40px 0;
    max-width: 100%;
    overflow: hidden;
}

.custom-cat-menu-list {
    display: flex;
    align-items: stretch; /* ЗАБЕЗПЕЧУЄ ОДНАКОВУ ВИСОТУ всіх елементів li */
    list-style: none;
    padding: 10px 0;
    margin: 0;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
    max-width: 100%;
}

/* Приховуємо стандартний скролбар */
.custom-cat-menu-list::-webkit-scrollbar {
    display: none;
}

/* Елемент списку (li) */
.cat-menu-item {
    display: flex;
    align-items: center;
    position: relative;
}

/* РОЗДІЛОВІ ЛІНІЇ між пунктами */
.cat-menu-item:not(:last-child)::after {
    content: "";
    position: absolute;
    right: 0;
    top: 25%; /* Лінія займає 50% висоти (відступає на 25% зверху і знизу) */
    height: 50%;
    width: 1px;
    background-color: #e9bf7c; /* Колір розділової лінії */
    transition: opacity 0.25s ease;
    z-index: 2;
}

/* Приховуємо лінії біля активного пункту або при наведенні, щоб вони не різали плашку */
.cat-menu-item.is-active::after,
.cat-menu-item:hover::after,
.cat-menu-item:has(+ .cat-menu-item.is-active)::after,
.cat-menu-item:has(+ .cat-menu-item:hover)::after {
    opacity: 0;
}

/* Елемент меню (посилання) */
.cat-menu-item a {
    display: flex;
    align-items: center;
    justify-content: center; /* Центрує контент, якщо немає іконки */
    gap: 12px;
    padding: 20px 30px;
    text-decoration: none !important;
    color: #482c22 !important;
    font-size: 16px;
    background: rgba(233, 191, 124, 0);
    border-radius: 4px;
    transition: all 0.3s ease;
    height: 100%; /* Розтягує посилання на всю висоту li */
    box-sizing: border-box;
}

/* Контейнер для іконок */
.cat-icon-container {
    position: relative;
    width: 40px;
    height: 40px;
    flex-shrink: 0; /* Захищає іконку від стискання */
}

.cat-icon-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: opacity 0.25s ease;
}

/* Початковий стан іконок */
.cat-icon-container .icon-active {
    opacity: 0;
}

.cat-icon-container .icon-normal {
    opacity: 1;
}

/* ЕФЕКТИ ХОВЕРУ ТА АКТИВНОГО СТАНУ ДЛЯ ІКОНОК */
.cat-menu-item:hover .icon-normal,
.cat-menu-item.is-active .icon-normal {
    opacity: 0;
}

.cat-menu-item:hover .icon-active,
.cat-menu-item.is-active .icon-active {
    opacity: 1;
}

/* Стиль для АКТИВНОЇ плашки */
.cat-menu-item.is-active a {
    background: rgba(233, 191, 124, 1);
    color: #fff !important;
}

/* Ефект наведення на неактивні плашки */
.cat-menu-item:not(.is-active):hover a {
    background: rgba(233, 191, 124, 1);
    color: #fff !important;
}