/* ============================================================
   Huakai Utop 桦恺乌托邦 · 客户端样式
   ------------------------------------------------------------
   设计定调（Design Direction）：
   受众  全球外贸买家（非洲 / 欧美），手机端看货 → 询盘 → 下单
   方向  国际外贸电商——纯白底 + 橙红主色，信息密度优先；
         商品卡直接挂「发询盘」按钮，买家最常做的动作不用进详情就能点；
         公告降为一条细线，黄金位置全部让给商品。
   记忆点 ①橙色询盘按钮   ②方形商品图 + 大字橙红价格
         ③细条公告不占位   ④国际化无衬线，弃用衬线文艺腔
   字体  Plus Jakarta Sans（拉丁） / PingFang SC + 微软雅黑（中文）
   色板  主橙 #FF6A00 · 深橙 #E85D04 · 浅橙底 #FFF4EA · 极浅 #FFF9F5
         价格 #FF3D00 · 文字 #1F1F1F / #6B6B6B / #9E9E9E
         边框 #EBEBEB · 页面底 #F7F7F7
   兼容  360 / IE11：色值全部硬编码，不使用 CSS 变量；字体本地自托管
   ============================================================ */

/* ---------- 本地字体（自托管，无外网依赖） ---------- */
@font-face { font-family: 'Plus Jakarta Sans'; src: url('/fonts/jakarta-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Plus Jakarta Sans'; src: url('/fonts/jakarta-500.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Plus Jakarta Sans'; src: url('/fonts/jakarta-600.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Plus Jakarta Sans'; src: url('/fonts/jakarta-700.woff2') format('woff2'); font-weight: 700; font-display: swap; }

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body { background: #F7F7F7; font-family: "Plus Jakarta Sans", -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; color: #1F1F1F; }
img { max-width: 100%; }
a { color: #E85D04; text-decoration: none; }

/* ---------- 手机容器 ---------- */
#phone { max-width: 480px; margin: 0 auto; min-height: 100vh; background: #F7F7F7; position: relative; padding-bottom: 74px; box-shadow: 0 0 40px rgba(0, 0, 0, 0.07); }

/* ---------- 顶栏 ---------- */
#topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; padding: 11px 14px; background: #FFFFFF; border-bottom: 1px solid #EBEBEB; }
.top-left { display: flex; align-items: center; min-width: 0; }
.back-btn { display: none; border: none; background: none; padding: 6px 10px 6px 2px; margin-left: -4px; cursor: pointer; line-height: 1; }
.back-btn svg { display: block; }
#topbar.can-back .back-btn { display: block; }
.back-btn:active { transform: scale(0.92); }
.brand { font-size: 17px; font-weight: 700; color: #1F1F1F; letter-spacing: 0.01em; display: flex; align-items: center; overflow: hidden; white-space: nowrap; }
.brand::before { content: ''; width: 22px; height: 22px; background: url(/brand/logo.png) center/contain no-repeat; margin-right: 8px; flex: 0 0 22px; }
.top-right { display: flex; align-items: center; gap: 8px; }
.lang-btn { border: 1px solid #EBEBEB; background: #FFFFFF; color: #6B6B6B; font-size: 12px; font-weight: 600; padding: 5px 12px; border-radius: 6px; cursor: pointer; transition: all 0.16s; }
.lang-btn:hover { border-color: #FF6A00; color: #FF6A00; }
.icon-btn { position: relative; border: none; background: none; padding: 4px; cursor: pointer; line-height: 1; }
.icon-btn svg { display: block; }
.bell-badge { position: absolute; top: -3px; right: -4px; background: #FF3D00; color: #FFFFFF; font-size: 10px; font-weight: 700; min-width: 16px; height: 16px; line-height: 16px; border-radius: 99px; padding: 0 4px; text-align: center; }

/* ---------- 底部标签栏 ---------- */
#tabbar { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px; display: flex; background: #FFFFFF; border-top: 1px solid #EBEBEB; padding: 6px 0 calc(6px + env(safe-area-inset-bottom)); z-index: 30; }
#tabbar a { flex: 1; text-align: center; font-size: 11px; color: #9E9E9E; text-decoration: none; padding: 3px 0; transition: color 0.16s; }
#tabbar a .tab-ico { display: block; margin: 0 auto 2px; }
#tabbar a.active { color: #FF6A00; font-weight: 700; }

#view { padding: 12px 14px; min-height: 60vh; }

/* ---------- 公告条（细线，不占黄金位） ---------- */
.banner { display: flex; align-items: center; gap: 8px; background: #FFF4EA; border: 1px solid #FFE0C7; border-radius: 8px; padding: 8px 11px; margin-bottom: 11px; }
.banner::before { content: ''; width: 14px; height: 14px; flex: 0 0 14px; background: #FF6A00; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M3 11v2a1 1 0 0 0 1 1h3l4 4V6L7 10H4a1 1 0 0 0-1 1z'/%3E%3Cpath d='M16 8a5 5 0 0 1 0 8'/%3E%3C/svg%3E") center/contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M3 11v2a1 1 0 0 0 1 1h3l4 4V6L7 10H4a1 1 0 0 0-1 1z'/%3E%3Cpath d='M16 8a5 5 0 0 1 0 8'/%3E%3C/svg%3E") center/contain no-repeat; }
.banner-title { display: none; }
.banner-sub { font-size: 12px; line-height: 1.5; color: #B45309; flex: 1; }

/* ---------- 搜索与分类 ---------- */
.search-row { display: flex; gap: 8px; margin-bottom: 10px; }
.search-row input { flex: 1; border: 1px solid #EBEBEB; background: #FFFFFF; border-radius: 8px; padding: 10px 13px; font-size: 14px; outline: none; color: #1F1F1F; transition: border-color 0.16s, box-shadow 0.16s; }
.search-row input:focus { border-color: #FF6A00; box-shadow: 0 0 0 3px rgba(255, 106, 0, 0.12); }
.search-row input::placeholder { color: #9E9E9E; }
.search-row button { border: none; background: #FF6A00; color: #FFFFFF; border-radius: 8px; padding: 0 18px; font-size: 14px; font-weight: 600; cursor: pointer; transition: background 0.16s; }
.search-row button:hover { background: #E85D04; }

.chips { display: flex; gap: 7px; overflow-x: auto; padding-bottom: 10px; margin-bottom: 2px; -webkit-overflow-scrolling: touch; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: 0 0 auto; border: 1px solid #EBEBEB; background: #FFFFFF; color: #6B6B6B; font-size: 13px; padding: 6px 14px; border-radius: 99px; cursor: pointer; transition: all 0.16s; }
.chip:hover { border-color: #FF6A00; color: #FF6A00; }
.chip.active { background: #FF6A00; color: #FFFFFF; border-color: #FF6A00; font-weight: 600; }

/* ---------- 商品列表 ---------- */
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.card { border: 1px solid #EBEBEB; border-radius: 10px; overflow: hidden; background: #FFFFFF; display: flex; flex-direction: column; transition: border-color 0.16s; animation: rise 0.42s cubic-bezier(0.16, 1, 0.3, 1) both; }
.card:nth-child(2) { animation-delay: 60ms; }
.card:nth-child(3) { animation-delay: 120ms; }
.card:nth-child(4) { animation-delay: 180ms; }
.card:nth-child(5) { animation-delay: 240ms; }
.card:nth-child(6) { animation-delay: 300ms; }
.card:hover { border-color: #FFC79E; }
.card-link { display: block; text-decoration: none; color: inherit; flex: 1; }
.pimg { position: relative; width: 100%; padding-top: 100%; background: #F7F7F7; overflow: hidden; display: block; }
.pimg img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.pimg-ph { position: absolute; top: 0; left: 0; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: #FFFFFF; font-size: 30px; font-weight: 700; }
.card-body { padding: 9px 10px 6px; }
.pname { font-size: 13px; font-weight: 500; line-height: 1.45; height: 38px; overflow: hidden; color: #1F1F1F; }
.pprice { color: #FF3D00; font-weight: 700; font-size: 17px; margin-top: 5px; font-variant-numeric: tabular-nums; }
.pprice small { font-size: 11px; font-weight: 500; }
.psold { font-size: 11px; color: #9E9E9E; margin-top: 2px; }
.card-inquiry { display: block; margin: 0 10px 10px; text-align: center; border: 1px solid #FF6A00; background: #FFF4EA; color: #E85D04; font-size: 12px; font-weight: 600; padding: 6px 0; border-radius: 6px; text-decoration: none; transition: all 0.16s; }
.card-inquiry:hover { background: #FF6A00; color: #FFFFFF; }

/* ---------- 商品详情 ---------- */
.gallery { margin-bottom: 12px; animation: rise 0.42s cubic-bezier(0.16, 1, 0.3, 1) both; }
.gallery-main { border-radius: 12px; overflow: hidden; height: 240px; background: #F7F7F7; border: 1px solid #EBEBEB; }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-thumbs { display: flex; gap: 7px; margin-top: 8px; overflow-x: auto; }
.gthumb { width: 50px; height: 50px; flex: 0 0 50px; border-radius: 8px; overflow: hidden; border: 2px solid #EBEBEB; padding: 0; background: #FFFFFF; cursor: pointer; transition: border-color 0.16s; }
.gthumb:hover { border-color: #FFC79E; }
.gthumb.active { border-color: #FF6A00; }
.gthumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.detail-img { height: 214px; border-radius: 12px; display: flex; align-items: center; justify-content: center; color: #FFFFFF; font-size: 58px; font-weight: 700; margin-bottom: 12px; }
.detail-name { font-size: 19px; font-weight: 700; line-height: 1.4; color: #1F1F1F; }
.detail-price { color: #FF3D00; font-size: 24px; font-weight: 700; margin: 7px 0 2px; font-variant-numeric: tabular-nums; }
.detail-meta { font-size: 12px; color: #9E9E9E; margin-bottom: 12px; line-height: 1.7; }

.section { border: 1px solid #EBEBEB; border-radius: 10px; padding: 13px; margin-bottom: 12px; background: #FFFFFF; animation: rise 0.42s cubic-bezier(0.16, 1, 0.3, 1) both; }
.section-title { font-size: 13px; font-weight: 700; color: #1F1F1F; margin-bottom: 10px; display: flex; align-items: center; }
.section-title::before { content: ''; width: 3px; height: 13px; background: #FF6A00; border-radius: 2px; margin-right: 8px; }
.section-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.spec-pills { display: flex; flex-wrap: wrap; gap: 7px; }
.spec-pill { border: 1px solid #EBEBEB; border-radius: 6px; padding: 7px 13px; font-size: 13px; cursor: pointer; background: #FFFFFF; color: #6B6B6B; transition: all 0.16s; }
.spec-pill:hover { border-color: #FF6A00; color: #FF6A00; }
.spec-pill.active { border-color: #FF6A00; background: #FFF4EA; color: #E85D04; font-weight: 700; }
/* 细分品类标签（详情页商品名下方） */
.detail-cat { display: inline-block; margin: 6px 0 2px; font-size: 12px; color: #9A6A45; background: #FFF4EA; padding: 2px 9px; border-radius: 6px; letter-spacing: .3px; }
/* 颜色选项 chip（可点选，与规格一样记入订单 spec） */
.color-opts { display: flex; flex-wrap: wrap; gap: 7px; }
.color-chip { border: 1px solid #EBEBEB; border-radius: 14px; padding: 5px 12px; font-size: 12px; color: #6B6B6B; background: #FFFFFF; cursor: pointer; transition: all 0.15s; font-family: inherit; }
.color-chip:hover { border-color: #FF6A00; color: #FF6A00; }
.color-chip.active { border-color: #FF6A00; background: #FFF4EA; color: #E85D04; font-weight: 700; }
.qty-row { display: flex; align-items: center; gap: 12px; }
.qty-btn { width: 34px; height: 34px; border-radius: 8px; border: 1px solid #EBEBEB; background: #FFFFFF; font-size: 18px; cursor: pointer; color: #1F1F1F; transition: all 0.15s; }
.qty-btn:hover { border-color: #FF6A00; color: #FF6A00; }
.qty-val { font-size: 16px; font-weight: 700; min-width: 48px; text-align: center; font-variant-numeric: tabular-nums; }
.desc-text { font-size: 13px; line-height: 1.9; color: #6B6B6B; white-space: pre-line; }

/* ---------- 按钮 ---------- */
.btn-row { display: flex; gap: 9px; margin: 6px 0 14px; }
.btn { flex: 1; border: none; border-radius: 8px; padding: 13px 0; font-size: 15px; font-weight: 700; cursor: pointer; transition: background 0.16s, transform 0.12s; letter-spacing: 0.02em; }
.btn:active { transform: scale(0.99); }
.btn-primary { background: #FF6A00; color: #FFFFFF; }
.btn-primary:hover { background: #E85D04; }
.btn-outline { background: #FFFFFF; color: #E85D04; border: 1px solid #FF6A00; }
.btn-outline:hover { background: #FFF4EA; }
.btn-block { width: 100%; }
.ghost-btn { border: 1px solid #EBEBEB; background: #FFFFFF; color: #6B6B6B; border-radius: 6px; padding: 8px 13px; font-size: 13px; font-weight: 600; cursor: pointer; transition: all 0.16s; }
.ghost-btn:hover { border-color: #FF6A00; color: #FF6A00; }
.link-btn { background: none; border: none; color: #E85D04; font-size: 13px; font-weight: 600; cursor: pointer; padding: 0; }
.link-btn:hover { color: #FF6A00; }

/* ---------- 表单 ---------- */
.form-item { margin-bottom: 12px; }
.form-item label { display: block; font-size: 12px; font-weight: 600; color: #6B6B6B; margin-bottom: 5px; }
.form-item input, .form-item textarea, .form-item select { width: 100%; border: 1px solid #EBEBEB; border-radius: 8px; padding: 10px 12px; font-size: 14px; outline: none; background: #FFFFFF; font-family: inherit; color: #1F1F1F; transition: border-color 0.16s, box-shadow 0.16s; }
.form-item input:focus, .form-item textarea:focus, .form-item select:focus { border-color: #FF6A00; box-shadow: 0 0 0 3px rgba(255, 106, 0, 0.12); }
.form-item input::placeholder, .form-item textarea::placeholder { color: #9E9E9E; }
.form-item textarea { min-height: 90px; resize: vertical; }
.radio-row { display: flex; gap: 9px; }
.radio-card { flex: 1; border: 1px solid #EBEBEB; border-radius: 8px; padding: 12px; cursor: pointer; font-size: 13px; background: #FFFFFF; color: #6B6B6B; transition: all 0.16s; }
.radio-card:hover { border-color: #FF6A00; }
.radio-card.active { border-color: #FF6A00; background: #FFF4EA; font-weight: 700; color: #E85D04; }
.pay-info { background: #FFF9F5; border: 1px solid #FFE0C7; color: #9A3412; border-radius: 8px; padding: 12px; font-size: 12px; line-height: 1.8; white-space: pre-line; }
.pay-option { display: flex; align-items: center; gap: 10px; border: 1px solid #EBEBEB; border-radius: 8px; padding: 12px 14px; margin-bottom: 9px; cursor: pointer; font-size: 14px; background: #FFFFFF; color: #6B6B6B; transition: all 0.16s; }
.pay-option:hover { border-color: #FF6A00; }
.pay-option.active { border-color: #FF6A00; background: #FFF4EA; font-weight: 700; color: #E85D04; }
.pay-option .radio { width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid #D4D4D4; flex: 0 0 16px; }
.pay-option.active .radio { border-color: #FF6A00; background: #FF6A00; box-shadow: inset 0 0 0 3px #FFFFFF; }

/* ---------- 订单 ---------- */
.order-card { border: 1px solid #EBEBEB; border-radius: 10px; padding: 13px; margin-bottom: 10px; background: #FFFFFF; animation: rise 0.42s cubic-bezier(0.16, 1, 0.3, 1) both; }
.order-card:nth-child(2) { animation-delay: 60ms; }
.order-card:nth-child(3) { animation-delay: 120ms; }
.order-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 7px; }
.order-no { font-size: 12px; color: #9E9E9E; font-variant-numeric: tabular-nums; }
.order-title { font-size: 14px; font-weight: 600; margin-bottom: 4px; color: #1F1F1F; }
.order-amount { color: #FF3D00; font-weight: 700; font-size: 17px; font-variant-numeric: tabular-nums; }
.order-meta { font-size: 12px; color: #9E9E9E; line-height: 1.7; }
.order-track-latest { margin-top: 8px; font-size: 12px; color: #9A3412; background: #FFF9F5; border-left: 3px solid #FF6A00; border-radius: 0 6px 6px 0; padding: 8px 10px; line-height: 1.6; }
.badge { font-size: 11px; padding: 3px 9px; border-radius: 5px; font-weight: 600; white-space: nowrap; }
.badge-pending_payment { background: #FFF4EA; color: #B45309; }
.badge-paid_confirmed { background: #EFF6FF; color: #1D4ED8; }
.badge-shipped { background: #ECFDF3; color: #15803D; }
.badge-completed { background: #F0FDF4; color: #166534; }
.badge-cancelled { background: #F5F5F5; color: #6B6B6B; }
.badge-refunded { background: #FEF2F2; color: #B91C1C; }
.badge-open { background: #FFF4EA; color: #B45309; }
.badge-replied { background: #ECFDF3; color: #15803D; }

/* ---------- 询盘 / 通知 ---------- */
.msg-card { border: 1px solid #EBEBEB; border-radius: 10px; padding: 13px; margin-bottom: 10px; background: #FFFFFF; animation: rise 0.42s cubic-bezier(0.16, 1, 0.3, 1) both; }
.msg-product { font-size: 13px; font-weight: 700; color: #1F1F1F; margin-bottom: 6px; }
.msg-content { font-size: 13px; line-height: 1.8; color: #6B6B6B; background: #F7F7F7; border-radius: 8px; padding: 10px; }
.msg-reply { font-size: 13px; line-height: 1.8; color: #15803D; background: #ECFDF3; border-radius: 8px; padding: 10px; margin-top: 8px; }
.msg-time { font-size: 11px; color: #9E9E9E; margin-top: 8px; }
.notice-item { border: 1px solid #EBEBEB; border-radius: 10px; padding: 12px 13px; margin-bottom: 9px; background: #FFFFFF; cursor: pointer; transition: border-color 0.16s; animation: rise 0.42s cubic-bezier(0.16, 1, 0.3, 1) both; }
.notice-item:hover { border-color: #FFC79E; }
.notice-item.unread { background: #FFF9F5; border-color: #FFE0C7; }
.notice-title { font-size: 14px; font-weight: 600; display: flex; justify-content: space-between; align-items: flex-start; color: #1F1F1F; }
.notice-dot { width: 7px; height: 7px; border-radius: 50%; background: #FF3D00; flex: 0 0 7px; margin-top: 6px; }
.notice-content { font-size: 12px; color: #6B6B6B; line-height: 1.8; margin-top: 5px; }
.notice-time { font-size: 11px; color: #9E9E9E; margin-top: 6px; }

/* ---------- 我的 / 会员 ---------- */
.me-card { border: 1px solid #EBEBEB; border-radius: 12px; padding: 15px; margin-bottom: 12px; background: #FFFFFF; animation: rise 0.42s cubic-bezier(0.16, 1, 0.3, 1) both; }
.me-name { font-size: 18px; font-weight: 700; color: #1F1F1F; }
.me-sub { font-size: 12px; color: #9E9E9E; margin-top: 4px; line-height: 1.7; }
.me-hint { font-size: 11px; color: #9A3412; line-height: 1.8; margin-top: 10px; padding: 10px 12px; background: #FFF9F5; border-radius: 8px; border-left: 3px solid #FF6A00; }
.kv { display: flex; justify-content: space-between; font-size: 13px; padding: 7px 0; border-bottom: 1px solid #F0F0F0; }
.kv:last-child { border-bottom: none; }
.kv span:first-child { color: #9E9E9E; }
.kv span:last-child { color: #1F1F1F; font-weight: 600; text-align: right; max-width: 60%; word-break: break-all; }
.link-row { display: flex; justify-content: space-between; align-items: center; padding: 13px 2px; font-size: 14px; border-bottom: 1px solid #F0F0F0; cursor: pointer; color: #1F1F1F; }
.link-row:last-child { border-bottom: none; }
.link-row:hover { color: #FF6A00; }
.link-row::after { content: '›'; color: #C4C4C4; font-size: 18px; font-weight: 700; }

/* ---------- 在线客服 ---------- */
.chat-wrap { display: flex; flex-direction: column; height: 64vh; min-height: 400px; background: #F7F7F7; }
.chat-tip { font-size: 11px; color: #9E9E9E; text-align: center; background: #FFFFFF; border: 1px solid #EBEBEB; border-radius: 8px; padding: 8px 10px; margin-bottom: 10px; line-height: 1.7; }
.chat-list { flex: 1; overflow-y: auto; padding: 4px 2px 10px; -webkit-overflow-scrolling: touch; }
.chat-msg { display: flex; flex-direction: column; margin-bottom: 13px; animation: rise 0.36s cubic-bezier(0.16, 1, 0.3, 1) both; }
.chat-msg.me { align-items: flex-end; }
.chat-msg .chat-who { font-size: 10px; color: #9E9E9E; margin-bottom: 3px; }
.chat-msg.ai .chat-who { color: #E85D04; font-weight: 700; }
.chat-bubble { max-width: 78%; padding: 9px 13px; border-radius: 12px; font-size: 14px; line-height: 1.7; word-break: break-word; white-space: pre-line; }
.chat-msg:not(.me) .chat-bubble { background: #FFFFFF; border: 1px solid #EBEBEB; border-top-left-radius: 3px; color: #1F1F1F; }
.chat-msg.ai .chat-bubble { border-color: #FFE0C7; background: #FFF9F5; border-left: 3px solid #FF6A00; }
.chat-msg.me .chat-bubble { background: #FF6A00; color: #FFFFFF; border-top-right-radius: 3px; }
.chat-time { font-size: 10px; color: #9E9E9E; margin-top: 3px; }
.chat-empty { text-align: center; color: #9E9E9E; padding: 42px 0; font-size: 13px; }
.chat-empty-icon { font-size: 34px; margin-bottom: 8px; }

/* 客服页整屏模式：底部导航与客服浮标让位，输入区贴底 */
#phone.chat-mode { padding-bottom: 0; }
#phone.chat-mode #view { padding: 0; }
.chat-full .chat-tip { margin: 10px 12px 0; border-radius: 8px; }
.chat-input-bar { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); background: #FFFFFF; border-top: 1px solid #EBEBEB; }
.chat-input-bar input { flex: 1; min-width: 0; border: 1px solid #EBEBEB; background: #F7F7F7; border-radius: 99px; padding: 10px 16px; font-size: 14px; outline: none; color: #1F1F1F; transition: border-color 0.16s, background 0.16s; }
.chat-input-bar input:focus { border-color: #FF6A00; background: #FFFFFF; }
.chat-plus { width: 38px; height: 38px; flex: 0 0 38px; border: 1px solid #EBEBEB; background: #FFFFFF; border-radius: 50%; font-size: 21px; line-height: 1; color: #6B6B6B; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.chat-plus:hover { border-color: #FF6A00; color: #FF6A00; }
.chat-plus.open { background: #FFF4EA; border-color: #FF6A00; color: #FF6A00; }
.chat-send { border: none; background: #FF6A00; color: #FFFFFF; border-radius: 99px; padding: 0 20px; height: 38px; font-size: 14px; font-weight: 700; cursor: pointer; transition: background 0.16s, transform 0.12s; }
.chat-send:hover { background: #E85D04; }
.chat-send:active { transform: scale(0.96); }
.chat-tools { display: none; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 14px 12px calc(14px + env(safe-area-inset-bottom)); background: #FFFFFF; border-top: 1px solid #F0F0F0; }
.chat-tools.open { display: grid; }
.chat-tool { border: none; background: #F7F7F7; border-radius: 12px; padding: 13px 6px; font-size: 12px; color: #1F1F1F; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 6px; font-family: inherit; }
.chat-tool:hover { background: #FFF4EA; color: #E85D04; }
.chat-tool i { font-size: 20px; font-style: normal; line-height: 1; }
/* 附件消息与卡片消息 */
.chat-bubble.media { padding: 0; background: none; border: none; max-width: 70%; }
.chat-msg.me .chat-bubble.media, .chat-msg:not(.me) .chat-bubble.media { background: none; border: none; }
.chat-img { max-width: 200px; max-height: 250px; border-radius: 10px; display: block; border: 1px solid #EBEBEB; background: #FFFFFF; }
.chat-video { width: 200px; max-height: 250px; border-radius: 10px; display: block; background: #000000; }
.chat-card { border: 1px solid #EBEBEB; background: #FFFFFF; border-radius: 10px; padding: 9px; width: 214px; text-align: left; }
.chat-card-img { width: 100%; height: 112px; object-fit: cover; border-radius: 7px; background: #F7F7F7; display: block; }
.chat-card-title { font-size: 12.5px; font-weight: 600; margin-top: 7px; line-height: 1.45; max-height: 38px; overflow: hidden; color: #1F1F1F; }
.chat-card-price { color: #FF3D00; font-weight: 700; font-size: 14px; margin-top: 4px; }
.chat-card-meta { font-size: 11px; color: #9E9E9E; margin-top: 3px; line-height: 1.55; }
.chat-card-link { display: block; margin-top: 8px; text-align: center; font-size: 12px; font-weight: 600; color: #E85D04; border-top: 1px solid #F0F0F0; padding-top: 7px; }
.chat-uploading { font-size: 12px; color: #9E9E9E; display: inline-block; padding: 8px 12px; background: #FFFFFF; border: 1px solid #EBEBEB; border-radius: 10px; }
.chat-pick-item { display: flex; gap: 10px; align-items: center; border: 1px solid #EBEBEB; border-radius: 10px; padding: 9px; margin-bottom: 8px; cursor: pointer; background: #FFFFFF; }
.chat-pick-item:hover { border-color: #FF6A00; }
.chat-pick-img { width: 52px; height: 52px; flex: 0 0 52px; border-radius: 7px; object-fit: cover; background: #F7F7F7; display: block; }
.chat-pick-body { flex: 1; min-width: 0; }
.chat-pick-name { font-size: 13px; font-weight: 600; color: #1F1F1F; line-height: 1.45; }
.chat-pick-sub { font-size: 11.5px; color: #9E9E9E; margin-top: 3px; }

/* 「联系老板」悬浮按钮 */
#contactFab { position: fixed; bottom: 84px; right: 16px; width: 50px; height: 50px; border-radius: 50%; background: #534AB7; display: flex; align-items: center; justify-content: center; z-index: 40; text-decoration: none; transition: transform 0.16s, background 0.16s; box-shadow: 0 6px 18px rgba(83, 74, 183, 0.38); }
#contactFab:hover { background: #43399E; transform: scale(1.05); }
#contactFab:active { transform: scale(0.94); }
@media (min-width: 521px) { #contactFab { right: auto; left: 50%; margin-left: 176px; } }
/* 客户联系卡：两张 WhatsApp 二维码直接展示，扫码或一键添加好友（无弹窗） */
.section-sub { font-size: 12px; color: #9E9E9E; line-height: 1.6; margin-bottom: 12px; }
.wa-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 6px; }
@media (max-width: 420px) { .wa-grid { grid-template-columns: 1fr; } }
.wa-card { background: #FFFFFF; border: 1px solid #EBEBEB; border-radius: 14px; padding: 14px 12px; text-align: center; display: flex; flex-direction: column; align-items: center; }
.wa-name { font-size: 14px; font-weight: 700; color: #1F1F1F; margin-bottom: 10px; }
.wa-qr-box { width: 100%; }
.wa-qr { width: 100%; max-width: 200px; aspect-ratio: 1 / 1; object-fit: contain; background: #FFFFFF; border: 1px solid #EBEBEB; border-radius: 10px; display: block; margin: 0 auto; image-rendering: pixelated; }
.wa-qr-empty { width: 100%; aspect-ratio: 1 / 1; display: flex; align-items: center; justify-content: center; background: #F7F7F7; border: 1px dashed #D0D0D0; border-radius: 10px; color: #9E9E9E; font-size: 12px; padding: 12px; }
.wa-qr-tip { font-size: 11px; color: #E85D04; font-weight: 600; margin-top: 9px; }
.wa-add { margin-top: 11px; width: 100%; border: 1px solid #25D366; background: #25D366; color: #FFFFFF; border-radius: 10px; padding: 10px 12px; font-size: 13px; font-weight: 700; cursor: pointer; font-family: inherit; transition: background 0.16s, transform 0.16s; }
.wa-add:hover { background: #1FB457; }
.wa-add:active { transform: scale(0.97); }
.contact-list { display: flex; flex-direction: column; gap: 9px; margin-top: 14px; }
.contact-btn { display: flex; align-items: center; gap: 10px; border: 1px solid #EBEBEB; background: #F7F7F7; border-radius: 11px; padding: 11px 12px; cursor: pointer; text-align: left; font-family: inherit; transition: border-color 0.16s, background 0.16s; }
.contact-btn:hover { border-color: #FF6A00; background: #FFF4EA; }
.contact-btn .c-ico { flex: 0 0 40px; height: 40px; width: 40px; border-radius: 9px; background: #534AB7; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; }
.contact-btn .c-name { flex: 0 0 auto; font-size: 12px; color: #9E9E9E; font-weight: 600; }
.contact-btn .c-val { flex: 1 1 auto; min-width: 0; font-size: 14px; font-weight: 600; color: #1F1F1F; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.contact-btn .c-hint { flex: 0 0 auto; font-size: 11px; color: #E85D04; font-weight: 600; }

/* ---------- 物流时间线 ---------- */
.timeline { position: relative; padding-left: 18px; }
.timeline::before { content: ''; position: absolute; left: 4px; top: 6px; bottom: 6px; width: 1px; background: #EBEBEB; }
.track-node { position: relative; padding: 0 0 14px 8px; }
.track-node::before { content: ''; position: absolute; left: -16px; top: 5px; width: 7px; height: 7px; border-radius: 50%; background: #FF6A00; box-shadow: 0 0 0 3px rgba(255, 106, 0, 0.15); }
.track-node:last-child { padding-bottom: 0; }
.track-desc { font-size: 13px; line-height: 1.7; color: #1F1F1F; }
.track-time { font-size: 11px; color: #9E9E9E; margin-top: 2px; font-variant-numeric: tabular-nums; }

/* ---------- 评价 ---------- */
.stars { display: inline-flex; gap: 2px; }
.star { color: #E5E5E5; font-size: 15px; }
.star.on { color: #FF9500; }
.star-btn { cursor: pointer; font-size: 26px; color: #E5E5E5; background: none; border: none; padding: 2px; transition: transform 0.15s; }
.star-btn:hover { transform: scale(1.12); }
.star-btn.on { color: #FF9500; }
.review-mini { font-size: 12px; color: #9A3412; background: #FFF9F5; border-radius: 8px; padding: 10px; margin-top: 8px; line-height: 1.7; }

/* ---------- 海报 / 其他 ---------- */
.poster-wrap { text-align: center; }
.poster-wrap canvas { max-width: 100%; border-radius: 10px; }
.tabs { display: flex; gap: 8px; margin-bottom: 12px; }
.empty { text-align: center; color: #9E9E9E; font-size: 13px; padding: 48px 0; line-height: 1.9; }
.empty::before { content: ''; display: block; width: 26px; height: 26px; margin: 0 auto 12px; border: 2px solid #E5E5E5; border-radius: 6px; }
.back-link { display: inline-flex; align-items: center; min-height: 30px; max-width: 100%; font-size: 13px; font-weight: 600; color: #6B6B6B; text-decoration: none; margin-bottom: 10px; }
.back-link:hover { color: #FF6A00; }
.back-link::before { content: ''; width: 10px; height: 10px; flex: 0 0 10px; margin-right: 6px; border-left: 2px solid #9E9E9E; border-bottom: 2px solid #9E9E9E; transform: rotate(45deg); }
.back-link-text { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.muted { color: #9E9E9E; font-size: 12px; }

/* ---------- 弹窗 / 提示 ---------- */
#modalMask { position: fixed; top: 0; left: 0; right: 0; bottom: 0; inset: 0; background: rgba(0, 0, 0, 0.45); display: flex; align-items: center; justify-content: center; z-index: 60; padding: 20px; }
#modalBox { background: #FFFFFF; border-radius: 12px; padding: 20px; width: 100%; max-height: 86vh; overflow-y: auto; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2); animation: modalIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) both; }
.modal-title { font-size: 17px; font-weight: 700; margin-bottom: 14px; color: #1F1F1F; }
.modal-actions { display: flex; gap: 9px; justify-content: flex-end; margin-top: 16px; flex-wrap: wrap; }
#toast { position: fixed; left: 50%; top: 42%; transform: translate(-50%, -50%); background: rgba(31, 31, 31, 0.92); color: #FFFFFF; font-size: 14px; padding: 12px 22px; border-radius: 8px; z-index: 99; opacity: 0; pointer-events: none; transition: opacity 0.25s; max-width: 76%; text-align: center; }
#toast.show { opacity: 1; }

/* ---------- 动效定义 ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes modalIn { from { opacity: 0; transform: translateY(16px) scale(0.99); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- 详情页底部操作栏 ---------- */
/* 操作栏停在底部导航「上方」，不再把 tabbar 盖住（实际 bottom 由 JS 按 tabbar 实测高度贴在行内） */
.action-bar { position: fixed; bottom: 56px; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px; display: flex; align-items: center; gap: 8px; padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); background: #FFFFFF; border-top: 1px solid #EBEBEB; z-index: 31; }
.action-bar .act-icon { width: 46px; height: 46px; flex: 0 0 46px; border: 1px solid #EBEBEB; background: #FFFFFF; border-radius: 8px; font-size: 16px; color: #6B6B6B; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; line-height: 1; transition: all 0.16s; }
.action-bar .act-icon:hover { border-color: #FF6A00; color: #FF6A00; }
.action-bar .act-icon .act-label { font-size: 9.5px; color: #9E9E9E; font-weight: 500; letter-spacing: 0; }
.action-bar .act-icon:hover .act-label { color: #FF6A00; }
.action-bar .btn { flex: 1; margin: 0; padding: 12px 0; }
/* 详情页既有操作栏又有底部导航，留白由 JS 按实测高度写入 #phone 行内 */
#phone.has-action { padding-bottom: 140px; }

/* ---------- 详情长图 ---------- */
.detail-imgs { display: flex; flex-direction: column; gap: 9px; }
.detail-imgs img { width: 100%; border-radius: 10px; display: block; border: 1px solid #EBEBEB; background: #F7F7F7; }

/* ---------- 购物车 ---------- */
.cart-list { padding-bottom: 76px; }
.cart-item { display: flex; gap: 12px; border: 1px solid #EBEBEB; border-radius: 10px; padding: 12px; margin-bottom: 10px; background: #FFFFFF; animation: rise 0.42s cubic-bezier(0.16, 1, 0.3, 1) both; }
.cart-img { width: 80px; height: 80px; flex: 0 0 80px; border-radius: 8px; overflow: hidden; display: flex; align-items: center; justify-content: center; color: #FFFFFF; font-size: 24px; font-weight: 700; background: #F7F7F7; }
.cart-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cart-info { flex: 1; min-width: 0; }
.cart-name { font-size: 13px; font-weight: 600; color: #1F1F1F; line-height: 1.5; }
.cart-spec { font-size: 11px; color: #9E9E9E; margin-top: 3px; }
.cart-price { font-size: 13px; color: #6B6B6B; margin-top: 6px; font-variant-numeric: tabular-nums; }
.cart-price b { color: #FF3D00; font-size: 15px; }
.cart-ops { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.cart-ops .qty-row { gap: 8px; }
.cart-ops .qty-btn { width: 28px; height: 28px; font-size: 15px; }
.cart-ops .qty-val { min-width: 32px; font-size: 14px; }
.link-btn.danger { color: #DC2626; }
.cart-bar { position: fixed; bottom: 56px; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; background: #FFFFFF; border-top: 1px solid #EBEBEB; z-index: 31; }
.cart-total { font-size: 13px; color: #6B6B6B; }
.cart-total b { color: #FF3D00; font-size: 19px; font-variant-numeric: tabular-nums; }
.cart-bar .btn { flex: 0 0 auto; padding: 10px 24px; }

/* ---------- 评价晒图 ---------- */
.review-imgs { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.review-imgs img { width: 66px; height: 66px; object-fit: cover; border-radius: 6px; border: 1px solid #EBEBEB; }

/* ---------- 登录 / 注册（强制登录入口） ---------- */
#phone.guest-mode { padding-bottom: 24px; }
#phone.guest-mode #topbar { justify-content: flex-end; }
.login-wrap { padding: 0 0 20px; animation: rise 0.42s cubic-bezier(0.16, 1, 0.3, 1) both; }
.login-hero { background: #FFFFFF; padding: 30px 16px 18px; text-align: center; border-bottom: 1px solid #F0F0F0; margin-bottom: 12px; }
.login-logo { font-size: 25px; font-weight: 800; color: #1F1F1F; letter-spacing: 1px; }
.login-logo::before { content: ''; display: block; width: 76px; height: 76px; margin: 0 auto 14px; background: url(/brand/logo.png) center/contain no-repeat; }
.login-title { font-size: 17px; font-weight: 700; color: #1F1F1F; margin-top: 10px; }
.login-slogan { font-size: 13px; color: #6B6B6B; margin-top: 9px; line-height: 1.7; }
.pending-icon { font-size: 40px; line-height: 1; margin-top: 18px; }
.login-tabs { display: flex; gap: 6px; background: #F5F5F5; border-radius: 9px; padding: 3px; margin: 18px auto 0; max-width: 260px; }
.login-tab { flex: 1; text-align: center; font-size: 14px; font-weight: 600; color: #6B6B6B; padding: 8px 0; border-radius: 7px; cursor: pointer; transition: background 0.16s, color 0.16s; }
.login-tab.active { background: #FFFFFF; color: #FF6A00; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.09); }
.login-note { font-size: 12px; color: #9E9E9E; line-height: 1.7; margin-top: 10px; text-align: center; }
.login-switch { text-align: center; margin-top: 16px; font-size: 13px; color: #FF6A00; font-weight: 600; cursor: pointer; }
.opt-tag { font-weight: 400; color: #B0B0B0; font-size: 11px; }
.login-wrap .form-item input:disabled { background: #FAFAFA; color: #9E9E9E; }
.demo-entry { border: 1px dashed #FFB27A; background: #FFF7F0; border-radius: 10px; padding: 13px; margin: 12px 12px 0; text-align: center; }
.demo-entry-title { font-size: 14px; font-weight: 700; color: #E85D04; }
.demo-entry-hint { font-size: 12px; color: #9A6A45; line-height: 1.7; margin: 6px 0 10px; }
.btn-ghost { background: #FFFFFF; color: #E85D04; border: 1px solid #FF6A00; }
.btn-ghost:hover { background: #FFF4EA; }

/* ---------- 实时汇率（人民币定价 + 奈拉换算） ---------- */
.rate-bar { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 8px 12px; margin: 0 0 10px; background: #FFFFFF; border: 1px solid #EBEBEB; border-radius: 8px; font-size: 12px; color: #6B6B6B; }
.rate-bar .rate-stamp { color: #FF6A00; font-weight: 700; font-variant-numeric: tabular-nums; }
.rate-bar .rate-note { color: #9E9E9E; }
.rate-bar.ngn-fail { background: #FFF7F0; border-color: #FFD9B8; }
.pprice-ngn { font-size: 12px; color: #9A6A45; margin-top: 2px; font-variant-numeric: tabular-nums; }
.detail-ngn { font-size: 14px; color: #C2410C; font-weight: 600; margin: 4px 0 2px; }
.rate-stamp { font-size: 11px; color: #9E9E9E; margin-bottom: 8px; }
.ngn-inline { font-size: 12px; color: #9A6A45; font-weight: 400; margin-left: 4px; font-variant-numeric: tabular-nums; }
.ngn-fail { color: #B91C1C; }

/* ============================================================
   商品图防泄露（客户端）
   - 禁止拖拽 / 选中 / 长按弹出保存菜单（配合 app.js 的右键与快捷键拦截）
   - 详情大图区铺斜向重复水印 + 极淡透明罩层
   - 列表小图右下角挂品牌角标
   ============================================================ */
#phone img {
  -webkit-user-drag: none;
  user-drag: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
.pimg, .gallery-main, .gthumb, .cart-img, .detail-imgs, .review-imgs { position: relative; }

/* 详情大图：斜向重复品牌水印（半透明白字+深色描边，深浅底都看得见） */
.gallery-main::after,
.detail-imgs::after {
  content: '';
  position: absolute;
  left: 0; top: 0; right: 0; bottom: 0;
  pointer-events: none;
  z-index: 3;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='156' height='112'%3E%3Cg transform='rotate(-24 78 56)'%3E%3Ctext x='78' y='56' text-anchor='middle' font-family='Arial' font-size='13' font-weight='700' fill='none' stroke='%23000' stroke-opacity='0.22' stroke-width='3'%3EHuakai Utop%3C/text%3E%3Ctext x='78' y='56' text-anchor='middle' font-family='Arial' font-size='13' font-weight='700' fill='%23FFF' fill-opacity='0.66'%3EHuakai Utop%3C/text%3E%3C/g%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 156px 112px;
  border-radius: inherit;
}

/* 首页商品卡主图：斜向重复品牌水印（与详情大图同款规格，铺满整图，深色底也看得见） */
.pimg::after {
  content: '';
  position: absolute;
  left: 0; top: 0; right: 0; bottom: 0;
  pointer-events: none;
  z-index: 3;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='88'%3E%3Cg transform='rotate(-24 60 44)'%3E%3Ctext x='60' y='44' text-anchor='middle' font-family='Arial' font-size='11' font-weight='700' fill='none' stroke='%23000' stroke-opacity='0.2' stroke-width='2.5'%3EHuakai Utop%3C/text%3E%3Ctext x='60' y='44' text-anchor='middle' font-family='Arial' font-size='11' font-weight='700' fill='%23FFF' fill-opacity='0.58'%3EHuakai Utop%3C/text%3E%3C/g%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 120px 88px;
  border-radius: inherit;
}

/* 列表 / 缩略图：右下角品牌角标（淡，不干扰浏览） */
.gthumb::after,
.cart-img::after,
.review-imgs::after {
  content: '';
  position: absolute;
  right: 4px; bottom: 4px;
  width: 16px; height: 16px;
  background: url(/brand/logo.png) center / contain no-repeat;
  opacity: 0.34;
  pointer-events: none;
  z-index: 3;
}
.review-imgs::after { width: 14px; height: 14px; }

/* ---------- 收货地址簿（多地址 / 切换 / 设默认） ---------- */
.addr-card { display: flex; align-items: flex-start; gap: 8px; padding: 14px 2px; border-bottom: 1px solid #f0f0f5; }
.addr-card:last-of-type { border-bottom: none; }
.addr-card-main { flex: 1; min-width: 0; }
.addr-card-top { display: flex; align-items: center; gap: 6px; font-size: 15px; }
.addr-card-top b { font-size: 15px; }
.addr-card-sub { color: #9e9e9e; font-size: 12px; margin-top: 3px; line-height: 1.5; word-break: break-word; }
.addr-default-tag { display: inline-block; background: #fff2e8; color: #FF6A00; font-size: 11px; padding: 1px 6px; border-radius: 6px; }
.addr-card-ops { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; flex-shrink: 0; }
.mini-link { font-size: 12px; color: #534ab7; cursor: pointer; padding: 2px 0; }
.mini-link:hover { text-decoration: underline; }


/* ===== 商品筛选栏（需求 2.8：排序 + 价格区间 + 清空）===== */
.filter-bar { display: flex; align-items: center; gap: 8px; padding: 10px 12px; flex-wrap: wrap; }
.filter-sel { flex: 0 0 auto; max-width: 140px; padding: 8px 10px; border: 1px solid #e5e5ef; border-radius: 10px; background: #fff; font-size: 13px; color: #26215c; }
.filter-price { width: 78px; padding: 8px 10px; border: 1px solid #e5e5ef; border-radius: 10px; font-size: 13px; color: #26215c; }
.filter-sep { color: #8887a5; }
.filter-apply { padding: 8px 14px; border: none; border-radius: 10px; background: #534ab7; color: #fff; font-size: 13px; cursor: pointer; }
.filter-clear { padding: 8px 12px; border: 1px solid #e5e5ef; border-radius: 10px; background: #fff; color: #8887a5; font-size: 13px; cursor: pointer; }
.filter-count { padding: 0 12px 10px; font-size: 12px; color: #8887a5; }
.remember-row { display: flex; align-items: center; gap: 8px; margin: 10px 0 2px; font-size: 13px; color: #6b6b6b; cursor: pointer; user-select: none; }
.remember-row input[type="checkbox"] { width: 16px; height: 16px; accent-color: #ff6a00; cursor: pointer; }
