/* 头部专用样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.container-fluid {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 头部样式 */
.top-header {
    background: linear-gradient(135deg, #1a1d3a 0%, #2d3561 100%);
    color: white;
    padding: 12px 0;
    position: relative;
}

.logo-section {
    display: flex;
    align-items: center;
}

.logo-section a {
    display: block;
    line-height: 0; /* 移除链接的默认行高 */
}

.logo-img {
    height: 45px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
}

/* 图标样式 */
.support-icon, .shipping-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.categories-icon {
    width: 16px;
    height: 16px;
    margin-right: 8px;
    object-fit: contain;
}

.user-icon {
    width: 18px;
    height: 18px;
    object-fit: contain;
}

.cart-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
    margin-right: 0;
    filter: brightness(0) invert(1);
}

.search-icon {
    width: 18px;
    height: 18px;
    object-fit: contain;
}

.btn-icon {
    width: 18px;
    height: 18px;
    object-fit: contain;
    margin-right: 8px;
    vertical-align: middle;
}

/* 搜索框样式 */
.search-section {
    padding: 0 20px;
}

.search-form .input-group {
    border-radius: 25px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.search-input {
    border: none;
    padding: 12px 20px;
    font-size: 14px;
    background: white;
}

.search-input:focus {
    box-shadow: none;
    border-color: transparent;
}

.search-btn {
    background: #4285f4;
    border: none;
    padding: 12px 20px;
    color: white;
    transition: all 0.3s ease;
}

.search-btn:hover {
    background: #3367d6;
    color: white;
}

/* 顶部信息样式 */
.top-info {
    display: flex;
    justify-content: flex-end;
    gap: 30px;
    align-items: center;
}

.support-info, .shipping-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.support-text, .shipping-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.support-label, .shipping-label {
    font-size: 12px;
    color: #b0b3c7;
    font-weight: 500;
}

.support-number, .shipping-detail {
    font-size: 14px;
    font-weight: 600;
    color: white;
}

/* 主导航样式 */
.main-nav {
    background: #f8f9fa;
    padding: 15px 0;
    border-bottom: 1px solid #e9ecef;
}

.categories-menu .btn-categories {
    background: #4285f4;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
}

.categories-menu .btn-categories:hover {
    background: #3367d6;
    color: white;
}

.categories-dropdown {
    min-width: 250px;
    padding: 10px 0;
}

.categories-dropdown .dropdown-item {
    padding: 12px 20px;
    color: #333;
    transition: all 0.3s ease;
}

.categories-dropdown .dropdown-item:hover {
    background: #f8f9fa;
    color: #4285f4;
}

/* 用户下拉菜单样式 */
.user-menu .dropdown-menu {
    min-width: 180px;
    padding: 8px 0;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin-top: 8px;
}

.user-menu .dropdown-item {
    padding: 10px 16px;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 14px;
}

.user-menu .dropdown-item:hover {
    background: #f8f9fa;
    color: #4285f4;
}

.user-menu .dropdown-divider {
    margin: 6px 0;
    border-color: #e9ecef;
}

/* 确保下拉菜单在hover时显示 */
.user-menu .dropdown:hover .dropdown-menu {
    display: block;
}

/* 下拉箭头样式 */
.user-menu .dropdown-toggle::after {
    margin-left: 6px;
    border-top: 4px solid #666;
    border-right: 4px solid transparent;
    border-left: 4px solid transparent;
    transition: all 0.3s ease;
}

.user-menu .dropdown:hover .dropdown-toggle::after {
    border-top-color: #4285f4;
    transform: rotate(180deg);
}

/* 主导航菜单 */
.main-navigation .nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
    margin: 0;
    padding: 0;
    justify-content: center;
}

.main-navigation .nav-link {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    padding: 10px 0;
    transition: all 0.3s ease;
    position: relative;
}

.main-navigation .nav-link:hover {
    color: #4285f4;
}

.main-navigation .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #4285f4;
    transition: width 0.3s ease;
}

.main-navigation .nav-link:hover::after {
    width: 100%;
}

/* 用户操作区域 */
.user-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 20px;
}

.cart-menu {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-link, .cart-link {
    color: #333;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.user-link:hover, .cart-link:hover {
    color: #4285f4;
    background: #f8f9fa;
}

.cart-link {
    position: relative;
    font-weight: 500;
    background: #4285f4;
    color: white;
    padding: 8px;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(66, 133, 244, 0.3);
    transition: all 0.3s ease;
}

.cart-link:hover {
    color: white;
    background: #3367d6;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(66, 133, 244, 0.4);
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff4757;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 11px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    border: 2px solid #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.cart-total-display {
    margin-left: 10px;
    display: flex;
    align-items: center;
}

.cart-total {
    font-weight: 600;
    color: #4285f4;
    font-size: 14px;
    white-space: nowrap;
}



/* 移动端头部样式 */
.mobile-header {
    display: none;
    background: #000;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1002;
    width: 100%;
}

.mobile-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    height: 60px;
}

.mobile-menu-btn {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
}

.hamburger-line {
    width: 20px;
    height: 2px;
    background: white;
    transition: all 0.3s ease;
}

.mobile-logo {
    flex: 1;
    text-align: center;
    margin-left: 20px;
}

.mobile-logo a {
    display: inline-block;
    line-height: 0; /* 移除链接的默认行高 */
}

.mobile-logo-img {
    height: 35px;
    width: auto;
    max-width: 120px;
}

.mobile-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.mobile-search-btn, .mobile-cart-btn, .mobile-user-btn {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    text-decoration: none;
    position: relative;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-search-icon, .mobile-cart-icon, .mobile-user-icon {
    width: 20px;
    height: 20px;
    filter: brightness(0) invert(1);
}

.mobile-cart-count {
    position: absolute;
    top: -2px;
    right: -2px;
    background: #ff4757;
    color: white;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    font-size: 10px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* 移动端搜索栏 */
.mobile-search-bar {
    background: #f8f9fa;
    padding: 0 15px;
    height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative; /* 恢复为relative */
    pointer-events: none; /* 默认不接收点击事件 */
}

.mobile-search-bar.show {
    height: 60px;
    padding: 10px 15px;
    pointer-events: auto; /* 展开时允许点击事件 */
}

.mobile-search-form {
    display: flex;
    align-items: center;
    background: white;
    border-radius: 25px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.mobile-search-input {
    flex: 1;
    border: none;
    padding: 12px 20px;
    font-size: 14px;
    outline: none;
}

.mobile-search-submit {
    background: #4285f4;
    border: none;
    padding: 12px 15px;
    cursor: pointer;
}

.mobile-search-submit-icon {
    width: 18px;
    height: 18px;
    filter: brightness(0) invert(1);
}

/* 移动端菜单覆盖层 */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none; /* 隐藏时不接收点击事件 */
}

.mobile-menu-overlay.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto; /* 显示时允许点击事件 */
}

.mobile-menu-content {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 85%;
    max-width: 320px;
    background: white;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.mobile-menu-overlay.show .mobile-menu-content {
    transform: translateX(0);
}

.mobile-menu-header {
    background: #000;
    color: white;
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mobile-menu-tabs {
    display: flex;
    gap: 20px;
}

.mobile-tab-btn {
    background: none;
    border: none;
    color: #999;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    padding: 8px 0;
    position: relative;
    transition: color 0.3s ease;
}

.mobile-tab-btn.active {
    color: white;
}

.mobile-tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: white;
}

.mobile-menu-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
    line-height: 1;
}

.mobile-menu-body {
    flex: 1;
    overflow-y: auto;
}

.mobile-tab-content {
    display: none;
    padding: 20px 0;
}

.mobile-tab-content.active {
    display: block;
}

/* 移动端分类列表 */
.mobile-categories-list, .mobile-menu-list {
    padding: 0;
}

.mobile-category-item, .mobile-menu-item {
    display: block;
    padding: 15px 20px;
    text-decoration: none;
    color: #333;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s ease;
}

.mobile-category-item:hover, .mobile-menu-item:hover {
    background: #f8f9fa;
    text-decoration: none;
    color: #333;
}

.mobile-category-content, .mobile-menu-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mobile-category-name, .mobile-menu-name {
    font-size: 16px;
    font-weight: 500;
}

.mobile-category-arrow, .mobile-menu-arrow {
    color: #999;
    font-size: 18px;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .desktop-header {
        display: none;
    }
    
    .mobile-header {
        display: block;
    }
    
    .main-nav {
        display: none;
    }
    
    /* 为fixed header添加body padding，避免内容被覆盖 */
    body {
        padding-top: 60px !important;
    }
    
    /* 当搜索栏展开时，增加额外的padding */
    body.search-open {
        padding-top: 120px !important;
    }
}

 