/* 全局通用导航栏CSS样式 */
.vape-global-header {
    background-color: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    z-index: 999;
    width: 100%;
}

.vape-header-container {
    width: 100%;
    max-width: none;
    height: 70px;
    margin: 0;
    padding: 0 100px;

    display: grid;
    grid-template-columns: 220px minmax(0, 1fr) 220px;
    align-items: center;
    gap: 20px;
    position: relative;
}

/* Logo */
.vape-logo {
    grid-column: 1;
    justify-self: start;
    min-width: 0;
}

.vape-logo a {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    color: #111827;
}

.vape-logo span {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #111827;
}

.vape-logo img {
    display: block;
    max-height: 45px;
    max-width: 80px;
    width: auto;
    object-fit: contain;
}

/* 中间菜单 */
.vape-nav-menu {
    justify-self: center;
    grid-column: 2;
}

.vape-nav-menu .vape-menu-list {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 50px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.vape-nav-menu .vape-menu-list > li {
    position: relative;
}

.vape-nav-menu .vape-menu-list a {
    display: inline-flex;
    align-items: center;
    min-height: 70px;
    text-decoration: none;
    color: #0D0D0D;
    font-family: var(--vape-font-brand);
    font-weight: 700;
    font-size: 16px;
    line-height: 24px;
    letter-spacing: 0;
    transition: color 0.2s ease;
}

.vape-nav-menu .vape-menu-list a:hover {
    color: #8F89FA;
}

.vape-nav-menu .vape-menu-list li.current-menu-item > a,
.vape-nav-menu .vape-menu-list li.current_page_item > a {
    color: #8F89FA;
}

/* 右侧图标 */
.vape-header-actions {
    grid-column: 3;
    justify-self: end;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 24px;
}

.vape-icon-btn {
    width: 24px;
    height: 24px;
    border-radius: 0;
    background: transparent;
    color: #111827;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    line-height: 1;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.vape-icon-btn img {
    width: 24px;
    height: 24px;
    display: block;
    object-fit: contain;
}

.vape-icon-fallback {
    font-size: 13px;
    font-weight: 800;
    color: currentColor;
}

.vape-icon-btn:hover {
    opacity: 0.75;
    transform: translateY(-1px);
}

/* 移动端折叠菜单按钮 */
.vape-mobile-toggle {
    display: none;
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 999px;
    background: #f3f4f6;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
    padding: 0;
}

.vape-mobile-toggle span {
    width: 18px;
    height: 2px;
    background: #111827;
    border-radius: 99px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

/* 桌面端当前页底部指示条 */
@media (min-width: 769px) {
    .vape-nav-menu .vape-menu-list li.current-menu-item > a::after,
    .vape-nav-menu .vape-menu-list li.current_page_item > a::after {
        content: '';
        position: absolute;
        bottom: 25px;
        left: 0;
        width: 100%;
        height: 2px;
        background-color: #2EF0D6;
        border-radius: 2px;
    }
}

/* 移动端 */
@media (max-width: 768px) {
    .vape-header-container {
        height: 64px;
        padding: 0 14px;
        grid-template-columns: 44px minmax(0, 1fr) auto;
        gap: 10px;
        position: relative;
    }

    .vape-mobile-toggle {
        display: inline-flex;
        justify-self: start;
        grid-column: 1;
    }

    .vape-logo {
        grid-column: 2;
        justify-self: center;
        text-align: center;
    }

    .vape-logo span {
        font-size: 21px;
    }

    .vape-logo img {
        max-height: 36px;
        max-width: 140px;
    }

    .vape-header-actions {
        grid-column: 3;
        justify-self: end;
        gap: 6px;
    }

    .vape-icon-btn {
        width: 34px;
        height: 34px;
    }

    .vape-icon-btn img {
        width: 17px;
        height: 17px;
    }

    .vape-nav-menu {
        display: none;
    }

    .vape-nav-menu.is-active {
        display: block;
        position: absolute;
        top: 64px;
        left: 0;
        width: 100%;
        background: #ffffff;
        border-bottom: 1px solid #e5e7eb;
        padding: 12px 14px;
        box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    }

    .vape-nav-menu.is-active .vape-menu-list {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
    }

    .vape-nav-menu.is-active .vape-menu-list a {
        display: block;
        min-height: auto;
        width: 100%;
        padding: 12px 14px;
        border-radius: 10px;
        color: #374151;
        background-color: transparent;
    }

    .vape-nav-menu.is-active .vape-menu-list a:hover,
    .vape-nav-menu.is-active .vape-menu-list li.current-menu-item > a,
    .vape-nav-menu.is-active .vape-menu-list li.current_page_item > a {
        background-color: #f3f4f6;
        color: #0071e3;
    }

    .vape-mobile-toggle.is-active span:nth-child(1) {
        transform: translateY(6px) rotate(45deg);
    }

    .vape-mobile-toggle.is-active span:nth-child(2) {
        opacity: 0;
    }

    .vape-mobile-toggle.is-active span:nth-child(3) {
        transform: translateY(-6px) rotate(-45deg);
    }
}

/* Shop Mega Menu */
.vape-shop-mega {
    position: absolute;
    left: 0;
    top: 70px;
    z-index: 998;
    width: 100%;
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.06);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    pointer-events: none;
    transition: opacity 0.18s ease, visibility 0.18s ease, transform 0.18s ease;
}

.vape-shop-mega.is-active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.vape-shop-mega-inner {
    width: 100%;
    max-width: 1240px;
    min-height: 300px;
    margin: 0 auto;
    padding: 56px 0 48px;
    display: grid;
    grid-template-columns: 220px minmax(0, 786px) 140px;
    gap: 32px;
    align-items: center;
}

.vape-shop-mega-tabs {
    display: grid;
    gap: 28px;
}

.vape-shop-mega-tab {
    width: max-content;
    color: #0d0d0d;
    font-family: var(--vape-font-brand);
    font-size: 18px;
    font-weight: 700;
    line-height: 26px;
    text-decoration: none;
    transition: color 0.18s ease, opacity 0.18s ease;
}

.vape-shop-mega-tab:hover,
.vape-shop-mega-tab:focus,
.vape-shop-mega-tab.is-active {
    color: #2ef0d6;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.vape-shop-mega-panels {
    position: relative;
    min-height: 240px;
}

.vape-shop-mega-panel {
    display: none;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}

.vape-shop-mega-panel.is-active {
    display: grid;
}

.vape-shop-mega-card {
    min-width: 0;
    color: #0d0d0d;
    display: block;
    text-align: center;
    text-decoration: none;
}

.vape-shop-mega-card:hover,
.vape-shop-mega-card:focus {
    color: #0d0d0d;
    text-decoration: none;
}

.vape-shop-mega-card-image {
    width: 100%;
    aspect-ratio: 180 / 240;
    border-radius: 10px;
    overflow: hidden;
    background: #f3f3f5;
    display: block;
}

.vape-shop-mega-card-image img {
    width: 100%;
    height: 100%;
    max-width: none;
    display: block;
    object-fit: cover;
    object-position: center;
    transition: transform 0.22s ease;
}

.vape-shop-mega-card:hover .vape-shop-mega-card-image img {
    transform: scale(1.04);
}

.vape-shop-mega-card-placeholder {
    width: 100%;
    height: 100%;
    color: #6b7280;
    background: #f3f3f5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--vape-font-brand);
    font-size: 12px;
    font-weight: 700;
}

.vape-shop-mega-card-title {
    margin-top: 8px;
    color: #0d0d0d;
    display: block;
    font-family: var(--vape-font-brand);
    font-size: 18px;
    font-weight: 500;
    line-height: 26px;
}

.vape-shop-mega-action {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.vape-shop-mega-view-all {
    min-width: 122px;
    height: 40px;
    padding: 0 16px;
    border-radius: 12px;
    background: #2ef0d6;
    color: #0d0d0d;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-family: var(--vape-font-brand);
    font-size: 16px;
    font-weight: 700;
    line-height: 24px;
    text-decoration: none;
}

.vape-shop-mega-view-all:hover,
.vape-shop-mega-view-all:focus {
    color: #0d0d0d;
    text-decoration: none;
    opacity: 0.9;
}

/* 让 Shop 菜单项在 Mega Menu 打开时保持激活状态 */
.vape-shop-menu-link.is-mega-active {
    color: #0d0d0d;
}

.vape-shop-menu-link.is-mega-active::after {
    content: '';
    position: absolute;
    bottom: 25px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #2EF0D6;
    border-radius: 2px;
}

@media (max-width: 1024px) {
    .vape-shop-mega-inner {
        max-width: 100%;
        padding: 42px 36px;
        grid-template-columns: 180px minmax(0, 1fr) 120px;
        gap: 24px;
    }

    .vape-shop-mega-panel {
        gap: 14px;
    }

    .vape-shop-mega-tab {
        font-size: 16px;
        line-height: 24px;
    }

    .vape-shop-mega-card-title {
        font-size: 16px;
        line-height: 24px;
    }
}

@media (max-width: 768px) {
    .vape-shop-mega {
        display: none;
    }
}

/* Support Dropdown Menu */
.vape-support-dropdown {
    position: absolute;
    top: 70px;
    z-index: 998;

    width: 139px;
    padding-top: 0;

    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);

    pointer-events: none;
    transition: opacity 0.18s ease, visibility 0.18s ease, transform 0.18s ease;
}

.vape-support-dropdown.is-active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.vape-support-dropdown-arrow {
    position: absolute;
    top: -3px;
    left: 30px;

    width: 6px;
    height: 6px;

    background: #a0a0a0;
    transform: rotate(45deg);
}

.vape-support-dropdown-inner {
    position: relative;
    z-index: 2;

    width: 100%;
    min-height: 139px;
    padding: 30px;

    display: grid;
    align-content: center;
    justify-items: start;
    gap: 20px;

    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.12);
}

.vape-support-dropdown-link {
    display: block;

    color: #0d0d0d;
    font-family: var(--vape-font-brand);
    font-size: 16px;
    font-weight: 700;
    line-height: 24px;
    letter-spacing: 0;
    text-align: start;
    text-decoration: none;

    transition: color 0.18s ease, transform 0.18s ease;
}

.vape-support-dropdown-link:hover,
.vape-support-dropdown-link:focus {
    color: #2ef0d6;
    text-decoration: none;
    transform: translateY(-1px);
}

/* Support 菜单项激活状态 */
.vape-support-menu-link.is-support-active {
    color: #0d0d0d;
}

.vape-support-menu-link.is-support-active::after {
    content: '';
    position: absolute;
    bottom: 25px;
    left: 0;

    width: 100%;
    height: 2px;

    background-color: #2ef0d6;
    border-radius: 2px;
}

@media (max-width: 768px) {
    .vape-support-dropdown {
        display: none;
    }
}