/**
 * 主样式表
 * 
 * 这个文件定义了网站的全局样式和通用组件样式
 * 包括：颜色变量、全局样式、按钮、卡片、表单等基础组件
 * 
 * 文件结构：
 * 1. CSS变量（配色方案）
 * 2. 全局基础样式
 * 3. 按钮组件样式
 * 4. 卡片组件样式
 * 5. 表单组件样式
 * 6. 产品相关样式
 * 7. 布局修复样式
 * 8. 响应式设计
 */

/* ==========================================================================
   1. CSS变量 - 配色方案
   ========================================================================== */
:root {
    /* 主色调 */
    --primary-blue: #1976D2;     /* 深蓝色 - 主要品牌色 */
    --secondary-green: #2C2C2C;  /* 柔和黑色 - 次要品牌色 */
    
    /* 背景色 */
    --white: #FFFFFF;
    --bg-light: #F5F5F5;        /* 浅灰色背景 */
    
    /* 文本颜色 */
    --text-dark: #333333;       /* 主要文本色 */
    --text-light: #666666;      /* 次要文本色 */
    
    /* 渐变色 */
    --gradient-primary: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-green) 100%);
}

/* ==========================================================================
   2. 全局基础样式
   ========================================================================== */
/* 基础排版设置 */
body {
    margin: 0;
    font-family: 'Open Sans', sans-serif;
    font-size: 14px;
    line-height: 1.42857143;
    color: var(--text-dark);
    background-color: var(--white);
}

/* 通用页面标题样式 */
.page-title {
    margin-bottom: 2rem;
    border-bottom: 1px solid #eee;
}

.page-title h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

/* 通用列表样式 */
.list-group-item {
    border-color: rgba(0, 0, 0, 0.125);
}

.list-group-item a {
    text-decoration: none;
    color: var(--text-dark);
}

.list-group-item a:hover,
.list-group-item-action:hover {
    color: var(--primary-blue);
    background-color: rgba(0, 0, 0, 0.03);
}

.list-group-item-action img {
    transition: transform 0.3s ease;
}

/* ==========================================================================
   3. 按钮组件样式
   ========================================================================== */
/* 基础按钮样式 */
.btn {
    border-radius: 50px;
    padding: 0.6rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

/* 主要按钮 */
.btn-primary {
    background: linear-gradient(to right, #0088ff, #0066cc);
    border: none;
    color: white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.btn-primary:hover, 
.btn-primary:focus {
    background: linear-gradient(to right, #0066cc, #004499);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

.btn-primary:active,
.btn-primary.active {
    background: linear-gradient(to right, #0066cc, #0055aa);
    transform: translateY(0);
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.1);
}

/* 轮廓按钮 */
.btn-outline-primary {
    color: #0088ff;
    background: transparent;
    border: 2px solid #0088ff;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
    background: linear-gradient(to right, #0088ff, #0066cc);
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* 阅读更多按钮 */
.btn-read-more {
    background: linear-gradient(to right, #0088ff, #0066cc);
    color: white;
    border: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: inline-block;
    text-decoration: none;
}

.btn-read-more:hover {
    background: linear-gradient(to right, #0066cc, #004499);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
    text-decoration: none;
}

/* 提交按钮 */
.btn-submit {
    background: linear-gradient(to right, #0088ff, #0066cc);
    color: white;
    border: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-submit:hover {
    background: linear-gradient(to right, #0066cc, #004499);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

/* 大按钮 */
.btn-lg {
    padding: 0.8rem 2rem;
    font-size: 1.1rem;
}

/* ==========================================================================
   4. 卡片组件样式
   ========================================================================== */
/* 基础卡片样式 */
.card {
    border-radius: 0.5rem;
    border: none;
}

.card-header {
    background-color: rgba(0, 0, 0, 0.03);
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
}

.card-title {
    color: var(--text-dark);
    font-weight: 600;
    margin-bottom: 1rem;
}

/* ==========================================================================
   5. 表单组件样式
   ========================================================================== */
/* 表单标签 */
.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

/* 下拉选择框 */
.form-select {
    border-radius: 0.375rem;
    border: 1px solid #ced4da;
}

.form-select:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* ==========================================================================
   6. 产品相关样式
   ========================================================================== */
/* 产品卡片 */
.product-card {
    transition: all 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* 产品详情 */
.product-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.product-model {
    margin-bottom: 1.5rem;
}

.product-model .label {
    font-weight: 600;
    color: var(--text-dark);
}

.product-description {
    margin-bottom: 2rem;
    line-height: 1.7;
}

/* 产品特性 */
.product-features h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.product-features li {
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.product-features i {
    color: var(--primary-blue);
    margin-right: 0.5rem;
}

/* 产品选项卡 */
.product-tabs .nav-tabs {
    border-bottom: none;
}

.product-tabs .nav-tabs .nav-link {
    color: var(--text-dark);
    font-weight: 600;
    border: none;
    padding: 1rem 1.5rem;
    margin-right: 0.5rem;
    position: relative;
}

.product-tabs .nav-tabs .nav-link:hover {
    color: var(--primary-blue);
}

.product-tabs .nav-tabs .nav-link.active {
    color: var(--primary-blue);
    background-color: transparent;
    position: relative;
}

.product-tabs .nav-tabs .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 3px;
    background-color: var(--primary-blue);
}

/* 选项卡内容 */
.tab-content {
    padding: 2rem 0;
}

.tab-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

/* 表格样式 */
.table th {
    font-weight: 600;
    color: var(--text-dark);
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
}

.table td {
    color: var(--text-light);
    border-color: #dee2e6;
}

/* 手风琴样式 */
.accordion-button {
    font-weight: 600;
    color: var(--text-dark);
}

.accordion-button:not(.collapsed) {
    color: var(--primary-blue);
    background-color: rgba(13, 110, 253, 0.05);
}

.accordion-body {
    color: var(--text-light);
    padding: 1.5rem;
}

/* 产品缩略图 */
.thumbnail-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.thumbnail {
    width: 80px;
    height: 80px;
    border-radius: 5px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    position: relative;
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.3s ease;
}

.thumbnail:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.thumbnail.active {
    border-color: var(--primary-blue);
}

/* ==========================================================================
   7. 布局修复样式
   ========================================================================== */
/* Footer间距修复 */
.index-page #footer-container,
[data-page-type="index"] #footer-container,
[data-page-template="home"] #footer-container,
body.home #footer-container,
html[data-page="index"] #footer-container,
#footer-container {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

.index-page #footer-container .footer, 
[data-page-type="index"] #footer-container .footer,
[data-page-template="home"] #footer-container .footer,
body.home #footer-container .footer,
html[data-page="index"] #footer-container .footer,
#footer-container .footer.mt-auto {
    margin-top: 0 !important;
    padding-top: 2rem !important;
}

/* 页面特定的margin修复 */
body.index-page main > section:last-child,
body.index-page .blog-section,
body.index-page .featured-banner {
    margin-bottom: 0 !important;
    padding-bottom: 2rem !important;
}

/* ==========================================================================
   8. 响应式设计
   ========================================================================== */
/* 平板设备适配 */
@media (max-width: 991.98px) {
    .col-lg-3 {
        margin-bottom: 1.5rem;
    }
}

/* 小屏幕设备适配 */
@media (max-width: 767.98px) {
    .card-title {
        font-size: 1.25rem;
    }
    
    .card-text {
        font-size: 0.95rem;
    }
}
