/**
 * 现代化珠宝电商首页样式优化
 * 包含通知栏、标题、卡片、页脚等全面优化
 * 创建时间：2026-02-05
 */

/* ========== 全局变量定义 ========== */
:root {
    /* 珠宝品牌色彩系统 */
    --jewelry-gold: #D4AF37;
    --jewelry-gold-light: #F4E4C1;
    --jewelry-gold-dark: #B8860B;
    --jewelry-bronze: #CD7F32;
    --jewelry-copper: #B87333;

    /* 中性色系 */
    --text-primary: #2C2C2C;
    --text-secondary: #666666;
    --text-muted: #999999;
    --bg-primary: #FFFFFF;
    --bg-secondary: #FAFAFA;
    --bg-accent: #F8F6F0;

    /* 阴影系统 */
    --shadow-light: 0 2px 8px rgba(212, 175, 55, 0.1);
    --shadow-medium: 0 4px 16px rgba(212, 175, 55, 0.15);
    --shadow-heavy: 0 8px 32px rgba(212, 175, 55, 0.2);
    --shadow-hover: 0 12px 48px rgba(212, 175, 55, 0.25);

    /* 边框半径 */
    --radius-small: 6px;
    --radius-medium: 12px;
    --radius-large: 20px;

    /* 字体系统 */
    --font-primary: 'Playfair Display', serif;
    --font-secondary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    /* 间距系统 */
    --spacing-xs: 8px;
    --spacing-sm: 16px;
    --spacing-md: 24px;
    --spacing-lg: 32px;
    --spacing-xl: 48px;
    --spacing-xxl: 64px;
}

/* ========== 通知栏现代化优化 ========== */

.notice {
    background: linear-gradient(135deg, var(--jewelry-gold-light) 0%, #FFF8E7 100%);
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 15px;
    padding-left: 20px;
    padding-right: 20px;
    width: 90%;
    border-radius: 12px;
    margin: 12px auto 0;
}

.notice::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

.notic-icon {
    width: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--jewelry-gold-dark);
    font-size: 20px;
    flex-shrink: 0;
    z-index: 1;
}

.notic-icon .iconfont {
    font-size: 36px !important;
    margin: 0 4px;
    transition: transform 0.3s ease;
}

.notic-icon .icon-laba {
    animation: ring 2s infinite;
}

@keyframes ring {
    0%, 100% {
        transform: rotate(0deg);
    }
    10%, 30% {
        transform: rotate(-10deg);
    }
    20% {
        transform: rotate(10deg);
    }
}

.scroll-container {
    flex: 1;
    min-height: 50px;
    height: auto;
    display: flex;
    align-items: center;
    overflow: visible;
    position: relative;
    background: rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-medium);
    padding: 10px var(--spacing-sm);
    z-index: 1;
}

.scroll-content {
    /*color: var(--jewelry-gold-dark);*/
    color: red;
    font-weight: 600;
    font-size: 15px;
    white-space: normal;
    word-wrap: break-word;
    line-height: 1.6;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
    width: 100%;
}

/* 移动端通知栏优化 */
@media (max-width: 768px) {
    .notice {
        padding: var(--spacing-xs) 10px;
        gap: 10px;
    }

    .notic-icon {
        width: 40px;
        font-size: 16px;
    }

    .notic-icon .iconfont {
        font-size: 16px !important;
    }

    .scroll-container {
        min-height: 40px;
        padding: 8px var(--spacing-xs);
    }

    .scroll-content {
        font-size: 13px;
        line-height: 1.5;
    }
}

.scroll-content {
    font-size: 13px;
}

}

/* ========== 栏目标题现代化优化 ========== */

.section-title {
    font-family: var(--font-primary);
    font-size: clamp(24px, 4vw, 36px);
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
    margin: var(--spacing-xl) 0 var(--spacing-lg);
    position: relative;
    letter-spacing: 1px;
}

.section-title::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--jewelry-gold), transparent);
    z-index: -1;
}

.section-title::after {
    content: '◆';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--bg-primary);
    color: var(--jewelry-gold);
    font-size: 16px;
    padding: 0 var(--spacing-sm);
    z-index: 1;
}

/* 栏目标题变体 */
.section-title.style-elegant {
    background: linear-gradient(135deg, var(--jewelry-gold-dark), var(--jewelry-gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-title.style-elegant::before {
    display: none;
}

.section-title.style-elegant::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, var(--jewelry-gold-dark), var(--jewelry-gold));
}

/* 栏目副标题 */
.section-subtitle {
    font-family: var(--font-secondary);
    font-size: clamp(14px, 2.5vw, 16px);
    color: var(--text-secondary);
    text-align: center;
    margin: -var(--spacing-sm) 0 var(--spacing-lg);
    font-style: italic;
    letter-spacing: 0.5px;
}

/* ========== 卡片立体效果优化 ========== */

/* 产品卡片 */
.product-item {
    background: var(--bg-primary);
    border-radius: var(--radius-medium);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;

    /* 珠宝级立体阴影 */
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.12),
    0 2px 6px rgba(0, 0, 0, 0.08),
    0 8px 24px rgba(212, 175, 55, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);

    border: 1px solid rgba(212, 175, 55, 0.1);
}

.product-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg,
    rgba(212, 175, 55, 0.03) 0%,
    rgba(255, 255, 255, 0.05) 50%,
    rgba(212, 175, 55, 0.03) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 1;
}

.product-item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 32px rgba(212, 175, 55, 0.2),
    0 6px 16px rgba(0, 0, 0, 0.12),
    0 20px 48px rgba(212, 175, 55, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
    border-color: rgba(212, 175, 55, 0.3);
}

.product-item:hover::before {
    opacity: 1;
}

/* 产品图片容器 */
.product-item-img {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
}

.product-item-img img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.product-item:hover .product-item-img img {
    transform: scale(1.05);
}

/* 产品编号标签 */
.product-item-no {
    position: absolute;
    top: var(--spacing-xs);
    left: var(--spacing-xs);
    background: rgba(44, 44, 44, 0.9);
    color: white;
    padding: 4px var(--spacing-xs);
    border-radius: var(--radius-small);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    backdrop-filter: blur(10px);
    z-index: 2;
}

/* 产品信息区域 */
.product-item-info {
    padding: var(--spacing-sm);
    position: relative;
    z-index: 2;
}

.info-item-title {
    font-family: var(--font-primary);
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.info-item-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--jewelry-gold-dark);
    margin: var(--spacing-xs) 0;
    text-shadow: 0 1px 2px rgba(212, 175, 55, 0.1);
}

/* 添加购物车按钮 */
.addShopCart {
    background: linear-gradient(135deg, var(--jewelry-gold), var(--jewelry-gold-dark));
    color: white;
    border: none;
    border-radius: var(--radius-small);
    padding: var(--spacing-xs) var(--spacing-sm);
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: var(--shadow-light);
}

.addShopCart:hover {
    background: linear-gradient(135deg, var(--jewelry-gold-dark), var(--jewelry-bronze));
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

/* ========== 促销标签卡片优化 ========== */

.ptag-item {
    background: var(--bg-primary);
    border-radius: var(--radius-medium);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    cursor: pointer;

    /* 立体阴影效果 */
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.15),
    0 3px 8px rgba(0, 0, 0, 0.1),
    0 12px 36px rgba(212, 175, 55, 0.1);

    border: 1px solid rgba(212, 175, 55, 0.12);
}

.ptag-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg,
    rgba(212, 175, 55, 0.05) 0%,
    rgba(255, 255, 255, 0.1) 50%,
    rgba(212, 175, 55, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 1;
}

.ptag-item:hover {
    transform: translateY(-10px) scale(1.03);
    box-shadow: 0 16px 48px rgba(212, 175, 55, 0.25),
    0 8px 20px rgba(0, 0, 0, 0.15),
    0 24px 64px rgba(212, 175, 55, 0.15);
    border-color: rgba(212, 175, 55, 0.25);
}

.ptag-item:hover::before {
    opacity: 1;
}

.ptag-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.ptag-item:hover img {
    transform: scale(1.08);
}

.ptag-item p {
    font-family: var(--font-primary);
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    padding: var(--spacing-sm);
    margin: 0;
    text-align: left;
    position: relative;
    z-index: 2;
    white-space: nowrap; /* 防止文本换行，强制在一行内显示 */
    overflow: hidden; /* 超出容器的部分隐藏 */
    text-overflow: ellipsis;
}

.price-separator {
    padding: var(--spacing-sm);
}

.price-separator .currency-price {
    color: var(--jewelry-gold-dark);
}

.ptag-item a {
    width: 90%;
    background: linear-gradient(135deg, var(--jewelry-gold), var(--jewelry-gold-dark));
    color: white;
    text-decoration: none;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-small);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
    z-index: 2;
    display: inline-block;
    margin: var(--spacing-sm);
}

.ptag-item a:hover {
    background: linear-gradient(135deg, var(--jewelry-gold-dark), var(--jewelry-bronze));
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

/* ========== 分类卡片优化 ========== */

.category-item {
    position: relative;
    border-radius: var(--radius-medium);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    /* 立体阴影 */
    box-shadow: 0 8px 24px rgba(212, 175, 55, 0.18),
    0 4px 12px rgba(0, 0, 0, 0.12),
    0 16px 40px rgba(212, 175, 55, 0.12);
}


.category-item:hover {
    transform: translateY(-12px) scale(1.05);
    box-shadow: 0 20px 60px rgba(212, 175, 55, 0.3),
    0 10px 24px rgba(0, 0, 0, 0.18),
    0 32px 80px rgba(212, 175, 55, 0.2);
}

.category-item:hover::before {
    opacity: 1;
}

.category-item img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.category-item:hover img {
    transform: scale(1.1);
}

.category-header{
    display: flex;
    flex-direction: row;
    align-content: center;
    justify-content: space-around;
}


.category-header span {
    color: white;
    font-family: var(--font-primary);
    font-size: 22px;
    font-weight: 700;
    text-align: center;
    z-index: 3;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    letter-spacing: 1px;
}

/* ========== 页面布局优化 ========== */

/* 主要内容区域 */
main.index {
    background: var(--bg-secondary);
}

/* 栏目区域 */
.classify {
    background: var(--bg-primary);
    padding: var(--spacing-xxl) 0;
    position: relative;
}

.classify::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.3), transparent);
}

/* 产品列表布局 */
.product-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-lg);
    max-width: 1460px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

.ptag-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-lg);
    max-width: 1460px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

.category-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
    max-width: 1460px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

/* ========== 页脚衔接优化 ========== */

/* 页脚过渡区域 */
main.index::after {
    content: '';
    display: block;
    height: 60px;
    background: linear-gradient(to bottom, var(--bg-primary), var(--bg-secondary));
}

/* 页脚样式优化 */
footer#card-footer {
    background: linear-gradient(135deg, #2C2C2C 0%, #1A1A1A 100%);
    color: #FFFFFF;
    position: relative;
    overflow: hidden;
}

footer#card-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--jewelry-gold-dark), var(--jewelry-gold), var(--jewelry-gold-dark));
}

.footer {
    padding: var(--spacing-xxl) 0 var(--spacing-lg);
}

.footer-menu {
    margin-bottom: var(--spacing-xl);
}

.footer_link {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-lg);
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

.footer_link dl {
    margin: 0;
}

.footer_link dt {
    margin-bottom: var(--spacing-sm);
}

.footer_link dt a {
    font-family: var(--font-primary);
    font-size: 18px;
    font-weight: 700;
    color: var(--jewelry-gold);
    text-decoration: none;
    border-bottom: 2px solid var(--jewelry-gold);
    padding-bottom: 4px;
    display: inline-block;
}

.footer_link dd {
    margin: 0 0 var(--spacing-xs) 0;
}

.footer_link dd a {
    color: #CCCCCC;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.footer_link dd a:hover {
    color: var(--jewelry-gold-light);
}

/* 页脚底部 */
.bottom-footer {
    border-top: 1px solid rgba(212, 175, 55, 0.2);
    padding-top: var(--spacing-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
    max-width: 1200px;
    margin: 0 auto;
    padding-left: var(--spacing-sm);
    padding-right: var(--spacing-sm);
}

/* 社交媒体图标 */
.zuui-share-link {
    display: flex;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
}

/*.zuui-share-icon {*/
/*    width: 40px;*/
/*    height: 40px;*/
/*    background: rgba(212, 175, 55, 0.1);*/
/*    border-radius: 50%;*/
/*    display: flex;*/
/*    align-items: center;*/
/*    justify-content: center;*/
/*    transition: all 0.3s ease;*/
/*    border: 1px solid rgba(212, 175, 55, 0.2);*/
/*}*/

.zuui-share-icon:hover {
    background: var(--jewelry-gold);
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.zuui-share-icon svg {
    width: 20px;
    height: 20px;
    fill: #CCCCCC;
    transition: fill 0.3s ease;
}

.zuui-share-icon:hover svg {
    fill: white;
}

/* 版权信息 */
.copyright-text {
    color: #999999;
    font-size: 13px;
    margin: 0;
}

.copyright-text a {
    color: inherit;
    text-decoration: none;
}

/* 货币选择器 */
.currency-wrapper {
    background: rgba(212, 175, 55, 0.1);
    border-radius: var(--radius-small);
    padding: var(--spacing-xs);
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.currency-box {
    background: transparent;
    border: none;
    color: var(--jewelry-gold);
    font-weight: 600;
    cursor: pointer;
    padding: var(--spacing-xs);
}

/* ========== 响应式设计 ========== */

@media (max-width: 768px) {
    :root {
        --spacing-xs: 6px;
        --spacing-sm: 12px;
        --spacing-md: 18px;
        --spacing-lg: 24px;
        --spacing-xl: 32px;
        --spacing-xxl: 40px;
    }

    .product-list,
    .category-list {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-sm);
        padding: 0 var(--spacing-xs);
    }

    .ptag-list {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--spacing-sm);
        padding: 0 var(--spacing-xs);
    }

    .category-item img {
        height: 150px;
    }

    .category-item span {
        font-size: 16px;
        padding: var(--spacing-sm) var(--spacing-xs) var(--spacing-xs);
    }

    .ptag-item img {
        height: 180px;
    }

    .product-item-img img {
        height: 180px;
    }

    .footer_link {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-sm);
    }

    .bottom-footer {
        flex-direction: column;
        text-align: center;
    }

    .section-title {
        margin: var(--spacing-lg) 0 var(--spacing-md);
    }

    .classify {
        padding: var(--spacing-xl) 0;
    }
}

@media (max-width: 480px) {
    .product-list {
        grid-template-columns: 1fr;
    }

    .ptag-list {
        grid-template-columns: repeat(2, 1fr);
    }

    .ptag-item img {
        height: 160px;
    }

    .category-list {
        grid-template-columns: 1fr;
    }

    .footer_link {
        grid-template-columns: 1fr;
    }
}

/* ========== 动画效果 ========== */

/* 页面加载动画 */
.product-item,
.ptag-item,
.category-item {
    animation: fadeInUp 0.6s ease-out;
}

.product-item:nth-child(2) {
    animation-delay: 0.1s;
}

.product-item:nth-child(3) {
    animation-delay: 0.2s;
}

.product-item:nth-child(4) {
    animation-delay: 0.3s;
}

.product-item:nth-child(5) {
    animation-delay: 0.4s;
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 标题动画 */
.section-title {
    animation: titleSlideIn 0.8s ease-out;
}

@keyframes titleSlideIn {
    0% {
        opacity: 0;
        transform: translateY(-20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 悬停时的微动画 */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.product-item:hover .product-item-no {
    animation: pulse 1s infinite;
}

/* ========== 可访问性优化 ========== */

/* 焦点状态 */
.product-item:focus-within,
.ptag-item:focus-within,
.category-item:focus-within {
    outline: 2px solid var(--jewelry-gold);
    outline-offset: 2px;
}

/* 减少动画（用户偏好） */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* 高对比度模式 */
@media (prefers-contrast: high) {
    :root {
        --jewelry-gold: #B8860B;
        --jewelry-gold-dark: #8B6914;
        --text-primary: #000000;
        --text-secondary: #333333;
    }
}

/* ========== 打印样式 ========== */

@media print {
    .notice,
    .addShopCart,
    .zuui-share-link {
        display: none;
    }

    .product-item,
    .ptag-item,
    .category-item {
        box-shadow: none;
        border: 1px solid #ccc;
    }
}
