@charset "utf-8";
/* ==========================================================================
   V-RESOURCE  /quote  产品报价查询页 样式表
   配色 / 字号 / 容器宽度 与官网 template/default/images/Just.css 保持一致
   --------------------------------------------------------------------------
   主色(品牌橙)  #f5801d   辅色(科技蓝) #0c6eae / #1e8acb
   背景色        #ffffff / #fafafa    正文 #4f4d4d   标题 #3a3a3a
   容器宽度      1140px（与 .Just_c 一致）
   ========================================================================== */

:root {
    --vr-brand: #f5801d;          /* 主色：品牌橙（官网顶部 3px 描边色） */
    --vr-brand-2: #ef7d1d;        /* 主色深一档（官网下拉描边色） */
    --vr-brand-dark: #d96c0c;
    --vr-accent: #0c6eae;         /* 辅色：导航 hover 蓝 */
    --vr-accent-2: #1e8acb;       /* 辅色亮一档 */
    --vr-accent-dark: #0b6fad;
    --vr-ink: #3a3a3a;            /* 标题 / 链接 */
    --vr-text: #4f4d4d;           /* 正文（官网 html 默认色） */
    --vr-muted: #989898;          /* 次要文字（官网导航灰） */
    --vr-line: #e2e2e2;           /* 分隔线 */
    --vr-line-2: #ececec;
    --vr-bg: #ffffff;
    --vr-bg-soft: #fafafa;        /* 官网浅灰底 */
    --vr-bg-soft-2: #f4f4f4;
    --vr-shadow: 0 2px 10px rgba(0, 0, 0, .06);
    --vr-shadow-lg: 0 5px 5px rgba(172, 172, 172, .35);
    --vr-radius: 3px;
    --vr-wrap: 1140px;
    --vr-font: "Segoe UI", "wf_segoe-ui_normal", "Microsoft YaHei", Arial, sans-serif;
}

/* ---------- reset（局部作用域，避免污染整站） ---------- */
.vr, .vr * { box-sizing: border-box; }
.vr { font-family: var(--vr-font); color: var(--vr-text); font-size: 14px; line-height: 1.6; text-align: left; }
.vr h1, .vr h2, .vr h3, .vr h4, .vr p, .vr dl, .vr dd, .vr dt, .vr ul, .vr li { margin: 0; padding: 0; }
.vr ul, .vr li { list-style: none; }
.vr a { color: var(--vr-ink); text-decoration: none; }
.vr a:hover { color: var(--vr-accent); }
.vr img { border: 0; }
.vr button, .vr input, .vr select { font-family: inherit; font-size: 14px; outline: none; }
.vr-wrap { width: 1140px; max-width: 100%; margin: 0 auto; }
.vr-clear { clear: both; height: 0; font-size: 0; line-height: 0; }

/* ==========================================================================
   1. 顶部（复刻官网 .Just_top / .ddsmoothmenu）
   ========================================================================== */
.vr-top {
    width: 100%;
    background: #fff;
    border-bottom: 3px solid var(--vr-brand);
    position: relative;
    z-index: 900;
}
.vr-top__inner { width: 1140px; max-width: 100%; margin: 0 auto; height: 110px; position: relative; }
.vr-logo {
    position: absolute; left: 0; top: 28px; height: 60px; display: block;
    font-size: 30px; line-height: 60px; font-weight: 700; letter-spacing: 1px;
    color: var(--vr-accent-dark); white-space: nowrap;
}
.vr-logo span { display: block; font-size: 12px; line-height: 1; letter-spacing: 3px; color: var(--vr-muted); font-weight: 400; margin-top: -6px; }

.vr-nav { float: right; height: 38px; margin-top: 38px; }
.vr-nav > ul > li { float: left; height: 38px; line-height: 38px; font-size: 16px; position: relative; }
.vr-nav > ul > li > a {
    display: inline-block; height: 38px; padding: 0 22px; color: #858585; font-weight: 400;
    transition: color .18s ease, background .18s ease;
}
.vr-nav > ul > li > a:hover,
.vr-nav > ul > li > a.is-current { color: var(--vr-accent); background: #fff; }
.vr-nav > ul > li.is-current > a { color: var(--vr-accent); box-shadow: inset 0 -3px 0 var(--vr-brand); }
.vr-nav ul ul {
    display: none; position: absolute; left: 0; top: 38px; width: 200px; background: #fff;
    box-shadow: 0 5px 5px #acacac; border-bottom: 2px solid var(--vr-brand-2); z-index: 999;
}
.vr-nav ul ul li { height: 36px; line-height: 36px; border-bottom: 1px dotted var(--vr-line-2); font-size: 14px; }
.vr-nav ul ul li a { display: block; padding: 0 0 0 15px; color: var(--vr-muted); }
.vr-nav ul ul li a:hover { background: var(--vr-line-2); color: var(--vr-brand-2); }
.vr-nav li:hover > ul { display: block; }
.vr-nav__toggle { display: none; }

/* ==========================================================================
   2. Hero 标题区
   ========================================================================== */
.vr-hero {
    background: var(--vr-bg-soft);
    border-bottom: 1px solid var(--vr-line);
    padding: 26px 0 24px;
}
.vr-crumb { font-size: 12px; color: var(--vr-muted); margin-bottom: 10px; }
.vr-crumb a { color: var(--vr-muted); }
.vr-crumb a:hover { color: var(--vr-brand); }
.vr-crumb i { font-style: normal; margin: 0 6px; color: #cacaca; }
.vr-hero h1 {
    font-size: 30px; line-height: 1.25; color: var(--vr-ink); font-weight: 600;
    letter-spacing: .5px;
}
.vr-hero h1 em {
    font-style: normal; display: block; font-size: 13px; letter-spacing: 4px;
    color: var(--vr-brand); font-weight: 400; margin-top: 4px; text-transform: uppercase;
}
.vr-hero__sub { margin-top: 8px; font-size: 13px; color: var(--vr-muted); max-width: 760px; }
.vr-stats { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 10px; }
.vr-stat {
    background: #fff; border: 1px solid var(--vr-line); border-left: 3px solid var(--vr-accent-2);
    border-radius: var(--vr-radius); padding: 8px 16px; min-width: 132px;
}
.vr-stat b { display: block; font-size: 20px; color: var(--vr-accent-dark); font-weight: 600; line-height: 1.3; }
.vr-stat span { font-size: 12px; color: var(--vr-muted); }
.vr-stat--brand { border-left-color: var(--vr-brand); }
.vr-stat--brand b { color: var(--vr-brand); }

/* ---- 数据源切换（English / Chinese / Product Pricing）----------------
   位置：hero 右上角的空白区（绝对定位在 .vr-wrap 右上，视觉最显眼且不与
   标题/统计块重叠）。每个按钮 = 一个独立的数据表，点击即切换读取的数据，
   字段名语言也随之切换（英文表=英文名，中英文表=中英完整名）。
   按钮由服务端按「数据目录里真实存在的文件」生成：放一个 xlsx 就多一个按钮，
   删掉就少一个 —— 界面上永远不会出现读不到数据的按钮。
   当前生效的一项用品牌橙实底标示，标题下方一行回显正在显示的表名。

   宽度：max-content —— 容器跟着最长按钮撑开，绝不用"平分宽度"挤压长标签
   （"Product Pricing" 被压成 "Products an..." 的就是固定 300px + flex 平分的
   结果）。上限 520px 或视口宽度；装不下时按钮整行换行，最后由 clamp() 收缩
   左右内边距，所以任何终端下最后一个按钮都完整可读。 */
.vr-hero .vr-wrap { position: relative; }          /* 切换框的定位锚点 */
.vr-datasrc {
    position: absolute; right: 0; top: 16px;
    width: max-content; max-width: min(520px, 100%);
    padding: 11px 14px 10px;
    background: #fff; border: 1px solid var(--vr-line);
    border-top: 3px solid var(--vr-brand); border-radius: var(--vr-radius);
    box-shadow: var(--vr-shadow); z-index: 20;
}
.vr-datasrc__title {
    display: block; font-size: 11px; letter-spacing: 1px; text-transform: uppercase;
    color: var(--vr-muted); margin-bottom: 7px;
}
/* 一个工作簿都没部署时：这里没有按钮，只有一句说明 —— 绝不允许出现"文件不存在
   却有按钮"的情况（按钮集合 = 实际会被读取的文件集合）。 */
.vr-datasrc__empty {
    display: block; font-size: 12px; line-height: 1.5;
    color: var(--vr-brand-dark); padding: 2px 0 3px;
}
.vr-datasrc__btns {
    display: flex; flex-wrap: wrap; border: 1px solid var(--vr-line);
    border-radius: var(--vr-radius); overflow: hidden;
}
/* 三个按钮共用同一套高度 / 字号 / 圆角 / 内边距，视觉完全一致。
   min-width:max-content 是"不被截断"的硬保证（flex 收缩不能低于标签宽度），
   空间不足时交给 flex-wrap 换行。 */
.vr-datasrc__btn {
    flex: 1 1 auto; flex-basis: max-content; min-width: max-content;
    height: 38px; padding: 0 clamp(6px, 1.1vw, 12px); border: 0; background: #fff;
    color: var(--vr-text); font-size: 14px; font-weight: 600; letter-spacing: .3px;
    cursor: pointer; white-space: nowrap;
    transition: background .16s ease, color .16s ease;
}
.vr-datasrc__btn + .vr-datasrc__btn { border-left: 1px solid var(--vr-line); }
.vr-datasrc__btn:hover { background: #fff3e8; color: #c85f06; }
.vr-datasrc__btn:focus-visible { outline: 2px solid var(--vr-accent-2); outline-offset: -2px; }
/* 换行后新起一行的按钮需要一条上分隔线。第三个数据表（"Product Pricing"）是
   最长的一个，正是最常换行的那个，所以 n+3 覆盖了实际会出现的所有情况。 */
.vr-datasrc__btns > .vr-datasrc__btn:nth-child(n+3) { border-top: 1px solid var(--vr-line); }
/* 首屏即正确：data-active 由服务端按 ?src= 渲染（JS 启动后会同步维护这个属性） */
.vr-datasrc[data-active="en"] [data-src="en"],
.vr-datasrc[data-active="zh"] [data-src="zh"],
.vr-datasrc[data-active="prod"] [data-src="prod"],
.vr-datasrc__btn.is-on { background: var(--vr-brand); color: #fff; }
.vr-datasrc__btn.is-on:hover { background: var(--vr-brand-dark); color: #fff; }

/* 标题下方：当前正在显示的数据表（字段名语言随之变化） */
.vr-hero__src { margin-top: 6px; font-size: 12px; color: var(--vr-muted); }
.vr-hero__src b { color: #c85f06; font-weight: 600; }

/* 窄屏（≤1100px）：绝对定位会压到 hero 文字上，改为常规流式、全宽按钮 */
@media (max-width: 1100px) {
    .vr-datasrc { position: static; width: 100%; max-width: 520px; margin-top: 14px; }
}
@media (max-width: 480px) {
    .vr-datasrc { max-width: none; padding: 10px 12px 9px; }
    /* 超窄屏：字号与内边距再收一档，三个按钮依然保持同一套高度/圆角/字号，
       标签宽度靠 min-width:max-content 保证 —— 宁可换行，也不截断。 */
    .vr-datasrc__btn {
        height: 36px; font-size: 13px; padding: 0 clamp(5px, 1.6vw, 9px);
        flex-basis: max-content;
    }
}
@media print {
    .vr-datasrc { display: none !important; }
}

/* ---- 报价币种（结果工具栏内：USD $ 美金 / CNY ¥ 人民币）-------------------
   默认美金（数据表本身以 USD/MT 报价）；切到人民币时按数据表「汇率 Exchange Rate」
   列的最新值换算，换算结果取整（按吨计价）。右侧小字回显本次使用的汇率。
   控件自高级查询面板迁入工具栏（与 Default order / Columns / Cards-Table 同一行），
   尺寸与工具栏其它按钮保持一致（36px 高、同一圆角与字号）。 */
.vr-cur-wrap { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.vr-cur {
    display: inline-flex; align-items: stretch; border: 1px solid var(--vr-line);
    border-radius: var(--vr-radius); overflow: hidden; background: #fff;
}
.vr-cur__cap {
    display: inline-flex; align-items: center; padding: 0 9px;
    font-size: 11px; letter-spacing: .04em; text-transform: uppercase;
    color: var(--vr-muted); background: var(--vr-bg-soft-2);
    border-right: 1px solid var(--vr-line); white-space: nowrap;
}
.vr-cur__btn {
    height: 34px; padding: 0 10px; border: 0; background: #fff;
    color: var(--vr-text); font-size: 12.5px; font-weight: 500; cursor: pointer;
    white-space: nowrap; transition: background .16s ease, color .16s ease;
}
.vr-cur__btn + .vr-cur__btn { border-left: 1px solid var(--vr-line); }
.vr-cur__btn:hover { background: #fff3e8; color: #c85f06; }
.vr-cur__btn:focus-visible { outline: 2px solid var(--vr-accent-2); outline-offset: -2px; }
.vr-cur__btn.is-on,
.vr-cur[data-cur="usd"] [data-cur="usd"],
.vr-cur[data-cur="cny"] [data-cur="cny"] { background: var(--vr-brand); color: #fff; }
.vr-cur__btn.is-on:hover { background: var(--vr-brand-dark); color: #fff; }
.vr-cur__rate { font-size: 11px; color: var(--vr-muted); white-space: nowrap; }

/* ==========================================================================
   3. 查询区
   ========================================================================== */
.vr-main { padding: 24px 0 40px; }
.vr-panel {
    background: #fff; border: 1px solid var(--vr-line); border-radius: var(--vr-radius);
    box-shadow: var(--vr-shadow);
}
.vr-search { padding: 16px 18px; }
.vr-search__bar { display: flex; gap: 8px; align-items: stretch; flex-wrap: wrap; }
.vr-field { position: relative; flex: 1 1 320px; min-width: 220px; }
.vr-field__icon {
    position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
    width: 16px; height: 16px; color: var(--vr-muted); pointer-events: none;
}
.vr-input {
    width: 100%; height: 42px; line-height: 42px; padding: 0 38px 0 34px;
    border: 1px solid var(--vr-line); border-radius: var(--vr-radius); background: #fff;
    color: var(--vr-ink); transition: border-color .18s ease, box-shadow .18s ease;
}
.vr-input:focus { border-color: var(--vr-accent-2); box-shadow: 0 0 0 3px rgba(30, 138, 203, .12); }
.vr-input::placeholder { color: #b9b9b9; }
.vr-input__clear {
    position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
    width: 20px; height: 20px; line-height: 18px; text-align: center; border: 0; cursor: pointer;
    background: var(--vr-bg-soft-2); color: var(--vr-muted); border-radius: 50%; font-size: 14px; display: none;
}
.vr-input__clear:hover { background: var(--vr-brand); color: #fff; }
.vr-field--dirty .vr-input__clear { display: block; }

.vr-btn {
    height: 42px; padding: 0 22px; border: 1px solid transparent; border-radius: var(--vr-radius);
    cursor: pointer; font-size: 14px; font-weight: 500; white-space: nowrap;
    transition: background .18s ease, color .18s ease, border-color .18s ease;
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.vr-btn--primary { background: var(--vr-brand); color: #fff; }
.vr-btn--primary:hover { background: var(--vr-brand-dark); color: #fff; }
.vr-btn--ghost { background: #fff; color: var(--vr-text); border-color: var(--vr-line); }
.vr-btn--ghost:hover { border-color: var(--vr-accent-2); color: var(--vr-accent); }
.vr-btn--link {
    height: 46px; padding: 0 4px; background: none; border: 0; color: var(--vr-accent);
    font-size: 14px; cursor: pointer;
}
.vr-btn--link:hover { color: var(--vr-brand); text-decoration: underline; }
.vr-btn[disabled] { opacity: .55; cursor: not-allowed; }

.vr-tips { margin-top: 8px; font-size: 12px; color: var(--vr-muted); line-height: 1.55; }
.vr-tips b { color: var(--vr-accent); font-weight: 500; }
.vr-note { display: block; margin-top: 5px; color: var(--vr-brand-dark); }
.vr-note b { color: var(--vr-brand-dark); font-weight: 600; }

/* ---- 高级查询 ---- */
.vr-adv { display: none; border-top: 1px dashed var(--vr-line); margin-top: 16px; padding-top: 16px; }
.vr-adv.is-open { display: block; }
.vr-adv__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.vr-adv__item label { display: block; font-size: 12px; color: var(--vr-muted); margin-bottom: 5px; }
.vr-adv__item input, .vr-adv__item select {
    width: 100%; height: 38px; line-height: 38px; padding: 0 10px; border: 1px solid var(--vr-line);
    border-radius: var(--vr-radius); background: #fff; color: var(--vr-ink);
}
.vr-adv__item input:focus, .vr-adv__item select:focus { border-color: var(--vr-accent-2); }
.vr-range { display: flex; align-items: center; gap: 6px; }
.vr-range input { flex: 1 1 0; min-width: 0; }
.vr-range span { color: var(--vr-muted); }
.vr-adv__foot { margin-top: 14px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
/* Apply 按钮已移除（条件边输入边生效）：左侧一行提示，右侧按钮靠右 */
.vr-adv__hint { font-size: 12px; color: var(--vr-muted); margin-right: auto; padding-right: 8px; }

/* ==========================================================================
   4. 结果区
   ========================================================================== */
/* 结果工具栏：Default order | Expand details | Columns | Currency | Preview |
   Cards-Table。
   宽屏：全部平铺在同一行（--vr-tool-h 统一每个控件的高度，视觉齐平）；
   平板/窄屏：flex-wrap 自动换行，绝不重叠、绝不溢出；
   手机断点（≤768px）：次要操作（Expand details / Columns / Currency / Preview）
   折叠进 "More ▾" 菜单。
   #vrBarExtra 默认 display:contents —— 它的子元素直接参与 .vr-bar__right 的 flex
   布局，所以同一份 HTML 同时服务"平铺"和"折叠"两种排版，JS 只负责开合菜单。 */
.vr-bar {
    --vr-tool-h: 34px;                       /* 工具栏统一高度（含边框） */
    margin: 18px 0 12px; display: flex; align-items: center; justify-content: space-between;
    gap: 10px 12px; flex-wrap: wrap;
}
.vr-bar__count { font-size: 14px; color: var(--vr-text); }
.vr-bar__count b { color: var(--vr-brand); font-size: 18px; margin: 0 3px; font-weight: 600; }
.vr-bar__right {
    display: flex; align-items: center; justify-content: flex-end;
    gap: 8px 10px; flex-wrap: wrap; position: relative; min-width: 0;
}
.vr-bar__extra { display: contents; }
.vr-bar__more { display: none; }             /* 仅手机断点显示（见响应式） */
.vr-bar__more i { font-style: normal; font-size: 10px; }
/* 统一高度：带 1px 边框的组合控件内部再减 2px，外框与其它按钮齐平。 */
.vr-bar .vr-btn { height: var(--vr-tool-h); padding: 0 12px; font-size: 12.5px; }
.vr-bar .vr-btn--primary { padding: 0 16px; }
.vr-bar .vr-sort { height: var(--vr-tool-h); font-size: 13px; }
.vr-bar .vr-view button { height: calc(var(--vr-tool-h) - 2px); }
.vr-bar .vr-cur__btn { height: calc(var(--vr-tool-h) - 2px); }
.vr-bar .vr-cols__btn,
.vr-bar .vr-sell-toggle { height: var(--vr-tool-h); padding: 0 10px; font-size: 12px; }
.vr-sort { height: 36px; padding: 0 10px; border: 1px solid var(--vr-line); border-radius: var(--vr-radius); background: #fff; color: var(--vr-text); cursor: pointer; transition: border-color .16s ease, box-shadow .16s ease; }
.vr-sort:focus { border-color: var(--vr-accent-2); box-shadow: 0 0 0 3px rgba(30, 138, 203, .12); }
.vr-view {
    display: inline-flex; align-items: center;
    border: 1px solid var(--vr-line); border-radius: var(--vr-radius);
    overflow: hidden; box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
}
.vr-view button {
    min-width: 44px; height: 36px; padding: 0 12px; border: 0; background: #fff;
    color: var(--vr-muted); cursor: pointer; font-size: 13px; font-weight: 500;
    transition: background .16s ease, color .16s ease;
}
.vr-view button + button { border-left: 1px solid var(--vr-line); }
.vr-view button:hover { color: var(--vr-brand); }
.vr-view button.is-on { background: var(--vr-brand); color: #fff; }
.vr-view button.is-on:hover { background: var(--vr-brand-dark); color: #fff; }

/* ---- 卡片视图：每条记录 = 一个独立卡片 ---- */
.vr-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.vr-card {
    /* 单条记录的整体容器：内部任何内容都不会与相邻记录混排 */
    position: relative; background: #fff; border: 1px solid var(--vr-line);
    border-top: 3px solid var(--vr-accent-2); border-radius: var(--vr-radius);
    padding: 16px 18px 14px; box-shadow: var(--vr-shadow);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
    contain: layout style;   /* 限制重排范围，提升渲染性能 */
    animation: vrFade .22s ease both;
}
.vr-card:hover { transform: translateY(-2px); box-shadow: var(--vr-shadow-lg); border-top-color: var(--vr-brand); }
.vr-card__no {
    /* 放在卡片顶部的内边距"留白区"里（相对 padding box 定位）：
       内容从 top:16px 才开始，所以序号不会再与标题/规格文字互相遮挡。
       line-height:1 让它更紧凑，整体更贴右上角。 */
    position: absolute; right: 8px; top: 6px; font-size: 11px; line-height: 1;
    color: #c9c9c9; font-weight: 600; letter-spacing: .3px;
}
.vr-card__name {
    font-size: 16px; font-weight: 600; color: var(--vr-ink); line-height: 1.45;
    padding-right: 42px; margin-bottom: 12px; word-break: break-word;
}
.vr-card__list { border-top: 1px dotted var(--vr-line); }
.vr-card__row {
    display: flex; align-items: flex-start; gap: 10px; padding: 8px 0;
    border-bottom: 1px dotted var(--vr-line);
}
.vr-card__row:last-child { border-bottom: 0; }
.vr-card__row dt {
    flex: 0 0 58px; font-size: 12px; color: var(--vr-muted); line-height: 1.7; text-align: right;
}
.vr-card__row dd { flex: 1 1 auto; font-size: 13px; color: var(--vr-text); line-height: 1.7; word-break: break-word; }
.vr-card__row--price { background: var(--vr-bg-soft); margin: 4px -18px -14px; padding: 10px 18px; border-bottom: 0; }
/* 价格永远单行：inline-block 便于测量宽度；nowrap 不换行；超宽时由 JS 逐级缩小字号（fitPriceOneLine） */
.vr-card__row--price dt { flex: 0 0 46px; line-height: 2; }
.vr-card__price {
    display: inline-block; max-width: 100%; white-space: nowrap; overflow: hidden;
    font-size: 22px; font-weight: 700; color: var(--vr-brand); letter-spacing: .2px; line-height: 1.4;
}
.vr-card__price i { font-style: normal; font-size: 15px; margin-right: 2px; }
.vr-card__unit { font-size: 12px; color: var(--vr-muted); margin-left: 6px; font-weight: 400; white-space: nowrap; }
.vr-card__ops { margin-top: 10px; display: flex; gap: 8px; justify-content: flex-end; }
.vr-card__ops button, .vr-card__ops a {
    border: 1px solid var(--vr-line); background: #fff; color: var(--vr-text); font-size: 12px;
    height: 28px; line-height: 26px; padding: 0 12px; border-radius: var(--vr-radius); cursor: pointer;
}
.vr-card__ops button:hover, .vr-card__ops a:hover { border-color: var(--vr-brand); color: var(--vr-brand); }
.vr-card mark { background: #ffe9b8; color: #a85900; padding: 0 1px; border-radius: 2px; }

/* ---- 自适应额外字段（港口 / 交付方式 / 运费 / 交期 / MOQ 等）----
   数据源新增任意列时自动出现；超过 6 项折叠，点击 "+N more" 展开。 */
.vr-card__row--extra dt { flex: 0 0 96px; }
.vr-card__row--extra dd { font-size: 12.5px; }
.vr-card__row--extra.is-extra-hidden { display: none; }
.vr-card.is-expanded .vr-card__row--extra.is-extra-hidden { display: flex; }
.vr-card__more {
    display: block; width: 100%; text-align: left; border: 0; background: none;
    color: var(--vr-accent); font-size: 12px; padding: 6px 0 0; cursor: pointer;
    text-decoration: underline;
}
.vr-card__more:hover { color: var(--vr-brand); }

/* ---- 产品图片（自适应 image 列，卡片靠前显示）---- */
/* 分类标签：紧贴产品名称下方。名称与标签都是块级元素，所以标签自然换行；
   fit-content 让底色只包住文字，不会拉成整行色带。 */
.vr-card__title { display: block; }
.vr-card__cat {
    display: block; width: fit-content; max-width: 100%; margin-top: 5px;
    padding: 1px 7px; border-radius: 9px; font-size: 11px; font-weight: 400;
    line-height: 1.7; color: var(--vr-accent-dark); background: #fdf1e4;
    border: 1px solid #f6ddc2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.vr-card__head { display: flex; align-items: flex-start; gap: 12px; }
.vr-card__head .vr-card__name { flex: 1 1 auto; min-width: 0; }
.vr-card__thumb {
    flex: 0 0 auto; width: 76px; height: 76px; object-fit: cover;
    border: 1px solid var(--vr-line); border-radius: 4px; background: #fff;
}
/* 表格里的图片：按单元格空间满格显示（4:3 与站内产品图一致，基本无裁切）。
   aspect-ratio 让高度随列宽自适应；旧浏览器退化为原始比例，不会变形。 */
.vr-table td.vr-c-image { width: 112px; padding: 5px; text-align: center; vertical-align: middle; }
.vr-c-thumb {
    display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
    border: 1px solid var(--vr-line); border-radius: 3px; background: #fff;
}

@keyframes vrFade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---- 表格视图 ---- */
.vr-table { display: none; width: 100%; min-width: 820px; border-collapse: collapse; background: #fff; }
.vr-table.is-on { display: table; }
/* 列较多时，表格在容器内横向滚动；下方滚动条加粗并着品牌色，便于看清与抓取 */
.vr-table-scroll {
    width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch;
    scrollbar-width: thin; scrollbar-color: var(--vr-brand) #f0f0f0;
}
.vr-table-scroll::-webkit-scrollbar { height: 12px; }
.vr-table-scroll::-webkit-scrollbar-track { background: #f0f0f0; border-radius: 6px; }
.vr-table-scroll::-webkit-scrollbar-thumb {
    background: var(--vr-brand); border: 3px solid #f0f0f0; border-radius: 6px;
}
.vr-table-scroll::-webkit-scrollbar-thumb:hover { background: var(--vr-brand-dark); }

/* (5) 列数超过一屏时：只保留「下方一行提示 + 加粗滚动条」两个不遮挡内容的提示。
   左右渐隐遮罩已移除：它固定在滚动容器边缘（right/left 定位），横向滚动时永远
   停在最右侧那一列上面，把正在看的数据盖成一片白色渐变（用户反馈"数据读不出来"）。
   表格内容必须像卡片视图一样完整可读 —— 于是改用不覆盖任何单元格的提示方式。
   .has-more / .has-prev 仍由 updateTableOverflowHint() 维护（提示行 + 自检用）。 */
.vr-table-scroll { position: relative; --vr-act-w: 84px; }
.vr-table-scroll.has-more::after,
.vr-table-scroll.has-prev::before { content: none; }
.vr-table-more {
    display: none; margin: 6px 2px 0; font-size: 12px; color: var(--vr-muted);
}
.vr-table-more.is-on { display: block; }
/* ---- 一屏自适应模式（列数 <= 8，含 No. 列）--------------------------------
   JS 在表格渲染后按实际可见列数决定是否加 .is-fit（见 applyTableFit()）。
   要点：取消 820px 最小宽度、允许单元格换行、宽度交给浏览器按内容分配，
   于是电脑 / 平板 / 手机都不出现横向滚动条。 */
.vr-table-scroll.is-fit { overflow-x: visible; }
.vr-table.is-fit { min-width: 0; table-layout: auto; }
.vr-table.is-fit th, .vr-table.is-fit td { padding: 7px 8px; font-size: 12.5px; }
.vr-table.is-fit thead th { white-space: normal; word-break: break-word; }
.vr-table.is-fit td { white-space: normal; overflow-wrap: anywhere; word-break: break-word; }
/* 窄列保持单行，避免数字与单位被拆行 */
/* 窄列尽量单行，避免数字与单位被拆行（手机断点会放开价格，见下） */
.vr-table.is-fit [data-key="no"],
.vr-table.is-fit [data-key="price"],
.vr-table.is-fit [data-key="unit"] { white-space: nowrap; }
/* ---- 一屏模式的列宽分配 -------------------------------------------------
   实测（headless Edge）显示：只把图片列交给浏览器「按内容定宽」不够，
   375px 屏上 8 列仍溢出 51px。原因是 <480px 时 nowrap 的固定列
   （价格 92.8 + 操作 84 + 单位 34 + No. 29.5 = 240px）把 335px 的表格
   占掉了七成，三个文本列只剩 ~22px。所以在两个断点上把列宽明确分配：
   合计约 360px（>480）/ 296px（<=480），既留出余量也让名称列最宽。 */
.vr-table.is-fit td.vr-c-image { padding: 3px; }
.vr-table.is-fit th.vr-col-image, .vr-table.is-fit td.vr-c-image { width: 88px; }
.vr-table.is-fit .vr-c-thumb {
    width: 76px; height: 76px; aspect-ratio: 1 / 1; margin: 0 auto;
}
@media (max-width: 768px) {
    /* 中等屏：缩略图略小，各列按比例收窄 */
    .vr-table.is-fit th.vr-col-image, .vr-table.is-fit td.vr-c-image { width: 72px; }
    .vr-table.is-fit .vr-c-thumb { width: 60px; height: 60px; }
}
@media (max-width: 480px) {
    /* 一屏模式 + 手机：八列按以下固定宽度相加
       No.22 + 图52 + 名称46 + 分类44 + 规格44 + 价格62 + 单位20 + 询价48 = 338px，
       与 375px 屏的表格宽度（约 335px + border）基本吻合，故不再溢出。 */
    .vr-table.is-fit th.vr-col-image, .vr-table.is-fit td.vr-c-image {
        width: 56px !important; min-width: 56px !important;
    }
    .vr-table.is-fit .vr-c-thumb { width: 50px; height: 50px; }
    .vr-table.is-fit [data-key="no"] { width: 22px !important; min-width: 22px !important; }
    /* 价格在这里放开换行，否则 92.8px 的 nowrap 内容会把表格撑出屏幕 */
    .vr-table.is-fit [data-key="price"] {
        width: 64px !important; min-width: 64px !important;
        white-space: normal !important;
    }
    .vr-table.is-fit [data-key="unit"] { width: 22px !important; min-width: 22px !important; }
    .vr-table.is-fit [data-key="act"] {
        width: 46px !important; min-width: 46px !important; padding-left: 2px; padding-right: 2px;
    }
    .vr-row-mail { padding: 0 8px; }
}

/* (8a) 长列表定位：表头吸附在视口顶部。整页滚动即可，无需内层滚动条。 */
.vr-table thead th {
    position: sticky; top: 0; z-index: 3;
    /* collapse 模式下 sticky 单元格的边框在部分浏览器会被裁掉，用阴影补一条分隔线 */
    box-shadow: inset 0 -1px 0 rgba(255, 255, 255, .35), 0 1px 0 var(--vr-line);
    background-clip: padding-box;
}
/* (1) 产品名称是识别字段，表格里必须比「规格/包装」更重。与卡片视图一致。 */
.vr-table td.vr-c-name { font-weight: 600; color: var(--vr-ink); }
.vr-table.is-fit td.vr-c-name { font-size: 12.5px; }

/* 截断容器：只用于「核心卖点」——它是 270 字的双语营销段落，不是对比字段。
   规格不再截断（纯技术代码，平均 76 字符，买家要逐行对比，必须完整可读）。 */
.vr-clamp {
    display: -webkit-box; -webkit-box-orient: vertical;
    overflow: hidden; overflow-wrap: anywhere; word-break: break-word;
}
/* 截断的单元格可点击展开：鼠标手型 + 底部渐隐提示「还有内容」。
   展开后按正常段落显示，再点一次收回。 */
.vr-table td.is-clampable { cursor: pointer; position: relative; }
.vr-table td.is-clampable .vr-clamp::after {
    content: ''; display: block; height: 0;
}
.vr-table td.is-clampable:not(.is-clamp-open) {
    box-shadow: inset 0 -9px 8px -9px rgba(0, 0, 0, .28);
}
.vr-table td.is-clamp-open { cursor: zoom-out; }
.vr-table td.is-clamp-open .vr-clamp { display: block; }
/* 展开时给出轻微的视觉提示，避免与相邻行混在一起 */
.vr-table td.is-clamp-open { background: #fffdf5; }
/* 百分比宽度只在截断列上需要：核心卖点（.vr-clamp）用它，规格不用 */
.vr-table td.vr-c-selling .vr-clamp { width: 100%; }

/* (2) 每行的询价入口。吸附在右侧，宽表横向滚动时始终可点。 */
.vr-table [data-key="act"] {
    position: sticky; right: 0; z-index: 2;
    min-width: var(--vr-act-w, 84px);
    width: 1%; white-space: nowrap; text-align: center;
    background: #fff; box-shadow: -1px 0 0 var(--vr-line);
}
.vr-table thead [data-key="act"] { z-index: 4; }
.vr-table tbody tr:nth-child(even) [data-key="act"] { background: var(--vr-bg-soft); }
.vr-table tbody tr:hover [data-key="act"] { background: #eef7fd; }
.vr-row-mail {
    height: 26px; padding: 0 9px; font-size: 11.5px; line-height: 24px;
    border: 1px solid var(--vr-brand); border-radius: 3px;
    background: #fff; color: var(--vr-brand); cursor: pointer; white-space: nowrap;
}
.vr-row-mail:hover { background: var(--vr-brand); color: #fff; }

/* ---- 列显示开关（列选择器）--------------------------------------------
   面板由脚本按当前工作簿的列结构填充，所以永远与屏幕上的数据一致。
   宽屏为按钮下方的下拉；窄屏改为底部抽屉，保证每项都有足够点击面积。 */
.vr-cols { position: relative; }
.vr-cols__btn {
    display: inline-flex; align-items: center; gap: 6px;
    height: 30px; padding: 0 10px; font-size: 12px; white-space: nowrap;
}
.vr-cols__icon { flex: 0 0 auto; }
.vr-cols__count {
    display: none; padding: 1px 6px; border-radius: 9px; font-size: 10.5px;
    background: var(--vr-brand); color: #fff; line-height: 1.5;
}
.vr-cols__btn.has-hidden { border-color: var(--vr-brand); color: var(--vr-brand); }
.vr-cols__btn.has-hidden .vr-cols__count { display: inline-block; }

.vr-cols__panel {
    position: absolute; right: 0; top: calc(100% + 6px); z-index: 60;
    width: 262px; max-height: 60vh; overflow-y: auto; text-align: left;
    background: #fff; border: 1px solid var(--vr-line); border-radius: var(--vr-radius);
    box-shadow: 0 10px 28px rgba(0, 0, 0, .16); padding: 10px 12px 8px;
}
.vr-cols__panel[hidden] { display: none; }
.vr-cols__head { display: flex; align-items: center; justify-content: space-between; }
.vr-cols__head b { font-size: 13px; color: var(--vr-ink); }
.vr-cols__close { border: 0; background: none; font-size: 18px; line-height: 1; color: var(--vr-muted); cursor: pointer; padding: 0 2px; }
.vr-cols__close:hover { color: var(--vr-ink); }
.vr-cols__hint { font-size: 11px; color: var(--vr-muted); margin: 2px 0 8px; }
.vr-cols__group + .vr-cols__group { margin-top: 8px; border-top: 1px dotted var(--vr-line); padding-top: 8px; }
.vr-cols__groupname { font-size: 10.5px; letter-spacing: .04em; color: var(--vr-muted); margin-bottom: 4px; text-transform: uppercase; }
.vr-cols__item {
    display: flex; align-items: center; gap: 7px; padding: 5px 4px; border-radius: 3px;
    font-size: 12.5px; color: var(--vr-ink); cursor: pointer; line-height: 1.35;
}
.vr-cols__item:hover { background: var(--vr-bg-soft); }
.vr-cols__item input { flex: 0 0 auto; width: 14px; height: 14px; accent-color: var(--vr-brand); cursor: pointer; }
.vr-cols__name { flex: 1 1 auto; min-width: 0; word-break: break-word; }
.vr-cols__item.is-core { opacity: .72; cursor: default; }
.vr-cols__item.is-core input { cursor: default; }
.vr-cols__tag { flex: 0 0 auto; font-size: 10px; color: var(--vr-muted); border: 1px solid var(--vr-line); border-radius: 8px; padding: 0 5px; }
.vr-cols__foot { display: flex; gap: 12px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--vr-line); }
.vr-cols__foot .vr-btn--link { height: auto; padding: 0; font-size: 11.5px; }

/* 批量展开「规格 / 核心卖点」的截断内容。只在列表视图且确有截断时出现。 */
.vr-sell-toggle { height: 30px; padding: 0 10px; font-size: 12px; white-space: nowrap; }
.vr-sell-toggle[hidden] { display: none; }

.vr-table th, .vr-table td { border: 1px solid var(--vr-line); padding: 9px 12px; font-size: 13px; text-align: left; vertical-align: middle; }
.vr-table thead th { background: var(--vr-accent-2); color: #fff; font-weight: 500; white-space: nowrap; }
.vr-table tbody tr:nth-child(even) { background: var(--vr-bg-soft); }
.vr-table tbody tr:hover { background: #eef7fd; }
.vr-table td.vr-c-price { color: var(--vr-brand); font-weight: 600; text-align: right; white-space: nowrap; }
.vr-table td.vr-c-num { text-align: right; white-space: nowrap; }
.vr-table mark { background: #ffe9b8; color: #a85900; }
.vr-cards.is-hidden { display: none; }

/* ---- 空态 / 加载 / 错误 ---- */
.vr-empty { display: none; padding: 60px 20px; text-align: center; background: #fff; border: 1px dashed var(--vr-line); border-radius: var(--vr-radius); }
.vr-empty.is-on { display: block; }
.vr-empty h3 { font-size: 17px; color: var(--vr-ink); margin-bottom: 8px; }
.vr-empty p { font-size: 13px; color: var(--vr-muted); }
.vr-empty .vr-btn { margin-top: 16px; }
.vr-loading { padding: 50px; text-align: center; color: var(--vr-muted); font-size: 13px; }
.vr-loading i {
    display: inline-block; width: 18px; height: 18px; margin-right: 8px; vertical-align: -3px;
    border: 2px solid var(--vr-line); border-top-color: var(--vr-brand); border-radius: 50%;
    animation: vrSpin .7s linear infinite;
}
@keyframes vrSpin { to { transform: rotate(360deg); } }
.vr-alert {
    display: none; margin-bottom: 14px; padding: 10px 14px; font-size: 13px; border-radius: var(--vr-radius);
    background: #fff7ea; border: 1px solid #ffd9a0; color: #95601a;
}
.vr-alert.is-on { display: block; }
/* Safety net for the "empty but lit" case: a message bar with no text keeps its
   1px border + 20px vertical padding + 1.6 line-height, i.e. ~22px of dead space
   between the stats and the search form (see setAlert in quote.js, which is the
   primary fix). :empty matches only when there is not even a text node, so do
   not "tidy" the container into `<div ...>\n  </div>`. */
.vr-alert:empty { display: none; margin-bottom: 0; }

.vr-more { margin-top: 20px; text-align: center; }
.vr-more button {
    height: 38px; padding: 0 34px; border: 1px solid var(--vr-line); background: #fff;
    color: var(--vr-accent); border-radius: var(--vr-radius); cursor: pointer;
}
.vr-more button:hover { border-color: var(--vr-accent-2); background: var(--vr-accent-2); color: #fff; }

/* ==========================================================================
   5. 页脚（复刻官网 .Just_bot_sub / .Just_bot）
   ========================================================================== */
.vr-foot-sub { background: var(--vr-bg-soft-2); border-top: 1px solid var(--vr-line); padding: 22px 0; }
.vr-foot-sub ul { display: flex; flex-wrap: wrap; gap: 20px; }
.vr-foot-sub li { flex: 1 1 240px; display: flex; gap: 12px; align-items: flex-start; font-size: 13px; color: var(--vr-text); }
.vr-foot-sub li span {
    flex: 0 0 40px; height: 40px; line-height: 40px; text-align: center; border-radius: 50%;
    background: var(--vr-brand); color: #fff; font-size: 15px; font-weight: 700;
}
.vr-foot-sub li p { line-height: 1.8; }
.vr-foot { background: var(--vr-bg-soft-2); border-top: 1px solid var(--vr-line); padding: 14px 0; }
.vr-foot__c { font-size: 12px; color: var(--vr-muted); text-align: center; }

/* back to top */
.vr-top-btn {
    position: fixed; right: 18px; bottom: 18px; width: 42px; height: 42px; line-height: 40px;
    text-align: center; border-radius: 50%; background: rgba(245, 128, 29, .85); color: #fff;
    font-size: 12px; cursor: pointer; opacity: 0; visibility: hidden; transition: opacity .25s ease; z-index: 800;
}
.vr-top-btn.is-on { opacity: 1; visibility: visible; }
.vr-top-btn:hover { background: var(--vr-brand-dark); color: #fff; }

/* ==========================================================================
   6. 响应式（≥1140 固定宽 / 1024 / 768 / 480）
   ========================================================================== */
@media (max-width: 1180px) {
    .vr-top__inner, .vr-wrap { width: 100%; padding: 0 20px; }
    .vr-logo { left: 20px; }
    /* 中等屏（笔记本 1024~1180）：工具栏收紧间距，保证六个控件仍在同一行。
       实测 1024px 视口下差额只有约 5px，gap 10→6 即可放下，不需要折叠。 */
    .vr-bar__right { gap: 6px 6px; }
    .vr-bar .vr-btn { padding: 0 10px; }
    .vr-bar .vr-btn--primary { padding: 0 13px; }
    .vr-cur-wrap { gap: 6px; }
    .vr-cur__cap { padding: 0 7px; }
}
@media (max-width: 1024px) {
    .vr-cards { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
    .vr-hero h1 { font-size: 26px; }
}
@media (max-width: 860px) {
    .vr-top__inner { height: 62px; }
    .vr-logo { top: 12px; font-size: 22px; line-height: 1.2; }
    .vr-logo span { margin-top: 2px; }
    .vr-nav__toggle {
        display: block; position: absolute; right: 20px; top: 16px; width: 34px; height: 30px;
        border: 1px solid var(--vr-line); background: #fff; border-radius: var(--vr-radius); cursor: pointer;
    }
    .vr-nav__toggle i { display: block; width: 18px; height: 2px; margin: 4px auto; background: var(--vr-text); }
    .vr-nav {
        float: none; margin: 0; height: auto; display: none; width: 100%;
        position: absolute; left: 0; top: 62px; background: #fff;
        box-shadow: var(--vr-shadow-lg); border-bottom: 2px solid var(--vr-brand-2); padding: 6px 0;
    }
    .vr-nav.is-open { display: block; }
    .vr-nav > ul > li { float: none; width: 100%; height: auto; line-height: 40px; }
    .vr-nav > ul > li > a { display: block; padding: 0 20px; height: 40px; line-height: 40px; }
    .vr-nav > ul > li.is-current > a { box-shadow: none; color: var(--vr-brand); }
    .vr-nav ul ul { display: none !important; position: static; width: 100%; box-shadow: none; border: 0; }
    .vr-nav ul ul li { line-height: 34px; height: 34px; }
    .vr-nav ul ul li a { padding-left: 34px; }
    .vr-nav li.is-open > ul { display: block !important; }
}
@media (max-width: 768px) {
    .vr-hero { padding: 14px 0 16px; }
    .vr-hero h1 { font-size: 20px; }
    .vr-hero h1 em { font-size: 11px; letter-spacing: 2px; }
    .vr-hero__sub { font-size: 12px; margin-top: 6px; }
    .vr-stats .vr-stat { flex: 1 1 44%; min-width: 0; padding: 6px 12px; }
    .vr-stat b { font-size: 17px; }
    .vr-search { padding: 10px 12px; }
    /* 紧凑布局：输入框 + 查询按钮占第一行；重置 + 高级查询占第二行 */
    .vr-search__bar {
        display: grid;
        grid-template-columns: 1fr auto;       /* 输入框自适应 + 查询按钮固定 */
        column-gap: 12px;                      /* 列间距放大，让按钮明显靠右 */
        row-gap: 6px;
        margin: 0;
        padding-right: 6px;                    /* 给查询按钮额外靠右 6px */
    }
    .vr-search__bar .vr-field { grid-column: 1 / 2; min-width: 0; flex: none; }
    .vr-search__bar #vrSearch { grid-column: 2 / 3; width: 76px; padding: 0; height: 38px; font-size: 13px; }
    .vr-search__bar #vrReset { grid-column: 1 / 2; width: 100%; padding: 0; height: 38px; font-size: 13px; }
    .vr-search__bar #vrAdvBtn { grid-column: 2 / 3; width: 100%; padding: 0; height: 38px; font-size: 13px; }
    /* 输入框：去掉左侧放大镜占位（移走 SVG 节省 32px），右侧留 30px 给清除按钮 */
    .vr-input { height: 38px; line-height: 38px; font-size: 14px; padding: 0 30px 0 10px; }
    .vr-field__icon { display: none; }       /* 移动端隐藏放大镜图标 */
    .vr-input__clear { width: 18px; height: 18px; line-height: 16px; font-size: 12px; right: 8px; }
    .vr-btn { height: 38px; padding: 0 10px; font-size: 13px; }
    .vr-btn--link { font-size: 13px; }
    .vr-tips { font-size: 11px; line-height: 1.5; margin-top: 6px; }
    .vr-cards { grid-template-columns: 1fr; gap: 8px; }
    .vr-bar { margin: 10px 0 8px; font-size: 13px; --vr-tool-h: 36px; }
    .vr-bar__right { gap: 6px 8px; }
    /* 折叠：次要操作收进 "More" 菜单，避免与计数/视图切换挤在一起。
       菜单是绝对定位的下拉面板，不推开页面内容；每项占满一行，点击区足够大。 */
    .vr-bar__more { display: inline-flex; }
    .vr-bar__extra {
        display: none;
        position: absolute; right: 0; top: calc(100% + 6px); z-index: 55;
        flex-direction: column; align-items: stretch; gap: 8px;
        min-width: 232px; max-width: min(320px, calc(100vw - 32px));
        /* 再高也不会超出视口（横屏小屏上菜单仍可滚动到每一项） */
        max-height: calc(100vh - 90px); overflow-y: auto;
        padding: 10px;
        background: #fff; border: 1px solid var(--vr-line);
        border-radius: var(--vr-radius); box-shadow: 0 10px 28px rgba(0, 0, 0, .18);
    }
    .vr-bar__extra.is-open { display: flex; }
    .vr-bar__extra > .vr-btn,
    .vr-bar__extra > .vr-cols,
    .vr-bar__extra > .vr-cur-wrap { width: 100%; }
    .vr-bar__extra > .vr-btn { justify-content: center; }
    .vr-bar__extra .vr-cols__btn { width: 100%; justify-content: flex-start; }
    .vr-cur-wrap { flex-direction: column; align-items: stretch; gap: 4px; }
    .vr-cur { width: 100%; }
    .vr-cur__btn { flex: 1 1 0; }
    .vr-cur__rate { text-align: center; }
    .vr-table.is-on { display: block; }
    /* 历史策略：列多时横向滚动。列数 <= 8 时改用一屏自适应：允许换行、
       收紧内边距、按需缩写表头，保证所有列都在一屏内。 */
    .vr-table.is-on:not(.is-fit) { white-space: nowrap; }
    .vr-table-scroll.is-fit { overflow-x: visible; }
    .vr-table.is-fit th, .vr-table.is-fit td { padding: 5px; font-size: 11.5px; }
    .vr-table.is-fit td.vr-c-image { padding: 2px; }
    /* 窄屏表头只留中文，避免「产品名称 Product Name」把行高翻倍 */
    .vr-table.is-fit thead .vr-hl-en { display: none; }
    /* 窄屏：列选择器改为底部抽屉，每项都是整行点击区 */
    .vr-cols { position: static; }
    .vr-cols__panel {
        position: fixed; left: 0; right: 0; bottom: 0; top: auto;
        width: auto; max-height: 72vh;
        border-radius: 12px 12px 0 0; border-bottom: 0;
        box-shadow: 0 -8px 28px rgba(0, 0, 0, .22);
    }
    .vr-cols__item { padding: 8px 4px; font-size: 13.5px; }
    .vr-cols__item input { width: 17px; height: 17px; }
    .vr-cols__foot .vr-btn--link { font-size: 12.5px; }
    /* 窄屏的询价按钮与吸附列都再收一点，否则会挤占名称列 */
    .vr-table [data-key="act"] { width: 1%; }
    .vr-row-mail { height: 22px; padding: 0 6px; font-size: 10.5px; line-height: 20px; }
    .vr-table-more { font-size: 11px; }
    .vr-foot-sub ul { flex-direction: column; gap: 8px; padding: 14px 0; }
    .vr-foot-sub li { gap: 10px; }
    .vr-foot-sub li span { flex: 0 0 32px; height: 32px; line-height: 32px; font-size: 13px; }
    .vr-foot-sub li p { font-size: 12px; line-height: 1.6; }
}
@media (max-width: 480px) {
    .vr-card { padding: 10px 12px 8px; }
    .vr-card__name { font-size: 14px; padding-right: 28px; margin-bottom: 6px; line-height: 1.4; }
    .vr-card__row { padding: 4px 0; gap: 6px; border-bottom: 0; }
    .vr-card__row dt { flex: 0 0 42px; font-size: 11px; }
    .vr-card__row dd { font-size: 12px; line-height: 1.55; }
    .vr-card__price { font-size: 17px; }
    .vr-card__thumb { width: 58px; height: 58px; }
    .vr-table td.vr-c-image { width: 72px; padding: 3px; }
    .vr-card__row--extra dt { flex: 0 0 78px; font-size: 10.5px; }
    .vr-card__row--extra dd { font-size: 12px; }
    .vr-card__more { font-size: 11.5px; padding-top: 4px; }
    .vr-card__row--price { margin: 6px -12px -8px; padding: 7px 12px; border-top: 1px dotted var(--vr-line); }
    .vr-card__row--price dt { line-height: 1.6; }
    .vr-card__list { border-top: 0; }
    .vr-card__no { font-size: 10.5px; right: 6px; top: 5px; }
    .vr-card__ops { margin-top: 6px; gap: 6px; }
    .vr-card__ops button, .vr-card__ops a { font-size: 11px; height: 24px; line-height: 22px; padding: 0 8px; }
    .vr-search { padding: 8px 10px; }
    .vr-search__bar { column-gap: 10px; row-gap: 4px; padding-right: 4px; }
    .vr-search__bar #vrSearch { width: 64px; }
    /* 超窄屏工具栏：计数独占一行，剩下的一行只放 排序 + More + Cards/Table */
    .vr-bar__count { flex: 1 1 100%; font-size: 12.5px; }
    .vr-bar__count b { font-size: 16px; }
    .vr-bar__right { width: 100%; justify-content: space-between; }
    .vr-bar .vr-sort { max-width: 132px; padding: 0 6px; }
    .vr-bar .vr-view button { min-width: 40px; padding: 0 8px; font-size: 12px; }
    .vr-bar__more { padding: 0 9px; }
    .vr-input { height: 36px; line-height: 36px; font-size: 13px; padding: 0 26px 0 10px; }
    .vr-btn { height: 36px; font-size: 12px; padding: 0 8px; }
    .vr-adv { padding-top: 8px; margin-top: 8px; }
    .vr-adv__grid { gap: 8px; }
    .vr-adv__item label { font-size: 11px; margin-bottom: 3px; }
    .vr-adv__item input, .vr-adv__item select { height: 34px; line-height: 34px; font-size: 12px; padding: 0 8px; }
    /* 超窄屏：内边距与字号再收一档（列宽见上面的一屏模式分配块） */
    .vr-table.is-fit th, .vr-table.is-fit td { padding: 4px 3px; font-size: 11px; }
}
@media print {
    .vr-top, .vr-search, .vr-bar, .vr-more, .vr-top-btn, .vr-foot-sub, .vr-foot { display: none !important; }
    .vr-card { break-inside: avoid; box-shadow: none; }
}

/* 不支持 grid 的老浏览器回退 */
@supports not (display: grid) {
    .vr-cards { display: flex; flex-wrap: wrap; }
    .vr-cards .vr-card { width: 31%; margin: 0 1% 16px; }
    @media (max-width: 1024px) { .vr-cards .vr-card { width: 48%; } }
    @media (max-width: 768px) { .vr-cards .vr-card { width: 100%; margin: 0 0 12px; } }
}

/* ====================== 邮件询价对话框 ====================== */
.vr-inq-mask {
    position: fixed; inset: 0; background: rgba(0, 0, 0, .45);
    display: none; justify-content: center; align-items: flex-start;
    z-index: 1000; overflow-y: auto; padding: 24px 12px;
    -webkit-overflow-scrolling: touch;
}
.vr-inq-box {
    width: 560px; max-width: 100%; background: #fff; border-radius: 8px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .25); overflow: hidden;
    display: flex; flex-direction: column; max-height: calc(100vh - 32px);
    animation: vrInqIn .25s ease;
}
@keyframes vrInqIn { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: none; } }
.vr-inq-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 18px; background: linear-gradient(90deg, var(--vr-brand) 0%, #f9a55c 100%);
    color: #fff;
}
.vr-inq-head h3 { font-size: 16px; font-weight: 600; margin: 0; }
.vr-inq-head h3 small { display: block; font-size: 11px; font-weight: 400; opacity: .85; letter-spacing: 1px; margin-top: 2px; }
.vr-inq-close {
    background: rgba(255, 255, 255, .15); border: 0; color: #fff; width: 28px; height: 28px;
    border-radius: 50%; font-size: 20px; line-height: 22px; cursor: pointer;
}
.vr-inq-close:hover { background: rgba(255, 255, 255, .3); }
.vr-inq-body {
    padding: 16px 18px; overflow-y: auto; flex: 1 1 auto;
}
.vr-inq-body h4 {
    font-size: 13px; font-weight: 500; color: var(--vr-accent);
    margin: 12px 0 8px; padding-left: 8px; border-left: 3px solid var(--vr-brand);
}
.vr-inq-body h4 small { font-size: 11px; color: var(--vr-muted); margin-left: 4px; }
.vr-inq-readonly {
    background: var(--vr-bg-soft); border-radius: 4px; padding: 10px 12px;
    border-left: 3px solid var(--vr-accent-2);
}
.vr-inq-row {
    display: flex; gap: 8px; padding: 3px 0; align-items: baseline; font-size: 13px;
}
.vr-inq-row label { flex: 0 0 56px; color: var(--vr-muted); font-size: 12px; }
.vr-inq-row strong { color: var(--vr-ink); }
.vr-inq-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px;
}
.vr-inq-form label, .vr-inq-form em {
    display: block; font-size: 12px; color: var(--vr-muted); margin-bottom: 3px;
}
.vr-inq-form em { color: var(--vr-brand); font-style: normal; }
.vr-inq-form input, .vr-inq-form textarea {
    width: 100%; padding: 7px 10px; border: 1px solid var(--vr-line);
    border-radius: var(--vr-radius); font-size: 13px; font-family: inherit;
    background: #fff; color: var(--vr-ink); box-sizing: border-box;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.vr-inq-form input:focus, .vr-inq-form textarea:focus {
    border-color: var(--vr-accent-2); box-shadow: 0 0 0 3px rgba(30, 138, 203, .12); outline: none;
}
.vr-inq-form textarea { resize: vertical; min-height: 40px; line-height: 1.55; }
.vr-inq-form > div { margin-bottom: 8px; }
.vr-inq-preview pre {
    background: #fafafa; border: 1px solid var(--vr-line); border-radius: 4px;
    padding: 12px 14px; font-size: 12px; line-height: 1.6; max-height: 260px;
    overflow-y: auto; white-space: pre-wrap; word-break: break-word;
    color: var(--vr-text); margin: 0;
    font-family: Consolas, "Microsoft YaHei", monospace;
}
/* 收件人提示 + 发送后的英文说明（邮件客户端未打开时的兜底指引） */
.vr-inq-to {
    margin: 0; padding: 10px 18px 0; font-size: 12.5px; color: var(--vr-muted);
    display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px;
}
.vr-inq-to strong { color: var(--vr-accent); font-size: 13px; font-weight: 600; }
.vr-inq-to small { color: var(--vr-muted); font-size: 11.5px; }
.vr-inq-hint {
    display: none; margin: 8px 18px 0; padding: 9px 12px; font-size: 12.5px;
    line-height: 1.65; border-radius: 4px;
    background: #eef7fd; border: 1px solid #cfe6f7; color: #16537d;
}
.vr-inq-hint.is-on { display: block; }
.vr-inq-hint.is-error { background: #fdecec; border-color: #f5c2c2; color: #a12b2b; }
.vr-inq-foot {
    display: flex; gap: 10px; justify-content: flex-end;
    padding: 12px 18px; border-top: 1px solid var(--vr-line); background: #fff;
}
.vr-inq-foot .vr-btn { height: 38px; padding: 0 18px; font-size: 13px; }

/* 移动端 */
@media (max-width: 600px) {
    .vr-inq-mask { padding: 0; align-items: stretch; }
    .vr-inq-box { max-height: 100vh; border-radius: 0; height: 100%; }
    .vr-inq-grid { grid-template-columns: 1fr; }
    .vr-inq-foot { padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
}
@media (max-width: 380px) {
    .vr-inq-head { padding: 12px 14px; }
    .vr-inq-body { padding: 12px 14px; }
    .vr-inq-foot { padding: 10px 14px; flex-direction: column-reverse; }
    .vr-inq-foot .vr-btn { width: 100%; }
}

/* ==========================================================================
   分类标签（tags）：手动输入 + 扁平化标签（多选/反选）两种方式。
   标签区域默认折叠，由 "Show tags / Hide tags" 开关控制显隐；两端体验一致。
   -------------------------------------------------------------------------- */
.vr-adv__label-row {
    display: flex; align-items: center; justify-content: space-between;
    gap: 8px;
}
.vr-cat-toggle {
    appearance: none; -webkit-appearance: none;
    /* 显眼化：浅橙实底 + 品牌橙字 + 加粗（用户要求比普通按钮突出） */
    background: #fff3e8;
    border: 1px solid #f5a45c;
    border-radius: 999px;
    color: #c85f06;
    font: inherit; font-size: 12.5px; font-weight: 600;
    line-height: 1.2;
    padding: 5px 13px;
    cursor: pointer;
    transition: background .12s ease, border-color .12s ease, color .12s ease;
    touch-action: manipulation;
    white-space: nowrap;
    box-shadow: 0 1px 4px rgba(245, 128, 29, .18);
}
.vr-cat-toggle:hover { background: #ffe7d1; border-color: #f5801d; color: #a54f05; }
.vr-cat-toggle[aria-expanded="true"] {
    background: #f5801d; border-color: #f5801d; color: #fff;
}
.vr-cat-chips-wrap { margin-top: 8px; }
.vr-cat-chips-wrap[hidden] { display: none !important; }
.vr-cat-chips {
    display: flex; flex-wrap: wrap; gap: 6px;
}
.vr-cat-chip {
    appearance: none; -webkit-appearance: none;
    background: #fff;
    border: 1px solid #d9d9d9;
    color: #555;
    font: inherit;
    font-size: 12px;
    line-height: 1.2;
    padding: 5px 11px;
    border-radius: 999px;
    cursor: pointer;
    transition: background .12s ease, border-color .12s ease, color .12s ease;
    /* 防止双击放大（移动端） */
    touch-action: manipulation;
    white-space: nowrap;
}
.vr-cat-chip:hover { border-color: #f5801d; color: #c85f06; }
.vr-cat-chip:active { transform: scale(.97); }
.vr-cat-chip.is-active {
    background: #f5801d;
    border-color: #f5801d;
    color: #fff;
    font-weight: 600;
}
/* 移动端：标签横向滚动（避免折行占太多空间）；开关触控区域略大 */
@media (max-width: 768px) {
    .vr-cat-chips {
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        margin: 0 -2px;
        padding: 2px;
        scrollbar-width: thin;
    }
    .vr-cat-chip { font-size: 11.5px; padding: 4px 10px; }
    .vr-cat-toggle { font-size: 12px; padding: 5px 11px; }
}

/* 卡片中的卖点行：位于价格之前，橙色标签 + 稍大字号以吸引买家
   卖点数据是"中文第一行 / 英文第二行"（同一单元格内换行），因此保留换行显示；
   单元格内的换行符不在任何地方被替换成竖线。 */
.vr-card__row--selling dt { color: #c85f06; font-weight: 600; }
.vr-card__row--selling dd {
    color: #444; font-size: 12.5px; line-height: 1.55;
    white-space: pre-line;      /* 保留单元格内换行（\n），中英各占一行 */
}
/* 表格视图里的卖点单元格同样保留换行 */
/* 自由文本列需要「上限 + 下限」两个约束：
   max-width 防止单行内容把表格撑到 4256px（实测 freight 一列曾要 1348px）；
   min-width 防止 table-layout:auto 把一个 183 字的运费说明压进 ~110px 后
   折成十几行——实测正是它把行高推到 206px（逐个隐藏单元格验证：去掉 freight
   行高 206→165，去掉 package 也有下降，而去掉 spec 没有变化）。
   表格因此宽于视口（15 列本就如此，横向滚动是既定行为），换来的是短行。 */
/* 卖点是"中文第一行 / 英文第二行"的同格内容：表格与卡片视图都要保留换行，
   所以用 pre-line（不是 normal，normal 会把 \n 折成空格）。
   行高由 JS 的 fitSellingRows() 按"本行其它单元格所需高度"（实际就是规格列）
   收紧并加省略号，最多不超过该行既有高度，见 quote.js。 */
.vr-table td.vr-c-selling {
    white-space: pre-line; max-width: 280px; min-width: 200px;
}
/* 规格列加宽：参数串（"Mn>99.7%,C<0.03%..."）是买家逐行对比的字段，
   给足宽度比压缩更值。上限 400px 仍能防止单行内容把表格撑得过宽；
   下限 200px 保证 table-layout:auto 不会把它压成窄条折成十几行。 */
.vr-table td.vr-c-spec {
    max-width: 400px; min-width: 200px; overflow-wrap: anywhere;
}
.vr-table td.vr-c-name { max-width: 260px; min-width: 150px; }
.vr-table td.vr-c-freight { max-width: 300px; min-width: 210px; }
.vr-table td.vr-c-package { max-width: 260px; min-width: 190px; }
.vr-table td.vr-c-incoterm { max-width: 220px; min-width: 140px; }
.vr-table td.vr-c-leadTime { max-width: 180px; min-width: 110px; }
.vr-table td.vr-c-port { max-width: 180px; min-width: 120px; }
.vr-table td.vr-c-origin { max-width: 150px; min-width: 100px; }
.vr-table td.vr-c-validity { max-width: 130px; min-width: 90px; }
.vr-table td.vr-c-moq { max-width: 96px; min-width: 62px; }
.vr-table td.vr-c-category { max-width: 150px; min-width: 100px; }
/* 右侧数值列（价格 / 单位 / 起订量）紧凑化：这些单元格内容短（金额、MT、档位），
   左右内边距由 12px 收到 6px，列宽同步收紧，把横向空间让给规格与卖点。
   选择器带 td/th，表头与数据列一起收窄，列边界才对齐。 */
.vr-table td.vr-c-price, .vr-table th.vr-th-price,
.vr-table td.vr-c-unit, .vr-table th.vr-th-unit,
.vr-table td.vr-c-moq, .vr-table th.vr-th-moq {
    padding-left: 6px; padding-right: 6px;
}
/* 窄屏再收一档。必须写在这条基础规则之后：媒体查询不改变优先级，
   同优先级的规则以"最后出现"的为准。 */
@media (max-width: 768px) {
    .vr-table td.vr-c-price, .vr-table th.vr-th-price,
    .vr-table td.vr-c-unit, .vr-table th.vr-th-unit,
    .vr-table td.vr-c-moq, .vr-table th.vr-th-moq {
        padding-left: 4px; padding-right: 4px;
    }
}
/* 中窄屏的"一屏模式"（≤1024）按可用宽度放宽各文本列的下限：桌面用的
   min-width（规格 200 / 名称 150 / 运费 210 …）在 820px 视口下会把整张表顶出屏幕
   （实测 822px 的表放进 780px 的内容列）。下限只保证"不被压成一条线"，不参与桌面加宽。 */
@media (max-width: 1024px) {
    .vr-table.is-fit td.vr-c-spec { min-width: 150px; max-width: none; }
    .vr-table.is-fit td.vr-c-name { min-width: 130px; }
    .vr-table.is-fit td.vr-c-selling { min-width: 150px; max-width: none; }
    .vr-table.is-fit td.vr-c-freight,
    .vr-table.is-fit td.vr-c-package,
    .vr-table.is-fit td.vr-c-incoterm,
    .vr-table.is-fit td.vr-c-port,
    .vr-table.is-fit td.vr-c-leadTime,
    .vr-table.is-fit td.vr-c-category { min-width: 110px; max-width: none; }
}
/* 手机：再放宽一档，列宽交给浏览器分配（配上面 ≤480 的固定宽度规则）。 */
@media (max-width: 768px) {
    .vr-table.is-fit td.vr-c-spec { min-width: 120px; }
    .vr-table.is-fit td.vr-c-name { min-width: 110px; }
    .vr-table.is-fit td.vr-c-category { min-width: 76px; }
}
/* 图片列在宽表里同样不能无限放大（实测 271 x 195px） */
.vr-table td.vr-c-image { width: 76px; }
.vr-table:not(.is-fit) .vr-c-thumb {
    width: 68px; height: 68px; aspect-ratio: 1 / 1; margin: 0 auto;
}

/* ==========================================================================
   PDF 预览 modal（Export as PDF → 预览 → 确认 → 才打印）
   -------------------------------------------------------------------------- */
.vr-pdf-modal {
    position: fixed; inset: 0;
    z-index: 1000;
    display: flex; align-items: center; justify-content: center;
    padding: 24px;
    box-sizing: border-box;
}
.vr-pdf-modal[hidden] { display: none !important; }
.vr-pdf-modal__mask {
    position: absolute; inset: 0;
    background: rgba(0, 0, 0, .45);
    animation: vr-fade-in .18s ease;
}
.vr-pdf-modal__dialog {
    position: relative;
    display: flex; flex-direction: column;
    width: 100%;
    max-width: 980px;
    max-height: calc(100vh - 48px);
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .35);
    overflow: hidden;
    animation: vr-pop-in .22s ease;
}
.vr-pdf-modal__head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 20px;
    border-bottom: 1px solid #eee;
    background: linear-gradient(180deg, #fff8f1 0%, #fff 100%);
}
.vr-pdf-modal__head h3 {
    margin: 0; font-size: 16px; color: #c85f06; font-weight: 600;
}
.vr-pdf-modal__tools {
    display: flex; align-items: center; gap: 10px;
}
.vr-pdf-modal__max {
    appearance: none; -webkit-appearance: none;
    background: #fff;
    border: 1px solid #e3e3e3;
    border-radius: 999px;
    color: #666;
    font: inherit; font-size: 12px;
    line-height: 1.2;
    padding: 4px 12px;
    cursor: pointer;
    transition: color .12s ease, border-color .12s ease;
    white-space: nowrap;
}
.vr-pdf-modal__max:hover { color: #c85f06; border-color: #f5801d; }
.vr-pdf-modal__close {
    appearance: none; -webkit-appearance: none;
    background: transparent; border: 0;
    font-size: 26px; line-height: 1; color: #888;
    cursor: pointer; padding: 0 6px;
}
.vr-pdf-modal__close:hover { color: #c85f06; }

.vr-pdf-modal__body {
    /* A4 横向比例 ≈ 297:210 = 1.414:1。iframe 用 aspect-ratio 缩放以保证一屏可见 */
    position: relative;
    width: 100%;
    aspect-ratio: 297 / 210;
    max-height: calc(100vh - 280px);
    background: #f5f5f5;
}
.vr-pdf-modal__body iframe {
    width: 100%; height: 100%;
    border: 0;
    background: #fff;
    /* 横向比例下，缩放到容器宽度的 100%，高度由 aspect-ratio 自动得出 */
}
.vr-pdf-modal__foot {
    padding: 12px 20px;
    border-top: 1px solid #eee;
    background: #fafafa;
}
.vr-pdf-modal__actions {
    display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap;
}
.vr-pdf-modal__actions .vr-btn { min-width: 110px; }

/* 最大化：对话框铺满视口（桌面端点 Maximize 切换；移动端本就全屏） */
.vr-pdf-modal__dialog.is-max {
    max-width: none;
    max-height: none;
    width: 100vw;
    height: 100vh;
    border-radius: 0;
}
.vr-pdf-modal__dialog.is-max .vr-pdf-modal__body {
    aspect-ratio: auto;
    max-height: none;
    flex: 1 1 auto;
}

/* 移动端：modal 全屏、按钮堆叠铺满。
   预览内容本身在窄屏下会自动改为“每个产品一个区块、字段名在左、值在右”的
   堆叠布局（见 buildPrintHtml 里的 @media (max-width:820px)），所以手机上
   一屏就能看全所有列，不需要左右滑动。 */
@media (max-width: 768px) {
    .vr-pdf-modal { padding: 0; }
    .vr-pdf-modal__dialog {
        max-width: 100%; max-height: 100vh;
        height: 100vh; border-radius: 0;
        height: 100dvh;                        /* 手机浏览器地址栏收起时也铺满 */
    }
    .vr-pdf-modal__body {
        flex: 1 1 auto;
        aspect-ratio: auto;
        max-height: none;
        height: auto;
        min-height: 240px;
        -webkit-overflow-scrolling: touch;
    }
    .vr-pdf-modal__head { padding: 10px 14px; }
    .vr-pdf-modal__head h3 { font-size: 15px; }
    .vr-pdf-modal__foot { padding: 12px 14px calc(12px + env(safe-area-inset-bottom)); }
    .vr-pdf-modal__actions { flex-direction: column-reverse; }
    .vr-pdf-modal__actions .vr-btn { width: 100%; min-width: 0; }
    .vr-pdf-modal__max { font-size: 11.5px; padding: 4px 10px; }
    /* 手机上已经是全屏，Maximize 没有意义 -> 隐藏（与 iframe 内的堆叠布局一致） */
    .vr-pdf-modal__max { display: none; }
}

/* 极小屏：hint 字号略缩 */
@media (max-width: 380px) {
    .vr-pdf-modal__hint { font-size: 12px; }
}

@keyframes vr-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes vr-pop-in {
    from { opacity: 0; transform: translateY(8px) scale(.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
