/* 顶部通知栏 */
.top-notice {
    background-color: #f5f7fa;
    padding: 8px 0;
    font-size: 14px;
}
.top-notice .container {
    display: flex;
    justify-content: center;
    align-items: center;
}
.top-notice p {
    margin: 0;
    color: #4e5969;
}
.top-notice .more {
    color: #165dff;
    margin-left: 15px;
    font-weight: 500;
}

/* 头部导航 */
.header {
    position: sticky;
    top: 0;
    background-color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    z-index: 999;
}
.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}
.logo img {
    display: block;
}
.nav {
    display: flex;
}
.nav a {
    margin: 0 20px;
    font-size: 16px;
    font-weight: 500;
    color: #4e5969;
    transition: color 0.2s;
}
.nav a:hover, .nav a.active {
    color: #165dff;
}

/* 头部操作区 */
.header-actions {
    display: flex;
    align-items: center;
}
.search-box {
    position: relative;
    margin-right: 20px;
}
.search-input {
    width: 260px;
    padding: 10px 16px;
    padding-right: 40px;
    border: 1px solid #e5e6eb;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s;
}
.search-input:focus {
    outline: none;
    border-color: #165dff;
    box-shadow: 0 0 0 2px rgba(22, 93, 255, 0.1);
}
.search-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #86909c;
    cursor: pointer;
}
.header-icon {
    font-size: 20px;
    color: #4e5969;
    margin-left: 20px;
    cursor: pointer;
    position: relative;
    transition: color 0.2s;
}
.header-icon:hover {
    color: #165dff;
}
.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: #ff4d4f;
    color: white;
    font-size: 12px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 用户菜单 */
.user-menu {
    position: relative;
    display: inline-block;
}
.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: white;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    border-radius: 6px;
    width: 160px;
    padding: 8px 0;
    margin-top: 5px;
    display: none;
    z-index: 1000;
}
.user-dropdown a {
    display: block;
    padding: 8px 16px;
    color: #4e5969;
    font-size: 14px;
    transition: background-color 0.2s;
}
.user-dropdown a:hover {
    background-color: #f5f7fa;
    color: #165dff;
}
.user-menu:hover .user-dropdown {
    display: block;
}

/* 移动端菜单 */
.hamburger {
    display: none;
    font-size: 24px;
    color: #4e5969;
    cursor: pointer;
}
.mobile-menu {
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100vh;
    background-color: white;
    z-index: 1001;
    transition: right 0.3s;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
}
.mobile-menu.active {
    right: 0;
}
.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid #f5f7fa;
}
.close-btn {
    font-size: 24px;
    color: #4e5969;
    cursor: pointer;
}
.mobile-nav {
    padding: 16px;
}
.mobile-nav a {
    display: block;
    padding: 12px 0;
    font-size: 16px;
    color: #4e5969;
    border-bottom: 1px solid #f5f7fa;
}
.mobile-nav a:last-child {
    border-bottom: none;
}
.mobile-search {
    margin: 20px 0;
    position: relative;
}
.mobile-search input {
    width: 100%;
    padding: 12px 16px;
    padding-right: 40px;
    border: 1px solid #e5e6eb;
    border-radius: 6px;
}
.mobile-search button {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #86909c;
}
.mobile-user-links {
    margin-top: 20px;
}
.mobile-user-links a {
    display: flex;
    align-items: center;
    padding: 12px 0;
    color: #4e5969;
}
.mobile-user-links a i {
    margin-right: 10px;
    width: 20px;
}
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: none;
}
.menu-overlay.active {
    display: block;
}

/* 响应式适配 */
@media (max-width: 768px) {
    .top-notice {
        font-size: 12px;
    }
    .nav, .search-box {
        display: none;
    }
    .hamburger {
        display: block;
    }
    .header-inner {
        height: 60px;
    }
    .header-icon {
        margin-left: 15px;
    }
}