/* ==========================================================================
   VANTRE 商品详情页 · 正文模板 A（服务业版式）
   --------------------------------------------------------------------------
   加载方式：由 src/app/[[...slug]]/page.jsx 按 ERP 下发的 detail_template=A
   注入 <link rel="stylesheet">，只在商品详情页加载。

   设计取向：直接沿用独立站服务业（services / service-design / service-packaging）
   的正文版式 —— 居中段落、72ch 易读行宽、h2 下方 56px 绿色短规则线、
   cl-pick 描边卡、cl-note 收束框。
   实现方式：容器挂 .copy-landing，正文包 .plain-section，
   从而让全局 copy-landing.css 的选择器（.copy-landing .plain-section > h2 等）
   自然命中，本文件只做「商品详情页场景」的适配，不重复定义版式。

   约束：
   - 只用 design token 变量，不硬编码色值
   - 圆角遵循 6/10/14/18/24 分级；本模板的卡片沿用 cl-pick 的直角
   - 不引入新阴影；断点统一 860px
   - 无任何内联 style
   ========================================================================== */

/* ---------- 第二屏容器 ---------- */
.pdp-body.pdp-tpl-a {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 28px 88px;
}

/* ---------- 分类导航：详情 / 可用项 / FAQ ---------- */
.pdp-tpl-a .pdp-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin: 0 0 40px;
  padding: 0 0 20px;
  border-bottom: 1px solid var(--line);
}

.pdp-tpl-a .pdp-tabs button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 132px;
  min-height: 40px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  background: #f1f1ef;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 760;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease;
}

.pdp-tpl-a .pdp-tabs button:hover {
  background: #e6e6e3;
}

.pdp-tpl-a .pdp-tabs button.active,
.pdp-tpl-a .pdp-tabs button.active:hover {
  background: var(--green);
  color: #fff;
}

/* ---------- 面板 ---------- */
/* .pdp-panel 默认不带 display，因此 [hidden] 天然生效；此处显式声明是防御
   「后续若给 panel 加 display:grid 会覆盖 [hidden]」这一已知陷阱。 */
.pdp-tpl-a .pdp-panel[hidden] {
  display: none;
}

/* 正文段落：抵消 .plain-section 自带的 max-width/内距，避免在 .pdp-body
   容器内产生二次缩进与重复左右留白。 */
.pdp-tpl-a .pdp-panel > .plain-section {
  max-width: none;
  margin: 0;
  padding: 0;
  border-bottom: 0;
}

/* 首段导语：服务业版式里首段更强（17px / var(--black)），
   商品详情页同样用它承载 answer_summary 式的开场陈述。 */
.pdp-tpl-a .pdp-panel > .plain-section > p:first-of-type {
  font-size: 17px;
}

/* 正文图片：正文长图按内容宽度收敛，避免撑破 72ch 阅读栏 */
.pdp-tpl-a .pdp-panel .plain-section img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
}

/* ---------- ERP 正文语义类（跨模板契约） ----------
   ERP 保存并推送的是「无内联样式、只带语义 class」的 HTML。
   下面这组 pdp-* 类是 ERP 与独立站之间的契约，A/B 两套模板各自实现，
   因此同一份 ERP 正文换模板时无需改数据。 */

/* 导语段：给采购方/AI 摘要用的完整陈述 */
.pdp-tpl-a .pdp-lede {
  max-width: 72ch;
  margin: 0 auto 1.4em;
  font-size: 17px;
  line-height: 1.75;
  color: var(--black);
  text-align: center;
  text-wrap: pretty;
}

/* 提示/收束框：与服务业 cl-note 同款视觉 */
.pdp-tpl-a .pdp-note {
  max-width: 720px;
  margin: 24px auto;
  padding: 18px 22px;
  border: 1px solid rgba(26, 77, 46, 0.16);
  border-radius: var(--radius-md);
  background: var(--green-soft);
  font-size: 15px;
  line-height: 1.8;
  text-align: left;
}

/* 图注 */
.pdp-tpl-a .pdp-figure {
  margin: 2.4em 0;
  text-align: center;
}

.pdp-tpl-a .pdp-caption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
}

/* ---------- FAQ（与主页完全一致的原生 details 折叠） ---------- */
/* 折叠本体样式由 styles.css 的裸 details/summary 规则接管（:1031/:1035），
   此处只约束宽度，保证与主页视觉一致（居中、72ch）。 */
.pdp-tpl-a .pdp-faq-list {
  max-width: 860px;
  margin: 0 auto;
}

/* ---------- 商品正文与服务页对齐：清单居中 / 警示收窄 / 章节分隔 ----------
   ERP 正文是无包装器的扁平 h2/p/ul/div 序列，本节只做 A 模板作用域适配，
   不碰 copy-landing.css 与 B 模板。 */
 
/* 规格表（无 class 的 ul）：收进 72ch 阅读带，整块居中、行内左对齐 */
.pdp-tpl-a .pdp-panel .plain-section > ul:not([class]) {
  max-width: 72ch;
  margin-left: auto;
  margin-right: auto;
}

/* 勾选清单：整块居中（收缩到最长行），行内左对齐，
   与服务页 cl-checks-center「整块居中、行内左对齐」同哲学 */
.pdp-tpl-a .pdp-panel .plain-section > ul.cl-checks {
  width: fit-content;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}

/* 警示区：与 cl-note/pdp-note 同宽收束，不再全幅拉宽 */
.pdp-tpl-a .pdp-panel .plain-section > div.cl-alert {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

/* 章节分隔：首节外的每个 h2 以间距 + 细分割线与上一节分开 */
.pdp-tpl-a .pdp-panel .plain-section > h2:not(:first-child) {
  margin-top: 64px;
  padding-top: 40px;
  border-top: 1px solid var(--line);
}

/* ---------- 可用项面板 ---------- */
.pdp-tpl-a .pdp-panel .customization-grid {
  margin-top: 28px;
}

/* ---------- 响应式 ---------- */
@media (max-width: 860px) {
  .pdp-body.pdp-tpl-a {
    padding: 0 16px 56px;
  }

  .pdp-tpl-a .pdp-panel .plain-section > h2:not(:first-child) {
    margin-top: 40px;
    padding-top: 24px;
  }

  .pdp-tpl-a .pdp-tabs {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 14px;
    -webkit-overflow-scrolling: touch;
  }

  .pdp-tpl-a .pdp-tabs button {
    flex: 0 0 auto;
    white-space: nowrap;
  }
}

/* ---------- 降低动效偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
  .pdp-tpl-a .pdp-tabs button {
    transition: none;
  }
}
