/* ============================================
   УМНОЕ МЕНЮ С КНОПКОЙ "ЕЩЁ"
   ============================================ */

/* Контейнер меню */
#primarymenu-section {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

/* Внутренний контейнер меню */
#primarymenu-section #menu {
    display: inline-block;
    vertical-align: middle;
}

ul.menu-more-dropdown.active a {
    color: #000 !important;
}

button.menu-more-btn {
    border: 1px solid #fff;
}

div#primarymenu-section-clone {
    display: flex;
}

/* Сам UL меню */
#actuate_menu {
    display: flex !important;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: nowrap;
}

#actuate_menu > li {
    position: relative;
    flex-shrink: 0;
    float: none !important; /* Перебиваем float от Superfish */
}

/* Скрытые пункты */
#actuate_menu > li.menu-item-hidden {
    display: none !important;
}

/* ===== КНОПКА "ЕЩЁ" (ТРИ ТОЧКИ) ===== */
.menu-more-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 10px 15px;
    margin-left: 5px;
    color: #fff;
    transition: all 0.3s ease;
    border-radius: 8px;
    font-family: inherit;
    vertical-align: middle;
}

.menu-more-btn:hover {
    background: rgba(167, 138, 107, 0.1);
}

.menu-more-btn.active {
    background: rgba(167, 138, 107, 0.15);
}

.menu-more-btn .dots {
    display: flex;
    gap: 4px;
    align-items: center;
}

.menu-more-btn .dots span {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
    display: block;
    transition: background 0.3s ease;
}

.menu-more-btn:hover .dots span,
.menu-more-btn.active .dots span {
    background: #a78a6b;
}

/* ===== ВЫПАДАЮЩЕЕ МЕНЮ ===== */
.menu-more-dropdown {
    position: absolute;
    top: calc(100% + 15px);
    right: 0;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    border: 1px solid #f0ebe6;
    min-width: 240px;
    padding: 10px 0;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    list-style: none;
    margin: 0;
}

.menu-more-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.menu-more-dropdown > li {
    list-style: none;
    margin: 0;
    float: none !important;
}

.menu-more-dropdown > li > a {
    display: block;
    padding: 12px 25px;
    color: #2c3e35;
    text-decoration: none;
    font-size: 15px;
    line-height: 1.4;
    transition: all 0.2s ease;
    white-space: nowrap;
    border-left: 3px solid transparent;
}

.menu-more-dropdown > li > a:hover {
    background: #f9f7f4;
    color: #a78a6b;
    border-left-color: #a78a6b;
    padding-left: 30px;
}

/* Подменю (если есть) */
.menu-more-dropdown .sub-menu {
    list-style: none;
    margin: 0;
    padding: 0 0 0 15px;
}

.menu-more-dropdown .sub-menu a {
    font-size: 14px;
    color: #6a6a6a;
    padding: 8px 25px 8px 30px;
}

/* ===== ОВЕРЛЕЙ ===== */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: 9998;
    display: none;
}

.menu-overlay.active {
    display: block;
}

/* ===== АДАПТИВНОСТЬ ===== */
@media (max-width: 992px) {
    #actuate_menu {
        flex-wrap: wrap;
    }
}

@media (max-width: 768px) {
    .menu-more-dropdown {
        right: auto;
        left: 50%;
        transform: translateX(-50%) translateY(-10px);
        min-width: 220px;
        max-width: 90vw;
    }

    .menu-more-dropdown.active {
        transform: translateX(-50%) translateY(0);
    }
}
