/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 顶部导航 */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    font-size: 24px;
    font-weight: bold;
}

.nav {
    display: flex;
    gap: 25px;
}

.nav a {
    color: white;
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 5px;
    transition: all 0.3s;
}

.nav a:hover,
.nav a.active {
    background: rgba(255,255,255,0.2);
}

/* 轮播图区域 */
.hero-banner {
    position: relative;
    height: 400px;
    overflow: hidden;
}

.banner-slider {
    width: 100%;
    height: 100%;
}

.banner-item {
    position: relative;
    width: 100%;
    height: 100%;
}

.banner-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.banner-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
    background: rgba(0,0,0,0.5);
    padding: 30px 50px;
    border-radius: 10px;
}

.banner-content h2 {
    font-size: 36px;
    margin-bottom: 10px;
}

.banner-content p {
    font-size: 18px;
}

/* 商品列表区域 */
.products-section {
    padding: 60px 0;
}

.section-title {
    text-align: center;
    font-size: 32px;
    margin-bottom: 40px;
    color: #333;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.product-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px 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.15);
}

.product-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.product-info {
    padding: 20px;
}

.product-info h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: #333;
}

.product-info .price {
    font-size: 24px;
    color: #e74c3c;
    font-weight: bold;
    margin-bottom: 10px;
}

.product-info .store {
    color: #666;
    font-size: 14px;
}

.view-more {
    text-align: center;
}

.btn-primary {
    display: inline-block;
    padding: 12px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    font-size: 16px;
    transition: opacity 0.3s;
}

.btn-primary:hover {
    opacity: 0.9;
}

.btn-secondary {
    display: inline-block;
    padding: 12px 30px;
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s;
}

.btn-secondary:hover {
    background: #667eea;
    color: white;
}

/* 店铺街 */
.stores-section {
    padding: 60px 0;
}

.stores-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.store-card {
    background: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s;
    cursor: pointer;
}

.store-card:hover {
    transform: translateY(-5px);
}

.store-card h3 {
    font-size: 24px;
    margin-bottom: 15px;
    color: #333;
}

.store-card p {
    color: #666;
    margin-bottom: 10px;
}

.store-card .phone {
    color: #667eea;
    font-weight: bold;
}

/* 玩具详情页 */
.product-detail {
    padding: 60px 0;
}

.detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 40px;
}

.detail-image img {
    width: 100%;
    border-radius: 10px;
}

.detail-info h2 {
    font-size: 28px;
    margin-bottom: 20px;
    color: #333;
}

.detail-info .price {
    font-size: 32px;
    color: #e74c3c;
    font-weight: bold;
    margin-bottom: 20px;
}

.store-info {
    margin-bottom: 30px;
}

.store-info a {
    color: #667eea;
    text-decoration: none;
}

.actions {
    display: flex;
    gap: 15px;
}

.detail-images {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.detail-images h3 {
    font-size: 24px;
    margin-bottom: 20px;
}

.detail-img-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.detail-img-grid img {
    width: 100%;
    border-radius: 10px;
}

/* 店铺详情页 */
.store-detail-section {
    padding: 60px 0;
}

.store-header {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.store-header h2 {
    font-size: 28px;
    margin-bottom: 10px;
}

.store-phone {
    color: #666;
}

.store-products {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.store-products h3 {
    font-size: 24px;
    margin-bottom: 20px;
}

/* 商家入驻 */
.merchant-section {
    padding: 60px 0;
}

.merchant-process {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.merchant-process h3 {
    font-size: 24px;
    margin-bottom: 20px;
}

.process-steps {
    display: flex;
    justify-content: space-around;
    gap: 20px;
}

.step {
    text-align: center;
    flex: 1;
}

.step-number {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    margin: 0 auto 10px;
}

.merchant-form {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.merchant-form h3 {
    font-size: 24px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

/* 登录注册页 */
.auth-section {
    padding: 60px 0;
    min-height: calc(100vh - 300px);
}

.auth-box {
    max-width: 400px;
    margin: 0 auto;
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.auth-box h2 {
    text-align: center;
    font-size: 28px;
    margin-bottom: 30px;
    color: #333;
}

.auth-link {
    text-align: center;
    margin-top: 20px;
    color: #666;
}

.auth-link a {
    color: #667eea;
    text-decoration: none;
}

/* 底部导航 */
.footer {
    background: #2c3e50;
    color: white;
    padding: 40px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 30px;
}

.footer-item h3 {
    font-size: 18px;
    margin-bottom: 15px;
}

.footer-item p {
    margin-bottom: 8px;
    color: #bdc3c7;
}

.footer-item a {
    color: #667eea;
    text-decoration: none;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #34495e;
    color: #95a5a6;
}

/* 购物车页面 */
.cart-section {
    padding: 60px 0;
}

.cart-content {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
    margin-bottom: 30px;
}

.cart-item {
    display: grid;
    grid-template-columns: 150px 1fr 200px;
    gap: 20px;
    padding: 20px;
    border-bottom: 1px solid #eee;
    align-items: center;
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 10px;
}

.cart-item-info h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: #333;
}

.cart-item-info .store {
    color: #666;
    font-size: 14px;
    margin-bottom: 10px;
}

.cart-item-info .price {
    font-size: 24px;
    color: #e74c3c;
    font-weight: bold;
}

.cart-item-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 15px;
}

.quantity-control {
    display: flex;
    align-items: center;
    gap: 10px;
}

.qty-btn {
    width: 35px;
    height: 35px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 5px;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.3s;
}

.qty-btn:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.quantity-control input {
    width: 60px;
    height: 35px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

.subtotal {
    font-size: 20px;
    color: #e74c3c;
    font-weight: bold;
}

.btn-remove {
    padding: 8px 15px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: opacity 0.3s;
}

.btn-remove:hover {
    opacity: 0.8;
}

.cart-empty {
    text-align: center;
    padding: 60px 0;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.cart-empty p {
    font-size: 18px;
    color: #666;
    margin-bottom: 20px;
}

.cart-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 20px 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.cart-summary {
    display: flex;
    gap: 30px;
    font-size: 18px;
}

.total-count {
    color: #666;
}

.total-price {
    font-size: 24px;
    color: #e74c3c;
    font-weight: bold;
}

.checkout-btn {
    padding: 12px 40px;
    font-size: 18px;
}

.cart-badge {
    display: inline-block;
    min-width: 20px;
    height: 20px;
    background: #e74c3c;
    color: white;
    border-radius: 10px;
    font-size: 12px;
    text-align: center;
    line-height: 20px;
    margin-left: 4px;
    vertical-align: top;
}

.policy-link {
    color: #667eea;
    cursor: pointer;
    transition: color 0.3s;
}

.policy-link:hover {
    color: #764ba2;
}

.terms-group {
    margin-bottom: 20px;
}

.terms-label {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    color: #666;
    cursor: pointer;
}

.terms-label input[type="checkbox"] {
    margin-right: 8px;
    cursor: pointer;
}

.policy-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    background: rgba(0,0,0,0.5);
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.modal-content {
    position: relative;
    background: white;
    border-radius: 10px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 1px solid #eee;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.modal-header h3 {
    margin: 0;
    font-size: 20px;
}

.modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.modal-close:hover {
    opacity: 1;
}

.modal-body {
    padding: 30px;
    max-height: 50vh;
    overflow-y: auto;
    line-height: 1.8;
    color: #333;
}

.modal-body h4 {
    color: #667eea;
    margin-top: 20px;
    margin-bottom: 10px;
    font-size: 16px;
}

.modal-body h4:first-child {
    margin-top: 0;
}

.modal-body p {
    margin-bottom: 10px;
    font-size: 14px;
    color: #666;
}

.modal-footer {
    padding: 20px 30px;
    border-top: 1px solid #eee;
    text-align: right;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        gap: 15px;
    }

    .nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }

    .banner-content h2 {
        font-size: 24px;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }

    .stores-grid {
        grid-template-columns: 1fr;
    }

    .detail-content {
        grid-template-columns: 1fr;
    }

    .detail-img-grid {
        grid-template-columns: 1fr;
    }

    .process-steps {
        flex-direction: column;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }

    .actions {
        flex-direction: column;
    }

    .cart-item {
        grid-template-columns: 1fr;
        gap: 15px;
        text-align: center;
    }

    .cart-item img {
        width: 100%;
        height: auto;
        max-height: 200px;
    }

    .cart-item-actions {
        align-items: center;
    }

    .cart-footer {
        flex-direction: column;
        gap: 15px;
    }

    .cart-summary {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
}
