/* 官网热销产品模块独立样式：桌面数值复刻参考站 .pinned_products_99715。
   与参考站的唯一偏差：无左上角 .bg 灰块，模块纯白（用户已确认）。
   方向属性全部使用逻辑属性（inset-inline / margin-inline），
   Arabic RTL 下由 dir="rtl" 自动镜像，无需单独规则。
   图标与交互从简：角标为纯文字；按钮点击由 site-inquiry.js 统一接管弹出询盘表单。 */
.public-hot {
    background: #fff;
    padding: 64px 0 42px;
    position: relative;
}

/* 内容区与参考站一致：1344px 居中，不设侧边距（与 Header 的 50px 内边距在 1440px 视口下仅差 2px）。 */
.public-hot__wrap {
    width: min(1344px, 100%);
    margin: 0 auto;
    position: relative;
}

/* 标题行：左侧青色胶囊装饰 + 大标题；右侧 view more 双箭头。
   标题不做 capitalize 变换：后台按语言存规范文本（如西语只首词大写），
   参考站的 capitalize 是因其标题存小写，本站不适用。 */
.public-hot__title {
    position: relative;
    margin-bottom: 48px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 48px;
}
.public-hot__title::before {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 48px;
    border-radius: 24px 0 0 24px;
    background: var(--site-primary);
}
.public-hot__heading {
    margin: 0;
    margin-inline-start: 36px;
    color: #323232;
    font-size: 36px;
    font-weight: 700;
    line-height: 48px;
    letter-spacing: 0;
}
.public-hot__more {
    display: inline-flex;
    align-items: center;
    color: #323232;
    font-size: 16px;
    font-weight: 400;
    line-height: 21px;
    white-space: nowrap;
}
.public-hot__more:hover { color: var(--site-primary); }
.public-hot__chevron {
    transition: margin .4s ease;
    font-family: ui-monospace, monospace;
}
.public-hot__chevron:last-of-type { margin-inline-start: 2px; }
.public-hot__more:hover .public-hot__chevron:first-of-type { margin-inline-start: 15px; }
.public-hot__more:hover .public-hot__chevron:last-of-type { margin-inline-start: 5px; }

/* 产品网格：桌面四列、≤1280 三列、≤920 两列、≤640 两列紧凑。
   宽度一律用流式计算（扣掉行间缝隙按列数平分），不用定宽：
   定宽 + flex-wrap 在容器宽度不整除时会出现「一行 N 张但行尾多一条缝」的参差布局
   （2026-10-24 审查修复，此前 641–1280px 行尾参差）。 */
.public-hot__list {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 0;
}
.public-hot__item {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: min(324px, calc((100% - 48px) / 4));
    margin-inline-end: 16px;
    margin-block-end: 36px;
    padding-bottom: 40px;
    height: 412px;
    background: #fff;
    box-shadow: 0 0 10px rgba(0, 0, 0, .15);
    box-sizing: border-box;
    position: relative;
}
.public-hot__item:nth-child(4n) { margin-inline-end: 0; }

/* 图片区：300px 见方，内缩 12px，hover 放大 1.3 倍。 */
.public-hot__media {
    height: 300px;
    box-sizing: border-box;
    flex-shrink: 0;
    margin: 12px;
    position: relative;
    overflow: hidden;
    background: #fafafa;
}
.public-hot__media a {
    position: relative;
    width: 100%;
    height: 100%;
    display: inline-block;
}
.public-hot__media img {
    width: 100%;
    height: 100%;
    object-fit: scale-down;
    transition: transform .4s ease;
}
.public-hot__item:hover .public-hot__media img { transform: scale(1.3); }

/* Video 角标：图片右下角灰底白字，默认媒体为视频时显示。 */
.public-hot__video {
    position: absolute;
    inset-inline-end: 0;
    bottom: 0;
    padding: 3px 9px;
    color: #fff;
    font-size: 12px;
    font-weight: 400;
    background: #969696;
    border-radius: 10px;
    z-index: 3;
    letter-spacing: .02em;
}

/* 产品名称：两行截断，居中，hover 变青。 */
.public-hot__name {
    margin: 0 12px;
    font-size: 16px;
    font-weight: 400;
    line-height: 24px;
    color: #323232;
    text-align: center;
    letter-spacing: 0;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}
.public-hot__name a { color: inherit; }
.public-hot__name a:hover { color: var(--site-primary); }

/* Get Best Price 按钮：蓝色胶囊骑跨卡片底边（下半截在卡外）。
   纯样式：无跳转、无弹窗，询盘表单建成后再接入。
   不做 capitalize 变换：文案按语言存规范文本（西语等只首词大写）。
   定位用 inset-inline-start 而非 margin-inline-start：按钮 reset 若写 margin:0
   会按加载顺序覆盖 margin 偏移，导致按钮贴左不居中。 */
.public-hot__cta {
    width: calc(100% - 76px);
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    border-radius: 36px;
    background: var(--site-primary);
    position: absolute;
    inset-inline-start: 38px;
    bottom: -20px;
    font-size: 14px;
    user-select: none;
}

/* 视口 ≤1280：三列（原为定宽 302px，容器不整除时行尾参差，改流式三列）。 */
@media screen and (max-width: 1280px) {
    .public-hot__item { width: calc((100% - 32px) / 3); }
    .public-hot__item:nth-child(4n) { margin-inline-end: 16px; }
    .public-hot__item:nth-child(3n) { margin-inline-end: 0; }
}

/* 视口 ≤920：两列；行尾重置随列数切换，避免缝隙参差。 */
@media screen and (max-width: 920px) {
    .public-hot__item { width: calc((100% - 16px) / 2); }
    .public-hot__item:nth-child(3n) { margin-inline-end: 16px; }
    .public-hot__item:nth-child(2n) { margin-inline-end: 0; }
}

/* 移动端 ≤640：一行两列（与参考站桌面站平板宽度同款形态，首屏多暴露一倍商品）。
   卡片等宽并列、图片区 38vw、标题 13px 两行截断；
   按钮对齐参考站移动端实测形态：宽胶囊（约占卡片 89% 宽、高 34px、字号 14px），
   完整位于卡片内部底部（参考站不骑跨卡边；桌面端骑跨形态保留不变）。
   边界用 inset-inline-start/end 显式约束而非 margin：按钮 reset 若写 margin:0
   会按加载顺序覆盖 margin 偏移导致不居中（2026-10-21 实测教训，见交接文档）。
   卡片 padding-bottom 由 28px 增至 48px：按钮移入卡内后需为其预留
   （底部 8px 间距 + 34px 高 + 与名称区间隔）空间，避免绝对定位按钮压住名称区。 */
@media screen and (max-width: 640px) {
    .public-hot { padding: 40px 0 36px; }
    .public-hot__title { margin-bottom: 32px; }
    .public-hot__heading { font-size: 28px; line-height: 36px; margin-inline-start: 28px; }
    .public-hot__title::before { width: 18px; height: 36px; border-radius: 18px 0 0 18px; }
    .public-hot__item {
        width: calc((100% - 12px) / 2);
        margin-inline-end: 12px;
        margin-block-end: 28px;
        height: auto;
        padding-bottom: 48px;
    }
    .public-hot__item:nth-child(2n) { margin-inline-end: 0; }
    /* ≤920 的 nth-child(3n) 重置在此宽度下要还原为 12px 缝隙（特异性更高，必须显式覆盖）。 */
    .public-hot__item:nth-child(3n) { margin-inline-end: 12px; }
    .public-hot__media { height: 38vw; margin: 8px; }
    .public-hot__name { margin: 0 8px; font-size: 13px; line-height: 18px; }
    .public-hot__cta {
        width: calc(100% - 20px);
        height: 34px;
        display: flex;
        justify-content: center;
        align-items: center;
        color: #fff;
        border-radius: 17px;
        background: var(--site-primary);
        position: absolute;
        inset-inline-start: 10px;
        inset-inline-end: 10px;
        bottom: 8px;
        font-size: 14px;
        white-space: nowrap;
        user-select: none;
    }
}
