* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
}

body {
    background-color: #f0f2f5;
    color: #333;
    font-size: 14px;
    line-height: 1.6;
    padding-bottom: 65px;
    -webkit-font-smoothing: antialiased;
}

/* ===== 顶部导航 ===== */
.header {
    background: linear-gradient(135deg, #1677ff 0%, #0958d9 100%);
    color: white;
    padding: 16px 20px;
    text-align: center;
    position: relative;
    box-shadow: 0 2px 8px rgba(22, 119, 255, 0.25);
}

.header h1 {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 1px;
}

/* ===== 容器 ===== */
.container {
    padding: 12px;
    max-width: 480px;
    margin: 0 auto;
}

/* ===== Banner ===== */
.banner {
    margin-bottom: 16px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.banner img {
    width: 100%;
    display: block;
}

/* ===== 板块标题 ===== */
.section-title {
    font-size: 17px;
    font-weight: 600;
    margin: 18px 0 12px;
    padding-left: 12px;
    border-left: 3px solid #1677ff;
    color: #1a1a1a;
}

/* ===== 商品网格 ===== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid #f0f0f0;
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
    border-color: #e6f0ff;
}

.product-card:active {
    transform: translateY(0);
}

.product-img-box {
    width: 100%;
    background: #f8f8f8;
}

.product-img-box img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 8 / 6;
    object-fit: contain;
}

.product-name {
    padding: 10px 10px 4px;
    font-size: 14px;
    color: #1a1a1a;
    font-weight: 500;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-all;
}

.product-price {
    padding: 0 10px 12px;
    color: #1677ff;
    font-weight: 700;
    font-size: 18px;
    letter-spacing: -0.3px;
}

.price {
    color: #1677ff;
    font-weight: 700;
    font-size: 18px;
    letter-spacing: -0.3px;
}

/* ===== 商品列表（商品页） ===== */
.product-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.product-item {
    background: white;
    border-radius: 12px;
    padding: 14px;
    display: flex;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
}

.product-item:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    border-color: #e6f0ff;
}

.product-item img {
    width: 90px;
    height: 90px;
    border-radius: 10px;
    margin-right: 14px;
    object-fit: cover;
    background: #fafafa;
    flex-shrink: 0;
}

.product-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0;
}

.product-info h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
    color: #1a1a1a;
}

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

.product-info .price {
    font-size: 17px;
}

.buy-btn {
    background: linear-gradient(135deg, #1677ff 0%, #0958d9 100%);
    color: white;
    border: none;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    float: right;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(22, 119, 255, 0.3);
}

.buy-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(22, 119, 255, 0.4);
}

.buy-btn:active {
    transform: translateY(0);
}

/* ===== 表单容器 ===== */
.form-container {
    background: white;
    border-radius: 16px;
    padding: 24px 20px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    margin-top: 8px;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid #e8e8e8;
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: #fafafa;
    outline: none;
}

.form-group input:focus {
    border-color: #1677ff;
    background: white;
    box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.08);
}

.form-group input::placeholder {
    color: #bbb;
}

.submit-btn {
    width: 100%;
    background: linear-gradient(135deg, #1677ff 0%, #0958d9 100%);
    color: white;
    border: none;
    padding: 13px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    margin-top: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 14px rgba(22, 119, 255, 0.3);
    letter-spacing: 1px;
}

.submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(22, 119, 255, 0.4);
}

.submit-btn:active {
    transform: translateY(0);
}

.login-link, .register-link {
    text-align: center;
    margin-top: 18px;
    font-size: 14px;
    color: #999;
}

.login-link a, .register-link a {
    color: #1677ff;
    text-decoration: none;
    font-weight: 500;
}

.login-link a:hover, .register-link a:hover {
    text-decoration: underline;
}

/* ===== 支付页面 ===== */
.payment-container {
    background: white;
    border-radius: 16px;
    padding: 24px 20px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    margin-top: 8px;
}

.payment-info {
    margin-bottom: 24px;
}

.payment-info h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
    color: #1a1a1a;
}

.payment-info p {
    margin-bottom: 10px;
    color: #666;
    font-size: 14px;
}

.payment-info .price {
    font-size: 20px;
}

.qrcode {
    text-align: center;
    margin: 24px 0;
    padding: 20px;
    background: #f9faff;
    border-radius: 16px;
    border: 1.5px dashed #d6e4ff;
}

.qrcode img {
    width: 180px;
    height: 180px;
    margin-bottom: 12px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.qrcode p {
    color: #666;
    font-size: 13px;
    line-height: 1.5;
}

.payment-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    gap: 12px;
}

.cancel-btn, .confirm-btn {
    flex: 1;
    padding: 12px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cancel-btn {
    background-color: #f5f5f5;
    color: #666;
}

.cancel-btn:hover {
    background-color: #e8e8e8;
}

.confirm-btn {
    background: linear-gradient(135deg, #1677ff 0%, #0958d9 100%);
    color: white;
    box-shadow: 0 4px 14px rgba(22, 119, 255, 0.3);
}

.confirm-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(22, 119, 255, 0.4);
}

.confirm-btn:active {
    transform: translateY(0);
}

/* ===== 底部导航 ===== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    display: flex;
    justify-content: space-around;
    padding: 8px 0 env(safe-area-inset-bottom, 8px);
    box-shadow: 0 -1px 6px rgba(0,0,0,0.06);
    z-index: 100;
    border-top: 1px solid #f0f0f0;
}

.bottom-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #999;
    font-size: 12px;
    padding: 4px 12px;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
}

.bottom-nav a.active {
    color: #1677ff;
    font-weight: 600;
}

.bottom-nav a.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 3px;
    background: #1677ff;
    border-radius: 2px;
}

.bottom-nav a span {
    margin-top: 3px;
    font-size: 12px;
}

/* ===== 支付宝图标 ===== */
.alipay-icon {
    display: inline-block;
    color: #1677ff;
    font-weight: 700;
    font-size: 14px;
}

/* ===== 页面微调 ===== */
.header h1 + p {
    font-size: 12px;
    opacity: 0.8;
    margin-top: 2px;
}

/* ===== 响应式 ===== */
@media (min-width: 480px) {
    .container {
        padding: 16px;
    }
    
    .product-grid {
        gap: 16px;
    }
}
