/**
 * Shop navbar dropdown — single source (no duplicates in theme.css / ecommerce.css)
 */

/* Kill legacy template conflicts on Shop only */
.header-nav .nav > li.mh-shop-nav.sub-menu-down > a:after,
.header-nav.w3menu .nav > li.mh-shop-nav.sub-menu-down > a:after {
    background-image: none !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    display: none !important;
    content: none !important;
}

.header-nav .nav > li.mh-shop-nav.sub-menu-down > a i,
.header-nav.w3menu .nav > li.mh-shop-nav.sub-menu-down > a i {
    display: none !important;
}

/* ── Navbar trigger ── */
.header-nav .mh-shop-nav__trigger {
    display: inline-flex !important;
    align-items: center;
    gap: 7px;
    text-decoration: none;
}

.header-nav .mh-shop-nav__arrow {
    font-size: 15px;
    line-height: 1;
    color: #333333;
    margin-top: 2px;
    transition: color 0.2s ease, transform 0.2s ease;
}

.header-nav .mh-shop-nav:hover > .mh-shop-nav__trigger,
.header-nav .mh-shop-nav > .mh-shop-nav__trigger:hover {
    color: var(--primary-hover) !important;
}

.header-nav .mh-shop-nav:hover > .mh-shop-nav__trigger .mh-shop-nav__arrow,
.header-nav .mh-shop-nav > .mh-shop-nav__trigger:hover .mh-shop-nav__arrow {
    color: var(--primary-hover);
}

/* ── Shared panel skin ── */
.header-nav .mh-shop-dropdown,
.header-nav .mh-shop-flyout {
    background: #ffffff !important;
    color: #333333 !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.14) !important;
    list-style: none;
    margin: 0;
    padding: 0 !important;
}

.header-nav .mh-shop-dropdown li:hover > a,
.header-nav .mh-shop-flyout li:hover > a {
    background: #f5f5f5 !important;
    color: #333333 !important;
}

/* ── Dropdown row link ── */
.header-nav .mh-shop-dropdown__link {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    box-sizing: border-box !important;
    text-decoration: none;
    gap: 12px;
}

.header-nav .mh-shop-dropdown__text {
    flex: 1 1 auto;
    min-width: 0;
    text-align: left;
    padding-right: 12px;
}

.header-nav .mh-shop-dropdown__arrow {
    flex: 0 0 26px;
    width: 26px;
    margin-left: auto;
    text-align: right;
    color: #bbbbbb;
    font-size: 22px;
    font-weight: 400;
    line-height: 1;
    letter-spacing: -1px;
    user-select: none;
}

.header-nav .mh-shop-flyout__link {
    display: block !important;
    text-decoration: none;
    color: #333333 !important;
    background: #ffffff !important;
}

/* ── Desktop ── */
@media (min-width: 992px) {
    .header-nav .mh-shop-nav {
        position: relative;
    }

    .header-nav .mh-shop-nav__trigger {
        position: relative;
        z-index: 2;
    }

    .header-nav .mh-shop-nav:hover > .mh-shop-nav__trigger::after {
        content: "" !important;
        display: block !important;
        background-image: none !important;
        position: absolute;
        left: 50%;
        bottom: 0;
        transform: translate(-50%, 55%);
        width: 0 !important;
        height: 0 !important;
        margin: 0 !important;
        border-left: 10px solid transparent;
        border-right: 10px solid transparent;
        border-bottom: 10px solid #ffffff;
        z-index: 13;
        pointer-events: none;
        filter: drop-shadow(0 -1px 1px rgba(0, 0, 0, 0.06));
    }

    .header-nav .mh-shop-nav > .mh-shop-dropdown {
        left: 0 !important;
        right: auto !important;
        min-width: 270px;
        width: 270px;
        margin-top: 0 !important;
        overflow: visible;
    }

    .header-nav .mh-shop-dropdown > .mh-shop-nav__item {
        position: relative;
        border-bottom: 1px solid #f0f0f0;
    }

    .header-nav .mh-shop-dropdown > .mh-shop-nav__item:last-child {
        border-bottom: 0;
    }

    .header-nav .mh-shop-dropdown__link {
        padding: 15px 18px !important;
        font-size: 15px !important;
        font-weight: 400 !important;
        line-height: 1.4 !important;
        color: #333333 !important;
        transition: background 0.15s ease;
    }

    .header-nav .mh-shop-flyout {
        display: none;
        position: absolute;
        top: 0;
        left: 100%;
        min-width: 230px;
        z-index: 10000;
    }

    .header-nav .mh-shop-flyout::before {
        content: "";
        position: absolute;
        top: 18px;
        left: -8px;
        width: 0;
        height: 0;
        border-top: 8px solid transparent;
        border-bottom: 8px solid transparent;
        border-right: 8px solid #ffffff;
    }

    .header-nav .mh-shop-nav__item--has-sub:hover > .mh-shop-flyout {
        display: block !important;
    }

    .header-nav .mh-shop-flyout > li {
        border-bottom: 1px solid #f0f0f0;
    }

    .header-nav .mh-shop-flyout > li:last-child {
        border-bottom: 0;
    }

    .header-nav .mh-shop-flyout__link {
        padding: 14px 18px !important;
        font-size: 14px !important;
        font-weight: 400 !important;
        transition: background 0.15s ease;
    }
}

/* ── Mobile ── */
@media (max-width: 991px) {
    .header-nav .mh-shop-nav:hover > .mh-shop-nav__trigger::after {
        display: none !important;
        content: none !important;
    }

    .header-nav .mh-shop-nav__trigger {
        justify-content: space-between !important;
        width: 100%;
    }

    .header-nav .mh-shop-nav.open > .mh-shop-nav__trigger .mh-shop-nav__arrow {
        transform: rotate(180deg);
        color: var(--primary);
    }

    .header-nav .mh-shop-dropdown {
        margin: 6px 0 8px !important;
        border: 1px solid #eeeeee !important;
        box-shadow: none !important;
    }

    .header-nav .mh-shop-dropdown__link {
        padding: 12px 16px !important;
        font-size: 14px !important;
        border-bottom: 1px solid #f0f0f0;
    }

    .header-nav .mh-shop-dropdown > .mh-shop-nav__item:last-child .mh-shop-dropdown__link {
        border-bottom: 0;
    }

    .header-nav .mh-shop-nav__item--has-sub.open > .mh-shop-dropdown__link {
        background: #f5f5f5 !important;
    }

    .header-nav .mh-shop-flyout {
        position: static !important;
        display: none !important;
        background: #fafafa !important;
        box-shadow: none !important;
    }

    .header-nav .mh-shop-flyout::before {
        display: none;
    }

    .header-nav .mh-shop-flyout.open {
        display: block !important;
    }

    .header-nav .mh-shop-flyout__link {
        padding: 11px 16px 11px 28px !important;
        font-size: 13px !important;
        color: #555555 !important;
        border-bottom: 1px solid #f0f0f0;
    }

    .mh-mobile-drawer .mh-shop-dropdown,
    .mh-mobile-drawer .mh-shop-flyout {
        border: 0 !important;
        box-shadow: none !important;
        background: transparent !important;
        padding: 0 0 8px !important;
    }

    .mh-mobile-drawer .mh-shop-dropdown.open {
        background: #ffffff !important;
        border: 1px solid #eeeeee !important;
    }

    .mh-mobile-drawer .mh-shop-dropdown__link,
    .mh-mobile-drawer .mh-shop-flyout__link {
        padding: 9px 0 9px 12px !important;
        font-size: 13px !important;
        color: #1a120e !important;
    }

    .mh-mobile-drawer .mh-shop-nav__arrow,
    .mh-mobile-drawer .mh-shop-dropdown__arrow {
        color: #555555 !important;
    }
}

.mh-shop-nav__item--no-sub > .mh-shop-flyout {
    display: none !important;
}
