/* 重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f8f9fa url('data:image/svg+xml,<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M10 2c1 0 2 1 2 2v14l-2 2-2-2V4c0-1 1-2 2-2z" fill="%23f0f0f0"/></svg>') repeat;
}

/* 通用容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* 导航栏 */
header {
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
}

.nav-links a {
    text-decoration: none;
    color: #333;
    margin-left: 2rem;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #007bff;
}

.nav-links a.active {
    color: #007bff;
}

/* 横幅 */
.banner {
    background: linear-gradient(rgba(0, 123, 255, 0.9), rgba(0, 191, 255, 0.9)), 
                url('https://images.unsplash.com/photo-1549298916-b41d501d3772?auto=format&fit=crop&w=1500&q=80') center/cover;
    color: white;
    text-align: center;
    padding: 8rem 2rem 4rem;
    position: relative;
    overflow: hidden;
}

.banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"><path d="M30 10c2 0 4 2 4 4v32l-4 4-4-4V14c0-2 2-4 4-4z" fill="rgba(255,255,255,0.1)"/></svg>') repeat;
    opacity: 0.1;
    animation: movePattern 20s linear infinite;
}

.banner h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    position: relative;
}

.banner p {
    position: relative;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

@keyframes movePattern {
    from {
        background-position: 0 0;
    }
    to {
        background-position: 60px 60px;
    }
}

/* 分类导航 */
.category-nav {
    background-color: #f8f9fa;
    padding: 2rem 0;
    text-align: center;
}

.category-nav h2 {
    margin-bottom: 1.5rem;
    color: #333;
}

.category-description {
    margin-top: 1rem;
    color: #666;
    font-style: italic;
}

.category-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

.category-btn {
    background: white;
    border: 1px solid #ddd;
    padding: 0.5rem 1.5rem;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 1rem;
}

.category-btn:hover {
    background: #f0f0f0;
}

.category-btn.active {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

/* 商品区域 */
.products {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.products h2 {
    text-align: center;
    margin-bottom: 2rem;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.product-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.product-image {
    width: 100%;
    height: 280px;
    object-fit: cover;
    object-position: center;
}

.product-info {
    padding: 1rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-title {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: #333;
}

.category-tag {
    display: inline-block;
    background: #f0f0f0;
    color: #666;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    margin: 0.5rem 0;
}

.product-price {
    color: #e44d26;
    font-weight: bold;
    font-size: 1.2rem;
    margin-top: auto;
    margin-bottom: 0.5rem;
}

.add-to-cart {
    background: #007bff;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
    margin-top: 1rem;
    transition: background 0.3s;
}

.add-to-cart:hover {
    background: #0056b3;
}

/* 无商品提示 */
.no-products {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 1.2rem;
    color: #666;
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1001;
}

.modal-content {
    background: white;
    margin: 10% auto;
    padding: 2rem;
    width: 90%;
    max-width: 500px;
    border-radius: 8px;
    position: relative;
}

.close {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
}

/* 表单样式 */
input {
    width: 100%;
    padding: 0.8rem;
    margin: 0.5rem 0;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.btn {
    background: #007bff;
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
    margin-top: 1rem;
}

.btn:hover {
    background: #0056b3;
}

/* 支付按钮 */
.payment-methods {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 1.5rem 0;
}

.payment-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    padding: 0.8rem;
}

.payment-btn i {
    margin-right: 0.5rem;
    font-size: 1.3rem;
}

/* 微信扫码支付 */
.payment-qr-section {
    margin-top: 2rem;
    text-align: center;
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
}

.payment-qr-section h3 {
    margin-bottom: 1rem;
    color: #333;
}

.payment-qr-code {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    display: inline-block;
    margin-bottom: 1rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.payment-qr-image {
    width: 200px;
    height: 200px;
    object-fit: contain;
}

.payment-amount {
    font-size: 1.2rem;
    font-weight: bold;
    color: #e53935;
    margin-bottom: 1rem;
}

.payment-instruction {
    color: #666;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.small-btn {
    padding: 0.3rem 0.8rem;
    font-size: 0.9rem;
}

/* 购物车样式 */
#cartItems {
    max-height: 300px;
    overflow-y: auto;
    margin: 1rem 0;
}

.cart-item {
    display: flex;
    align-items: center;
    padding: 0.5rem;
    border-bottom: 1px solid #ddd;
}

.cart-item img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    margin-right: 1rem;
}

.cart-item-info {
    flex: 1;
}

.cart-total {
    font-size: 1.2rem;
    font-weight: bold;
    margin: 1rem 0;
    text-align: right;
}

/* 联系我们 */
.contact {
    background: #f8f9fa;
    padding: 4rem 0;
}

.contact h2 {
    text-align: center;
    margin-bottom: 2rem;
}

.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.contact-item i {
    font-size: 2rem;
    color: #007bff;
    margin-right: 1rem;
}

.contact-item h3 {
    margin-bottom: 0.5rem;
    color: #333;
}

.contact-item p {
    color: #666;
    margin-bottom: 0.5rem;
}

.qr-code {
    margin-top: 1rem;
    text-align: center;
    background: #fff;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.qr-image {
    width: 200px;
    height: 200px;
    object-fit: contain;
    margin-bottom: 0.5rem;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.wechat-id {
    font-size: 1.1rem;
    color: #333;
    font-weight: bold;
    margin-bottom: 1rem;
}

/* 页脚 */
footer {
    background: #333;
    color: white;
    padding-top: 2rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    padding: 0 1rem 2rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.footer-section p {
    color: #ccc;
    margin-bottom: 0.5rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: white;
}

.footer-section i {
    margin-right: 0.5rem;
    width: 20px;
    text-align: center;
}

.footer-bottom {
    background: #222;
    text-align: center;
    padding: 1rem;
    font-size: 0.9rem;
}

/* 留言板 */
.message-board {
    background: #fff;
    padding: 4rem 0;
}

.message-board h2 {
    text-align: center;
    margin-bottom: 2rem;
}

.message-form {
    max-width: 800px;
    margin: 0 auto 2rem;
}

.message-form textarea {
    width: 100%;
    height: 100px;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    resize: vertical;
    margin-bottom: 1rem;
}

.message-list {
    max-width: 800px;
    margin: 0 auto;
}

.message-item {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.message-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    color: #666;
    font-size: 0.9rem;
}

.message-content {
    color: #333;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.message-replies {
    margin-left: 2rem;
    margin-top: 1rem;
}

.reply-item {
    background: #fff;
    border-radius: 4px;
    padding: 1rem;
    margin-bottom: 0.5rem;
}

.reply-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    color: #666;
    font-size: 0.85rem;
}

.reply-content {
    color: #333;
    font-size: 0.95rem;
}

.reply-btn {
    background: #007bff;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.3s;
}

.reply-btn:hover {
    background: #0056b3;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-links {
        display: flex;
        gap: 1rem;
    }
    
    .nav-links a {
        margin-left: 0;
        font-size: 0.9rem;
    }
    
    .banner {
        padding: 6rem 1rem 3rem;
    }
    
    .banner h1 {
        font-size: 2rem;
    }
    
    .modal-content {
        margin: 20% auto;
        width: 95%;
    }
    
    .category-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .category-btn {
        width: 80%;
    }
    
    .contact-info {
        grid-template-columns: 1fr;
    }
    
    .message-form {
        padding: 0 1rem;
    }
    
    .message-list {
        padding: 0 1rem;
    }
    
    .message-item {
        padding: 1rem;
    }
    
    .message-replies {
        margin-left: 1rem;
    }
    
    .qr-image {
        width: 180px;
        height: 180px;
    }
    
    .qr-code {
        padding: 0.8rem;
    }
    
    .payment-qr-image {
        width: 180px;
        height: 180px;
    }
    
    .payment-qr-section {
        padding: 1rem;
    }
}

/* 支付相关样式 */
.payment-collection {
    text-align: center;
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 8px;
    margin-top: 1rem;
}

.payment-amount {
    font-size: 1.5rem;
    font-weight: bold;
    color: #e53935;
    margin-bottom: 1.5rem;
}

.payment-qr-code {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    display: inline-block;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.payment-qr-image {
    width: 200px;
    height: 200px;
    object-fit: contain;
}

.payment-instruction {
    color: #666;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.payment-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.btn.secondary {
    background: #6c757d;
}

.btn.secondary:hover {
    background: #5a6268;
}

@media (max-width: 768px) {
    .payment-collection {
        padding: 1rem;
    }
    
    .payment-qr-image {
        width: 180px;
        height: 180px;
    }
    
    .payment-buttons {
        flex-direction: column;
    }
} 