/* ==========================================================================
   1. 基础重置 & 全局背景 (解决背景发白的关键)
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    background-color: #ffffff; /* 初始白色 */
    color: #222;
    transition: background-color 0.3s ease;
}

.page-wrapper {
    min-height: 100%;
    display: flex;
    flex-direction: column;
    background-color: inherit; /* 继承 body 背景 */
}

.main-content {
    flex: 1;
    padding-top: 80px; /* 避开固定导航栏 */
    background-color: inherit; /* 确保内容区背景跟随全局 */
}


/* ==========================================================================
   3. 产品展示区 (3列布局)
   ========================================================================== */
.contact-page {
    padding: 60px 0 100px;
    background-color: inherit; /* 关键：确保这部分不露白 */
}

.page-title {
    text-align: center;
    font-size: 32px;
    color: #12165d;
    margin-bottom: 40px;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 32px;
}

.product-card {
    background: #ffffff;
    border: 1px solid #f1f1f1;
    border-radius: 24px;
    padding: 40px 32px;
    text-align: center;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: all 0.25s ease;
    display: block;
    color: inherit;
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
}

.product-card img {
    width: 180px;
    height: 240px;
    object-fit: contain;
    margin: 0 auto 24px;
    display: block;
}

.product-card h3 { font-size: 20px; color: #12165d; margin-bottom: 10px; }
.product-card p { font-size: 14px; color: #3b3b3b; line-height: 1.6; }



/* ==========================================================================
   5. 完整暗黑模式强制适配 (Dark Mode)
   ========================================================================== */
@media (prefers-color-scheme: dark) {
    /* 1. 强制全局背景变黑 */
    html, body, .page-wrapper, .main-content, .contact-page, .section {
        background-color: #0d0d0d !important; 
        color: #e5e5e5;
    }

    /* 2. 导航栏适配 */
    .site-header {
        background-color: #1a1a1a !important;
        border-bottom: 1px solid #333;
    }
    .nav-menu a { color: #e5e5e5; }
    .nav-search input { background-color: #333; color: #fff; }
    .lang-btn { background: #333; color: #eee; border-color: #555; }

    /* 3. 卡片与文字适配 */
    .page-title, .product-card h3 { color: #ffffff !important; }
    
    .product-card {
        background-color: #1c1c1c !important;
        border: 1px solid #333 !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    }
    .product-card p { color: #aaa; }
    .product-card:hover { background-color: #252525 !important; }
}



/* 响应式简写 */
@media (max-width: 992px) { .contact-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 576px) { .contact-grid { grid-template-columns: 1fr; } }