/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Serif SC', serif;
    line-height: 1.6;
    color: #333;
    background-color: #f9f9f9;
}

/* 顶部品牌信息 */
.brand-top {
    background: linear-gradient(135deg, #8B4513, #A0522D);
    color: white;
    padding: 20px 0;
    text-align: center;
}

.brand-info {
    margin-bottom: 15px;
}

.brand-logo img {
    max-width: 100%;
    height: auto;
}

.contact-fbt {
    margin: 10px 0;
}

.contact-fbt2 span {
    font-size: 18px;
    font-weight: bold;
    font-family: 'Ma Shan Zheng', cursive;
}

.contact-info {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 15px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.contact-item i {
    color: #ffd700;
}

/* 导航栏 */
nav {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.main-nav {
    display: flex;
    justify-content: center;
    list-style: none;
    flex-wrap: wrap;
}

.nav-item {
    margin: 0 10px;
}

.nav-item a {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px 10px;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
}

.nav-item a:hover {
    color: #8B4513;
}

.nav-item.active a {
    color: #8B4513;
    font-weight: bold;
}

.nav-item a i {
    font-size: 18px;
    margin-bottom: 5px;
}

/* 欢迎区域 */
.welcome-section {
    background: url('../img/cgy1.jpg') center/cover no-repeat;
    color: white;
    text-align: center;
    padding: 60px 20px;
    position: relative;
}

.welcome-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0,0,0,0.5);
}

.welcome-section .section-title,
.welcome-section .section-subtitle {
    position: relative;
    z-index: 1;
}

.section-title {
    font-size: 36px;
    margin-bottom: 15px;
    font-family: 'Ma Shan Zheng', cursive;
}

.section-subtitle {
    font-size: 18px;
    max-width: 800px;
    margin: 0 auto;
}

/* 追溯查询区域 */
.trace-section {
    padding: 60px 20px;
    background-color: #fff;
}

.trace-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 40px;
}

.trace-search {
    background-color: #f9f9f9;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.trace-search h3,
.trace-result h3 {
    color: #8B4513;
    margin-bottom: 20px;
    font-size: 20px;
}

.search-box {
    display: flex;
    margin-bottom: 20px;
}

.search-box input {
    flex: 1;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
    font-size: 16px;
}

.search-box button {
    background-color: #8B4513;
    color: white;
    border: none;
    padding: 0 20px;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.search-box button:hover {
    background-color: #A0522D;
}

.scan-tip {
    text-align: center;
    color: #666;
    font-size: 14px;
}

.trace-result {
    background-color: #f9f9f9;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.result-content {
    min-height: 300px;
}

.no-result {
    text-align: center;
    color: #999;
    margin-top: 100px;
}

.product-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.info-item {
    background-color: #fff;
    padding: 15px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.info-label {
    font-weight: bold;
    color: #8B4513;
    margin-bottom: 5px;
}

.info-value {
    color: #333;
}

.info-section {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.info-section .section-title {
    color: #8B4513;
    font-size: 18px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.trace-code {
    font-weight: bold;
    color: #8B4513;
    font-size: 16px;
}

.product-images {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 15px;
}

.product-images img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.product-images img:hover {
    transform: scale(1.02);
}

/* 扫码指南区域 */
.scan-guide-section {
    padding: 60px 20px;
    background-color: #f9f9f9;
}

.scan-guide-container {
    max-width: 1200px;
    margin: 0 auto;
}

.scan-guide-container h3 {
    color: #8B4513;
    margin-bottom: 30px;
    font-size: 20px;
    text-align: center;
}

.scan-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.step-item {
    display: flex;
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
}

.step-item:hover {
    transform: translateY(-5px);
}

.step-number {
    background-color: #8B4513;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: bold;
    margin-right: 15px;
    flex-shrink: 0;
}

.step-content h4 {
    color: #333;
    margin-bottom: 10px;
    font-size: 16px;
}

.step-content p {
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

/* 底部区域 */
footer {
    background-color: #333;
    color: white;
    padding: 40px 20px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.footer-col h3 {
    margin-bottom: 20px;
    color: #ffd700;
    font-family: 'Ma Shan Zheng', cursive;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #ddd;
    text-decoration: none;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-links a:hover {
    color: #ffd700;
}

.copyright {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #555;
    color: #999;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .contact-info {
        flex-direction: column;
        align-items: center;
    }
    
    .main-nav {
        flex-direction: column;
        align-items: center;
    }
    
    .nav-item {
        margin: 5px 0;
    }
    
    .trace-container {
        grid-template-columns: 1fr;
    }
    
    #productForm {
        grid-template-columns: 1fr;
    }
    
    .product-info {
        grid-template-columns: 1fr;
    }
    
    .section-title {
        font-size: 28px;
    }
    
    .welcome-section {
        padding: 40px 20px;
    }
    
    .trace-section,
    .admin-section,
    .qrcode-section {
        padding: 40px 20px;
    }
}