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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f5f5f5;
    color: #333;
}

.app {
    max-width: 750px;
    margin: 0 auto;
    background: #fff;
    min-height: 100vh;
    position: relative;
}

/* 商家头部 */
.merchant-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 16px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.merchant-info h2 {
    font-size: 20px;
    margin-bottom: 8px;
}

.merchant-meta {
    display: flex;
    gap: 15px;
    font-size: 12px;
    margin-bottom: 8px;
    opacity: 0.9;
}

.contact-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
}

.phone {
    color: white;
    text-decoration: none;
    font-size: 18px;
}

/* 主体布局 */
.main-content {
    display: flex;
    height: calc(100vh - 160px);
    overflow: hidden;
}

/* 左侧分类 */
.category-sidebar {
    width: 90px;
    background: #f8f8f8;
    overflow-y: auto;
    flex-shrink: 0;
}

.category-item {
    padding: 15px 10px;
    text-align: center;
    font-size: 14px;
    color: #666;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: all 0.3s;
}

.category-item.active {
    background: white;
    color: #667eea;
    font-weight: 600;
    position: relative;
}

.category-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 20px;
    background: #667eea;
}

/* 右侧商品列表 */
.product-list {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.product-item {
    display: flex;
    background: white;
    margin-bottom: 16px;
    padding: 12px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.product-image {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    object-fit: cover;
    margin-right: 12px;
}

.product-info {
    flex: 1;
}

.product-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 6px;
}

.product-desc {
    font-size: 12px;
    color: #999;
    margin-bottom: 8px;
}

.product-price {
    color: #f60;
    font-size: 18px;
    font-weight: 600;
}

.product-price::before {
    content: '¥';
    font-size: 12px;
}

.product-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.add-btn {
    width: 32px;
    height: 32px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.add-btn:active {
    transform: scale(0.95);
}

.quantity-control {
    display: flex;
    align-items: center;
    gap: 12px;
}

.quantity-btn {
    width: 28px;
    height: 28px;
    background: #f0f0f0;
    border: none;
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
}

.quantity-num {
    font-size: 14px;
    font-weight: 600;
    min-width: 24px;
    text-align: center;
}

/* 底部购物车栏 */
.cart-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-width: 750px;
    margin: 0 auto;
    background: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 200;
}

.cart-icon {
    position: relative;
    width: 50px;
    height: 50px;
    background: #667eea;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    cursor: pointer;
}

.cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #f60;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-total {
    flex: 1;
    text-align: right;
    margin-right: 15px;
}

.total-amount {
    font-size: 18px;
    font-weight: 600;
    color: #f60;
}

.checkout-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 300;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 400px;
    max-height: 80%;
    overflow: hidden;
}

.modal-header {
    padding: 16px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-body {
    padding: 16px;
    max-height: 400px;
    overflow-y: auto;
}

.modal-footer {
    padding: 16px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 12px;
}

/* 订单页面样式 */
.order-container {
    padding: 16px;
    padding-bottom: 80px;
}

.order-type-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    background: #f5f5f5;
    padding: 4px;
    border-radius: 8px;
}

.order-type-tab {
    flex: 1;
    text-align: center;
    padding: 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
}

.order-type-tab.active {
    background: #667eea;
    color: white;
}

.order-info-card {
    background: #f8f8f8;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
}

.order-items {
    background: white;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
}

.order-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
}

.order-total {
    text-align: right;
    font-size: 18px;
    font-weight: 600;
    color: #f60;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #eee;
}

/* 订单列表 */
.order-list {
    padding: 16px;
}

.order-card {
    background: white;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.order-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #eee;
}

.order-status {
    color: #667eea;
    font-weight: 600;
}

.order-body {
    margin-bottom: 12px;
}

.order-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* 响应式 */
@media (max-width: 480px) {
    .merchant-header {
        padding: 15px;
    }
    
    .product-image {
        width: 70px;
        height: 70px;
    }
}