/* DIY 主机报价系统 — 共用样式 */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --bg: #f3f5f9;
  --card: #ffffff;
  --border: #e5e8ef;
  --text: #1f2937;
  --muted: #6b7280;
  --red: #dc2626;
  --green: #16a34a;
  --orange: #ea580c;
}
html { font-size: 15px; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  padding-bottom: 20px;
}
.hidden { display: none !important; }

/* 主内容限宽居中(大屏幕不会拉太宽) */
.page-wrap { max-width: 1000px; margin: 0 auto; padding: 0 12px; }
.muted { color: var(--muted); font-size: .85rem; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; font-size: 1rem; }

/* 顶栏 */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: linear-gradient(135deg, #1e3a8a, #2563eb);
  color: #fff; padding: 12px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.topbar > div:first-child { min-width: 0; flex: 1 1 auto; }   /* 店名可压缩: 小屏不再把右侧按钮挤变形 */
.topbar h1 { font-size: 1.05rem; font-weight: 600; }
.topbar .sub { font-size: .75rem; opacity: .85; }
.topbar h1, .topbar .sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar .top-actions { position: relative; display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.topbar .tools { display: flex; align-items: center; gap: 8px; }
.topbar .tool-btn {
  background: rgba(255,255,255,.15); color: #fff;
  border: 1px solid rgba(255,255,255,.3);
  padding: 6px 10px; border-radius: 8px; font-size: .8rem; white-space: nowrap;
}
.topbar .tool-btn.active { background: #f59e0b; border-color: #f59e0b; color: #fff; }
#btnMore { display: none; }                                   /* 桌面端按钮放得下, 不需要「⋯」 */

/* 小屏: 次要按钮收进「⋯」菜单(「登录」不折叠, 它自己点开就是下拉菜单) */
@media (max-width: 620px) {
  #btnMore { display: inline-block; }
  .topbar .tools { display: none; }
  .topbar .tools.open {
    display: flex; flex-direction: column; align-items: stretch; gap: 0;
    position: absolute; top: calc(100% + 6px); right: 0;
    background: #fff; border: 1px solid var(--border); border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,.16); min-width: 168px; overflow: hidden; z-index: 95;
  }
  .topbar .tools.open > .tool-btn:not(.hidden) {
    display: block; width: 100%; text-align: left;
    background: none; color: #1f2937; border: none; border-radius: 0;
    padding: 11px 14px; font-size: .9rem;
  }
  .topbar .tools.open > .tool-btn:not(.hidden) + .tool-btn:not(.hidden) { border-top: 1px solid #f1f5f9; }
}

/* 店主登录后的下拉菜单 */
.owner-menu {
  position: absolute; top: 100%; right: 0; margin-top: 6px;
  background: #fff; border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,.14); z-index: 95; min-width: 150px; overflow: hidden;
}
.om-item {
  display: block; width: 100%; text-align: left; padding: 11px 14px;
  border: none; background: none; cursor: pointer; font-size: .9rem; color: #1f2937;
}
.om-item:hover { background: #eff6ff; }
.om-item.om-danger { color: #dc2626; }
.om-item + .om-item { border-top: 1px solid #f1f5f9; }

/* 卡片 */
.card {
  background: var(--card); border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
  padding: 14px; margin: 12px;
}
.card h3 { font-size: .95rem; margin-bottom: 10px; color: var(--text); }

/* 类目 tab */
.cat-tabs { display: flex; gap: 8px; overflow-x: auto; padding: 10px 12px 2px; scrollbar-width: none; }
.cat-tabs::-webkit-scrollbar { display: none; }
.cat-tab {
  flex: 0 0 auto; padding: 7px 14px; border-radius: 999px;
  background: #fff; border: 1px solid var(--border); font-size: .88rem;
  color: var(--muted); transition: all .15s;
}
.cat-tab.active { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }

/* 产品选择列表 */
.prod-list { max-height: 46vh; overflow-y: auto; }
.prod-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 6px; border-bottom: 1px solid var(--border);
}
.prod-item:last-child { border-bottom: none; }
.prod-item .info { flex: 1; min-width: 0; }
.prod-item .name { font-size: .9rem; word-break: break-all; }
.prod-item .price-tag { color: var(--primary); font-weight: 600; font-size: .9rem; white-space: nowrap; }
.prod-item .add-btn {
  background: var(--primary); color: #fff; border-radius: 8px;
  padding: 6px 14px; font-size: .85rem; white-space: nowrap;
}
.prod-item.added .add-btn { background: var(--green); }

.search-box { width: 100%; padding: 9px 12px; border: 1px solid var(--border); border-radius: 8px; margin-bottom: 8px; background: #fafbfc; }

/* 配置单表格 */
.quote-table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.quote-table th {
  text-align: left; padding: 6px 4px; color: var(--muted); font-weight: 500;
  border-bottom: 2px solid var(--border); font-size: .78rem; white-space: nowrap;
}
.quote-table td { padding: 8px 4px; border-bottom: 1px solid var(--border); vertical-align: top; }
.quote-table .qty-ctl { display: inline-flex; align-items: center; gap: 2px; }
.quote-table .qty-ctl button {
  width: 24px; height: 24px; border-radius: 6px; background: #eef2ff; color: var(--primary);
  font-size: 1rem; line-height: 1; font-weight: 700;
}
.quote-table .qty-ctl span { min-width: 26px; text-align: center; font-weight: 600; }
.unit-price-inp { -moz-appearance: textfield; }
.unit-price-inp::-webkit-outer-spin-button,
.unit-price-inp::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.quote-table .del-btn { color: var(--red); font-size: .85rem; }
.num-input {
  width: 70px; padding: 4px 6px; border: 1px solid var(--border);
  border-radius: 6px; text-align: right; background: #fff;
}

/* 合计区 */
.summary { background: #f8fafc; border-radius: 10px; padding: 10px 12px; }
.summary .row { display: flex; justify-content: space-between; padding: 4px 0; font-size: .9rem; }
.summary .row.grand { font-size: 1.15rem; font-weight: 700; color: var(--primary); border-top: 1px dashed var(--border); margin-top: 6px; padding-top: 8px; }
.summary .row .profit-hint { color: var(--orange); font-weight: 600; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: .72rem; background: #eef2ff; color: var(--primary); }

/* 按钮组 */
.btn-group { display: flex; gap: 10px; padding: 12px; flex-wrap: wrap; }
.btn {
  flex: 1; min-width: 130px; padding: 12px 16px; border-radius: 10px;
  font-size: .95rem; font-weight: 600; text-align: center; transition: filter .15s;
}
.btn:active { filter: brightness(.93); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-green { background: var(--green); color: #fff; }
.btn-orange { background: var(--orange); color: #fff; }
.btn-outline { background: #fff; border: 1px solid var(--border); color: var(--text); }
.btn-danger { background: #fef2f2; color: var(--red); border: 1px solid #fecaca; }

/* 弹窗 */
.modal-mask {
  position: fixed; inset: 0; background: rgba(15,23,42,.5); z-index: 100;
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal {
  background: #fff; border-radius: 14px; width: 100%; max-width: 480px;
  padding: 18px; max-height: 84vh; overflow-y: auto;
}
/* 自定义滚动条: 细轨道 + 圆角滑块。
   注意: 不要同时写 scrollbar-width / scrollbar-color —— Chrome 一旦采用标准属性
   就会忽略下面这些 ::-webkit-scrollbar 规则。 */
.modal::-webkit-scrollbar, .modal-body::-webkit-scrollbar { width: 10px; }
.modal::-webkit-scrollbar-track, .modal-body::-webkit-scrollbar-track { background: transparent; }
.modal::-webkit-scrollbar-thumb, .modal-body::-webkit-scrollbar-thumb {
  background: #cbd5e1; border-radius: 999px; border: 2px solid transparent; background-clip: content-box;
}
.modal::-webkit-scrollbar-thumb:hover, .modal-body::-webkit-scrollbar-thumb:hover { background: #94a3b8; background-clip: content-box; }
.modal::-webkit-scrollbar-corner, .modal-body::-webkit-scrollbar-corner { background: transparent; }
/* 滚动条通道本身是矩形, 直接给带圆角的弹窗加 overflow:auto 会把右上/右下角切平。
   两层结构: 外层 .modal-clip 负责圆角并裁剪(overflow:hidden), 内层 .modal-body 负责滚动;
   滚动条贴右边缘, 超出圆角的部分由外层 overflow:hidden 裁掉。 */
.modal-clip { padding: 0; overflow: hidden; max-height: none; }
.modal-clip > .modal-body { padding: 18px; overflow-y: auto; max-height: 88vh; }
.modal h3 { margin-bottom: 12px; }
.field { margin-bottom: 12px; }
.field label { display: block; font-size: .85rem; color: var(--muted); margin-bottom: 5px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; background: #fff;
  font-size: 1rem; transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--primary); outline: none; box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}
.modal .actions { display: flex; gap: 10px; margin-top: 14px; }

/* toast */
#toast {
  position: fixed; left: 50%; bottom: 30px; transform: translateX(-50%) translateY(20px);
  background: rgba(17,24,39,.92); color: #fff; padding: 10px 18px; border-radius: 10px;
  font-size: .88rem; opacity: 0; transition: all .25s; z-index: 200; max-width: 86vw; text-align: center;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* 图片预览 */
.img-preview { text-align: center; }
.img-preview img { max-width: 100%; border-radius: 8px; box-shadow: 0 2px 12px rgba(0,0,0,.15); }
.img-preview .tip { margin-top: 10px; font-size: .85rem; color: var(--muted); }

/* 后台表格 */
.admin-table { width: 100%; border-collapse: collapse; font-size: .83rem; }
.admin-table th { text-align: left; padding: 6px; background: #f8fafc; border-bottom: 2px solid var(--border); white-space: nowrap; }
.admin-table td { padding: 6px; border-bottom: 1px solid var(--border); }
.admin-table input[type=number], .admin-table input[type=text] {
  width: 100%; padding: 4px 6px; border: 1px solid var(--border); border-radius: 6px;
}
.admin-table .save-btn { color: var(--primary); font-weight: 600; }
.admin-table .del-btn { color: var(--red); }
.admin-table .edit-btn { background: var(--primary); color: #fff; border: none; padding: 5px 10px; border-radius: 6px; cursor: pointer; font-size: .8rem; }
.admin-table .ins-btn { background: var(--green); color: #fff; border: none; width: 28px; height: 28px; border-radius: 6px; cursor: pointer; font-size: 1rem; line-height: 1; }
.admin-table td button + button { margin-left: 4px; }
.admin-table .name-inp { width: 100%; min-width: 120px; }

/* 修改价格页(响应式列数, 紧凑) */
.price-table td { padding: 3px 6px; font-size: .82rem; }
.price-table th { font-size: .75rem; white-space: nowrap; }
.price-table .pe-name { word-break: break-all; line-height: 1.3; }
.price-table .pe-cat { font-size: .7rem; display: block; margin-top: 2px; line-height: 1.2; }
.price-table .pe-inp {
  width: 50px; padding: 2px 4px; border: 1px solid var(--border); border-radius: 6px;
  text-align: right; font-size: .8rem; background: #fff;
}
.pe-yest { font-size: .7rem; color: var(--muted); margin-right: 3px; }
.pe-prev { font-size: .78rem; margin-right: 6px; font-weight: 600; }
.pe-prev-line { margin-top: 2px; line-height: 1.2; text-align: right; white-space: nowrap; }
.price-table .pe-inp:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 2px rgba(37,99,235,.12); }
.price-table .pe-inp.saving { background: #fef9c3; }
.price-table .pe-inp.saved { background: #ecfdf5; border-color: var(--green); }
.pe-disabled { color: var(--muted); opacity: .6; }

/* 价表图片导出 */
.preview-nav { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 10px; }
.preview-nav button:disabled { opacity: .4; cursor: default; }
.img-cat-item { display: flex; align-items: center; gap: 6px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; cursor: pointer; font-size: .9rem; }
.img-cat-item input { width: 16px; height: 16px; }

.tab-bar { display: flex; background: #fff; border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 40; }
.tab-bar button { flex: 1; padding: 12px 4px; font-size: .9rem; color: var(--muted); border-bottom: 2px solid transparent; }
.tab-bar button.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }

.pane { padding: 12px; }
.filters { display: flex; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.filters select, .filters input { padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: #fff; }
.filters input { flex: 1; min-width: 140px; }

.empty { text-align: center; color: var(--muted); padding: 30px 0; font-size: .9rem; }

/* 登录页 */
.login-wrap { max-width: 380px; margin: 10vh auto 0; padding: 0 16px; }
.login-wrap .card { padding: 30px 24px; border-radius: 16px; box-shadow: 0 6px 24px rgba(0,0,0,.08); }
.login-wrap .logo {
  width: 56px; height: 56px; margin: 0 auto 12px; border-radius: 14px;
  background: linear-gradient(135deg, #1e3a8a, #2563eb);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; color: #fff;
}
.login-wrap h2 { text-align: center; margin-bottom: 4px; font-size: 1.15rem; }
.login-wrap .sub { text-align: center; margin-bottom: 22px; }
.login-wrap .btn-login { width: 100%; margin-top: 6px; padding: 13px; }
.login-reg { text-align: center; margin-top: 16px; font-size: .85rem; }
.login-reg button { color: var(--primary); font-weight: 600; }
.login-reg button:active { opacity: .7; }

.quote-code { display: flex; align-items: center; gap: 8px; background: #fef9c3; border: 1px dashed #facc15; border-radius: 10px; padding: 10px 12px; margin: 12px; font-size: .9rem; }
.quote-code b { letter-spacing: 2px; font-size: 1.05rem; color: #854d0e; }
.quote-code .copy-btn { margin-left: auto; color: var(--primary); font-weight: 600; }
.quote-code .close-btn { margin-left: 8px; color: var(--muted); font-size: 1rem; padding: 2px 6px; }

/* ===== 表格形式 + 模糊搜索下拉 ===== */
.quote-table td { padding: 6px 4px; }
.row-ops { white-space: nowrap; width: 60px; }
.op-add {
  width: 24px; height: 24px; border-radius: 6px; background: #eef2ff; color: var(--primary);
  font-weight: 700; font-size: 1rem; line-height: 1; margin-right: 4px;
}
.row-cat { white-space: nowrap; font-size: .78rem; width: 56px; padding-top: 12px !important; }
.ac-wrap { position: relative; min-width: 180px; }
.ac-input {
  width: 100%; padding: 7px 9px; border: 1px solid var(--border); border-radius: 8px;
  background: #fff; font-size: .88rem;
}
.ac-input:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 2px rgba(37,99,235,.12); }
.ac-dropdown {
  position: fixed; top: 0; left: 0; z-index: 90;
  background: #fff; border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,.14);
  max-height: 320px; overflow-y: auto; /* 默认显示约 8 行, 超出可滚动 */
}
.ac-item {
  display: flex; align-items: center; gap: 8px; padding: 9px 10px;
  border-bottom: 1px solid #f1f5f9; cursor: pointer;
}
.ac-item:last-child { border-bottom: none; }
.ac-item.active, .ac-item:hover { background: #2563eb; color: #fff; }
.ac-name { flex: 1; font-size: .85rem; word-break: break-all; }
.ac-price { color: var(--primary); font-weight: 600; font-size: .85rem; white-space: nowrap; }
.ac-item.active .ac-price, .ac-item:hover .ac-price, .ac-item.active .ac-name, .ac-item:hover .ac-name { color: #fff; }
.qty-val { min-width: 26px; text-align: center; font-weight: 600; }
.markup-inp:disabled { background: #f3f4f6; color: var(--muted); }

/* 批发价长按浮层 */
#wsFloat {
  position: fixed; inset: 0; background: rgba(15,23,42,.45); z-index: 150;
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
#wsFloat.hidden { display: none; }
.ws-float-box {
  background: #fff; border-radius: 14px; width: 100%; max-width: 420px;
  padding: 18px; max-height: 78vh; overflow-y: auto;
}
.ws-float-title { font-weight: 700; margin-bottom: 10px; }
.ws-float-box .row { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--border); font-size: .85rem; }
.ws-float-box .row .nm { flex: 1; word-break: break-all; }
.ws-float-total { margin-top: 12px; font-size: 1.05rem; color: var(--primary); text-align: right; }
.ws-float-tip { text-align: center; color: var(--muted); font-size: .75rem; margin-top: 8px; }

/* 历史配置列表 */
.history-item:hover { background: #f9fafb; }

/* 活动设置 */
.chk-grid { display: flex; flex-wrap: wrap; gap: 4px 14px; padding: 4px 0; }
.chk-item { display: inline-flex; align-items: center; gap: 5px; font-size: .9rem; cursor: pointer; }
.chk-item input { width: auto; }
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.tag { display: inline-flex; align-items: center; gap: 7px; background: #eef2ff; color: #3730a3; padding: 4px 10px; border-radius: 999px; font-size: .82rem; }
.tag a { cursor: pointer; color: #ef4444; font-weight: 700; }
#actProdSuggest .item, #actBundleProdSuggest .item, #actQtyProdSuggest .item { padding: 8px 10px; cursor: pointer; border-bottom: 1px solid #f1f5f9; font-size: .85rem; }
#actProdSuggest .item:hover, #actBundleProdSuggest .item:hover, #actQtyProdSuggest .item:hover { background: #eff6ff; }
/* 活动数量门槛输入框(满件/满类): 与其它表单控件统一外观 */
.act-num-inp {
  width: 100%; max-width: 160px; box-sizing: border-box;
  padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px;
  background: #fff; font-size: 1rem; transition: border-color .15s, box-shadow .15s;
}
.act-num-inp:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
/* 套提活动: 分类参与型号编辑器 */
.bcat-block { border: 1px solid var(--border); border-radius: 8px; margin-bottom: 8px; overflow: hidden; }
.bcat-head { display: flex; align-items: center; gap: 8px; padding: 7px 10px; background: #f9fafb; flex-wrap: wrap; }
.bcat-body { max-height: 220px; overflow-y: auto; padding: 6px 10px; border-top: 1px solid var(--border); }
.bcat-item { display: flex; align-items: center; gap: 6px; padding: 3px 0; font-size: .84rem; cursor: pointer; }
.bcat-item input { width: auto; }
.bcat-tools { display: flex; align-items: center; gap: 8px; padding: 2px 0 8px; flex-wrap: wrap; position: sticky; top: 0; background: #fff; }
.bcat-tools .bcat-search { flex: 1 1 140px; min-width: 120px; box-sizing: border-box; padding: 6px 9px; border: 1px solid var(--border); border-radius: 8px; font-size: .84rem; }
.bcat-tools .bcat-count { white-space: nowrap; }

/* 今日价表(预览 + 查价) */
.pt-quick-query { margin-bottom: 14px; width: 50%; max-width: 640px; min-width: 280px; margin-left: auto; margin-right: auto; }
.pt-query-wrap { position: relative; }
.pt-query-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pt-input-wrap { position: relative; flex: 1; min-width: 220px; }
.pt-input-wrap input { width: 100%; padding: 10px 38px 10px 14px; font-size: 16px; border: 1px solid var(--border); border-radius: 8px; box-sizing: border-box; -webkit-appearance: none; appearance: none; outline: none; }
.pt-input-wrap input::-webkit-search-cancel-button,
.pt-input-wrap input::-webkit-search-decoration,
.pt-input-wrap input::-webkit-search-results-button,
.pt-input-wrap input::-webkit-search-results-decoration { -webkit-appearance: none; appearance: none; display: none; }
.pt-clear { position: absolute; top: 50%; right: 8px; transform: translateY(-50%); width: 26px; height: 26px; border: none; background: #d1d5db; color: #1f2937; border-radius: 50%; font-size: 14px; line-height: 1; cursor: pointer; display: none; align-items: center; justify-content: center; padding: 0; -webkit-appearance: none; appearance: none; }
.pt-clear:hover { background: #9ca3af; color: #fff; }
.pt-input-wrap:focus-within .pt-clear:not(.hidden), .pt-clear.show { display: inline-flex; }
.pt-result { position: fixed; z-index: 90; top: 0; left: 0; max-height: 320px; overflow-y: auto; border: 1px solid var(--border); border-radius: 8px; background: #fff; box-shadow: 0 8px 24px rgba(0,0,0,.14); display: none; box-sizing: border-box; }
.pt-result:not(:empty).open { display: block; }
.pt-hit { display: flex; flex-wrap: nowrap; align-items: center; column-gap: 8px; padding: 8px 12px; border-bottom: 1px solid #f1f5f9; font-size: .9rem; }
.pt-hit:last-child { border-bottom: none; }
.pt-hit-name { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; word-break: normal; line-height: 1.35; }
.pt-hit-meta { display: inline-flex; align-items: center; gap: 6px 10px; margin-left: auto; flex: none; }
.pt-hit-cat { color: var(--muted); font-size: .8rem; white-space: nowrap; }
.pt-hit-price { font-weight: 700; white-space: nowrap; }
.pt-toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.pt-cat { padding: 7px 10px; border: 1px solid var(--border); border-radius: 6px; }
.pt-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.pt-table td.pt-col { vertical-align: top; border: 1px solid #111; padding: 0; width: 9%; }
.pt-col > div { border-right: 1px solid #111; }
.pt-cat-title { background: #dbeafe; color: #1e40af; font-weight: 700; padding: 6px 10px; border-bottom: 1px solid #111; font-size: .85rem; }
.pt-row { display: flex; justify-content: space-between; gap: 6px; padding: 5px 8px; border-bottom: 1px solid #111; font-size: .78rem; }
.pt-row.alt { background: #f6f8fb; }
.pt-name { color: #000; overflow-wrap: anywhere; flex: 1; min-width: 0; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pt-price { font-weight: 700; white-space: nowrap; }
#ptTableWrap { -webkit-overflow-scrolling: touch; }
@media (max-width: 900px) {
  .pt-quick-query { width: 100%; max-width: none; }
  .pt-table { display: block; width: 100%; max-width: 100%; margin: 0 auto; }
  .pt-table tr { display: block; width: 100%; }
  .pt-table td.pt-col { display: block; width: 100%; box-sizing: border-box; }
  .pt-table .pt-col > div { width: 100%; box-sizing: border-box; }
  /* 手机: 查价输入框占满整行, 弹窗全宽居中; 每行内容留白加大 */
  .pt-input-wrap { flex: 1 1 100%; }
  .pt-hit { padding: 8px 16px; font-size: .85rem; }
  .pt-hit-cat { font-size: .72rem; }
  .pt-hit-price { font-size: .82rem; }
  /* iOS/Safari: 输入框字号 ≥16px, 防止点击聚焦自动放大页面 */
  input[type="text"],
  input[type="password"],
  input[type="search"],
  textarea,
  select {
    font-size: 16px !important;
  }
}


/* 页脚备案号 */
.site-footer { text-align: center; margin-top: 8px; padding: 8px 12px; font-size: .8rem; color: #9ca3af; border-top: 1px solid #f3f4f6; }
.site-footer a { color: #9ca3af; text-decoration: none; }
.site-footer a:hover { color: #6b7280; }
/* 协议族提示: 与备案号同色同字号(继承 .site-footer), 只用中点分隔 + 左侧留白 */
.site-footer .site-footer-ip { margin-left: 8px; }
.site-footer .site-footer-ip::before { content: "·"; margin-right: 8px; }


/* 直播/竖屏紧凑布局: 缩小白边与字号, 让狭小采集区也能完整清晰显示 */
body.live-cmd .quote-table td { padding: 4px 3px; font-size: .78rem; }
body.live-cmd .ac-input { padding: 5px 7px; font-size: .8rem; border-radius: 6px; }
body.live-cmd .quote-table .qty-ctl button { padding: 2px 6px; }
body.live-cmd .quote-table .qty-ctl span { min-width: 20px; font-size: .8rem; }
body.live-cmd .topbar { padding: 6px 10px; }
body.live-cmd .topbar h1 { font-size: .95rem; }
body.live-cmd .btn-group { padding: 6px 8px; gap: 6px; }
body.live-cmd .btn { padding: 4px 10px; font-size: .8rem; }
body.live-cmd .unit-price-val, body.live-cmd .row-line { font-size: .78rem; }
@media (max-width: 620px) {
  .quote-table td { padding: 4px 3px; font-size: .78rem; }
  .ac-input { padding: 5px 7px; font-size: .8rem; border-radius: 6px; }
  .topbar { padding: 6px 10px; }
  .btn-group { padding: 6px 8px; gap: 6px; }
  .btn { padding: 4px 10px; font-size: .8rem; }
}

/* 弹窗查价结果: 宽度 <430px(比 iPhone 15 Pro Max 更小)时才自动换行;
   15 Pro Max(430px)及以上保持单行(名称过长以省略号收尾), 避免价格被挤出/遮挡 */
@media (max-width: 429px) {
  .pt-hit { flex-wrap: wrap; row-gap: 3px; }
  .pt-hit-name { flex: 1 1 100%; white-space: normal; word-break: break-word; overflow: visible; text-overflow: clip; }
  .pt-hit-meta { width: 100%; justify-content: space-between; margin-left: 0; }
}

/* 管家婆别名搜索候选(admin 产品编辑弹窗) */
.gp-tip { font-size: .72rem; color: #6b7280; margin-top: 4px; line-height: 1.4; }
.gp-list {
  margin-top: 6px; max-height: 200px; overflow-y: auto;
  border: 1px solid var(--border); border-radius: 8px; background: #fff;
}
.gp-item {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 10px; cursor: pointer; font-size: .84rem;
  border-bottom: 1px solid #f1f3f5;
}
.gp-item:last-child { border-bottom: none; }
.gp-item:hover { background: #f8fafc; }
.gp-name { flex: 1; word-break: break-all; }
.gp-qty { color: #374151; font-size: .76rem; font-family: monospace; white-space: nowrap; }
.gp-qty-zero { color: #cbd5e1; }
.gp-stop {
  color: #b45309; background: #fef3c7; border-radius: 4px;
  padding: 0 4px; font-size: .68rem; white-space: nowrap;
}
.gp-empty { padding: 8px 10px; font-size: .8rem; color: #6b7280; }

/* 产品规格属性表单(按分类字典动态渲染) */
.spec-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; }
.spec-grid .field { margin: 0; }
.spec-grid .field label { font-size: .78rem; }
.spec-grid input, .spec-grid select {
  width: 100%; box-sizing: border-box; padding: 6px 8px;
  border: 1px solid var(--border); border-radius: 6px; font-size: .84rem;
}
.spec-layer { grid-column: 1 / -1; font-size: .78rem; color: #6b7280; margin-top: 4px; border-top: 1px dashed #e5e7eb; padding-top: 6px; }
.spec-suite { color: #b45309; background: #fef3c7; border-radius: 4px; padding: 1px 6px; font-size: .72rem; margin-left: 4px; }