* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
    background: #f7f7f7; color: #333;
}
a { text-decoration: none; color: inherit; }
.container { max-width: 900px; margin: 0 auto; padding: 0 16px; }

/* 顶部 */
.header {
    background: linear-gradient(135deg, #e53935, #ff7043);
    color: #fff; padding: 18px 0 28px;
}
.header .brand { font-size: 22px; font-weight: 700; }
.header .brand em { font-style: normal; font-size: 13px; opacity: .9; margin-left: 8px; }
.header .notice {
    margin-top: 10px; font-size: 13px; background: rgba(255,255,255,.18);
    padding: 8px 12px; border-radius: 8px;
}

/* 商品区 */
.section-title {
    font-size: 18px; font-weight: 700; margin: 24px 0 14px;
    padding-left: 10px; border-left: 4px solid #e53935;
}
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.card {
    background: #fff; border-radius: 12px; overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,.06); display: flex; flex-direction: column;
}
.card .img {
    height: 180px; background: #eee center/cover no-repeat;
    display: flex; align-items: center; justify-content: center;
    color: #bbb; font-size: 14px;
}
.card .info { padding: 14px; flex: 1; display: flex; flex-direction: column; }
.card .name { font-size: 16px; font-weight: 600; }
.card .desc { font-size: 12px; color: #999; margin: 6px 0 10px; line-height: 1.5; flex: 1; }
.card .row { display: flex; align-items: center; justify-content: space-between; }
.price { color: #e53935; font-size: 18px; font-weight: 700; }
.price small { font-size: 12px; font-weight: 400; }
.stock { font-size: 12px; color: #999; }

.qty-control { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.qty-control button {
    width: 28px; height: 28px; border: 1px solid #ddd; background: #fff;
    border-radius: 6px; font-size: 16px; cursor: pointer;
}
.qty-control input {
    width: 48px; height: 28px; text-align: center; border: 1px solid #ddd;
    border-radius: 6px; font-size: 14px;
}
.btn-add {
    margin-top: 12px; width: 100%; padding: 9px 0; border: none;
    background: #e53935; color: #fff; border-radius: 8px;
    font-size: 14px; cursor: pointer;
}
.btn-add:hover { background: #c62828; }
.btn-add:disabled { background: #ccc; cursor: not-allowed; }

/* 购物车浮条 */
.cart-bar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
    background: #fff; box-shadow: 0 -2px 12px rgba(0,0,0,.12);
}
.cart-bar .inner {
    max-width: 900px; margin: 0 auto; padding: 12px 16px;
    display: flex; align-items: center; justify-content: space-between;
}
.cart-info { display: flex; align-items: center; gap: 8px; }
.cart-count {
    background: #e53935; color: #fff; border-radius: 50%;
    width: 22px; height: 22px; display: flex; align-items: center;
    justify-content: center; font-size: 12px; font-weight: 600;
}
.cart-total { font-size: 14px; }
.cart-total .amount { color: #e53935; font-size: 18px; font-weight: 700; }
.btn-checkout {
    padding: 11px 26px; border: none; border-radius: 22px;
    background: linear-gradient(135deg, #e53935, #ff7043); color: #fff;
    font-size: 15px; font-weight: 600; cursor: pointer;
}
.btn-checkout:disabled { background: #ccc; cursor: not-allowed; }

/* 弹出层 */
.modal-mask {
    position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 30;
    display: none; align-items: center; justify-content: center; padding: 20px;
}
.modal-mask.show { display: flex; }
.modal {
    background: #fff; border-radius: 14px; width: 100%; max-width: 480px;
    max-height: 90vh; overflow-y: auto; padding: 22px;
}
.modal h3 { font-size: 18px; margin-bottom: 16px; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; color: #666; margin-bottom: 6px; }
.form-group input, .form-group textarea {
    width: 100%; padding: 10px 12px; border: 1px solid #ddd; border-radius: 8px;
    font-size: 14px; font-family: inherit;
}
.form-group textarea { resize: vertical; min-height: 70px; }
.order-summary {
    background: #f9f9f9; border-radius: 8px; padding: 12px; margin-bottom: 14px;
    font-size: 13px;
}
.order-summary .line { display: flex; justify-content: space-between; padding: 3px 0; }
.order-summary .grand { font-size: 15px; font-weight: 700; color: #e53935; }
.modal .actions { display: flex; gap: 10px; margin-top: 16px; }
.btn {
    flex: 1; padding: 11px 0; border: none; border-radius: 8px; font-size: 15px; cursor: pointer;
}
.btn-primary { background: #e53935; color: #fff; }
.btn-plain { background: #f0f0f0; color: #333; }

/* 付款页 */
.pay-page { padding-bottom: 60px; }
.pay-card { background: #fff; border-radius: 14px; padding: 24px; margin-top: 20px; text-align: center; }
.pay-card .amount { font-size: 34px; font-weight: 700; color: #e53935; }
.pay-card .ono { font-size: 13px; color: #999; margin: 6px 0 18px; }
.qr-wrap { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; }
.qr-box { text-align: center; }
.qr-box img { width: 150px; height: 150px; border: 1px solid #eee; border-radius: 8px; object-fit: contain; }
.qr-box p { font-size: 13px; color: #666; margin-top: 8px; }
.pay-tip { margin-top: 18px; font-size: 13px; color: #888; line-height: 1.7; }

/* 底部 */
.footer { text-align: center; padding: 26px 16px 90px; color: #999; font-size: 12px; line-height: 1.8; }
.toast {
    position: fixed; top: 20px; left: 50%; transform: translateX(-50%);
    background: rgba(0,0,0,.8); color: #fff; padding: 10px 20px;
    border-radius: 20px; font-size: 14px; z-index: 100; display: none;
}