/* ===== WORKBUDDYAI_UPDATE_B [QUOTE] [2026-12-04 询价清单样式（模板无关）] =====
   只负责「抽屉 + 列表 + 角标」这一层，入口按钮的外观仍由各模板自己的类决定：
   模板给出 <button class="site-xxx" data-qb-open>，本文件不覆盖它的排版。

   配色/圆角全部走 --qb-* 变量，模板在 site.css 里改一行就能贴合自己的品牌色，
   不需要复制整份样式。默认值刻意中性（不抢模板主色）。

   怎么删：删本文件与 quote-basket.js，并去掉 _Layout 里的 link。
   ===== WORKBUDDYAI_UPDATE_E [QUOTE] ===== */

.qb-drawer {
  --qb-ink: #1f2937;
  --qb-muted: #6b7280;
  --qb-line: #e5e7eb;
  --qb-bg: #ffffff;
  --qb-accent: #1d4ed8;
  --qb-radius: 10px;
  --qb-shadow: 0 18px 48px rgba(15, 23, 42, .22);
  position: fixed;
  inset: 0;
  z-index: 1080;
  pointer-events: none;
}

.qb-drawer[aria-hidden="false"] { pointer-events: auto; }

.qb-drawer__scrim {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, .45);
  opacity: 0;
  transition: opacity .22s ease;
}

.qb-drawer[aria-hidden="false"] .qb-drawer__scrim { opacity: 1; }

.qb-drawer__panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  width: min(420px, 92vw);
  background: var(--qb-bg);
  color: var(--qb-ink);
  box-shadow: var(--qb-shadow);
  transform: translateX(102%);
  transition: transform .26s ease;
}

.qb-drawer[aria-hidden="false"] .qb-drawer__panel { transform: translateX(0); }

.qb-drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: 1rem 1.1rem;
  border-bottom: 1px solid var(--qb-line);
}

.qb-drawer__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.3;
}

.qb-drawer__close {
  flex: none;
  width: 32px;
  height: 32px;
  border: 1px solid var(--qb-line);
  border-radius: 50%;
  background: transparent;
  color: var(--qb-muted);
  font-size: .9rem;
  line-height: 1;
  cursor: pointer;
}

.qb-list {
  flex: 1 1 auto;
  margin: 0;
  padding: .35rem 1.1rem;
  list-style: none;
  overflow: auto;
}

.qb-list__item {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .7rem 0;
  border-bottom: 1px solid var(--qb-line);
}

.qb-list__item:last-child { border-bottom: 0; }

.qb-list__thumb {
  flex: none;
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 6px;
  background: #f3f4f6;
}

.qb-list__main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: .15rem;
}

.qb-list__title {
  color: inherit;
  font-size: .92rem;
  font-weight: 500;
  line-height: 1.35;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.qb-list__title:hover { text-decoration: underline; }

.qb-list__sku {
  color: var(--qb-muted);
  font-size: .76rem;
  letter-spacing: .02em;
  overflow-wrap: anywhere;
}

.qb-list__qty {
  flex: none;
  width: 58px;
  padding: .25rem .35rem;
  border: 1px solid var(--qb-line);
  border-radius: 6px;
  background: #fff;
  color: inherit;
  font-size: .85rem;
  text-align: center;
}

.qb-list__del {
  flex: none;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--qb-muted);
  font-size: .8rem;
  line-height: 1;
  cursor: pointer;
}

.qb-list__del:hover { background: #f3f4f6; color: #b91c1c; }

.qb-empty {
  flex: 1 1 auto;
  margin: 0;
  padding: 2.2rem 1.4rem;
  color: var(--qb-muted);
  font-size: .9rem;
  line-height: 1.6;
  text-align: center;
}

.qb-drawer__foot {
  padding: .85rem 1.1rem calc(.85rem + env(safe-area-inset-bottom));
  border-top: 1px solid var(--qb-line);
}

.qb-btn {
  display: block;
  width: 100%;
  padding: .7rem 1rem;
  border: 1px solid transparent;
  border-radius: var(--qb-radius);
  font-size: .95rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.qb-btn--primary { background: var(--qb-accent); color: #fff; }

/* [QUOTE-UI 2026-12-04] 修「提交詢價」深蓝底黑字：
   前台 cms-front.css 里有 `.cf-body a { color: ... }`，特异性 (0,1,1) 高于
   `.qb-btn--primary` (0,1,0) —— 白字被站点链接色覆盖，深蓝底上几乎读不出来。
   抽屉是独立层，这里加 .qb-drawer 前缀提到 (0,2,0) 把白字抢回来。 */
.qb-drawer .qb-btn--primary,
.qb-drawer .qb-btn--primary:hover,
.qb-drawer .qb-btn--primary:focus {
  color: #fff;
}

.qb-btn.is-disabled {
  opacity: .5;
  pointer-events: none;
}

/* 加购按钮的「已在清单里」态。模板可以覆盖成更强/更弱的表达 */
.qb-add.is-added { opacity: .72; }

/* 入口按钮 —— v2：以英文站 Template_inniasub 的询盘篮入口为母版重做。
   [QUOTE-UI 2026-12-04] 用户明确认可英文站「明显」：常显 + 文字标签 + 右上角独立数字徽章。
   前几版做成 36px 灰胶囊，太像紧挨着的搜索控件，而且没有文字，客户看不出这是询价入口。

   规格对齐英文站 v3：40px 高（站点头部内高 74px，留足呼吸）、白底、发丝边、
   8px 圆角（与导航 .site-nav__link 同语族，不用胶囊）、图标 + 文字 + 角标三件套。
   空篮中性，hover / 有内容才浮出品牌色 —— 明显指的是「看得懂」，不是「一直在闪」。 */
.qb-entry {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex: none;
    height: 40px;
    padding: 0 12px;
    border: 1px solid var(--line, #dee2e6);
    border-radius: 8px;
    background: var(--bg, #fff);
    color: var(--ink, #1b2230);
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    transition: color .18s ease, border-color .18s ease, background-color .18s ease;
}

/* 图标尺寸只在这里定：模板里那段 SVG 不再自带 width/height 之外的排版含义 */
.qb-entry > svg {
    flex: none;
    width: 18px;
    height: 18px;
}

.qb-entry__text { line-height: 1; }

.qb-entry:hover,
.qb-entry.has-items {
    border-color: var(--brand, #008fcd);
    background: var(--brand-soft, #e8f5fb);
    color: var(--brand, #008fcd);
}

.qb-entry:focus-visible {
    outline: 2px solid var(--brand, #008fcd);
    outline-offset: 2px;
}

/* JS 按「空篮是否隐藏」控制 hidden，display 不能把它顶掉 */
.qb-entry[hidden] { display: none; }

/* 产品列表卡片的加购按钮：排在价格行（.cf-card__foot）末尾，占的是原本空着的右侧。
   [QUOTE-UI 2026-12-04] 早先的实现是绝对定位在商品图右上角、内容只有一个「+」：
     ① 压住主图（图上还有认证徽章），② 客户看不出点了会发生什么。
   改成带文字的行内按钮后不再需要定位祖先，下面那条 :has 只负责「有按钮的脚注行允许换行」，
   没有按钮的卡片（新闻 / 下载 / 图集）在 DOM 与样式上都与改动前完全一致。

   配色刻意用 --cf-brand 而不是 --brand：这块卡片属于 CMS 前台样式域
   （cms-front.css 的 --cf-brand #1d4ed8），与站点模板的 --brand #008fcd 是两套色，
   用错变量会让按钮比旁边的价格、徽章偏青一档。 */
.cf-card__foot:has(.qb-card-add) {
    flex-wrap: wrap;
    row-gap: 6px;
}

.qb-card-add {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    /* 不许被 flex 压缩：卡片窄、标题行更长时，span 会被压到文字下面裁掉半个「盤」字。
       flex-shrink:0 + 上一层 flex-wrap 的结果是「放不下就整块换行」，而不是压扁。 */
    flex: 0 0 auto;
    margin-left: auto;   /* 价格 / 日期靠左，按钮推到行尾 */
    height: 26px;
    padding: 0 9px;
    border: 1px solid color-mix(in srgb, var(--cf-brand, #1d4ed8) 22%, #ffffff);
    border-radius: 7px;
    background: var(--cf-brand-soft, #eff6ff);
    color: var(--cf-brand, #1d4ed8);
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: .02em;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color .16s ease, border-color .16s ease, color .16s ease;
}

/* 加号用两枚 1.6px 的 currentColor 渐变拼出来：粗细与文字对齐，
   不依赖字体里「+」的字面渲染（不同中文字体下加号会偏细、偏上）。 */
.qb-card-add::before {
    content: "";
    flex: none;
    width: 10px;
    height: 10px;
    background:
        linear-gradient(currentColor, currentColor) center / 10px 1.6px no-repeat,
        linear-gradient(currentColor, currentColor) center / 1.6px 10px no-repeat;
}

.qb-card-add:hover {
    background: var(--cf-brand, #1d4ed8);
    border-color: var(--cf-brand, #1d4ed8);
    color: #fff;
}

.qb-card-add:focus-visible {
    outline: 2px solid var(--cf-brand, #1d4ed8);
    outline-offset: 2px;
}

/* 已在清单里：换成对勾 + 白底描边。文案不改 —— 同一份内容可以在抽屉里继续加数量，
   写成「已加入」反而像不能再点。 */
.qb-card-add.is-added {
    background: #fff;
    border-color: color-mix(in srgb, var(--cf-brand, #1d4ed8) 45%, #ffffff);
    color: var(--cf-brand, #1d4ed8);
}

.qb-card-add.is-added::before {
    width: 9px;
    height: 5px;
    background: none;
    border-left: 1.6px solid currentColor;
    border-bottom: 1.6px solid currentColor;
    transform: rotate(-45deg) translate(.5px, -1px);
}

/* 已加入时仍要有 hover 反馈；特异性 (0,3,0) 盖过上一条 (0,2,0) */
.qb-card-add.is-added:hover {
    background: var(--cf-brand, #1d4ed8);
    border-color: var(--cf-brand, #1d4ed8);
    color: #fff;
}

/* 产品详情页的加购按钮：复用站内 .cf-btn 的外观，只补一点上下间距 */
.qb-detail-add { margin: 14px 0 4px; }

.qb-detail-add .qb-add {
    display: inline-block;
    cursor: pointer;
    text-decoration: none;
}

/* 数量徽章：照英文站的做法独立挂在入口右上角（不是行内数字）。
   [QUOTE-UI 2026-12-04] 独立徽章比行内数字醒目得多 —— 访客扫一眼头部就知道
   「这里已经放了几样东西」，同时又不会像告警红点那样制造焦虑。
   2px 白描边让徽章从按钮边缘「浮」出来，英文站同款处理。 */
[data-qb-count] {
  position: absolute;
  top: -7px;
  right: -7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: content-box;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border: 2px solid var(--bg, #fff);
  border-radius: 999px;
  background: var(--qb-count-bg, var(--brand, #008fcd));
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

/* [QUOTE-UI 2026-12-04] 修「空篮显示 0」：JS 按 hidden 属性控制显隐，但上面的
   display:inline-flex 特异性高于 UA 的 [hidden]{display:none}，hidden 会失效 ——
   访客第一次来就看见一个写着 0 的圆点，像「有 0 条未读消息」。 */
[data-qb-count][hidden] { display: none !important; }

.qb-locked { overflow: hidden; }

/* 窄屏占满：手机上右侧抽屉留 8vw 空白反而挡住正文，且容易误触关闭 */
@media (max-width: 575.98px) {
  .qb-drawer__panel { width: 100%; }
}

/* [QUOTE-UI 2026-12-04 v2] 照英文站的响应式处理：窄屏收起文字只留图标按钮，
   避免「詢盤清單」四个字把本就紧的中文导航挤到换行。
   入口本身始终常显 —— 「明显」不能因为屏幕小就退化成找不到。 */
@media (max-width: 1024px) {
  .qb-entry {
    width: 40px;
    padding: 0;
  }

  .qb-entry__text { display: none; }
}

/* ---------------- 加购反馈 toast ----------------
   深色底 + 白字 + 描边「查看清单」按钮：任何模板的背景下都清晰，
   不借用站点品牌色（品牌色在深底上对比不足，容易被当成禁用态）。
   文案由服务端下发（data-qb-text-added / data-qb-text-view），JS 零硬编码。 */
.qb-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 1090;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  max-width: calc(100vw - 32px);
  padding: 10px 12px 10px 16px;
  border-radius: 8px;
  background: #1f2937;
  color: #fff;
  font-size: 13.5px;
  line-height: 1.4;
  box-shadow: 0 12px 32px rgba(15, 23, 42, .32);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 14px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
}

.qb-toast.is-show {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

.qb-toast__msg { min-width: 0; }

.qb-toast__view {
  flex: none;
  height: 28px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, .42);
  border-radius: 999px;
  background: transparent;
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .15s ease;
}

.qb-toast__view:hover { background: rgba(255, 255, 255, .14); }

.qb-toast__view:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .qb-toast { transition: none; }
}

@media (max-width: 575.98px) {
  .qb-toast {
    bottom: 16px;
    gap: 10px;
    padding: 9px 10px 9px 13px;
    font-size: 13px;
  }
}

/* ===== WORKBUDDYAI_UPDATE_B [QUOTE-UI] [2026-12-04 正文加购按钮重做] =====
   问题：正文里的按钮继承 .cf-prose a 的 --cf-brand(#1d4ed8 蓝紫) + 下划线，
   又没有任何盒模型，读起来就是一行加粗的蓝色链接 —— 不像按钮，且颜色不属于本站品牌。
   做法：单独给正文的 .qb-add 一枚细描边按钮：
     · 与头部入口、卡片按钮同一套品牌色语言（--brand #008fcd，不引 #1d4ed8）
     · 用 CSS 画一枚线框购物车（与头部入口呼应），不引图标字体、不硬编码文案
     · 1px 发丝边 + 6px 小圆角，字重压到 500、14px，去掉下划线和浏览器「粗链接」观感
   选择器 scoped 在 .cf-prose.sun-editor-editable 内，详情页的 .qb-detail-add
   继续用模板原有的 cf-btn 样式，产品卡片 .qb-card-add 与抽屉按钮都不受影响。 */
.cf-prose.sun-editor-editable .qb-add {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin: .35rem 0;
    padding: 6px 12px 6px 11px;
    /* WORKBUDDYAI_UPDATE_B [QUOTE-UI] [2026-12-05 正文按钮配色统一亮蓝] 固定 #008fcd，不跟随 nianjie 模板深蓝 --brand(#003090) */
    border: 1px solid color-mix(in srgb, #008fcd 34%, #ffffff);
    border-radius: 6px;
    background: #e8f5fb;
    color: #008fcd;
    font-size: 13.5px;
    font-weight: 500;
    line-height: 1.4;
    text-decoration: none;
    text-underline-offset: 0;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color .16s ease, border-color .16s ease, color .16s ease,
        box-shadow .16s ease;
}

/* WORKBUDDYAI_UPDATE_B [QUOTE-UI] [2026-12-05 正文按钮配色统一亮蓝] 图标 currentColor 跟随固定亮蓝文字，hover 反白 */
/* 线框购物车：两轮 + 车斗 + 把手，与头部入口同一枚图形。
   currentColor 跟随文字色，hover 时自动反白，不需要第二份图标 */
.cf-prose.sun-editor-editable .qb-add::before {
    content: "";
    flex: none;
    width: 14px;
    height: 14px;
    background:
        radial-gradient(circle at 5px 11.5px, currentColor 0 1.6px, transparent 1.7px),
        radial-gradient(circle at 11px 11.5px, currentColor 0 1.6px, transparent 1.7px),
        linear-gradient(currentColor, currentColor) 3px 3.5px / 9px 1.4px no-repeat,
        linear-gradient(currentColor, currentColor) 2px 3.5px / 1.4px 5.5px no-repeat,
        linear-gradient(currentColor, currentColor) 12px 3.5px / 1.4px 5.5px no-repeat,
        linear-gradient(currentColor, currentColor) 2px 8.5px / 11px 1.4px no-repeat;
}

/* WORKBUDDYAI_UPDATE_B [QUOTE-UI] [2026-12-05 正文按钮配色统一亮蓝] hover/focus 底与 outline 固定亮蓝 #008fcd */
.cf-prose.sun-editor-editable .qb-add:hover,
.cf-prose.sun-editor-editable .qb-add:focus-visible {
    background: #008fcd;
    border-color: #008fcd;
    color: #fff;
    box-shadow: 0 3px 10px rgba(0, 143, 205, .22);
    outline: none;
}

.cf-prose.sun-editor-editable .qb-add:focus-visible {
    outline: 2px solid #008fcd;
    outline-offset: 2px;
}

/* 已在清单：改成极淡的确认态，不做整块实心，避免正文里抢视线 */
.cf-prose.sun-editor-editable .qb-add.is-added {
    background: transparent;
    border-color: var(--line, #dee2e6);
    color: var(--ink-2, #4e4e4e);
    box-shadow: none;
    opacity: 1;
}
/* ===== WORKBUDDYAI_UPDATE_E [QUOTE-UI] ===== */
