/* ================================================================
   global.css — 前台全局共享样式 (浅色主题 NEW-LIGHT)
   主色: var(--brand) | 背景: #ffffff | 深色区块: var(--brand-darker)
   品牌字体: Inter
   ================================================================ */

/* ================================================================
   品牌色 Design Tokens（全站唯一色源，改色只需改这里）
   主色: 蓝绿 teal | 辅色: 金 + 蓝
   ================================================================ */
:root {
    /* —— 主色：蓝绿（唯一色源，改色只改这里） —— */
    --brand:         #0D9488;   /* 主色 */
    --brand-rgb:     13, 148, 136;
    --brand-dark:    #0F766E;   /* 深端（渐变/hover） */
    --brand-darker:  #062D2A;   /* 深色区块 / 页脚底 */
    /* 蓝绿浅色阶 */
    --brand-50:      #F0FDFA;   /* 最浅底 */
    --brand-100:     #CCFBF1;   /* 浅底 */
    --brand-200:     #99F6E4;   /* 浅边框 */
    --brand-300:     #5EEAD4;   /* 次浅 */

    /* —— 辅色 —— */
    --color-accent:      #D4A853;      /* 金 */
    --color-accent-rgb:  212, 168, 83;
    --color-secondary:     #2563EB;    /* 蓝 */
    --color-secondary-rgb: 37, 99, 235;

    /* —— 语义色 —— */
    --color-danger: #FF3366;

    /* —— 兼容别名（旧代码引用） —— */
    --primary-color: var(--brand);
    --primary-dark:  var(--brand-dark);
    --color-primary: var(--brand);
}

/* ===== 基础 & 布局 ===== */
body {
    font-family: 'Inter', sans-serif;
    background-color: #ffffff;
    color: #1A2B3C;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

h1, h2, h3, h4, h5, h6 {
    color: #1A2B3C;
}

/* 页脚深色背景区域 - 标题修正为白色（修复全局 h1-h6 规则导致的标题看不清问题） */
footer h3,
footer h4,
footer .footer-menu-group h3 {
    color: #ffffff;
}

/* 页脚子链接文字提亮（原 text-gray-400 在深色背景上不清晰） */
footer .text-gray-400 {
    color: rgba(255, 255, 255, 0.75);
}
footer .text-gray-400:hover {
    color: var(--brand);
}

/* 页脚 SNS 社交图标 - 深色适配（替代亮底 glass-card） */
.footer-sns-icon {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    transition: all 0.3s ease;
}
.footer-sns-icon:hover {
    background: var(--brand);
    border-color: var(--brand);
    color: #ffffff;
}

/* ===== NEW-LIGHT 品牌色工具类 ===== */
.text-brand-blue { color: var(--brand); }
.bg-brand-blue { background-color: var(--brand); }
.border-brand-blue { border-color: var(--brand); }

/* ===== 背景覆盖 ===== */
.bg-white { background-color: #ffffff; }
.bg-gradient-dark { background-color: #ffffff; }
.bg-black { background-color: #ffffff; }

/* 覆盖 Tailwind 灰色文本 */
.text-gray-400 { color: #90A4AE; }
.text-gray-500 { color: #78909C; }

/* Latest News 卡片 hover 时箭头变白色（覆盖 text-gray-400 !important） */
.group:hover .group-hover\:text-white {
    color: #ffffff;
}

/* ===== 深色主题残留强制覆盖 ===== */
[class*="bg-white/5"],
[class*="bg-white\/5"] { background-color: var(--brand-50); }
[class*="bg-white/10"],
[class*="bg-white\/10"] { background-color: var(--brand-100); }
[class*="bg-black/80"],
[class*="bg-black\/80"],
[class*="bg-black/95"],
[class*="bg-black\/95"] { background-color: #ffffff; }

/* 白色半透明边框 -> 浅灰色边框 */
[class*="border-white/10"],
[class*="border-white\/10"] { border-color: var(--brand-200); }
[class*="border-white/20"],
[class*="border-white\/20"] { border-color: var(--brand-300); }

/* 深蓝/蓝色按钮 -> 青色按钮 */
.bg-blue-600 { background: linear-gradient(135deg, var(--brand), var(--brand-dark)); }
.bg-blue-500 { background: var(--brand); }
.bg-blue-700,
.bg-blue-800,
.bg-gray-900 { background-color: var(--brand-darker); }

/* placeholder 颜色修复 */
input::placeholder,
textarea::placeholder { color: #9CA3AF; }
.placeholder-gray-600::placeholder { color: #9CA3AF; }

/* section 级别 bg-black 强制覆盖 */
section.bg-black,
[class*="bg-[#050505]"],
[class*="bg-[#0A0A0A]"] { background-color: var(--brand-50); }

/* NEW-LIGHT 深色区块 (var(--brand-darker)) 保留不动，不覆盖 */

/* ===== Tailwind 语义类覆盖 - 浅色主题 ===== */
.bg-gray-900 { background-color: var(--brand-50); }
.text-black { color: #1A2B3C; }

/* ===== Glass Card - 浅色主题 ===== */
.glass-card {
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(var(--brand-rgb),0.15);
    transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
}
.glass-card:hover {
    background: rgba(255,255,255,0.95);
    border-color: rgba(var(--brand-rgb),0.4);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(var(--brand-rgb),0.15);
}
.glass-card-enhanced {
    position: relative;
    overflow: hidden;
}
.glass-card-enhanced::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(var(--color-accent-rgb, 212,168,83),0.06), transparent);
    transition: left 0.6s ease;
    pointer-events: none;
    z-index: 1;
}
.glass-card-enhanced:hover::before {
    left: 100%;
}

/* ===== Glass Card - 静态（无悬停抬升，用于内容展示区） ===== */
.glass-card-static {
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(var(--brand-rgb),0.1);
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.glass-card-static:hover {
    border-color: rgba(var(--brand-rgb),0.2);
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

/* ===== 产品详情页骨架卡片 ===== */
.pd-card {
    background: #fff;
    border: 1px solid #eef2f5;
    border-radius: 1.25rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    transition: box-shadow 0.3s ease;
}
.pd-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}

/* ===== 精致标签（用于产品角标） ===== */
.pd-badge-sale {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    color: #ef4444;
    background: rgba(239,68,68,0.08);
}

/* ===== Glow Button - 浅色主题 ===== */
.glow-button {
    transition: all 0.3s ease;
    box-shadow: 0 0 15px rgba(var(--brand-rgb),0.3);
    animation: pulseGlow 2s infinite;
}
.glow-button:hover {
    box-shadow: 0 0 25px rgba(var(--brand-rgb),0.5);
    transform: scale(1.02);
}

/* ===== Discount Tag ===== */
.discount-tag {
    background: linear-gradient(135deg, var(--color-danger, #FF3366), #FF0044);
}

/* ===== 全局商品角标 ===== */
.product-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    line-height: 1;
    vertical-align: middle;
}
.product-badge-new { background: linear-gradient(135deg, #00ab55 0%, #008f47 100%); box-shadow: 0 2px 8px rgba(0,171,85,0.5); }
.product-badge-hot { background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%); box-shadow: 0 2px 8px rgba(239,68,68,0.5); }
.product-badge-sale { background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%); box-shadow: 0 2px 8px rgba(245,158,11,0.5); }
.product-badge-best { background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%); box-shadow: 0 2px 8px rgba(59,130,246,0.5); }
.product-badge-discount { background: linear-gradient(135deg, #e7515a 0%, #d2363b 100%); box-shadow: 0 2px 8px rgba(231,81,90,0.5); }
.product-badge-default { background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%); box-shadow: 0 2px 8px rgba(99,102,241,0.5); }

/* ===== 旧版角标（兼容 homepage / products/index 等） ===== */
.badge-new { background: linear-gradient(135deg, #00ab55 0%, #008f47 100%); }
.badge-hot { background: linear-gradient(135deg, #e7515a 0%, #d2363b 100%); }
.badge-sale { background: linear-gradient(135deg, #e2a03f 0%, #c98a2e 100%); }
.badge-best { background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%); }
.badge-10percent, .badge-20percent, .badge-30percent, .badge-50percent {
    background: linear-gradient(135deg, #e7515a 0%, #d2363b 100%);
}
.badge-default { background: linear-gradient(135deg, #4361ee 0%, #3b51de 100%); }

/* ===== 全局商品标签 ===== */
.product-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.product-tag {
    display: inline-block;
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 500;
    color: #93c5fd;
    background: rgba(59,130,246,0.20);
    border: 1px solid rgba(96,165,250,0.35);
    border-radius: 4px;
    line-height: 1.4;
}

/* ===== 自定义滚动条 - 浅色主题 ===== */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--brand-100); }
::-webkit-scrollbar-thumb { background: var(--brand-300); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--brand); }

/* ===== Reveal 滚动淡入动画 ===== */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition-property: opacity, transform;
    transition-duration: 0.6s, 0.6s;
    transition-timing-function: ease-out, ease-out;
    will-change: transform, opacity;
}
.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ===== Text Gradient - 浅色主题 ===== */
.text-gradient-blue {
    background: linear-gradient(135deg, var(--brand), var(--color-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.text-gradient-cyan {
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ===== pulseGlow 动画（全局唯一）- 浅色主题 ===== */
@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 15px rgba(var(--brand-rgb),0.3); }
    50% { box-shadow: 0 0 35px rgba(var(--brand-rgb),0.5), 0 0 60px rgba(var(--brand-rgb),0.15); }
}

/* ===== Pagination 分页 - 浅色主题 ===== */
ul.pagination {
    display: flex;
    align-items: center;
    gap: 6px;
    list-style: none;
    padding: 0;
    margin: 0;
}
ul.pagination li { display: inline-flex; }
ul.pagination li > a,
ul.pagination li > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    color: #546E7A;
    background: #ffffff;
    border: 1px solid var(--brand-200);
    text-decoration: none;
    transition: all 0.2s ease;
}
ul.pagination li > a:hover {
    border-color: var(--brand);
    color: var(--brand);
    background: var(--brand-50);
}
ul.pagination li.active > span,
ul.pagination li.active > a {
    background: var(--brand);
    color: #fff;
    border-color: var(--brand);
    font-weight: 700;
}
ul.pagination li.disabled > span,
ul.pagination li.disabled > a {
    color: var(--brand-300);
    border-color: #E8EEEF;
    background: transparent;
    cursor: not-allowed;
}

/* ===== 轮播图组件 (slider.twig) - 浅色主题 ===== */
.pb-slider {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}
.pb-slider-slide img {
    pointer-events: none;
}
.pb-slider-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 40px;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.75) 0%,
        rgba(0, 0, 0, 0.4) 40%,
        rgba(0, 0, 0, 0.2) 70%,
        rgba(0, 0, 0, 0.3) 100%
    );
    color: #fff;
    z-index: 1;
}
.pb-slider-content-inner {
    max-width: 800px;
    text-align: center;
}
@keyframes pbSliderFadeUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
.pb-slider-animate {
    animation: pbSliderFadeUp 0.8s ease-out forwards;
}
.pb-slider-content-inner h1,
.pb-slider-content-inner h2,
.pb-slider-content-inner h3,
.pb-slider-content-inner h4,
.pb-slider-content-inner h5,
.pb-slider-content-inner h6 {
    color: #ffffff;
    margin: 0 0 20px 0;
    font-weight: 700;
    line-height: 1.15;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
    letter-spacing: -0.02em;
}
.pb-slider-content-inner h1 { font-size: 3.5rem; margin-bottom: 24px; }
.pb-slider-content-inner h2 { font-size: 2.8rem; margin-bottom: 20px; }
.pb-slider-content-inner h3 {
    font-size: 1.2rem; font-weight: 500; text-transform: uppercase;
    letter-spacing: 0.15em; opacity: 0.9; margin-bottom: 12px;
}
.pb-slider-content-inner h4 { font-size: 1.4rem; }
.pb-slider-content-inner h5 { font-size: 1.2rem; }
.pb-slider-content-inner h6 { font-size: 1rem; }
.pb-slider-content-inner p {
    color: rgba(255, 255, 255, 0.9);
    margin: 0 auto 28px auto;
    line-height: 1.8;
    font-size: 1.15rem;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.4);
    max-width: 600px;
}
.pb-slider-content-inner a {
    color: #fff;
    text-decoration: none;
    transition: all 0.3s ease;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
    padding-bottom: 2px;
}
.pb-slider-content-inner a:hover {
    color: #fff;
    border-bottom-color: #fff;
}
.pb-slider-content-inner > a,
.pb-slider-content-inner > p > a:only-child,
.pb-slider-content-inner a.btn,
.pb-slider-content-inner a.button,
.pb-slider-content-inner .btn,
.pb-slider-content-inner a[class*="btn"] {
    display: inline-block;
    padding: 14px 40px;
    background: linear-gradient(135deg, var(--brand), var(--brand-dark));
    color: #fff;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border: none;
    border-bottom: none;
    padding-bottom: 14px;
    transition: all 0.3s;
    box-shadow: 0 4px 20px rgba(var(--brand-rgb),0.4);
    margin-top: 12px;
}
.pb-slider-content-inner > a:hover,
.pb-slider-content-inner > p > a:only-child:hover,
.pb-slider-content-inner a.btn:hover,
.pb-slider-content-inner a.button:hover,
.pb-slider-content-inner .btn:hover,
.pb-slider-content-inner a[class*="btn"]:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(var(--brand-rgb),0.5);
}
.pb-slider-content-inner ul,
.pb-slider-content-inner ol {
    margin: 0 0 16px 0;
    padding-left: 20px;
    text-align: left;
    display: inline-block;
}
.pb-slider-content-inner li {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 8px;
    line-height: 1.6;
}
.pb-slider-content-inner strong,
.pb-slider-content-inner b { color: #ffffff; font-weight: 700; }
.pb-slider-content-inner em,
.pb-slider-content-inner i { font-style: italic; }

@media (max-width: 1024px) {
    .pb-slider-content { padding: 50px 30px; }
    .pb-slider-content-inner h1 { font-size: 2.8rem; }
    .pb-slider-content-inner h2 { font-size: 2.2rem; }
}
@media (max-width: 768px) {
    .pb-slider-content { padding: 40px 24px; }
    .pb-slider-content-inner h1 { font-size: 2.2rem; }
    .pb-slider-content-inner h2 { font-size: 1.8rem; }
    .pb-slider-content-inner h3 { font-size: 1rem; }
    .pb-slider-content-inner p { font-size: 1rem; }
    .pb-slider-content-inner > a,
    .pb-slider-content-inner > p > a:only-child,
    .pb-slider-content-inner a.btn,
    .pb-slider-content-inner a.button,
    .pb-slider-content-inner .btn,
    .pb-slider-content-inner a[class*="btn"] {
        padding: 12px 32px;
        font-size: 0.9rem;
    }
}
@media (max-width: 480px) {
    .pb-slider-content { padding: 30px 16px; }
    .pb-slider-content-inner h1 { font-size: 1.8rem; }
    .pb-slider-content-inner h2 { font-size: 1.5rem; }
    .pb-slider-content-inner h3 { font-size: 0.85rem; }
    .pb-slider-content-inner p { font-size: 0.9rem; }
}

/* ===== 评价组件 (testimonials.twig) ===== */
.testimonials-swiper-wrapper::-webkit-scrollbar { height: 6px; }
.testimonials-swiper-wrapper::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}
.testimonials-swiper-wrapper::-webkit-scrollbar-thumb {
    background: rgba(var(--color-secondary-rgb, 59,130,246),0.5);
    border-radius: 3px;
    transition: background 0.3s;
}
.testimonials-swiper-wrapper::-webkit-scrollbar-thumb:hover {
    background: rgba(var(--color-secondary-rgb, 59,130,246),0.8);
}
@media (max-width: 768px) {
    .testimonial-card {
        width: calc(100% - 0px) !important;
        min-width: 280px !important;
    }
}
@media (min-width: 769px) and (max-width: 1024px) {
    .testimonial-card {
        width: calc(50% - 12px) !important;
        min-width: 280px !important;
    }
}

/* ===== 商品列表组件 (products.twig) 响应式 ===== */
@media (max-width: 1024px) {
    section[style*="grid-template-columns:repeat(4"] > div,
    section[style*="grid-template-columns:repeat(5"] > div,
    section[style*="grid-template-columns:repeat(6"] > div {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}
@media (max-width: 768px) {
    section[style*="grid-template-columns"] > div {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}
@media (max-width: 480px) {
    section[style*="grid-template-columns"] > div {
        grid-template-columns: 1fr !important;
    }
}

/* ===== 导航菜单链接 - 浅色主题 ===== */
.mobile-link {
    color: #1A2B3C;
    font-weight: 300;
    transition: color 0.3s ease;
}
.mobile-link:hover {
    color: var(--brand);
}

/* 主导航菜单项 */
#navbar a:not(.logo):not([class*="btn"]):not(.relative) {
    transition: color 0.3s ease;
}
#navbar a:not(.logo):not([class*="btn"]):not(.relative):hover {
    color: var(--brand);
}

/* nav-link-reset 样式 */
.nav-link-reset {
    color: inherit;
    text-decoration: none;
}
