/* 德力西选型查询系统 样式 */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: "Microsoft YaHei", "PingFang SC", sans-serif; background: #f5f6f8; color: #222; font-size: 14px; }
a { color: #d11515; text-decoration: none; }
a:hover { text-decoration: underline; }

.topbar { background: #d11515; color: #fff; padding: 12px 24px; display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.topbar .brand { font-size: 20px; font-weight: bold; color: #fff; }
.searchbox { flex: 1; min-width: 260px; display: flex; }
.searchbox input { flex: 1; border: none; border-radius: 4px 0 0 4px; padding: 9px 12px; font-size: 14px; outline: none; }
.searchbox button { border: none; background: #a10d0d; color: #fff; padding: 0 22px; border-radius: 0 4px 4px 0; cursor: pointer; }

.layout { display: flex; gap: 16px; padding: 16px; align-items: flex-start; }
.sidebar { width: 260px; background: #fff; border-radius: 8px; padding: 14px; flex-shrink: 0; }
.sidebar h3 { margin-bottom: 10px; font-size: 15px; }
.cattree { list-style: none; }
.cattree ul { list-style: none; padding-left: 14px; }
.cattree a { display: block; padding: 6px 8px; color: #333; border-radius: 4px; }
.cattree a:hover { background: #f7eaea; text-decoration: none; }
.cattree a.active { background: #d11515; color: #fff; }
.cat-l1 > a { font-weight: bold; }

.main { flex: 1; min-width: 0; }
.series-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.series-card { background: #fff; border-radius: 8px; padding: 14px; display: block; color: #333; border: 1px solid #eee; }
.series-card:hover { border-color: #d11515; text-decoration: none; box-shadow: 0 2px 8px rgba(209,21,21,.12); }
.series-card img { max-width: 100%; height: 90px; object-fit: contain; display: block; margin: 0 auto 8px; }
.sc-name { font-weight: bold; }
.sc-meta { color: #999; font-size: 12px; margin-top: 4px; }
.sc-disc { margin-top: 6px; font-size: 13px; font-weight: 700; color: #d11515; }
.sc-disc.flat { color: #999; font-weight: normal; }
.empty { color: #999; padding: 30px; text-align: center; }

.breadcrumb { color: #888; margin-bottom: 10px; }
.xuan-panel { background: #fff; border-radius: 8px; padding: 20px; }
.xuan-head { display: flex; gap: 20px; border-bottom: 1px solid #eee; padding-bottom: 16px; margin-bottom: 16px; }
.xuan-img { width: 140px; height: 140px; object-fit: contain; border: 1px solid #f0f0f0; border-radius: 6px; background: #fafafa; }
.xuan-info h2 { font-size: 20px; margin-bottom: 10px; }
.xuan-row { margin: 6px 0; color: #555; }
.price-row { font-size: 15px; }
.price-row .disc { color: #888; }
.red { color: #d11515; font-size: 20px; }
.disc-input { width: 76px; padding: 6px 8px; border: 1px solid #ddd; border-radius: 4px; font-size: 15px; text-align: center; }
.disc-input:focus { outline: none; border-color: #d11515; }

/* ============ 移动端适配（基础层） ============
   注意：本段位于样式表前部，凡后面被同优先级规则重复声明的属性都会失效。
   需要「最终生效」的移动端规则统一收口在文件末尾的「移动端适配（统一收口）」段。 */
@media (max-width: 768px) {
  body { font-size: 13px; }
  .topbar { padding: 10px 12px; gap: 10px; }
  .topbar .brand { font-size: 16px; }
  .searchbox input { padding: 10px 12px; font-size: 16px; } /* 16px 防止 iOS 聚焦缩放 */
  .layout { flex-direction: column; padding: 10px; gap: 10px; }
  .sidebar { width: 100%; }
  .cattree ul { padding-left: 10px; }
  .cattree a { padding: 10px 8px; }               /* 触控目标加大 */
  .series-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .series-card { padding: 10px; }
  .series-card img { height: 64px; }
  .sc-name { font-size: 13px; }
  .xuan-panel { padding: 14px; }
  .xuan-head { flex-direction: column; align-items: center; text-align: center; gap: 12px; }
  .xuan-img { width: 110px; height: 110px; }
  .xuan-info { width: 100%; }
  .xuan-info h2 { font-size: 17px; }
  .red { font-size: 18px; }
  .ptable { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .two-col { flex-direction: column; }
  .admin-wrap { margin: 10px; padding: 14px; }
  .login-box { margin: 40px 12px; }
}

.props .prop { margin-bottom: 14px; }
.props .prop-name { font-weight: bold; margin-bottom: 8px; color: #333; }
.props .items { display: flex; flex-wrap: wrap; gap: 8px; }
.props .item { border: 1px solid #ddd; background: #fafafa; border-radius: 4px; padding: 7px 16px; cursor: pointer; user-select: none; }
.props .item:hover { border-color: #d11515; color: #d11515; }
.props .item.selected { background: #d11515; border-color: #d11515; color: #fff; }
.props .item.disabled { color: #bbb; background: #f5f5f5; cursor: not-allowed; border-color: #eee; }
.props .prop-plain { color: #666; font-size: 13px; margin-bottom: 10px; }

.attach-panel { background: #fff; border-radius: 8px; padding: 16px; margin-top: 16px; }
.attach-panel h3 { margin-bottom: 12px; }

.ptable { width: 100%; background: #fff; border-collapse: collapse; margin: 10px 0; }
.ptable th, .ptable td { border: 1px solid #eee; padding: 9px 12px; text-align: left; }
.ptable th { background: #fafafa; }
.ptable .r { text-align: right; }
.ptable tr:hover td { background: #fdf7f7; }

.admin-wrap { max-width: 900px; margin: 20px auto; background: #fff; border-radius: 8px; padding: 24px; }
.admin-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
fieldset { border: 1px solid #eee; border-radius: 8px; margin-bottom: 18px; padding: 14px 18px; }
legend { font-weight: bold; padding: 0 8px; }
.inline-form input[type=number] { width: 90px; padding: 6px; }
button { background: #d11515; color: #fff; border: none; border-radius: 4px; padding: 8px 20px; cursor: pointer; }
button:hover { background: #a10d0d; }
.hint { color: #999; margin-left: 12px; font-size: 12px; }
.ok { color: #0a7d32; background: #e8f6ee; padding: 8px 12px; border-radius: 4px; margin-bottom: 10px; }
.error { color: #c00; background: #fdeaea; padding: 8px 12px; border-radius: 4px; }
.two-col { display: flex; gap: 24px; }
.two-col > div { flex: 1; }
.sort-row { display: flex; justify-content: space-between; align-items: center; padding: 3px 0; }
.sort-row input { width: 80px; padding: 4px 8px; }

.login-box { max-width: 360px; margin: 80px auto; background: #fff; border-radius: 8px; padding: 30px; }
.login-box h2 { margin-bottom: 18px; font-size: 18px; }
.login-box input { width: 100%; padding: 10px; margin-bottom: 12px; border: 1px solid #ddd; border-radius: 4px; }
.login-box button { width: 100%; padding: 10px; }

/* ============ 折扣信息行 / 设置面板 / 悬浮价格条 ============ */
.disc-info {
  display: flex; align-items: center; gap: 8px; margin-top: 14px;
  background: #f7f8fa; border: 1px solid #f0f1f3; border-radius: 8px;
  padding: 10px 14px; font-size: 13px; cursor: pointer; user-select: none;
}
.disc-info:hover { background: #fdf2f2; }
.di-badge { color: #d11515; background: #fdf2f2; border-radius: 4px; padding: 2px 8px; font-size: 12px; font-weight: bold; }
.di-val { color: #d11515; font-weight: bold; font-size: 14px; }
.di-cat { color: #b8bfc9; font-size: 12px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.di-none { color: #86909c; flex: 1; }
.di-link { color: #d11515; font-weight: bold; }

/* 设置面板（桌面居中弹窗，移动端近全屏底部） */
.dp-mask {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 1000;
}
.dp-mask.open { display: block; }
.dp-panel {
  display: none; position: fixed; z-index: 1001;
  left: 50%; top: 50%; transform: translate(-50%,-50%);
  width: 420px; max-width: calc(100vw - 32px);
  background: #fff; border-radius: 14px; padding: 22px 22px 20px;
  box-shadow: 0 12px 48px rgba(0,0,0,.18);
}
.dp-panel.open { display: block; }
.dp-head { display: flex; justify-content: space-between; align-items: center; }
.dp-title { font-size: 17px; font-weight: bold; }
.dp-close { color: #b8bfc9; cursor: pointer; font-size: 16px; padding: 2px 6px; }
.dp-close:hover { color: #d11515; }
.dp-cat {
  display: inline-block; margin-top: 14px; font-size: 13px; font-weight: bold;
  color: #d11515; background: #fdf2f2; border-radius: 6px; padding: 8px 12px;
}
.dp-path { color: #b8bfc9; font-size: 12px; margin-top: 8px; word-break: break-all; }
.dp-sub { color: #999; font-size: 12px; margin-top: 10px; }
.dp-opts { display: flex; flex-wrap: wrap; margin-top: 14px; }
.dp-opt {
  padding: 7px 20px; border-radius: 999px; font-size: 13px;
  background: #f7f8fa; border: 1px solid #f0f1f3; margin: 0 10px 10px 0;
  cursor: pointer; user-select: none;
}
.dp-opt:hover { border-color: #d11515; color: #d11515; }
.dp-opt.on { background: #d11515; border-color: #d11515; color: #fff; font-weight: bold; }
.dp-input-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 6px; font-size: 14px;
}
.dp-input {
  width: 120px; border: 1px solid #ddd; border-radius: 8px; padding: 9px 12px;
  font-size: 16px; font-weight: bold; text-align: center; color: #d11515; background: #fafafa;
}
.dp-input:focus { outline: none; border-color: #d11515; }
.dp-btns { display: flex; gap: 12px; margin-top: 20px; }
.dp-btn { flex: 1; text-align: center; line-height: 40px; border-radius: 999px; font-size: 14px; cursor: pointer; border: none; }
.dp-btn.primary { background: linear-gradient(135deg,#e32626 0%,#d11515 55%,#a90f0f 100%); color: #fff; }
.dp-btn.primary:hover { filter: brightness(1.06); }
.dp-btn.ghost { border: 1px solid #e5e6eb; color: #86909c; background: #fff; }

/* 悬浮价格条（半透明毛玻璃，下滑出现） */
.float-bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 900;
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 20px;
  background: rgba(255,255,255,.82);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(209,21,21,.10);
  box-shadow: 0 2px 12px rgba(31,35,41,.06);
  transform: translateY(-120%); transition: transform .25s ease;
  cursor: pointer;
}
.float-bar.show { transform: translateY(0); }
.fb-left { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.fb-label { color: #b8bfc9; font-size: 12px; }
.fb-price { color: #86909c; font-size: 14px; font-weight: bold; }
.fb-disc { color: #d11515; font-size: 14px; font-weight: bold; }
.fb-right { color: #86909c; font-size: 13px; white-space: nowrap; }
.fb-final { color: #d11515; font-size: 20px; font-weight: bold; margin: 0 2px; }

@media (max-width: 768px) {
  .dp-panel {
    left: 0; right: 0; bottom: 0; top: auto; transform: none;
    width: 100%; max-width: none;
    border-radius: 16px 16px 0 0;
    padding-bottom: calc(20px + env(safe-area-inset-bottom));
  }
  .disc-info { font-size: 13px; padding: 12px 14px; }
}

/* ============ 移动端分类抽屉（列表收进抽屉，商品/搜索结果置顶） ============ */
.cat-toggle { display: none; }
.cat-mask { display: none; }
@media (max-width: 768px) {
  .cat-toggle {
    display: flex; align-items: center; gap: 8px;
    margin: 10px 10px 0; padding: 12px 16px;
    background: #fff; border: 1px solid #eee; border-radius: 8px;
    font-size: 15px; font-weight: bold; color: #333; cursor: pointer;
  }
  .cat-toggle span { color: #d11515; font-size: 17px; }
  .cat-mask.open {
    display: block; position: fixed; inset: 0;
    background: rgba(0,0,0,.45); z-index: 1090;
  }
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0;
    width: 80%; max-width: 320px; margin: 0; border-radius: 0;
    z-index: 1100; overflow-y: auto;
    transform: translateX(-105%); transition: transform .25s ease;
  }
  body.drawer-open .sidebar {
    transform: translateX(0);
    box-shadow: 4px 0 24px rgba(0,0,0,.15);
  }
  body.drawer-open { overflow: hidden; }
}

/* ============ 折扣输入框 / 价格区统一设计（电脑+移动） ============ */
.disc-input {
  width: 86px; padding: 8px 10px;
  border: 1.5px solid #f0c0c0; border-radius: 10px;
  font-size: 17px; font-weight: bold; text-align: center; color: #d11515;
  background: #fff8f8; transition: border-color .15s, background .15s;
}
.disc-input:focus { outline: none; border-color: #d11515; background: #fff; }
.price-row {
  display: flex; flex-direction: column; gap: 10px;
  margin-top: 10px; padding: 12px 16px;
  background: #fdf5f5; border: 1px solid #f7e3e3; border-radius: 12px;
}
/* 第一行：价格 / 折扣价；第二行：商品折扣 / 附件折扣 */
.price-line { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
.price-row .disc { display: inline-flex; align-items: center; gap: 6px; }
.price-row .final { display: inline-flex; align-items: baseline; gap: 4px; }
.price-line-main .final { margin-left: auto; }
/* 接口合计面价的构成说明 */
.price-note { font-size: 12px; color: #999; margin-left: 6px; white-space: nowrap; }
.dp-input {
  width: 130px; border: 1.5px solid #f0c0c0; border-radius: 10px; padding: 10px 12px;
  font-size: 18px; font-weight: bold; text-align: center; color: #d11515; background: #fff8f8;
}
.dp-input:focus { outline: none; border-color: #d11515; background: #fff; }

/* ============ 抽屉关闭按钮 ============ */
.drawer-close { display: none; }
@media (max-width: 768px) {
  .drawer-close {
    display: inline-flex; align-items: center; justify-content: center;
    width: 30px; height: 30px; border-radius: 50%;
    background: #f4f5f7; color: #86909c; font-size: 14px; cursor: pointer;
  }
  .drawer-close:active { color: #d11515; background: #fdf2f2; }
  .sidebar h3 { display: flex; justify-content: space-between; align-items: center; }
}

/* ============ 电脑端样式打磨 ============ */
@media (min-width: 769px) {
  .layout { max-width: 1280px; margin: 0 auto; width: 100%; }
  .topbar { position: sticky; top: 0; z-index: 800; }
  .xuan-panel { padding: 28px 32px; box-shadow: 0 1px 6px rgba(31,35,41,.05); }
  .series-card { transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
  .series-card:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(209,21,21,.10); }
  .sidebar { box-shadow: 0 1px 6px rgba(31,35,41,.05); }
}

/* ============ 电脑端折扣设置面板打磨 ============ */
@media (min-width: 769px) {
  .dp-panel { width: 460px; padding: 26px 28px 24px; }
  .dp-title { font-size: 18px; }
  .dp-cat { font-size: 14px; padding: 9px 14px; }
  .dp-opts { margin-top: 18px; }
  .dp-opt { padding: 9px 28px; font-size: 14px; }
  .dp-input-row {
    margin-top: 14px; padding: 14px 16px;
    background: #fafafa; border-radius: 12px; font-size: 15px;
  }
  .dp-input { width: 140px; font-size: 20px; padding: 10px 14px; }
  .dp-btns { margin-top: 24px; }
  .dp-btn { line-height: 44px; font-size: 15px; }
}

/* ============ 分类树点击展开 ============ */
.cattree li { position: relative; }
.cattree li ul { display: none; }                 /* 子级默认收起 */
.cattree li.expanded > ul { display: block; }     /* 点击后展开 */
.cat-arrow {
  position: absolute; left: -2px; top: 50%;
  width: 18px; height: 18px; margin-top: -9px;
  cursor: pointer; user-select: none;
  transition: transform .2s ease;
}
.cat-arrow::before {
  content: ''; display: block; margin: 5px;
  border: solid #b8bfc9; border-width: 2px 2px 0 0;
  width: 6px; height: 6px;
  transform: rotate(45deg);          /* 默认 ▸ */
  transition: transform .2s ease, border-color .2s ease;
}
.cattree li.expanded > .cat-arrow::before { transform: rotate(135deg); border-color: #d11515; } /* 展开 ▾ */
.cat-arrow:hover::before { border-color: #d11515; }
.cattree li.has-children > a { padding-left: 20px; }  /* 给箭头留位 */
.cattree li.has-children > a.active { padding-left: 20px; }

/* ============ 折扣系数输入框精细样式 ============ */
.disc-input, .dp-input {
  -moz-appearance: textfield;
  appearance: textfield;
  caret-color: #d11515;
  box-shadow: inset 0 1px 2px rgba(209,21,21,.05);
}
.disc-input::-webkit-outer-spin-button,
.disc-input::-webkit-inner-spin-button,
.dp-input::-webkit-outer-spin-button,
.dp-input::-webkit-inner-spin-button {
  -webkit-appearance: none; margin: 0;
}
.disc-input:focus, .dp-input:focus {
  border-color: #d11515;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(209,21,21,.12);   /* 聚焦红色光圈 */
  outline: none;
}

/* ============ 修正分类箭头位置：对齐第一行（而非整个 li 垂直居中） ============ */
.cat-arrow { top: 7px; margin-top: 0; }               /* 桌面：行高 6+20+6=32，箭头 18px → 顶部 7px */
@media (max-width: 768px) {
  .cat-arrow { top: 12px; }                            /* 移动端：行高 10+20+10=40 → 顶部 12px */
}

/* ============ 折扣系数输入框（dp-input）与折扣输入框（disc-input）样式完全统一 ============ */
.disc-input, .dp-input {
  border: 1.5px solid #f0c0c0; border-radius: 10px;
  font-size: 17px; font-weight: bold; text-align: center; color: #d11515;
  background: #fff8f8; padding: 8px 10px;
  box-sizing: border-box;
  -moz-appearance: textfield; appearance: textfield;
  caret-color: #d11515;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.disc-input:focus, .dp-input:focus {
  border-color: #d11515; background: #fff;
  box-shadow: 0 0 0 3px rgba(209,21,21,.12); outline: none;
}
/* 面板里的系数输入框只保留宽度差异，其余视觉完全一致 */
.dp-input { width: 130px; }

/* ============ 搜索联想下拉 ============ */
.searchbox { position: relative; }
.sug {
  display: none; position: absolute; top: 100%; left: 0; right: 0;
  background: #fff; border: 1px solid #eee; border-top: none;
  border-radius: 0 0 8px 8px; box-shadow: 0 8px 20px rgba(31,35,41,.12);
  z-index: 1200; max-height: 320px; overflow-y: auto;
}
.sug.open { display: block; }
.sug-item {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 10px 14px; cursor: pointer; border-bottom: 1px solid #f5f5f5;
}
.sug-item:last-child { border-bottom: none; }
.sug-item.on, .sug-item:hover { background: #fdf2f2; }
.sug-name { font-weight: bold; color: #333; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sug-item.on .sug-name, .sug-item:hover .sug-name { color: #d11515; }
.sug-path { color: #b8bfc9; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex-shrink: 1; }
@media (max-width: 768px) {
  .sug-item { padding: 12px 14px; }
  .sug-path { max-width: 45%; }
}

/* ============ 选型页顶栏搜索图标 ============ */
.search-icon {
  margin-left: auto; display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,.14); flex-shrink: 0;
}
.search-icon:hover { background: rgba(255,255,255,.26); text-decoration: none; }
.search-icon:active { background: rgba(255,255,255,.36); }

/* 窄屏横向溢出保护 */
@media (max-width: 768px) {
  html, body { overflow-x: hidden; }
}

/* ============ 首页（标题行 + 搜索框行 + 标签行） ============ */
.home-top { background: #d11515; padding: 14px 24px 16px; }
.home-title { color: #fff; font-size: 20px; font-weight: bold; margin-bottom: 12px; }
.home-sub { font-size: 12px; font-weight: normal; opacity: .85; }
.searchbox.home-search { display: flex; max-width: 860px; margin: 0 auto; position: relative; }
.searchbox.home-search input { flex: 1; border: none; border-radius: 6px 0 0 6px; padding: 10px 14px; font-size: 15px; min-width: 0; }
.searchbox.home-search button { border-radius: 0 6px 6px 0; padding: 10px 26px; }
.home-tags { display: flex; flex-wrap: wrap; gap: 10px; max-width: 860px; margin: 14px auto 0; justify-content: center; }
.hot-tag {
  display: inline-block; padding: 7px 22px; border-radius: 999px;
  background: #fff; border: 1px solid #f0d3d3; color: #d11515;
  font-size: 14px; font-weight: 600; letter-spacing: .5px;
  transition: all .15s ease;
}
.hot-tag:hover { background: #fff5f5; border-color: #d11515; text-decoration: none; }
.tag-cat {
  display: inline-block; padding: 7px 22px; border-radius: 999px;
  background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.55);
  color: #fff; font-size: 14px; font-weight: 600;
  transition: all .15s ease;
}
.tag-cat:hover { background: #fff; color: #d11515; text-decoration: none; }
.home-wrap { max-width: 1280px; margin: 0 auto; padding: 22px 24px 60px; }
/* 首页大横幅（德力西优品系列） */
.home-banner {
  display: block; max-width: 1280px; margin: 0 auto 24px;
  border-radius: 14px; overflow: hidden;
  box-shadow: 0 6px 20px rgba(209, 21, 21, .14);
  transition: transform .15s ease, box-shadow .15s ease;
}
.home-banner:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(209, 21, 21, .2); }
.home-banner img { display: block; width: 100%; height: auto; }
@media (max-width: 768px) {
  .home-banner { margin: 0 auto 16px; border-radius: 10px; }
}
@media (max-width: 768px) {
  .home-top { padding: 12px 14px 14px; }
  .home-title { font-size: 16px; margin-bottom: 10px; }
  .home-tags { gap: 8px; margin-top: 12px; justify-content: flex-start; }
  .hot-tag, .tag-cat { padding: 6px 14px; font-size: 13px; }
  .home-wrap { padding: 14px 14px 40px; }
}

/* ============ 全站声明页脚 ============ */
.site-footer {
  text-align: center; padding: 30px 16px 36px;
  color: #9aa0aa; font-size: 13px; line-height: 2;
}
.site-footer a { color: #d11515; font-weight: 600; }
.site-footer a:hover { text-decoration: underline; }

/* ============ 多品牌页样式 ============ */
.sec-label {
  display: inline-block; font-size: 16px; font-weight: bold; color: #333;
  padding-left: 10px; border-left: 4px solid #d11515; margin: 0 0 16px;
}
.brand-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px;
}
.brand-card {
  background: #fff; border: 1px solid #eee; border-radius: 10px;
  padding: 18px 20px; display: block; color: #333;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.brand-card:hover {
  border-color: #d11515; text-decoration: none; transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(209,21,21,.12);
}
.bc-name { font-size: 17px; font-weight: 600; }
.bc-meta { margin-top: 8px; font-size: 12px; color: #a0a6b0; }
.bnote {
  background: #fff8e6; border: 1px solid #f3dfa8; color: #8a6d1a;
  border-radius: 10px; padding: 12px 16px; font-size: 13px; line-height: 1.8;
  margin: 0 0 14px;
}
@media (max-width: 768px) {
  .brand-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .brand-card { padding: 12px 14px; }
  .bc-name { font-size: 15px; }
}
.bc-logo {
  display: block; width: 100%; height: 64px; object-fit: contain;
  margin-bottom: 10px; background: #fafafa; border-radius: 8px; padding: 6px;
}
@media (max-width: 768px) { .bc-logo { height: 46px; margin-bottom: 6px; } }

/* ===== 主页布局改版 ===== */
.mb-hero {
  background: linear-gradient(135deg, #e02020, #a50f0f);
  padding: 30px 16px 34px; text-align: center;
}
.mb-title { color: #fff; font-size: 26px; font-weight: bold; letter-spacing: 1px; }
.mb-sub { color: rgba(255,255,255,.85); font-size: 13px; margin-top: 8px; }
.mb-search { max-width: 560px; margin: 18px auto 0; }
.mb-hot { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.mb-hotcard { text-align: center; padding: 20px 14px 16px; }
.mb-hotcard .bc-logo { height: 72px; background: #fff; }
.bc-badge {
  display: inline-block; margin-top: 8px; font-size: 12px;
  border-radius: 20px; padding: 3px 10px; background: #f2f3f5; color: #999;
}
.bc-badge.ok { background: #eef7ee; color: #1a9a4a; }
.mb-secrow { display: flex; align-items: baseline; gap: 10px; margin: 30px 0 14px; }
.mb-count { color: #999; font-size: 12px; }
.mb-resultbar {
  background: #fff8e6; border: 1px solid #f3dfa8; color: #8a6d1a;
  border-radius: 8px; padding: 8px 14px; font-size: 13px;
  margin-bottom: 12px; display: flex; align-items: center; gap: 8px;
}
.mb-clear {
  margin-left: auto; background: none; border: 1px solid #d8c48a; color: #8a6d1a;
  border-radius: 6px; padding: 3px 10px; cursor: pointer; font-size: 12px;
}
@media (max-width: 768px) {
  .mb-title { font-size: 20px; }
  .mb-hero { padding: 22px 14px 26px; }
  .mb-hotcard .bc-logo { height: 52px; }
}

/* ===== 选项区按钮 / 产品参数弹窗 ===== */
.param-btn {
  background: #fff; border: 1px solid #d11515; color: #d11515;
  border-radius: 6px; padding: 6px 16px; font-size: 13px; cursor: pointer;
}
.param-btn.open, .param-btn:hover { background: #d11515; color: #fff; }
.pm-mask { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 1300; }
.pm-mask.open { display: block; }
.pm-panel {
  display: none; position: fixed; z-index: 1301;
  left: 50%; top: 50%; transform: translate(-50%,-50%);
  width: 680px; max-width: calc(100vw - 32px); max-height: min(80vh, 720px);
  background: #fff; border-radius: 14px; box-shadow: 0 12px 48px rgba(0,0,0,.18);
  flex-direction: column; overflow: hidden;
}
.pm-panel.open { display: flex; }
.pm-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 20px; border-bottom: 1px solid #f0f0f0; flex-shrink: 0;
}
.pm-title { font-size: 17px; font-weight: bold; }
.pm-close { color: #b8bfc9; cursor: pointer; font-size: 16px; padding: 2px 6px; }
.pm-close:hover { color: #d11515; }
.pm-body { overflow-y: auto; padding: 14px 20px 20px; -webkit-overflow-scrolling: touch; }
body.pm-open { overflow: hidden; }
@media (max-width: 768px) {
  .pm-panel { width: calc(100vw - 24px); max-height: 85vh; }
  .pm-head { padding: 14px 16px; }
  .pm-body { padding: 12px 16px 18px; }
}
.param-group { margin-bottom: 14px; }
.param-group:last-child { margin-bottom: 0; }
.param-group-hd {
  font-weight: bold; font-size: 14px; color: #333;
  padding: 8px 12px; background: #f7f8fa; border-radius: 6px;
}
.param-row {
  display: flex; align-items: baseline; padding: 8px 12px;
  border-bottom: 1px solid #f0f0f0; font-size: 13px;
}
.param-row:last-child { border-bottom: none; }
.param-row .pk { width: 150px; color: #888; flex-shrink: 0; }
.param-row .pv { color: #333; word-break: break-all; }
@media (max-width: 768px) {
  .param-row .pk { width: 108px; }
}
.param-btns { display: flex; gap: 10px; margin-top: 8px; }

/* ============ 附件折扣（紧挨商品折扣输入框右侧） ============ */
.price-row .comb-disc-inline { margin-left: 0; padding-left: 12px; border-left: 1px dashed #f0c0c0; }
.comb-disc-inline .disc-input { width: 72px; }
.comb-disc-inline .cd-reset { color: #d11515; font-size: 12px; cursor: pointer; text-decoration: underline; }

/* ============ 选中附件后浮出的商品清单（可收起 / 展开） ============ */
.quote-bar {
  display: none; position: fixed; right: 20px; bottom: 18px; z-index: 950;
  width: 350px; max-width: calc(100vw - 40px);
  background: #fff; border: 1px solid #f0d5d5; border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,.16); overflow: hidden;
}
.quote-bar.show { display: block; animation: qb-in .22s ease-out; }
@keyframes qb-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.qb-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 14px; background: #d11515; color: #fff; font-size: 13px; font-weight: bold;
  cursor: pointer; user-select: none;
}
.qb-close { font-weight: normal; font-size: 12px; cursor: pointer; opacity: .9; padding: 2px 4px; }
.qb-close:hover { opacity: 1; text-decoration: underline; }
.quote-bar.collapsed { box-shadow: 0 6px 18px rgba(0,0,0,.14); }
.qb-row {
  display: flex; align-items: baseline; gap: 8px;
  padding: 10px 14px; border-bottom: 1px solid #f5f5f5; font-size: 13px;
}
.qb-label { flex-shrink: 0; width: 34px; color: #888; }
.qb-name { flex: 1; color: #333; word-break: break-all; }
.qb-name small { display: block; color: #999; font-size: 11px; margin-top: 3px; }
.qb-price { flex-shrink: 0; font-weight: bold; color: #d11515; }
.qb-total { border-top: 1px dashed #f0c0c0; border-bottom: none; background: #fffafa; }
.qb-total .qb-name { font-weight: bold; }
.qb-total .qb-price { font-size: 16px; }
body.has-quote .float-bar { display: none; }
@media (max-width: 768px) {
  .quote-bar { left: 10px; right: 10px; bottom: 10px; width: auto; max-width: none; }
}

/* ============ 附件下级规格（entity.views.props） ============ */
#comb-view-wrap {
  padding: 12px 14px; background: #fafafa; border: 1px solid #eee; border-radius: 10px;
}
.comb-view-fixed { font-size: 12px; color: #888; line-height: 1.7; margin: 4px 0 8px; word-break: break-all; }
#comb-view-props .prop { margin-top: 8px; }
#comb-view-props .item.selected { border-color: #d11515; color: #d11515; background: #fff5f5; }

/* ============================================================
   移动端适配（统一收口）
   必须放在样式表末尾：前面的基础规则会覆盖「写在前面的 @media」里
   同优先级的声明（.price-row / .props .item 等曾因此失效），
   这里重新声明一遍，保证窄屏下真正生效。
   ============================================================ */
@media (max-width: 768px) {
  /* --- 防 iOS 聚焦自动缩放、加大触控目标 --- */
  input, select, textarea { font-size: 16px; }        /* 类选择器优先级更高，折扣框仍保持 17px */
  .disc-input { width: 76px; padding: 8px 6px; }
  .comb-disc-inline .disc-input { width: 70px; }
  .props .items { gap: 8px; }
  .props .item { padding: 10px 14px; font-size: 13px; word-break: break-word; }
  .props .prop-name { line-height: 1.5; word-break: break-word; }
  .prop-plain { font-size: 12px; line-height: 1.6; word-break: break-word; }
  .param-btns { flex-wrap: wrap; gap: 8px; margin-top: 12px; }
  .param-btn { padding: 10px 14px; font-size: 13px; }
  .qb-close { padding: 6px; }
  .pm-close, .dp-close {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 34px; min-height: 34px;
  }

  /* --- 商品信息头部：左对齐更易读，长名称自动换行 --- */
  .xuan-panel { padding: 14px 12px; }
  .xuan-head { align-items: center; text-align: left; gap: 12px; }
  .xuan-info h2 { font-size: 17px; line-height: 1.4; word-break: break-word; }
  .xuan-info .xuan-row:not(.price-row) { line-height: 1.6; word-break: break-word; }

  /* --- 价格区：第一行「价格 + 折扣价」，第二行「两个折扣」 --- */
  .price-row { padding: 12px; gap: 10px; }
  .price-line { gap: 8px 12px; }
  .price-line-main { flex-wrap: nowrap; align-items: baseline; }
  .price-main { display: block; flex: 1 1 auto; min-width: 0; line-height: 1.5; }
  /* 合计面价说明很长，窄屏改为换行显示，避免横向溢出被裁掉 */
  .price-note {
    display: block; white-space: normal; word-break: break-word;
    margin-left: 0; margin-top: 3px; font-size: 11px; line-height: 1.5;
  }
  .price-line-main .final { flex-shrink: 0; white-space: nowrap; }
  .price-row .disc { flex-shrink: 0; }
  /* 两个折扣换行时竖线会挂在行首，改为无分隔、靠间距区分 */
  .price-row .comb-disc-inline { border-left: 0; padding-left: 0; }
  .red { font-size: 18px; }

  /* --- 折扣信息行 --- */
  .disc-info { flex-wrap: wrap; gap: 6px; padding: 10px 12px; }
  .di-cat { min-width: 40px; }

  /* --- 产品参数弹窗 --- */
  .pm-panel { width: calc(100vw - 20px); max-height: 85vh; }
  .pm-body { padding: 12px 12px calc(18px + env(safe-area-inset-bottom)); }
  .param-row { padding: 8px 6px; font-size: 12px; }
  .param-row .pk { width: 92px; }

  /* --- 折扣设置底部弹窗 --- */
  .dp-panel { max-height: 85vh; overflow-y: auto; -webkit-overflow-scrolling: touch; }
  .dp-opt { padding: 9px 18px; }
  .dp-input { width: 110px; }
  .dp-btn { line-height: 42px; }

  /* --- 悬浮价格条 --- */
  .float-bar { padding: 8px 12px; gap: 8px; }
  .fb-left { flex-wrap: wrap; gap: 2px 6px; }
  .fb-label { font-size: 11px; }
  .fb-price, .fb-disc { font-size: 13px; }
  .fb-right { font-size: 12px; }
  .fb-final { font-size: 17px; }

  /* --- 商品清单：限高内部滚动 + 底部安全区 --- */
  .quote-bar {
    left: 8px; right: 8px; bottom: calc(8px + env(safe-area-inset-bottom));
    max-height: 60vh;
  }
  #qb-rows {
    max-height: calc(60vh - 54px);
    overflow-y: auto; -webkit-overflow-scrolling: touch;
  }
  .qb-row { padding: 9px 10px; font-size: 12px; gap: 6px; }
  .qb-label { width: 30px; }
  .qb-name { min-width: 0; }
  .qb-price { white-space: nowrap; }
  .qb-total .qb-price { font-size: 14px; }

  /* --- 附件详情 / 下级规格 --- */
  #comb-view-wrap { padding: 10px; }
  .comb-view-fixed { word-break: break-all; }
  .ptable { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

/* 超窄屏（≤360px，如 iPhone SE / 老安卓）再收紧一档 */
@media (max-width: 360px) {
  .xuan-panel { padding: 12px 10px; }
  .price-row { padding: 10px; }
  .price-line { gap: 8px; }
  .disc-input { width: 68px; }
  .comb-disc-inline .disc-input { width: 64px; }
  .param-btn { padding: 9px 11px; font-size: 12px; }
  .red { font-size: 17px; }
  .price-line-main .final { font-size: 12px; }
  .fb-left { gap: 0 4px; }
  .fb-right { white-space: nowrap; }
  .qb-label { width: 26px; }
}
