/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

/* 容器居中 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 头部样式 */
header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo {
    font-size: 24px;
    font-weight: bold;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

nav a {
    color: white;
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 5px;
    transition: background 0.3s;
}

nav a:hover {
    background: rgba(255,255,255,0.2);
}

/* 主要内容区域 */
main {
    min-height: calc(100vh - 200px);
    padding: 30px 0;
}

/* 横幅区域 */
.banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 60px 20px;
    text-align: center;
    margin-bottom: 40px;
}

.banner h1 {
    font-size: 2.5em;
    margin-bottom: 15px;
}

.banner p {
    font-size: 1.2em;
    opacity: 0.9;
}

/* 内容区块 */
.content-section {
    background: white;
    padding: 40px;
    margin-bottom: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
}

.content-section h2 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 1.8em;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
}

/* 商品网格 */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.product-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}

.product-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.product-info {
    padding: 20px;
}

.product-title {
    font-size: 1.2em;
    font-weight: bold;
    margin-bottom: 10px;
    color: #333;
}

.product-price {
    color: #e74c3c;
    font-size: 1.3em;
    font-weight: bold;
    margin-bottom: 15px;
}

.product-desc {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 15px;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    background: #667eea;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background 0.3s;
    border: none;
    cursor: pointer;
    font-size: 16px;
}

.btn:hover {
    background: #5568d3;
}

.btn-primary {
    background: #667eea;
}

.btn-success {
    background: #27ae60;
}

.btn-success:hover {
    background: #229954;
}

/* 商品详情页 */
.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-top: 30px;
}

.product-detail-image {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.1);
}

.product-detail-info {
    padding: 20px;
}

.product-detail-title {
    font-size: 2em;
    margin-bottom: 15px;
    color: #333;
}

.product-detail-price {
    font-size: 2em;
    color: #e74c3c;
    margin-bottom: 20px;
}

.product-detail-desc {
    line-height: 1.8;
    margin-bottom: 30px;
    color: #666;
}

/* 订单表单 */
.order-form {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #333;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    font-family: inherit;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.order-summary {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.order-summary-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.order-summary-total {
    font-size: 1.3em;
    font-weight: bold;
    color: #e74c3c;
    border-top: 2px solid #ddd;
    padding-top: 10px;
    margin-top: 10px;
}

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 80px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 24px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.3);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 999;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: #5568d3;
    transform: translateY(-3px);
}

/* 在线客服 */
.online-service {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 998;
}

.service-btn {
    width: 60px;
    height: 60px;
    background: #27ae60;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 3px 15px rgba(0,0,0,0.3);
    transition: all 0.3s;
}

.service-btn:hover {
    background: #229954;
    transform: scale(1.1);
}

.service-panel {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 300px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.3);
    padding: 20px;
    display: none;
}

.service-panel.show {
    display: block;
}

.service-panel h3 {
    margin-bottom: 15px;
    color: #333;
}

.service-contact {
    margin-bottom: 15px;
}

.service-contact p {
    margin-bottom: 8px;
    color: #666;
}

.service-contact strong {
    color: #333;
}

/* 页脚 */
footer {
    background: #2c3e50;
    color: white;
    text-align: center;
    padding: 30px 0;
    margin-top: 50px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.footer-content p {
    margin-bottom: 10px;
}

.footer-content a {
    color: #3498db;
    text-decoration: none;
}

.footer-content a:hover {
    text-decoration: underline;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .banner h1 {
        font-size: 1.8em;
    }
    
    .banner p {
        font-size: 1em;
    }
    
    .content-section {
        padding: 20px;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .product-detail {
        grid-template-columns: 1fr;
    }
    
    .header-content {
        flex-direction: column;
        gap: 15px;
    }
    
    nav ul {
        justify-content: center;
    }
    
    .service-panel {
        width: 250px;
    }
    
    .back-to-top {
        bottom: 100px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
    
    .service-btn {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .banner {
        padding: 40px 15px;
    }
    
    .banner h1 {
        font-size: 1.5em;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .order-form {
        padding: 20px;
    }
}

