* { margin: 0; padding: 0; box-sizing: border-box; }
:root { --primary: #2563eb; --danger: #dc2626; --text: #1e293b; --text-light: #64748b; --border: #e2e8f0; }
body { font-family: "Microsoft YaHei", "PingFang SC", sans-serif; background: #f5f6fa; color: var(--text); font-size: 14px; }

.store-top { position: sticky; top: 0; background: linear-gradient(135deg,#2563eb,#1e40af); color: #fff; padding: 16px; z-index: 20; box-shadow: 0 2px 8px rgba(0,0,0,.15); }
.store-top h1 { font-size: 19px; }
.store-top p { font-size: 12px; opacity: .9; margin-top: 4px; }
.store-top .phone { margin-top: 6px; font-size: 12px; }

.search-bar { padding: 12px 16px 8px; position: sticky; top: 96px; background: #f5f6fa; z-index: 10; }
.search-bar input { width: 100%; padding: 10px 16px; border: 1px solid var(--border); border-radius: 22px; font-size: 14px; outline: none; }

.cat-bar { display: flex; gap: 8px; overflow-x: auto; padding: 0 16px 8px; -webkit-overflow-scrolling: touch; }
.cat-bar::-webkit-scrollbar { display: none; }
.cat-bar .cat { white-space: nowrap; padding: 6px 16px; border-radius: 18px; background: #fff; border: 1px solid var(--border); cursor: pointer; font-size: 13px; flex-shrink: 0; }
.cat-bar .cat.active { background: var(--primary); color: #fff; border-color: var(--primary); }

.goods-list { padding: 12px 16px 110px; }
.goods-card { display: flex; justify-content: space-between; align-items: center; background: #fff; border-radius: 12px; padding: 14px 16px; margin-bottom: 12px; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.goods-card .g-img { width: 52px; height: 52px; object-fit: cover; border-radius: 8px; margin-right: 12px; flex-shrink: 0; }
.goods-info { flex: 1; min-width: 0; margin-right: 10px; }
.goods-info .g-name { font-weight: 600; font-size: 15px; }
.goods-info .g-spec { color: var(--text-light); font-size: 12px; margin: 4px 0; }
.goods-info .g-row { display: flex; align-items: baseline; gap: 10px; }
.goods-info .g-price { color: var(--danger); font-weight: 700; font-size: 18px; }
.goods-info .g-price small { color: var(--text-light); font-weight: 400; font-size: 12px; }
.goods-info .g-stock { color: var(--text-light); font-size: 12px; }
.stepper { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.stepper button { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--border); background: #fff; font-size: 18px; line-height: 1; cursor: pointer; }
.stepper button:disabled { opacity: .4; cursor: default; }
.stepper .qty { min-width: 28px; text-align: center; font-weight: 600; font-size: 15px; }

.cart-bar { position: fixed; left: 0; right: 0; bottom: 0; background: #fff; box-shadow: 0 -4px 16px rgba(0,0,0,.1); padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; z-index: 30; }
.cart-bar .total { font-size: 14px; }
.cart-bar .total b { color: var(--danger); font-size: 22px; }
.cart-bar .btn { padding: 10px 24px; border: none; border-radius: 22px; background: var(--primary); color: #fff; font-size: 15px; cursor: pointer; }
.cart-bar .btn:disabled { background: #a0aec0; cursor: not-allowed; }

.order-panel { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 100; display: none; align-items: flex-end; }
.order-panel.show { display: flex; }
.order-panel .panel { background: #fff; width: 100%; border-radius: 18px 18px 0 0; padding: 22px 20px 30px; max-height: 88vh; overflow-y: auto; }
.order-panel .panel h3 { margin-bottom: 16px; font-size: 18px; }
.order-panel .field { margin-bottom: 12px; }
.order-panel label { display: block; font-size: 13px; color: var(--text-light); margin-bottom: 6px; }
.order-panel input, .order-panel textarea { width: 100%; padding: 11px 12px; border: 1px solid var(--border); border-radius: 10px; font-size: 14px; outline: none; }
.order-panel input:focus, .order-panel textarea:focus { border-color: var(--primary); }
.order-list { border-top: 1px dashed var(--border); border-bottom: 1px dashed var(--border); padding: 10px 0; margin-bottom: 14px; max-height: 30vh; overflow-y: auto; }
.order-list .ol-item { display: flex; justify-content: space-between; padding: 6px 0; font-size: 13px; }
.order-list .ol-item .left { flex: 1; }
.order-list .ol-item .price { color: var(--danger); font-weight: 600; }
.panel-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; }
.panel-foot .sum { font-size: 16px; }
.panel-foot .sum b { color: var(--danger); font-size: 22px; }
.panel-foot .btn { padding: 11px 26px; border: none; border-radius: 22px; background: var(--primary); color: #fff; font-size: 15px; cursor: pointer; }
.panel-foot .btn:disabled { background: #a0aec0; }

.success-wrap { position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 120; display: none; align-items: center; justify-content: center; padding: 20px; }
.success-wrap.show { display: flex; }
.success-card { background: #fff; border-radius: 16px; padding: 36px 30px; text-align: center; width: 100%; max-width: 380px; }
.success-card .icon { font-size: 52px; margin-bottom: 12px; }
.success-card h3 { font-size: 19px; margin-bottom: 8px; }
.success-card .no { color: var(--text-light); font-size: 14px; margin-bottom: 12px; }
.success-card p { color: var(--text-light); font-size: 13px; margin-bottom: 20px; }
.success-card .btn { padding: 10px 28px; border: none; border-radius: 22px; background: var(--primary); color: #fff; font-size: 14px; cursor: pointer; }

.empty { text-align: center; color: var(--text-light); padding: 60px 0; }
.loading { text-align: center; color: var(--text-light); padding: 60px 0; }
