*{margin:0;padding:0;box-sizing:border-box}
body{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;font-size:14px;color:#333;background:#f4f7fc;line-height:1.6}
a{color:inherit;text-decoration:none}
img{max-width:100%;display:block}
.container{max-width:1200px;margin:0 auto;padding:0 16px}

/* 左侧悬浮 */
.float-bar{position:fixed;left:0;top:120px;z-index:99}
.float-item{padding:10px 12px;margin-bottom:8px;border-radius:0 8px 8px 0;box-shadow:0 4px 12px rgba(0,0,0,.15);text-align:center}
.float-item a{color:#fff;font-size:13px;font-weight:600;display:block}
.float-red{background:linear-gradient(45deg,#fd0b27,#ff4a4a)}
.float-blue{background:linear-gradient(45deg,#3798f7,#3369ff)}
.float-purple{background:linear-gradient(45deg,#f737e8,#3369ff)}

/* 顶部 */
.site-header{background:linear-gradient(90deg,#2a62ff,#4e7dff);box-shadow:0 2px 10px rgba(51,105,255,.3)}
.header-inner{display:flex;align-items:center;justify-content:space-between;height:64px;gap:20px}
.header-left{display:flex;align-items:center;gap:24px}
.logo{display:flex;align-items:center;gap:10px}
.logo img{height:36px}
.logo-text{font-size:20px;font-weight:700;color:#fff}
.logo-slogan{color:rgba(255,255,255,.85);font-size:13px}
.header-cs{display:flex;align-items:center;gap:6px;color:#fff;font-size:13px;background:rgba(255,255,255,.15);padding:6px 14px;border-radius:20px}
.header-right{display:flex;gap:8px}
.header-btn{display:flex;align-items:center;gap:6px;color:#fff;font-size:14px;padding:8px 16px;border-radius:6px;background:rgba(255,255,255,.15);transition:background .2s}
.header-btn:hover{background:rgba(255,255,255,.25)}

.flash-message{max-width:1200px;margin:16px auto;padding:12px 20px;border-radius:6px}
.flash-success{background:#f6ffed;border:1px solid #b7eb8f;color:#389e0d}
.flash-error{background:#fff2f0;border:1px solid #ffccc7;color:#cf1322}

.main-content{min-height:calc(100vh - 200px);padding:24px 0 100px}

/* 卡片区块 */
.card-section{background:#fff;border-radius:10px;box-shadow:0 7px 29px 0 rgba(18,52,91,.08);padding:20px 30px;margin-bottom:0}
.section-title{font-size:16px;font-weight:600;color:#333;margin-bottom:16px;padding-left:10px;border-left:3px solid #3369ff}
.divider{border:none;border-top:1px solid #f0f0f0;margin:0}

/* 搜索 */
.search-box{margin-bottom:8px}
.search-form{display:flex;gap:12px;align-items:center}
.search-form input{flex:1;max-width:400px;height:40px;padding:0 16px;border:1px solid #f0f0f0;border-radius:6px;box-shadow:0 4px 10px rgba(135,142,154,.07);font-size:14px}
.search-form input:focus{outline:none;border-color:#3369ff}
.search-form button{height:36px;padding:0 24px;background:linear-gradient(0deg,#2a62ff,#4e7dff);color:#fff;border:none;border-radius:18px;cursor:pointer;font-size:14px;box-shadow:0 5px 6px rgba(73,105,230,.22)}

/* 分类 */
.category-list{display:flex;flex-wrap:wrap;gap:12px}
.category-card{flex:0 0 auto;min-width:140px;padding:14px 20px;background:#f8f9fc;border-radius:8px;border:2px solid transparent;cursor:pointer;transition:all .2s}
.category-card:hover{border-color:#3369ff;background:#f0f4ff}
.category-card.active{border-color:#3369ff;background:#f0f4ff}
.cat-name{font-size:15px;font-weight:600;color:#333;margin-bottom:4px}
.cat-count{font-size:12px;color:#999}

/* 商品列表 */
.goods-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:12px}
.goods-card{padding:16px;border:2px solid #f0f0f0;border-radius:8px;cursor:pointer;transition:all .2s;background:#fff}
.goods-card:hover{border-color:#3369ff;box-shadow:0 4px 12px rgba(51,105,255,.15)}
.goods-card.selected{border-color:#3369ff;background:#f0f4ff;box-shadow:0 4px 12px rgba(51,105,255,.2)}
.goods-name{font-size:15px;font-weight:600;color:#333;margin-bottom:8px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.goods-meta{display:flex;justify-content:space-between;align-items:center;margin-bottom:4px}
.goods-price{color:#ff4d4f;font-size:18px;font-weight:700}
.goods-stock{font-size:12px;padding:2px 8px;border-radius:10px}
.goods-stock.in-stock{background:#f6ffed;color:#52c41a}
.goods-stock.out-stock{background:#fff2f0;color:#ff4d4f}
.goods-sales{font-size:12px;color:#999}

/* 商品描述 */
.goods-desc{padding:12px;background:#f8f9fc;border-radius:6px;color:#666;line-height:1.8;min-height:60px;white-space:pre-wrap}

/* 填写信息 */
.info-box{background:#fff}
.info-title{font-size:15px;font-weight:600;color:#333;margin-bottom:16px;padding:10px 0;border-bottom:1px solid #f0f0f0}
.info-row{display:flex;align-items:center;gap:12px;margin-bottom:12px}
.info-label{width:100px;flex-shrink:0;font-size:14px;color:#555}
.info-label .required{color:#ff4d4f}
.info-input{flex:1}
.info-input input{width:100%;height:40px;padding:0 14px;border:1px solid #e0e0e0;border-radius:6px;font-size:14px}
.info-input input:focus{outline:none;border-color:#3369ff}
.info-tip{font-size:12px;color:#999;margin-left:112px;margin-bottom:16px}
.pay-title{font-size:15px;font-weight:600;color:#333;margin:16px 0 12px}
.pay-list{display:flex;gap:12px}
.pay-item{display:flex;align-items:center;gap:8px;padding:10px 20px;border:2px solid #e0e0e0;border-radius:8px;cursor:pointer;transition:all .2s;position:relative}
.pay-item:hover{border-color:#3369ff}
.pay-item.active{border-color:#3369ff;background:#f0f4ff}
.pay-icon{width:28px;height:28px;border-radius:6px;display:flex;align-items:center;justify-content:center;color:#fff;font-weight:700;font-size:14px}
.alipay-icon{background:#1677ff}
.wechat-icon{background:#07c160}
.pay-check{color:#3369ff;font-weight:700;display:none}
.pay-item.active .pay-check{display:inline}

/* 底部购买栏 */
.bottom-bar{position:fixed;bottom:0;left:0;right:0;background:#fff;box-shadow:0 -4px 20px rgba(0,0,0,.1);z-index:100}
.bottom-inner{display:flex;align-items:center;justify-content:space-between;height:64px;gap:16px}
.bottom-goods{font-size:15px;font-weight:600;color:#333;max-width:300px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.bottom-right{display:flex;align-items:center;gap:20px}
.quantity-box{display:flex;align-items:center;gap:0}
.qty-btn{width:32px;height:32px;border:1px solid #e0e0e0;background:#f8f9fc;cursor:pointer;font-size:18px;display:flex;align-items:center;justify-content:center}
.qty-btn:first-child{border-radius:6px 0 0 6px}
.quantity-box input{width:50px;height:32px;text-align:center;border:1px solid #e0e0e0;border-left:none;border-right:none;font-size:14px}
.quantity-box .qty-btn:last-child{border-radius:0 6px 6px 0;border-left:none}
.total-price{font-size:15px;color:#666}
.total-price .currency{color:#ff4d4f}
.total-price #totalPrice{color:#ff4d4f;font-size:22px;font-weight:700}
.pay-btn{height:44px;padding:0 40px;background:linear-gradient(0deg,#2a62ff,#4e7dff);color:#fff;border:none;border-radius:22px;cursor:pointer;font-size:16px;font-weight:600;box-shadow:0 5px 15px rgba(73,105,230,.3)}
.pay-btn:hover{opacity:.9}

/* 二维码 */
.qr-box{position:fixed;right:20px;bottom:100px;background:#fff;padding:12px;border-radius:8px;box-shadow:0 4px 20px rgba(0,0,0,.15);text-align:center;z-index:99}
.qr-box p{font-size:12px;color:#999;margin-top:6px}
#qrcode img{margin:0 auto}

/* 支付页 */
.pay-page{display:flex;justify-content:center;padding:40px 0}
.pay-card{background:#fff;border-radius:12px;box-shadow:0 10px 40px rgba(0,0,0,.1);padding:40px;max-width:500px;width:100%;text-align:center}
.pay-title{font-size:24px;font-weight:700;color:#333;margin-bottom:24px}
.pay-order-info{text-align:left;margin-bottom:24px}
.pay-order-info .info-row{display:flex;justify-content:space-between;padding:8px 0;border-bottom:1px solid #f5f5f5}
.pay-order-info .total-row{border-bottom:none;font-size:16px}
.pay-order-info .amount{color:#ff4d4f;font-size:20px}
.pay-qrcode-area{margin:24px 0}
.pay-method-tag{display:inline-block;padding:6px 20px;background:#f0f4ff;color:#3369ff;border-radius:20px;font-size:14px;margin-bottom:16px}
.qrcode-wrap{width:220px;height:220px;margin:0 auto;border:1px solid #f0f0f0;border-radius:8px;display:flex;align-items:center;justify-content:center;overflow:hidden}
.pay-qrcode{width:200px;height:200px}
.no-qrcode{color:#999}
.pay-tip{font-size:15px;color:#333;margin:16px 0 4px}
.pay-tip strong{color:#ff4d4f}
.pay-tip-small{font-size:13px;color:#999;margin-bottom:20px}
.confirm-pay-btn{width:100%;height:48px;background:linear-gradient(0deg,#2a62ff,#4e7dff);color:#fff;border:none;border-radius:24px;cursor:pointer;font-size:16px;font-weight:600}
.pay-links{margin-top:20px;display:flex;justify-content:center;gap:24px}
.pay-links a{color:#3369ff;font-size:14px}

/* 成功页 */
.success-page{display:flex;justify-content:center;padding:40px 0}
.success-card{background:#fff;border-radius:12px;box-shadow:0 10px 40px rgba(0,0,0,.1);padding:40px;max-width:560px;width:100%;text-align:center}
.success-icon{width:72px;height:72px;border-radius:50%;background:#52c41a;color:#fff;font-size:40px;display:flex;align-items:center;justify-content:center;margin:0 auto 16px}
.success-title{font-size:24px;font-weight:700;color:#333;margin-bottom:8px}
.success-desc{color:#999;margin-bottom:24px}
.order-detail-box{text-align:left;background:#f8f9fc;border-radius:8px;padding:16px 20px;margin-bottom:20px}
.order-detail-box .info-row{display:flex;justify-content:space-between;padding:6px 0;font-size:14px}
.order-detail-box .amount{color:#ff4d4f}
.card-box{text-align:left;margin-bottom:24px}
.card-box h3{font-size:16px;margin-bottom:12px;color:#333}
.card-textarea{width:100%;min-height:100px;padding:12px;border:1px solid #e0e0e0;border-radius:6px;font-family:monospace;font-size:13px;background:#fafafa;resize:vertical}
.card-tip{font-size:12px;color:#999;margin-top:6px}
.no-card{color:#ff4d4f;padding:12px;background:#fff2f0;border-radius:6px}
.success-actions{display:flex;gap:12px;justify-content:center}
.btn-primary{display:inline-block;padding:10px 32px;background:linear-gradient(0deg,#2a62ff,#4e7dff);color:#fff;border-radius:22px;font-size:15px;border:none;cursor:pointer}
.btn-outline{display:inline-block;padding:10px 32px;background:#fff;color:#3369ff;border:1px solid #3369ff;border-radius:22px;font-size:15px;cursor:pointer}

/* 查询页 */
.query-page{display:flex;justify-content:center;padding:40px 0}
.query-card{background:#fff;border-radius:12px;box-shadow:0 10px 40px rgba(0,0,0,.1);padding:40px;max-width:500px;width:100%}
.query-title{font-size:22px;font-weight:700;text-align:center;margin-bottom:24px}
.query-form .form-group{margin-bottom:16px}
.query-form label{display:block;margin-bottom:6px;font-size:14px;color:#555}
.query-form input{width:100%;height:44px;padding:0 14px;border:1px solid #e0e0e0;border-radius:6px;font-size:15px}
.query-form input:focus{outline:none;border-color:#3369ff}
.query-btn{width:100%;height:44px;background:linear-gradient(0deg,#2a62ff,#4e7dff);color:#fff;border:none;border-radius:22px;cursor:pointer;font-size:16px;font-weight:600}
.query-result{margin-top:24px}
.query-result.error{color:#ff4d4f;text-align:center;padding:16px;background:#fff2f0;border-radius:6px}
.order-status{display:inline-block;padding:4px 16px;border-radius:16px;font-size:13px;margin-bottom:16px}
.status-pending{background:#fff7e6;color:#fa8c16}
.status-paid{background:#f6ffed;color:#52c41a}
.status-delivered{background:#e6f7ff;color:#1890ff}
.status-cancelled{background:#f5f5f5;color:#999}

/* 页脚 */
.site-footer{background:#fff;padding:24px 0;text-align:center;color:#999;font-size:13px;border-top:1px solid #f0f0f0}

.empty-state{text-align:center;padding:40px;color:#999}

@media(max-width:768px){
    .header-inner{flex-wrap:wrap;height:auto;padding:10px 0}
    .header-cs{display:none}
    .float-bar{display:none}
    .qr-box{display:none}
    .goods-list{grid-template-columns:repeat(auto-fill,minmax(140px,1fr))}
    .bottom-goods{display:none}
    .pay-card,.success-card,.query-card{padding:24px 16px}
}
