/* 全局样式 */
:root {
    --primary-color: #0066cc;
    --dark-blue: #003366;
    --light-blue: #e6f2ff;
    --text-color: #333;
    --white: #fff;
    --font-main: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    font-family: var(--font-main);
    color: var(--text-color);
    line-height: 1.6;
    background-color: #f9f9f9;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* 头部样式 */
header {
    background-color: var(--dark-blue);
    color: var(--white);
    padding: 0.5rem 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

header h1 {
    text-align: center;
}

a {
  color: inherit;       /* 继承父级文字颜色 */
  text-decoration: none; /* 默认无下划线 */
  transition: text-decoration 0.2s ease; /* 平滑动画（可选） */
}

a:hover {
  text-decoration: underline; /* 悬停时显示下划线 */
}

/* 主要内容 */
main {
    padding: 2rem 0;
}

/* 英雄区域 */
.hero img {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: cover;
    margin: 1rem 0;
}

/* 关于我们 */
.about {
    background-color: var(--light-blue);
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.about h2 {
    color: var(--dark-blue);
    margin-bottom: 1rem;
}

/* 产品展示 */
.products {
    margin-bottom: 0rem;
}

.products h2 {
    color: var(--dark-blue);
    margin-bottom: 1.5rem;
    text-align: center;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.product-grid img {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.product-grid img:hover {
    transform: scale(1.03);
}
.price {
  display: block;
  color: #F50;
  font-weight: bold; /* 加粗 */
}

/* 文章列表 */
.article-list {
    background-color: var(--white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.article-list h2 {
    color: var(--dark-blue);
    margin-bottom: 1.5rem;
}

.article-list ul {
    list-style: none;
}

.article-list li {
    margin-bottom: 0.8rem;
    font-size: 1.125rem;
}

.article-list a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s;
}

.article-list a:hover {
    color: var(--dark-blue);
    text-decoration: underline;
}

/* 分页样式 */
.page-link {
    display: inline-block;
    padding: 0.5rem 1rem;
    margin: 0.5rem 0.5rem 0.5rem 0;
    background-color: var(--light-blue);
    color: var(--dark-blue);
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s;
}

.page-link:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

.page-link.active {
    background-color: var(--primary-color);
    color: var(--white);
    font-weight: bold;
}

/* 相关内容 */
.related-articles {
    margin-top: 1rem;
    border-top: 1px solid #ddd;
}

.related-articles h2 {
    color: var(--dark-blue);
    margin-bottom: 1rem;
}

.related-articles ul {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
	 list-style: none;
}

.related-articles  a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s;
}

.related-articles  a:hover {
    color: var(--dark-blue);
    text-decoration: underline;
}

/* 文章内容 */
article {
    font-size: 1.125rem;
    line-height: 1.8;
}

article h1, article h2, article h3 {
    color: var(--dark-blue);
    margin: 1rem 0;
}

article p {
    margin-bottom: 1.5rem;
	    text-align: justify;
    overflow-wrap: break-word;
}

article img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1rem 0;
}

article ol {
  padding: 0 20px 0 40px;  
}
article ol li {
  padding-left: 2px;    
}

/* 页脚 */
footer {
    background-color: var(--dark-blue);
    color: var(--white);
    padding: 2rem 0;
    text-align: center;
    margin-top: 1rem;
}

footer p {
    margin: 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    html {
        font-size: 18px;
    }
    header h1 {
        font-size: 1.5rem;
    }
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .related-articles ul {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.5rem;
    }
    
    .related-articles ul {
        grid-template-columns: 1fr;
    }
}
