/* === Выпадающее меню, которое СМЕЩАЕТ другие элементы === */

/* Контейнер пункта меню */
.dropdown {
    position: relative;
    display: block;
    z-index: 10;
}

/* Ссылка "Каталог" */
.dropdown .dropdown-link {
    display: flex;
    align-items: center;
    /*justify-content: space-between;*/
    width: 100%;
    text-decoration: none;
    color: var(--link-color);
    font-size: 18px;
    padding: 12px 8px!important;
    border-radius: 14px;
    background: linear-gradient(145deg, transparent, rgba(0, 0, 0, 0.03));
    transition: all 0.3s ease;
}

.dropdown .dropdown-link:hover {
    background: linear-gradient(145deg, #f7f7f7, #e9e9e9);
    color: var(--link-hover);
}

.dark-theme .dropdown .dropdown-link:hover {
    background: linear-gradient(145deg, #323232, #282828);
    color: var(--link-hover);
}

/* Стрелка */
.dropdown .arrow {
    font-size: 0.7em;
    opacity: 0.7;
    transition: transform 0.3s ease;
}

.dropdown.open .arrow,
.dropdown:hover .arrow {
    transform: rotate(180deg);
}

/* Выпадающий список — ВНУТРИ ПОТОКА */
.dropdown-menu {
    list-style: none;
    padding: 0;
    margin: 8px 0 0 0;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.4s ease, opacity 0.3s ease;
}

.dropdown.open .dropdown-menu,
.dropdown:hover .dropdown-menu {
    max-height: 300px;
    opacity: 1;
    margin: 8px 0 0 0;
}

/* Элементы списка */
.dropdown-menu li {
    margin: 0;
}

.dropdown-menu a {
    display: block;
    padding: 10px 16px;
    padding-left: 42px; /* Отступ для вложенности */
    color: var(--link-color);
    text-decoration: none;
    font-size: 15px;
    transition: all 0.2s ease;
    border-radius: 6px;
    margin: 2px 8px;
    color: var(--text-primary);
}

.dropdown-menu a:hover {

    color: white;
    border-left-color: var(--btn-gradient-start);
}
/* Скрываем выпадающее меню, когда сайдбар свёрнут */
.sidebar.collapsed .dropdown .dropdown-menu {
    display: none !important;
}

/* Также можно скрыть стрелку (опционально) */
.sidebar.collapsed .dropdown .arrow {
    display: none;
}
.sidebar.collapsed .dropdown:hover .dropdown-menu {
    opacity: 0;
    visibility: hidden;
}

