{# trade-pro product detail — cms 产品详情精确对齐重做(Task 12a,重做 10b); Task 15 选项卡改锚点 Tab + 每产品自定义区块。 设计源(唯一权威依据)D:/project/cms/runtimes/astro-site-runtime/src/pages/ [locale]/products/[slug].astro,区块序列逐块对照: detail-hero(面包屑 + 1.08/0.92 双栏:画廊/标题区,cms 产品名 h2 全页无 h1) → product-tabbed(sticky 锚点选项卡:Product Details 正文恒有 → 每产品自定义 区块 detail_sections(wppop_sections 迁移,标题来自数据)→ Specifications / Features 按数据显隐)→ related-detail(sf-tp-card 卡片网格)→ quote-section (左联系信息 + 右 CTA/外部表单)。 与 cms 的三处结构决策: 1. 选项卡为锚点跳转非面板切换(用户要求,Task 15):Tab 是 #anchor 链接, 区块全部平铺渲染 + panel-title 常显——无 JS 时原生锚点跳转、全部区块可读, 静态可抓取;JS 渐进增强平滑滚动 + scrollspy 高亮当前 Tab 并在横滚行内居中。 2. 正文不拆表:WordPress 规格表 直接在 body HTML 里,正文整体作为 Product Details 区块渲染(.sf-tp-product-body rich-body 表格样式:全宽/ 发丝框/斑马纹/覆盖内联宽高/单元格 div 净空);specs 变量有数据时另设 Specifications 区块(干净 spec-table,每行两对键值,从 fields 读)。 自定义区块数据由 theme_pro.product_detail_sections 供给:fields.sections 结构化优先,旧同步产物的 body H2 段识别拆出(正文 overview 不重复渲染)。 3. 画廊交互复用平台 pro.js 既有钩子(.pro-product-media / .pro-gallery-thumbs / [data-gallery-image]):缩略图点击换主图 + 主图灯箱, 零新增 JS;无 JS 时全部图片仍平铺可读。无图回退封面,再无则占位渐变 (空值不破版)。 #}
{# pro.js 经 .pro-gallery-thumbs 的 parentElement 定位 .pro-product-media img—— 缩略图容器必须保持为 .pro-product-media 的兄弟节点(不可外包滚动容器) #}
PRODUCT DETAILS / {{ fields.get('brand') or 'CATALOGUE' }} {# cms 产品名为 h2 量级(2xl 非巨型);平台全站单 h1 契约 (test_theme_pro_v3 全页 h1==1)保留 h1 标签、字号用 cms 2xl #}

{{ page.title }}

{{ page.summary or 'Detailed product information, specifications and export packaging are published on this page.' }}

{% if fields.get('brand') or fields.get('model') %}

{% if fields.get('brand') %}Brand · {{ fields.get('brand') }}{% endif %}{% if fields.get('model') %}Model · {{ fields.get('model') }}{% endif %}

{% endif %}
{# 选项卡详情(cms .product-tabbed,Task 15 改锚点 Tab):Tab 序列完全数据 驱动,对齐 cms detailTabs——Product Details(正文)恒有 → 每产品自定义区块 detail_sections(CMS wppop_sections 迁移:Packing & Delivery / Our Exhibition / Our Certifications / Our Company / FAQ,标题来自数据不固定;theme_pro 从 fields.sections 读、旧同步产物从 body H2 段识别拆出)→ Specifications(specs 有数据才显)→ Features(fields.features 有数据才显)。 Tab 是锚点跳转非面板切换(用户要求 + 区块全部平铺渲染):无 JS 时原生锚点 跳转 + 全部区块可读、标题可见,静态可抓取;JS 平滑滚动 + scrollspy 高亮。 #} {% set tp_spec_rows = specs | rejectattr('label', 'equalto', 'gallery') | list %}

Product details

{{ body_copy(detail_overview, page) }}
{% for s in detail_sections %}

{{ s.title }}

{{ s.content }}
{% endfor %} {% if tp_spec_rows %}

Specifications

{# cms spec-table:每行两对键值(batch(2) 纵向配对) #} {% for row in tp_spec_rows | batch(2) %} {% for cell in row %}{% endfor %} {% endfor %}
{{ cell.label }}{{ cell.value }}
{% endif %} {% if detail_features %}

Features

{% for f in detail_features %}

{{ f.title }}

{{ f.desc }}

{% endfor %}
{% endif %} {% set tp_related = (groups['product'] + groups['vehicle']) | rejectattr('route', 'equalto', page.route) | list %} {% if tp_related %}
{% for tp_item in tp_related[:4] %} {% endfor %}
{% endif %}
REQUEST A QUOTE

Inquire about this product

Send the specifications you need for {{ page.title }} and our trade desk replies with pricing, lead time and export packaging within one business day.

{% if footer_email %}
{% endif %}
Direct sourcing desk

One contact from inquiry to container loading.

{% if form_endpoint %}

Get a quote for {{ page.title }}

Submissions are handled by the external form service configured by the site administrator.

{% else %}

Get a quote for {{ page.title }}

Share your specifications and target market through the contact page; our trade desk replies within one business day.

Contact us {{ icon('arrow-right') }} {% endif %}