
/* 全局变量与重置 */
:root {
    --primary-red: #e74c3c;
    --dark-red: #c0392b;
    --safety-orange: #f39c12;
    --dark-bg: #2c3e50;
    --light-bg: #ecf0f1;
    --text-color: #333;
    --white: #ffffff;
    --shadow: 0 4px 6px rgba(0,0,0,0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--light-bg);
    color: var(--text-color);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

/* 导航栏 */
.navbar {
    background: var(--dark-bg);
    color: var(--white);
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-red);
}

.navbar nav a {
    margin-left: 2rem;
    font-weight: 500;
    transition: var(--transition);
}

.navbar nav a:hover {
    color: var(--primary-red);
}

/* 英雄区域 */
.hero {
    height: 80vh;
    background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), url('https://picsum.photos/1920/1080?grayscale&blur=2'); 
    /* 注意：实际项目中应使用真实的消防相关图片，此处使用占位图 */
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    position: relative;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-btn {
    background: var(--primary-red);
    color: var(--white);
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-weight: bold;
    font-size: 1.1rem;
    transition: var(--transition);
    border: 2px solid var(--primary-red);
}

.cta-btn:hover {
    background: transparent;
    color: var(--primary-red);
    background: rgba(255,255,255,0.1);
    border-color: var(--white);
}

/* 通用标题 */
h2 {
    text-align: center;
    margin: 3rem 0 2rem;
    font-size: 2rem;
    color: var(--dark-bg);
    position: relative;
}

h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--primary-red);
    margin: 10px auto 0;
    border-radius: 2px;
}

/* 分类网格 */
.category-section {
    padding: 2rem 5%;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.card {
    background: var(--white);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: var(--transition);
    border-top: 4px solid transparent;
}

.card:hover {
    transform: translateY(-5px);
    border-top-color: var(--primary-red);
}

.icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.cat-card h3 {
    margin-bottom: 0.5rem;
    color: var(--dark-bg);
}

.cat-card p {
    color: #7f8c8d;
    font-size: 0.9rem;
}

/* 产品列表与Accordion效果 */
.product-section {
    padding: 2rem 5%;
    background: #fff;
}

.product-item {
    max-width: 800px;
    margin: 0 auto 1.5rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
}

.toggle-input {
    display: none;
}

.product-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background: var(--white);
    cursor: pointer;
    transition: background 0.2s;
}

.product-card:hover {
    background: #f9f9f9;
}

.product-info h3 {
    color: var(--dark-bg);
    margin-bottom: 0.3rem;
}

.badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    background: var(--primary-red);
    color: white;
    font-size: 0.7rem;
    border-radius: 4px;
    margin-left: 0.5rem;
    vertical-align: middle;
}

.badge.warning {
    background: var(--safety-orange);
}

.product-info p {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.expand-icon {
    font-size: 1.5rem;
    color: var(--primary-red);
    transition: transform 0.3s;
}

/* 核心逻辑：选中时展开详情 */
.product-details {
    max-height: 0;
    overflow: hidden;
    background: #f8f9fa;
    transition: max-height 0.4s ease-out;
}

.toggle-input:checked + .product-card .expand-icon {
    transform: rotate(45deg);
}

.toggle-input:checked ~ .product-details {
    max-height: 500px; /* 足够容纳内容的高度 */
    border-top: 1px solid #eee;
}

.detail-content {
    padding: 1.5rem;
}

.detail-content h4 {
    color: var(--dark-bg);
    margin-bottom: 0.5rem;
    margin-top: 1rem;
}

.detail-content ul {
    list-style-position: inside;
    color: #555;
    margin-bottom: 1rem;
}

.inquire-btn {
    margin-top: 1rem;
    padding: 0.5rem 1.5rem;
    background: var(--dark-bg);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}

.inquire-btn:hover {
    background: var(--primary-red);
}

/* 安全提示 */
.safety-tips {
    padding: 3rem 5%;
    background: var(--dark-bg);
    color: white;
}

.safety-tips h2 {
    color: white;
}

.safety-tips h2::after {
    background: var(--safety-orange);
}

.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.tip-box {
    background: rgba(255,255,255,0.1);
    padding: 2rem;
    border-radius: 8px;
    border-left: 4px solid var(--safety-orange);
}

.tip-box h3 {
    margin-bottom: 1rem;
    color: var(--safety-orange);
}

/* 页脚 */
footer {
    background: #1a252f;
    color: #bdc3c7;
    text-align: center;
    padding: 2rem;
}

.footer-links {
    margin-top: 1rem;
}

.footer-links a {
    margin: 0 1rem;
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: var(--primary-red);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .navbar {
        flex-direction: column;
        gap: 1rem;
    }
    
    .navbar nav a {
        margin: 0 0.5rem;
    }
}
