/**
 * Header 修复和优化样式
 * 解决：1. Logo颜色优化 2. 滚动穿透问题 3. 顶部通知栏颜色加深
 * 创建时间：2026-02-05
 * 更新时间：2026-02-07
 */

/* ========== 顶部通知栏颜色优化 ========== */

/* yqlink容器背景 - 优雅的浅金色 */
.yqlink {
    background: linear-gradient(135deg, #FFF8E7 0%, #F4E4C1 100%) !important;
    border-bottom: 1px solid rgba(212, 175, 55, 0.3);
    height:40px;
    line-height:40px;
}

/* 顶部通知栏背景 */
.top-notice {
    background: transparent !important; /* 使用yqlink的背景 */
    color: #2C2C2C !important;
    position: relative;
    z-index: 999;
    padding: 10px 0;
}

/* 顶部通知栏布局 - 图标和文字在一排 */
.top-notice {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: wrap !important;
    gap: 15px !important;
}

/* 图标菜单 */
.notice-icon-menu {
    display: flex !important;
    align-items: center !important;
    flex-shrink: 0 !important;
    order: 1 !important;
}

.notice-icon-menu .zuui-share-link {
    display: flex !important;
    gap: 10px !important;
}

/* 通知文字 - 允许换行 */
.top-notice-text {
    flex: 1 1 auto !important;
    display: block !important;
    order: 2 !important;
    max-width: 60% !important;
    line-height: 1.5 !important;
    white-space: normal !important;
    word-wrap: break-word !important;
}

/* 货币选择器 */
.currency-wrapper {
    flex-shrink: 0 !important;
    order: 3 !important;
}

/* 顶部通知栏文字 */
.top-notice-text,
.top-notice-text a {
    color: #2C2C2C !important;
    font-weight: 500;
    font-size: 14px;
}

.top-notice-text a:hover {
    color: #B8860B !important;
}

/* 社交媒体图标 */
.notice-icon-menu .zuui-share-icon {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.notice-icon-menu .zuui-share-icon svg path {
    fill: #4A4A4A !important;
}

.notice-icon-menu .zuui-share-icon:hover svg path {
    fill: #D4AF37 !important;
}

/* 货币选择器在顶部通知栏中的样式 */
.top-notice .currency-wrapper,
.top-notice .currency {
    color: #2C2C2C !important;
}

.top-notice .currency-box {
    background: rgba(212, 175, 55, 0.1) !important;
    border: 1px solid rgba(212, 175, 55, 0.3) !important;
    color: #2C2C2C !important;
}

.top-notice .currency-box:hover {
    background: rgba(212, 175, 55, 0.2) !important;
    border-color: #D4AF37 !important;
}

/* 移动端响应式 */
@media screen and (max-width: 768px) {
    .top-notice {
        flex-direction: row !important;
        align-items: flex-start !important;
        gap: 10px !important;
    }

    .top-notice-text {
        max-width: 100% !important;
        font-size: 12px !important;
        order: 2 !important;
        flex: 1 !important;
    }

    .notice-icon-menu {
        order: 1 !important;
    }

    .currency-wrapper {
        order: 3 !important;
        width: auto !important;
    }
}

/* ========== Logo 颜色优化 ========== */

/* 珠宝电商现代化Logo样式 */
.header_box .header-nav .header-logo-box .header-logo {
    /* 渐变色彩 - 更深邽奢华金色系 */
    background: linear-gradient(135deg, #8B6914 0%, #A0522D 15%, #654321 30%, #4A2C17 45%, #2F1B14 60%, #1A0F0A 80%, #0D0705 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;

    /* 字体优化 */
    font-family: 'Playfair Display', 'Georgia', serif;
    font-weight: 700;
    font-size: 24px;
    letter-spacing: 2px;
    text-transform: uppercase;

    /* 更深的阴影效果 */
    text-shadow: 0 2px 6px rgba(139, 105, 20, 0.4), 0 1px 3px rgba(0, 0, 0, 0.3);

    /* 动画过渡 */
    transition: all 0.3s ease;
    position: relative;
}

/* 悬停效果 */
.header_box .header-nav .header-logo-box .header-logo:hover {
    /* 更深的悬停渐变 */
    background: linear-gradient(135deg, #B8860B 0%, #CD853F 20%, #8B4513 40%, #654321 60%, #4A2C17 80%, #2F1B14 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;

    /* 增强阴影 */
    text-shadow: 0 4px 10px rgba(139, 105, 20, 0.6), 0 2px 5px rgba(0, 0, 0, 0.4);

    /* 轻微放大 */
    transform: scale(1.05);
}

/* 添加装饰性元素 */
.header_box .header-nav .header-logo-box .header-logo::before {
    content: '✦';
    position: absolute;
    left: -25px;
    top: 50%;
    transform: translateY(-50%);
    color: #8B6914; /* 更深的装饰色 */
    font-size: 16px;
    opacity: 0.8;
    animation: sparkle 2s ease-in-out infinite;
}

.header_box .header-nav .header-logo-box .header-logo::after {
    content: '✦';
    position: absolute;
    right: -25px;
    top: 50%;
    transform: translateY(-50%);
    color: #8B6914; /* 更深的装饰色 */
    font-size: 16px;
    opacity: 0.8;
    animation: sparkle 2s ease-in-out infinite reverse;
}

/* 闪烁动画 */
@keyframes sparkle {
    0%, 100% {
        opacity: 0.7;
        transform: translateY(-50%) scale(1);
    }
    50% {
        opacity: 1;
        transform: translateY(-50%) scale(1.2);
    }
}

/* 移动端Logo优化 */
@media screen and (max-width: 767px) {
    .header_box .header-nav .header-logo-box .header-logo {
        font-size: 20px;
        letter-spacing: 1.5px;
    }

    .header_box .header-nav .header-logo-box .header-logo::before,
    .header_box .header-nav .header-logo-box .header-logo::after {
        display: none; /* 移动端隐藏装饰元素 */
    }

    /* 移动端导航样式优化 */
    .header-nav-item .navigation {
        font-size: 13px;
        padding: 10px 6px;
        letter-spacing: 0.6px;
        color: #4A4A4A;
    }

    .header-nav-item .navigation.active {
        color: #B8860B;
    }

    .header-nav-item .navigation:hover {
        color: #C9A96E;
    }

    .header-nav-item .navigation.active::after {
        width: 70%;
        height: 1.5px;
        background: linear-gradient(90deg, #C9A96E 0%, #B8860B 50%, #C9A96E 100%);
    }

    /* 确保移动端active状态不显示额外的下划线 */
    .header-nav-item .navigation.active::before {
        display: none;
    }
}

/* 固定状态下的Logo样式 */
.header_box.header_fixed .header-nav .header-logo-box .header-logo {
    /* 固定时使用更深的颜色 */
    background: linear-gradient(135deg, #8B6914 0%, #A0522D 20%, #654321 40%, #4A2C17 60%, #2F1B14 80%, #1A0F0A 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;

    /* 减少阴影 */
    text-shadow: 0 1px 3px rgba(139, 105, 20, 0.3), 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* ========== 滚动穿透修复 ========== */

/* 确保header有正确的层级 */
.header_box {
    position: relative;
    z-index: 1000;
}

/* 固定header的样式优化 */
.header_box.header_fixed {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;

    /* 添加背景和阴影 */
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);

    /* 平滑过渡 */
    transition: all 0.3s ease;
}

/* 固定header的导航栏 */
.header_box.header_fixed .header-nav {
    position: static; /* 重置position避免双重fixed */
    background: transparent;
    box-shadow: none;
}

/* 为页面内容添加顶部间距，避免被固定header遮挡 */
body.header-fixed-active {
    padding-top: 80px; /* 根据header高度调整 */
}

@media screen and (max-width: 767px) {
    body.header-fixed-active {
        padding-top: 60px; /* 移动端header高度 */
    }
}

/* 确保页面内容不会穿透 */
.content {
    position: relative;
    z-index: 1;
    background: #ffffff;
}

/* 顶部通知栏的z-index */
.top-notice {
    position: relative;
    z-index: 999;
}

/* 搜索弹窗的z-index优化 */
.pop_search-mask {
    z-index: 1100;
}

.pop_search {
    z-index: 1200;
}

/* 移动端菜单的z-index优化 */
.fullscreen-menu {
    z-index: 1300;
}

.fullscreen-menu .fullscreen-mask {
    z-index: 1301;
}

.fullscreen-menu .fullscreen-wrapper {
    z-index: 1302;
}

/* ========== 额外的视觉优化 ========== */

/* 导航链接的现代化样式 - 珠宝电商风格 */
.header-nav-item .navigation {
    position: relative;
    color: #4A4A4A; /* 优雅的深灰色 */
    font-family: 'Helvetica Neue', 'Arial', sans-serif; /* 使用更现代的无衬线字体 */
    font-weight: 500; /* 中等粗细 */
    font-size: 14px;
    letter-spacing: 0.8px; /* 适中的字母间距 */
    text-transform: uppercase; /* 大写字母 */
    text-decoration: none;
    padding: 12px 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-block;
}

/* 悬停效果 */
.header-nav-item .navigation:hover {
    color: #C9A96E; /* 优雅的香槟金色 */
    transform: translateY(-1px);
}

/* Active状态样式 */
.header-nav-item .navigation.active {
    color: #B8860B; /* 深金色，但不会太暗 */
    font-weight: 600; /* 稍微加粗 */
    position: relative;
}

/* Active状态下划线 */
.header-nav-item .navigation.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 2px;
    background: linear-gradient(90deg, #C9A96E 0%, #B8860B 50%, #C9A96E 100%);
    border-radius: 1px;
    animation: activeUnderline 0.3s ease-out;
}

/* 悬停时的下划线效果 - 只对非active元素生效 */
.header-nav-item .navigation:not(.active)::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 1px;
    background: #C9A96E; /* 香槟金色 */
    transition: width 0.3s ease;
}

.header-nav-item .navigation:not(.active):hover::before {
    width: 60%;
}

/* 确保active状态不显示悬停下划线 */
.header-nav-item .navigation.active::before {
    display: none;
}

/* Active下划线动画 */
@keyframes activeUnderline {
    0% {
        width: 0;
        opacity: 0;
    }
    100% {
        width: 80%;
        opacity: 1;
    }
}

/* Active导航项动画 */
@keyframes activeNavigation {
    0% {
        transform: translateY(0);
        color: #4A4A4A;
    }
    50% {
        transform: translateY(-2px);
        color: #C9A96E;
    }
    100% {
        transform: translateY(0);
        color: #B8860B;
    }
}

/* 购物车图标优化 */
.header_box .header-nav .cart-box svg path {
    transition: fill 0.3s ease;
}

.header_box .header-nav .cart-box:hover svg path {
    fill: #C9A96E; /* 使用香槟金色 */
}

/* 搜索图标优化 */
.header_box .header-nav .click-search svg path {
    transition: fill 0.3s ease;
}

.header_box .header-nav .click-search:hover svg path {
    fill: #C9A96E; /* 使用香槟金色 */
}

/* 用户图标优化 */
.header_box .header-nav .member-icon svg path {
    transition: fill 0.3s ease;
}

.header_box .header-nav .member-icon:hover svg path {
    fill: #C9A96E; /* 使用香槟金色 */
}

/* 货币选择器优化 */
#currency-select {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 5px 10px;
    background: white;
    color: #4A4A4A; /* 与导航文字颜色一致 */
    font-size: 14px;
    transition: all 0.3s ease;
}

#currency-select:hover,
#currency-select:focus {
    border-color: #C9A96E; /* 使用香槟金色 */
    outline: none;
    box-shadow: 0 0 5px rgba(201, 169, 110, 0.3); /* 香槟金色阴影 */
}

/* ========== 响应式优化 ========== */

/* 平板设备 */
@media screen and (min-width: 768px) and (max-width: 1024px) {
    .header_box .header-nav .header-logo-box .header-logo {
        font-size: 22px;
        letter-spacing: 1.8px;
    }
}

/* 大屏设备 */
@media screen and (min-width: 1200px) {
    .header_box .header-nav .header-logo-box .header-logo {
        font-size: 26px;
        letter-spacing: 2.5px;
    }
}

/* ========== 加载动画 ========== */

/* Logo加载动画 */
@keyframes logoFadeIn {
    0% {
        opacity: 0;
        transform: translateY(-10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.header_box .header-nav .header-logo-box .header-logo {
    animation: logoFadeIn 0.8s ease-out;
}

/* ========== 可访问性优化 ========== */

/* 高对比度模式支持 */
@media (prefers-contrast: high) {
    .header_box .header-nav .header-logo-box .header-logo {
        background: #000000;
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        text-shadow: none;
    }
}

/* 减少动画模式支持 */
@media (prefers-reduced-motion: reduce) {
    .header_box .header-nav .header-logo-box .header-logo,
    .header_box .header-nav .header-logo-box .header-logo::before,
    .header_box .header-nav .header-logo-box .header-logo::after,
    .header-nav-item .navigation,
    .header_box .header-nav .cart-box svg path,
    .header_box .header-nav .click-search svg path,
    .header_box .header-nav .member-icon svg path,
    #currency-select {
        animation: none;
        transition: none;
    }
}
