/*
 * ==========================================================================
 * Ricodisk Enterprise Theme — 32-product-single.css
 * 作用域: product-single（产品详情页）
 *
 * PRD 商品页样板（Block Pattern）的呈现样式。
 *
 * 仅命中样板产出的语义类（.rd-section--* / .rd-product-top），历史文章没有这些类，
 * 天然不受影响（向后兼容，见 docs/adr/0002）。图册占位段在前台总是被 single.php
 * 整体替换/移除，无需前台样式；编辑器里的占位提示框样式在 assets/css/editor.css。
 *
 * 实现说明（与 31-home-app-case-v2.css 同一模式）：
 * - functions.php 里 swiper-css 句柄的“内联轮播样式”没有放进任何 @layer；
 *   CSS 级联中 unlayered 声明优先于 @layer legacy 内的声明，因此本文件若包在
 *   @layer legacy 里，“去卡片化”覆盖（透明背景 / 56px 缩略图）永远不生效。
 * - 故本文件刻意「不放入任何 layer」，用更高的选择器优先级压过内联样式；
 *   对内联里带 !important 的条目（缩略图 86px 宽高）同样用 !important 应对。
 * - 字体 / 字号 / 间距遵循 CLAUDE.md 规范：普通内容主字体、400 字重、层级靠字号与间距。
 * ========================================================================== */

/* 主字体基准：与 Header/Footer 一致 */
body.single-product .entry-content .rd-section,
body.single-product .entry-content .rd-product-top {
    font-family: "Inter", "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* 顶部两列：图册左 | 介绍/容量/应用右。核心 Columns 自带栅格，这里只补间距。 */
body.single-product .entry-content .rd-product-top {
    gap: 32px;
    margin-bottom: 24px;
    align-items: flex-start;
}

/*
 * 顶部两列左右宽度占比 —— 唯一维护点。
 * 模板（inc/product-blocks.php）不再写死 width / 内联 flex-basis，改由此处按语义类控制：
 * 左列（图册）59% : 右列（内容）41%。刻意不加 !important，好让 Gutenberg 在窄屏
 * (<781px) 的 `flex-basis:auto!important` 堆叠规则照常生效；桌面端本选择器优先级已
 * 压过列的默认 `flex-basis:0%`。编辑器同值见 assets/css/editor.css，两处需保持一致。
 */
body.single-product .entry-content .rd-product-top .rd-product-left {
    flex-basis: 59%;
}

body.single-product .entry-content .rd-product-top .rd-product-right {
    flex-basis: 41%;
}

/* 顶部两列：图册左 | 介绍/容量/应用右。右侧需要补顶部间距。 */
body.single-product .entry-content .rd-product-top .rd-product-right {
    margin-top: 40px;
}

/*
 * 图册区域视觉（参考 PRD 原型：图片直接摆在页面上、无卡片容器感）。
 * 限定在 .rd-product-top 内，不改动 .product-swiper 基础类本身，
 * 历史文章（图册在 .rd-product-top 之外）不受影响。
 */
body.single-product .entry-content .rd-product-top .product-swiper-wrap {
    margin-bottom: 0;
}

body.single-product .entry-content .rd-product-top .product-swiper {
    background: transparent;
    border-radius: 0;
}

body.single-product .entry-content .rd-product-top .product-swiper .swiper-slide {
    background: transparent;
}

/* 缩略图导航：缩小并降低视觉权重，激活态用细下划线代替粗边框 */
body.single-product .entry-content .rd-product-top .product-swiper-thumbs {
    margin-top: 14px;
    height: 56px;
}

body.single-product .entry-content .rd-product-top .product-swiper-thumbs .swiper-wrapper {
    height: 56px;
}

body.single-product .entry-content .rd-product-top .product-swiper-thumbs .swiper-slide {
    /* !important 应对 functions.php 内联样式的 width/height:86px!important */
    width: 56px !important;
    height: 56px !important;
    border: none;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    opacity: 0.45;
}

body.single-product .entry-content .rd-product-top .product-swiper-thumbs .swiper-slide-thumb-active {
    opacity: 1;
    border-bottom-color: #e30613;
}

/* 命名段：段与段的纵向节奏 */
body.single-product .entry-content .rd-section {
    margin: 0 0 32px;
}

body.single-product .entry-content .rd-product-top .rd-section {
    margin-bottom: 24px;
}

/* 段标题：内容小标题层级（编辑器可改标题级别，这里只需要控制间距） */
body.single-product .entry-content .rd-section__title {
    margin: 0 0 12px;
    padding-bottom: 10px;
}

/* 段内正文：正文说明层级 */
body.single-product .entry-content .rd-section p,
body.single-product .entry-content .rd-section li {
    font-size: 15px;
    font-weight: 400;
    line-height: 1.8;
    color: #333;
}

/* 容量段：标签化展示 */
body.single-product .entry-content .rd-section--capacity .is-layout-flex {
    display: flex;
    flex-wrap: wrap;
}
body.single-product .entry-content .rd-section--capacity .wp-block-group .wp-block-paragraph {
    display: inline-block !important;
    margin: 3px 5px 3px 0 !important;
    padding: 3px 12px !important;
    border: 1px solid #d0d0d0 !important;
    border-radius: 4px !important;
    background: #f5f5f5 !important;
    font-size: 13px !important;
    color: #333 !important;
    white-space: nowrap !important;
}

/* 应用场景段：若配图，图片自适应 */
body.single-product .entry-content .rd-section--application .wp-block-group {
    min-width: 0;
    margin-left: max(-30px, -2vw);
}
body.single-product .entry-content .rd-section--application .wp-block-group .wp-block-image {
    max-width: 30%;
}

/* 规格参数段：表格呈现 */
body.single-product .entry-content .rd-section--spec table {
    width: 100%;
    border-collapse: collapse;
}

body.single-product .entry-content .rd-section--spec th,
body.single-product .entry-content .rd-section--spec td {
    padding: 10px 14px;
    border: 1px solid #e6e6e6;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
    text-align: left;
}

body.single-product .entry-content .rd-section--spec tr:nth-child(even) td {
    background: #fafafa;
}

/* 应用场景段：若配图，图片自适应 */
body.single-product .entry-content .rd-section--application img {
    max-width: 100%;
    height: auto;
}

/* 移动端：核心 Columns 已在窄屏堆叠，这里收紧节奏 */
@media (max-width: 781px) {
    body.single-product .entry-content .rd-product-top {
        gap: 24px;
        margin-bottom: 0;
    }

    body.single-product .entry-content .rd-section {
        margin-bottom: 24px;
    }

    body.single-product .entry-content .rd-product-top .rd-product-right {
        margin-top: 0;
    }
    body.single-product .entry-content .rd-section--application .wp-block-group {
        margin-left: -24px;
    }
}
