/* ===== Desktop menu override ===== */

#header {
    position: sticky;
    top: 0;
    z-index: 3;
    box-shadow: 0 0 3px #0000007a;
    border-bottom: 1px solid #fff;
}

#header .logo {
    max-width: 140px;
    max-height: 40px;
    margin: 10px 0;
}

#header li {
    position: relative;
}

#header .navigation {
    font-size: 16px;
    margin: 0;
}

/* Контейнер меню */
#header .navigation .desktop_menu_container {
    display: flex;
}

/* Список верхнего уровня */
#header .navigation .desktop_menu_list {
    display: flex;
    gap: 24px;
    margin: 0;
    padding: 0;
}

/* Пункты верхнего уровня */
#header .navigation .desktop_menu_list>li {
    position: relative;
    margin: 0;
    padding: 0;
}

/* Ссылки верхнего уровня */
#header .navigation .desktop_menu_list>li>a {
    display: flex;
    align-items: center;
    height: 50px;
    padding: 0 4px;
    color: #ffffff;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    position: relative;
    transition: opacity 0.2s ease;
}

#header .navigation .desktop_menu_list>li>a:hover {
    opacity: 0.6;
}

#header .navigation .desktop_menu_list>li.current-menu-ancestor>a::before,
#header .navigation .desktop_menu_list>li.current-menu-parent>a::before,
#header .navigation .desktop_menu_list>li.current-menu-item>a::before,
#header .navigation .desktop_menu_list>li.current_page_item>a::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 10px;
    height: 2px;
    background-color: #ffffff;
    border-radius: 2px;
}

/* ===== Submenu ===== */

/* Базово скрыто */
#header .navigation .desktop_menu_list>li>ul {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 260px;
    margin: 0;
    padding: 8px 0;
    list-style: none;
    background-color: #ffffff;
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
    z-index: 1000;
    display: block;
}

/* Показываем по ховеру */
#header .navigation .desktop_menu_list>li:hover>ul {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Пункты подменю */
#header .navigation .desktop_menu_list>li>ul>li {
    margin: 0;
    padding: 0;
}

/* Ссылки подменю */
#header .navigation .desktop_menu_list>li>ul>li>a {
    display: block;
    padding: 10px 16px;
    color: #222222;
    font-size: 14px;
    line-height: 1.4;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
}

#header .navigation .desktop_menu_list>li>ul>li>a:hover {
    background-color: #f2f2f2;
    color: #000000;
}

/* Активный пункт в подменю */
#header .navigation .desktop_menu_list>li>ul>li.current-menu-item>a,
#header .navigation .desktop_menu_list>li>ul>li.current_page_item>a {
    font-weight: 600;
    background-color: #f2f2f2;
}

/* Резервируем место под стрелку */
#header .navigation .desktop_menu_list>li.menu-item-has-children>a {
    padding-right: 14px;
}

/* Стрелка у пунктов с подменю */
#header .navigation .desktop_menu_list>li.menu-item-has-children>a::after {
    content: "⌵";
    position: absolute;
    right: 0;
    font-size: 11px;
    line-height: 1;
}

/* Для последних пунктов меню открываем подменю влево */
#header .navigation .desktop_menu_list>li:last-child>ul,
#header .navigation .desktop_menu_list>li:nth-last-child(2)>ul {
    left: auto;
    right: 0;
}

/* Любой пункт с подменю — якорь для вложенного ul */
#header .navigation .desktop_menu_list li {
    position: relative;
}

/* Все вложенные подменю (любой глубины) */
#header .navigation .desktop_menu_list ul ul {
    top: 0;
    left: 100%;
    margin-left: 6px;
    transform: translateY(0);
}

/* Показываем подменю любого уровня при ховере */
#header .navigation .desktop_menu_list li:hover>ul {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* По умолчанию все подменю скрыты (любой глубины) */
#header .navigation .desktop_menu_list ul {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

/* Метки/эффекты/индивидуализация */

#header li li.warning_star:after {
    content: "★";
    color: #FF9800;
    font-size: 20px;
    line-height: 20px;
    position: absolute;
    right: 10px;
    bottom: 10px;
}

#header li li.warning_dot:after {
    content: "•";
    color: #FF9800;
    font-size: 20px;
    line-height: 20px;
    position: absolute;
    right: 10px;
    bottom: 10px;
}

@keyframes blink_smooth {
    0% {
        opacity: 1;
    }

    100% {
        opacity: 0.1;
    }
}

#header li li.hot:after {
    content: "hot!";
    color: #c9011e;
    font-size: 15px;
    line-height: 20px;
    position: absolute;
    right: 10px;
    bottom: 11px;
    border: 1px solid #c9011e;
    background-color: #c9011e;
    padding: 1px 5px 2px 5px;
    line-height: 12px;
    border-radius: 5px;
    color: #fff;
    animation: blink_smooth 0.4s infinite alternate;
}

#header li li.warning_bg {
    border-top: 1px solid #FF9800;
    border-bottom: 1px solid #FF9800;
    background-color: #ffd9a1;
}

#header li li.success_bg {
    border-top: 1px solid #9CCC65;
    border-bottom: 1px solid #9CCC65;
    background-color: #DCEDC8;
}