/* ========== 全局重置与变量 ========== */
:root {
    --primary-color: #4361ee;
    --secondary-color: #3f37c9;
    --accent-color: #4cc9f0;
    --light-accent: #a9d6e5;
    --dark-bg: #1b263b;
    --light-bg: #f8f9fa;
    --card-bg: #ffffff;
    --text-primary: #2d3748;
    --text-secondary: #4a5568;
    --border-radius: 16px;
    --box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --box-shadow-hover: 0 20px 40px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans SC', 'Microsoft YaHei', system-ui, -apple-system, sans-serif;
    line-height: 1.7;
    color: var(--text-primary);
    background: linear-gradient(135deg, #f0f9ff 0%, #e6f4ff 100%);
    position: relative;
    overflow-x: hidden;
}

/* ========== 粘性页脚布局核心 ========== */
.page-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* ========== 装饰背景 ========== */
body::before,
body::after {
    content: '';
    position: absolute;
    z-index: 0;
}

body::before {
    top: -100px;
    right: -100px;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--accent-color) 0%, transparent 70%);
    opacity: 0.1;
}

body::after {
    bottom: -150px;
    left: -150px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--primary-color) 0%, transparent 70%);
    opacity: 0.08;
}

/* ========== 头部 ========== */
header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
    z-index: 1;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.company-info {
    max-width: 1400px; /* ← 扩大头部最大宽度 */
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 2;
}

h1 {
    font-size: 3.5rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    background: linear-gradient(to right, #ffffff, #e0f0ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

h6 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-shadow: 0 2px 11px rgba(0, 0, 0, 0.2);
    background: linear-gradient(to right, #ffffff, #e0f0ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.intro {
    font-size: 1.4rem;
    max-width: 1000px; /* ← 稍微放宽介绍文本宽度 */
    margin: 0 auto;
    opacity: 0.95;
    line-height: 1.8;
    font-weight: 300;
}

/* ========== 主体内容 —— 关键：扩大容器宽度 ========== */
main {
    max-width: 1400px; /* ← 从 1200px 改为 1400px */
    margin: 3rem auto;
    padding: 0 2rem;
    position: relative;
    z-index: 2;
}

section {
    margin-bottom: 4rem;
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 3rem;
    box-shadow: var(--box-shadow);
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

section:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow-hover);
}

section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
}

h2 {
    color: var(--primary-color);
    font-size: 2.6rem; /* ← 稍微加大标题 */
    margin-bottom: 2rem;
    text-align: center;
    font-weight: 700;
    position: relative;
    padding-bottom: 1.2rem;
}

h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
    border-radius: 2px;
}

section p {
    color: var(--text-secondary);
    font-size: 1.15rem; /* ← 字号略微增大 */
    line-height: 1.8;
    text-align: center;
    max-width: 900px; /* ← 宽度从 800px → 900px */
    margin: 0 auto;
}

/* ========== 产品网格 ========== */
.products-grid {
    display: grid;
    gap: 2.5rem;
    margin-top: 2rem;
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.product-card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 2.5rem;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(67, 97, 238, 0.1);
    text-align: center;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s ease;
}

.product-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: var(--box-shadow-hover);
}

.product-card:hover::before {
    transform: scaleX(1);
}

.product-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    display: block;
    transition: var(--transition);
}

.product-card:hover .product-icon {
    transform: scale(1.2) rotate(10deg);
}

.product-card h3 {
    color: var(--secondary-color);
    font-size: 1.6rem; /* ← 标题稍大 */
    margin-bottom: 1.2rem;
    font-weight: 600;
    position: relative;
    display: inline-block;
}

.product-card h3::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 3px;
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
    border-radius: 2px;
}

.product-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.7;
    font-size: 1.05rem; /* ← 产品描述字号略增 */
}

.product-price {
    font-size: 1.35rem; /* ← 价格稍大 */
    font-weight: 700;
    color: var(--primary-color);
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    display: inline-block;
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    transition: var(--transition);
    border: 2px solid transparent;
}

.product-card:hover .product-price {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    transform: scale(1.1);
    border-color: var(--light-accent);
}

/* ========== 页脚：增大字体 + 优化间距 ========== */
footer {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    text-align: center;
    padding: 2.5rem 0;
    margin-top: auto;
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(255,255,255,0.3), transparent);
}

/* ← 关键修改：页脚文字在桌面端恢复正常大小 */
footer p {
    margin-bottom: 0.9rem;
    font-size: 1.05rem; /* 原为 0.95rem，现在更清晰 */
    line-height: 1.6;
}

.icp-link {
    color: #ccc;
    text-decoration: none;
    font-size: 1rem; /* ← ICP 链接也同步增大 */
    transition: all 0.3s ease;
    display: inline-block;
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
}

.icp-link:hover {
    color: #fff;
    text-decoration: underline;
    background: rgba(255,255,255,0.1);
    transform: translateY(-2px);
}

/* ========== 响应式微调 ========== */
@media (max-width: 768px) {
    h1 { font-size: 2.4rem; }
    h2 { font-size: 2rem; }
    .intro { font-size: 1.2rem; }
    main { padding: 0 1.5rem; }
    section { padding: 2rem 1.5rem; }
    .product-card { padding: 2rem; }

    /* 移动端页脚保持紧凑 */
    footer {
        padding: 2rem 1rem;
    }
    footer p {
        font-size: 0.95rem;
        margin-bottom: 0.7rem;
    }
    .icp-link {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    h1 { font-size: 2rem; }
    .intro { font-size: 1.1rem; }
    main { padding: 0 1rem; }
    section { padding: 1.5rem; }
    .product-card { padding: 1.8rem; }
    footer p {
        font-size: 0.9rem;
        margin-bottom: 0.6rem;
    }
}

/* ========== 动画 ========== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.product-card {
    animation: fadeInUp 0.6s ease-out;
}

.product-card:nth-child(2) { animation-delay: 0.1s; }
.product-card:nth-child(3) { animation-delay: 0.2s; }
.product-card:nth-child(4) { animation-delay: 0.3s; }
.product-card:nth-child(5) { animation-delay: 0.4s; }
.product-card:nth-child(6) { animation-delay: 0.5s; }

body {
    opacity: 0;
    animation: fadeIn 1s ease-in-out forwards;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

/* 滚动条美化 */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #f1f9ff; }
::-webkit-scrollbar-thumb {
    background: linear-gradient(var(--primary-color), var(--accent-color));
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(var(--secondary-color), var(--primary-color));
}