/* 基础样式 */
:root {
    --primary-color: #cc0000;
    --secondary-color: #f5f5f5;
    --accent-color: #e0e0e0;
    --text-color: #333333;
    --link-color: #0066cc;
    --page-width: 1200px;
    --base-font-size: 1.125rem;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: var(--base-font-size);
    color: var(--text-color);
    line-height: 1.8;
    background-color: white;
}
h1, h2, h3 { font-weight: 700; line-height: 1.8; color: #222; } 
h1 { font-size: 2rem; } 
h2 { font-size: 1.5rem; } 
h3 { font-size: 1.17rem; }
.container {
    width: 100%;
    max-width: var(--page-width);
    margin: 0 auto;
    padding: 0 1rem;
}

/* 头部样式 */
header {
    background-color: var(--primary-color);
    color: white;
	padding: 0.5rem 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-name {
    font-size: 1.8rem;
    font-weight: 700;
}

.site-name a {
    color: white;
    text-decoration: none;
}

/* 简洁关于我们板块 */
.about-brief {
    background-color: #f8f9fa;
    padding: 15px 20px;
    margin-top: 15px;
    border-radius: 4px;
    border-left: 4px solid #3498db;
	border-right: 4px solid #3498db;
}

.about-brief h2 {
    margin: 0 0 10px 0;
    font-size: 1.5rem;
    color: #2c3e50;
}

.about-brief p {
    margin: 0;
    font-size: 1.125rem;
    color: #444;
}

.about-brief  a {
    color: #cc0000; 
	text-decoration: none;	
}

 .category-title {
            position: relative;
            background-color: #f8f9fa;  
            padding: 15px 20px;
            margin-top: 15px;
            border-radius: 4px;
			border-left: 4px solid #3498db;
        }


/* 产品网格样式 */
.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin: 2rem 0;
}

.product-item {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.product-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.product-image-container {
    position: relative;
    width: 100%;
    padding-top: 81.25%; /* 16:13 比例 */
    overflow: hidden;
    background: white;
}

.product-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-name {
    padding: 1rem;
    text-align: center;
    font-weight: 500;
    color: var(--text-color);
	transition: color 0.3s ease;
}

.product-name:hover {
    color: #cc0000; 
    cursor: pointer; 
}

        .add-to-cart-btn {
            display: inline-block;
            padding: 18px 30px;
			margin: 10px 10px 10px 0;
			width: 40%;
            background-color: #cc0000;
            color: white;
            font-weight: bold;
            border: none;
            border-radius: 4px;
            cursor: pointer;
            transition: all 0.3s;
        }
        .add-to-cart-btn:hover {
            background-color: #a80000;
        }

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.pagination a {
    display: inline-block;
    padding: 0.5rem 1rem;
    margin: 0.25rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: var(--primary-color);
    transition: all 0.3s ease;
}

.pagination a.active,
.pagination a:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* 页脚样式 */
footer {
    background-color: var(--secondary-color);
    padding: 1rem 0;
	padding-bottom: 55px;
}

.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.footer-links a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary-color);
}

.copyright {
    text-align: center;
    color: #666;
    font-size: 0.9rem;
}

/* 产品页面样式 */
.product-header {
    margin-top: 1rem;
}

.product-header-image {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: cover;
    border-radius: 8px;
}

.product-content {
    margin-bottom: 1rem;
}

.product-content p {
    line-height: 2;
    margin-bottom: 1.5rem;
    text-align: justify;
    overflow-wrap: break-word;
}

.product-content ol,ul {
  padding: 0 30px 0 40px;  
}

.related-products {
    padding: 1rem 0;
    border-top: 1px solid var(--accent-color);
}

.related-products h2 {
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.related-products-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.related-product-item {
    background: var(--accent-color);
    padding: 0.8rem 1rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.related-product-item a {
    display: block;
    text-decoration: none;
    color: var(--text-color);
}

.related-product-item:hover {
    background: var(--primary-color);
}

.related-product-item:hover a {
    color: white;
}

/* 底部订单栏样式 */
.order-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50px;
    display: flex;
    background-color: #fff;
    box-shadow: 0 -2px 5px rgba(0,0,0,0.1);
    z-index: 1000;
}

.order-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: white;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.home-btn {
    width: 20%;
    background-color: #333;
}

.home-btn:hover {
    background-color: #555;
}

.order-now-btn {
    width: 80%;
    background-color: #cc0000;
}

.order-now-btn:hover {
    background-color: #e60000;
}
/* 响应式设计 */
@media (max-width: 1200px) {
    .container {
        padding: 0 2rem;
    }
}

@media (max-width: 992px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .site-name {
        font-size: 1.5rem;
    }
}

@media (max-width: 576px) {
    .product-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    :root {
        --base-font-size: 1.0125rem;
    }
    
    .container {
        padding: 0 1rem;
    }
}
