@charset "utf-8";
/* CSS Document */


/* ===== 带角标的导航项 ===== */
.nav-item-with-badge {
    position: relative;          /* 为绝对定位的角标提供定位基准 */
}

/* ===== 导航"活动"角标（固定在左上角） ===== */
.nav-item-with-badge .nav-badge {
    position: absolute;
    top: -8px;                   /* 距离顶部：负值让角标上浮，可按需调整 */
    left: 0;                     /* 距离左侧：与菜单项左边缘对齐 */
    z-index: 10;
    display: inline-block;
    padding: 0 7px;
    height: 18px;
    line-height: 18px;
    font-size: 11px;
    font-style: normal;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #ff7a45, #ff2d55);
    border-radius: 9px;
    box-shadow: 0 2px 6px rgba(255, 45, 85, .35);
    animation: navBadgePulse 1.8s ease-in-out infinite;
    white-space: nowrap;
    pointer-events: none;        /* 不阻挡菜单项点击 */
}

@keyframes navBadgePulse {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.08); }
}

/* 悬停主菜单项时角标更亮 */
.nav-item-with-badge:hover .nav-badge {
    background: linear-gradient(135deg, #ff2d55, #ff7a45);
    box-shadow: 0 2px 10px rgba(255, 45, 85, .55);
}

@media (max-width: 992px) {
    .nav-item-with-badge .nav-badge {
        top: -6px;
        font-size: 10px;
        height: 16px;
        line-height: 16px;
        padding: 0 6px;
    }
}

/* ===== 右侧搜索框 ===== */
.nav-search {
    display: flex;
    align-items: center;
    position: relative;
    margin-left: 24px;
    flex-shrink: 0;
}

.nav-search-input {
    width: 180px;
    height: 38px;
    padding: 0 42px 0 16px;
    border: 1px solid #dcdfe6;
    border-radius: 20px;
    background: #f5f7fa;
    font-size: 14px;
    color: #333;
    outline: none;
    transition: all .3s ease;
}

.nav-search-input::placeholder {
    color: #a8abb2;
}

.nav-search-input:focus {
    width: 220px;
    background: #fff;
    border-color: #1a73e8;
    box-shadow: 0 0 0 3px rgba(26, 115, 232, .12);
}

.nav-search-btn {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: #909399;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color .3s, background .3s;
}

.nav-search-btn:hover {
    color: #fff;
    background: #1a73e8;
}

@media (max-width: 992px) {
    .nav-search {
        display: none;
    }
}
