/* 安分 H5 — 自定义样式补充 */

/* ---- 全局 ---- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, "PingFang SC", "Microsoft YaHei", sans-serif; background: #f5f5f5; color: #333; -webkit-font-smoothing: antialiased; }
#app { max-width: 480px; margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; background: #f5f5f5; position: relative; }
.app-body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding-bottom: 60px; }

/* ---- 卡片 ---- */
.card { background: #fff; border-radius: 12px; margin: 12px; padding: 16px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }

/* ---- TabBar ---- */
.tabbar { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px; display: flex; background: #131313; border-top: 1px solid #2a2a2a; z-index: 100; }
.tabbar-item { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 6px 0 8px; color: #565657; cursor: pointer; transition: color .2s; }
.tabbar-item.active { color: #fff; }
.tabbar-icon { width: 24px; height: 24px; margin-bottom: 2px; }
.tabbar-label { font-size: 10px; line-height: 1.2; }

/* ---- 顶部导航 ---- */
.nav-bar { position: sticky; top: 0; z-index: 50; background: #fff; padding: 12px 16px; display: flex; align-items: center; border-bottom: 1px solid #eee; }
.nav-back { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 20px; color: #333; }
.nav-title { flex: 1; text-align: center; font-size: 17px; font-weight: 600; margin-right: 32px; }

/* ---- 品牌标签 ---- */
.brand-tabs { display: flex; gap: 20px; padding: 12px 16px 0; }
.brand-tab { position: relative; padding: 8px 0; font-size: 18px; font-weight: 600; color: #999; cursor: pointer; transition: color .2s; }
.brand-tab.active { color: #333; }
.brand-tab-indicator { position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: 24px; height: 3px; border-radius: 2px; }

/* ---- 系列标签条 ---- */
.series-bar { padding: 8px 16px; overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; }
.series-bar::-webkit-scrollbar { display: none; }
.series-chip { display: inline-block; padding: 6px 16px; border-radius: 20px; font-size: 13px; color: #666; background: #f0f0f0; cursor: pointer; margin-right: 8px; transition: all .2s; }
.series-chip.active { color: #fff; background: #333; }

/* ---- Hero 大图 ---- */
.hero-section { padding: 20px 16px; text-align: center; }
.hero-image { width: 100%; max-height: 300px; object-fit: contain; border-radius: 12px; }
.hero-name { font-size: 22px; font-weight: 700; margin-top: 16px; }
.hero-tagline { font-size: 14px; color: #999; margin-top: 4px; }

/* ---- CTA 按钮 ---- */
.cta-group { display: flex; gap: 12px; padding: 0 16px 20px; }
.cta-btn { flex: 1; padding: 12px; border-radius: 8px; text-align: center; font-size: 15px; font-weight: 600; cursor: pointer; transition: opacity .2s; }
.cta-btn:active { opacity: .7; }
.cta-btn-ghost { background: #f5f5f5; color: #333; }
.cta-btn-primary { background: #333; color: #fff; }

/* ---- 选择器 chips ---- */
.section { margin: 12px; }
.section-title { font-size: 15px; font-weight: 600; margin-bottom: 12px; }
.chip-list { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 8px 16px; border: 1px solid #ddd; border-radius: 8px; font-size: 13px; color: #333; cursor: pointer; transition: all .2s; }
.chip.active { border-color: #333; color: #333; font-weight: 600; }
.chip-compact { padding: 6px 12px; font-size: 12px; }

/* ---- 主按钮 ---- */
.primary-btn { background: #333; color: #fff; border: none; border-radius: 8px; padding: 14px; font-size: 16px; font-weight: 600; text-align: center; cursor: pointer; width: 100%; transition: opacity .2s; }
.primary-btn:active { opacity: .7; }
.primary-btn:disabled { opacity: .4; }
.ghost-btn { background: #f5f5f5; color: #333; border: none; border-radius: 8px; padding: 14px; font-size: 16px; font-weight: 600; text-align: center; cursor: pointer; width: 100%; }

/* ---- 底部固定栏 ---- */
.footer { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px; padding: 12px 16px; background: #fff; border-top: 1px solid #eee; z-index: 50; }
.footer-placeholder { height: 70px; }

/* ---- 表单 ---- */
.form-row { display: flex; align-items: center; padding: 14px 0; border-bottom: 1px solid #f0f0f0; }
.form-row:last-child { border-bottom: none; }
.form-label { width: 80px; font-size: 14px; color: #666; flex-shrink: 0; }
.form-input { flex: 1; border: none; font-size: 14px; outline: none; background: transparent; }
.form-input::placeholder { color: #ccc; }
.form-value { flex: 1; font-size: 14px; }
.form-ph { color: #ccc; }

/* ---- 订单卡片 ---- */
.order-card { cursor: pointer; }
.order-main { display: flex; justify-content: space-between; align-items: flex-start; }
.order-name { font-size: 15px; font-weight: 600; flex: 1; }
.order-amount { font-size: 15px; font-weight: 600; text-align: right; }
.order-status { font-size: 12px; color: #999; text-align: right; margin-top: 2px; }
.order-status-paid { color: #07c160; }
.order-delivery { font-size: 12px; color: #999; margin-top: 6px; }
.order-time { font-size: 12px; color: #bbb; margin-top: 4px; }

/* ---- 信息行 ---- */
.info-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid #f5f5f5; }
.info-row:last-child { border-bottom: none; }
.info-label { font-size: 13px; color: #999; }
.info-value { font-size: 13px; color: #333; text-align: right; max-width: 60%; }
.info-highlight { color: #333; font-weight: 600; }

/* ---- 地址卡片 ---- */
.addr-card { position: relative; }
.addr-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.addr-receiver { font-size: 15px; font-weight: 600; }
.addr-phone { font-size: 13px; color: #999; }
.addr-tag { font-size: 10px; color: #fff; background: #333; padding: 1px 6px; border-radius: 4px; }
.addr-detail { font-size: 13px; color: #666; }
.addr-actions { display: flex; gap: 16px; margin-top: 10px; padding-top: 10px; border-top: 1px solid #f0f0f0; }
.addr-action { font-size: 13px; color: #576b95; cursor: pointer; }
.addr-action-danger { color: #fa5151; }

/* ---- 空态 ---- */
.empty-wrap { text-align: center; padding: 60px 0; }
.empty-icon-text { font-size: 48px; }
.empty-text { font-size: 14px; color: #999; margin-top: 12px; }

/* ---- 用户卡片 ---- */
.user-card { display: flex; align-items: center; padding: 20px 16px; }
.avatar { width: 48px; height: 48px; border-radius: 50%; margin-right: 12px; display: flex; align-items: center; justify-content: center; }
.avatar-guest { background: #e0e0e0; }
.avatar-user { background: #333; color: #fff; font-size: 18px; font-weight: 600; }
.user-name { font-size: 17px; font-weight: 600; }
.user-sub { font-size: 13px; color: #999; margin-top: 2px; }

/* ---- 功能入口 ---- */
.entry-item { display: flex; justify-content: space-between; align-items: center; padding: 16px 0; cursor: pointer; }
.entry-label { font-size: 15px; }
.entry-arrow { color: #ccc; font-size: 14px; }
.entry-divider { height: 1px; background: #f0f0f0; }

/* ---- 结果页 ---- */
.result { text-align: center; padding: 40px 16px; }
.success-icon { width: 64px; height: 64px; border-radius: 50%; background: #07c160; margin: 0 auto 16px; display: flex; align-items: center; justify-content: center; }
.success-tick { color: #fff; font-size: 32px; font-weight: 700; }
.result-title { font-size: 20px; font-weight: 700; margin-bottom: 20px; }
.result-btn { margin-top: 16px; }

/* ---- Tab 切换 ---- */
.tabs { display: flex; margin: 12px; gap: 0; }
.tab { flex: 1; text-align: center; padding: 10px; font-size: 14px; color: #666; background: #f5f5f5; cursor: pointer; transition: all .2s; }
.tab:first-child { border-radius: 8px 0 0 8px; }
.tab:last-child { border-radius: 0 8px 8px 0; }
.tab.active { background: #333; color: #fff; }

/* ---- 门店选择 ---- */
.store-item { display: flex; align-items: center; padding: 12px 0; border-bottom: 1px solid #f0f0f0; cursor: pointer; }
.store-item:last-child { border-bottom: none; }
.store-info { flex: 1; }
.store-name { font-size: 14px; font-weight: 600; }
.store-addr { font-size: 12px; color: #999; margin-top: 2px; }

/* ---- 单选/复选 ---- */
.radio, .checkbox { width: 20px; height: 20px; border: 2px solid #ddd; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.radio-checked { border-color: #333; }
.radio-dot { width: 10px; height: 10px; border-radius: 50%; background: #333; }
.checkbox { border-radius: 4px; }
.checkbox-checked { background: #333; border-color: #333; }
.checkbox-tick { color: #fff; font-size: 12px; }

/* ---- 未绑定商户提示 ---- */
.no-merchant { text-align: center; padding: 100px 32px; }
.no-merchant-icon { font-size: 48px; margin-bottom: 16px; }
.no-merchant-text { font-size: 15px; color: #999; line-height: 1.6; }

/* ---- 分期信息行 ---- */
.installment-title { display: flex; justify-content: space-between; align-items: center; }
.installment-info { font-size: 12px; color: #999; font-weight: 400; }

/* ---- 地址选择列表 ---- */
.addr-item { padding: 10px 0; border-bottom: 1px solid #f0f0f0; cursor: pointer; }
.addr-item:last-child { border-bottom: none; }
.addr-item-active { background: #f9f9f9; border-radius: 6px; padding: 10px 8px; margin: -2px -8px; }
.addr-line1 { font-size: 14px; font-weight: 600; }
.addr-line2 { font-size: 12px; color: #999; margin-top: 4px; }

/* ---- 底部安全区 ---- */
.bottom-safe { height: 20px; }

/* ---- 保存地址行 ---- */
.save-row { display: flex; align-items: center; gap: 8px; padding: 12px 0 0; }
.save-text { font-size: 13px; color: #666; }
