/*
 * 托管补丁 —— 原型包本身不动。跟同系列其余原型同一套分工。
 * ① 不引 Google Fonts  ② 演示角标只在单独打开时出现  ③ 功能视图见下
 */
body {
  font-family: Manrope, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC',
    'Hiragino Sans GB', 'Microsoft YaHei', Roboto, Helvetica, Arial, sans-serif;
}

.demo-badge {
  position: fixed; z-index: 9; left: 16px; bottom: 16px;
  display: none; align-items: center; gap: 8px;
  padding: 8px 14px 8px 11px; border-radius: 30px;
  background: #1a1a1a; color: #fff; font-size: 11px; line-height: 1;
  text-decoration: none; box-shadow: 0 7px 24px #00000026;
}
.demo-badge b { color: #fb8c42; font-weight: 700; }
.demo-badge span { color: #b8b4b0; }
@media (max-width: 700px) { .demo-badge { display: none !important; } }

/* ══════════════════════════════════════════════════════════════════
 * 功能视图 `?view=feature`
 *
 * 这个原型跟 dealer-portal 同构：**改的东西一大半在面板外面** ——
 * 产品图、规格表、配置码、价格，全在左边那张产品页上。
 * 所以同样给两块挂橙色虚线，配置一变脉冲一次。
 *
 * ⚠️ 这里有一处别的原型没有的取舍：**产品图不能压太扁。**
 * 它是这个演示唯一的证据 —— 换了面料看不出来，整个演示就没了。
 * 所以左栏里图占大头，规格表压紧，副标题和图库说明让位。
 * ══════════════════════════════════════════════════════════════════ */
body.feature-view { height: 100dvh; overflow: hidden; }

body.feature-view .site-header { height: 56px; }
body.feature-view .product-shell {
  margin-top: 34px;
  height: calc(100dvh - 90px);
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #d2ccc5 transparent;
  padding: 6px 34px 40px;
  padding-right: calc(46% + 30px);
}
body.feature-view .product-shell::-webkit-scrollbar { width: 6px; }
body.feature-view .product-shell::-webkit-scrollbar-thumb { border-radius: 10px; background: #d2ccc5; }

/* 左栏压成单列：图在上，规格在下。两栏各 250px 的话，
   椅子小到看不出换了面料 —— 那正是要看的东西。 */
body.feature-view .product-hero { grid-template-columns: 1fr; gap: 0; padding: 14px 0 20px; }
body.feature-view .crumb-row { padding-bottom: 12px; }
body.feature-view .crumb-row > p { display: none; }
body.feature-view .visual-frame { height: 230px; border-radius: 10px; }
body.feature-view .chair { height: 94%; }
body.feature-view .gallery { margin-top: 10px; }
body.feature-view .shot { width: 40px; height: 34px; }
body.feature-view .gallery-note { font-size: 10px; }
body.feature-view .subtitle { display: none; }
/*
 * 🔴 **配置码提到规格表前面。**
 * 它是这一层的产物 —— 一串把 96 种组合里的这一种钉死的编号，
 * 采购拿着它就能下单。排在规格表后面的话，在最小的那个框里
 * 它落在第一屏外面，而访客最该跟产品图一起看见的就是它。
 * 完整站视图不动（那里屏幕够高，按正常的信息顺序排）。
 */
body.feature-view .spec-block { display: flex; flex-direction: column; margin-top: 10px; }
body.feature-view .code-row { order: -1; margin: 0 0 10px; padding: 11px 13px; }
body.feature-view .code-row b { font-size: 14px; }
body.feature-view .spec-list { gap: 7px 18px; padding: 11px 0; }
body.feature-view .spec-list dd { font-size: 13px; }
body.feature-view .eyebrow { display: none; }
body.feature-view .product-info h1 { margin-top: 10px; font-size: 22px; }
body.feature-view .price-row { margin-top: 12px; gap: 24px; }
body.feature-view .price-row b i { font-size: 22px; }
body.feature-view .actions { margin-top: 16px; }
body.feature-view .btn-primary, body.feature-view .btn-ghost { padding: 11px 16px; font-size: 11px; }

body.feature-view .config-trigger,
body.feature-view .config-panel header > button { display: none; }

body.feature-view .config-panel {
  top: 90px;
  right: 18px;
  bottom: auto;
  left: auto;
  width: 46%;
  min-width: 340px;
  /* ⚠️ 高度写死。top + bottom 配 auto 高度时 bottom 被忽略，
     面板缩成半截 —— 被切掉的是底下那张「这一套配置」的小结卡。 */
  height: calc(100dvh - 106px);
  min-height: 0;
  max-height: none;
  transform: none;
  visibility: visible;
  opacity: 1;
  box-shadow: 0 24px 64px rgba(0, 0, 0, .16);
}

body.feature-view .config-panel header { padding: 15px 24px 13px; }
body.feature-view .config-panel header span { font-size: 10px; }
body.feature-view .config-panel header h2 { font-size: 20px; }
body.feature-view .config-content { padding: 15px 24px 20px; }
body.feature-view .config-intro { font-size: 12px; line-height: 1.7; margin-bottom: 14px; }
body.feature-view .opt-group { margin-bottom: 13px; }
body.feature-view .swatch { font-size: 12px; }
body.feature-view .chip { font-size: 12px; }
body.feature-view .build-summary b { font-size: 18px; }

/* ── 左边被这一层改写的两块 ────────────────────────────── */
body.feature-view [data-zone] {
  position: relative;
  outline: 1px dashed #f0b985;
  outline-offset: 6px;
  border-radius: 4px;
  transition: outline-color .5s;
}
body.feature-view [data-zone].zone-touched {
  outline-color: var(--orange);
  animation: zone-pulse .9s ease;
}
@keyframes zone-pulse {
  0% { box-shadow: 0 0 0 0 #ed650033; }
  40% { box-shadow: 0 0 0 10px #ed650000; }
  100% { box-shadow: 0 0 0 0 #ed650000; }
}

/* 两个区域标签。**这是这个视图里信息量最大的两行字。** */
.fv-tag {
  position: fixed; z-index: 4; top: 60px;
  display: none; align-items: center; gap: 7px;
  padding: 6px 12px; border-radius: 20px;
  font: 500 11px/1 DM Mono, monospace; letter-spacing: .3px; white-space: nowrap;
}
body.feature-view .fv-tag { display: inline-flex; }
.fv-tag:before { content: ''; width: 6px; height: 6px; border-radius: 50%; }
.fv-tag-base { left: 34px; background: #efece8; color: #6f6a66; }
.fv-tag-base:before { background: #b9b3ac; }
.fv-tag-built { left: calc(54% - 18px); background: #ed6500; color: #fff; }
.fv-tag-built:before { background: #ffd0aa; }

/* ══ 窄屏：上下分屏 ══════════════════════════════════════
 * 同系列其余原型。这个演示尤其不能让面板铺满 ——
 * 换了面料的那把椅子在面板外面。
 * ⚠️ 上下各半时别忘了减掉站点头那 56px。 */
@media (max-width: 900px) {
  body.feature-view { height: 100dvh; overflow: hidden; }
  body.feature-view .product-shell {
    margin-top: 0;
    height: calc(46dvh - 56px);
    overflow-y: auto;
    padding: 8px 16px 12px;
  }
  /* 手机上半屏只有 300 出头 —— 全给产品图和那行「有没有照片」，
     规格表和价格滚下去看。 */
  body.feature-view .crumb-row,
  body.feature-view .product-info h1,
  body.feature-view .spec-list { display: none; }
  body.feature-view .product-hero { padding: 0; }
  body.feature-view .visual-frame { height: 190px; }
  body.feature-view .spec-block { margin-top: 10px; }
  body.feature-view .code-row { margin-top: 0; }
  body.feature-view .config-panel {
    top: auto; bottom: 0; left: 0; right: 0;
    width: auto; min-width: 0;
    height: 54dvh;
    border-radius: 14px 14px 0 0;
    box-shadow: 0 -14px 40px rgba(0, 0, 0, .14);
  }
  body.feature-view .fv-tag { display: none; }
  body.feature-view .fv-tag-built {
    display: inline-flex;
    top: auto; bottom: calc(54dvh - 13px);
    left: 50%; transform: translateX(-50%);
    z-index: 8;
  }
  body.feature-view [data-zone] { outline: none; }
}
