/* =====================================================================
   批发商城 · 主样式表
   =====================================================================
   多终端自适应策略（Mobile First）：
     基础样式            → 手机（< 480px）
     @media (min-width:480px)   → 大屏手机
     @media (min-width:768px)   → 平板竖屏
     @media (min-width:1024px)  → 平板横屏 / 小笔记本
     @media (min-width:1280px)  → 桌面宽屏
   所有可点元素最小触控区 44×44px，符合移动端可用性要求。
   ===================================================================== */

/* ---------------------------------------------------------------
 | 设计令牌
 --------------------------------------------------------------- */
:root {
    --c-brand:        #c8102e;
    --c-brand-dark:   #9e0c24;
    --c-brand-light:  #fdecef;
    --c-accent:       #ff6a00;
    --c-accent-light: #fff4e8;

    --c-text:         #1a1d24;
    --c-text-sub:     #5b6271;
    --c-text-muted:   #8b92a1;
    --c-line:         #e6e9ef;
    --c-line-strong:  #d2d7e0;
    --c-bg:           #f5f6f8;
    --c-surface:      #ffffff;
    --c-surface-alt:  #fafbfc;

    --c-success:      #0f9d58;
    --c-success-bg:   #e8f6ee;
    --c-warning:      #d97706;
    --c-warning-bg:   #fef4e6;
    --c-danger:       #d92d20;
    --c-danger-bg:    #fdecea;
    --c-info:         #1a73e8;
    --c-info-bg:      #e8f0fe;

    --r-sm: 6px;
    --r-md: 10px;
    --r-lg: 16px;
    --r-full: 999px;

    --sh-sm: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
    --sh-md: 0 2px 8px rgba(16, 24, 40, .08), 0 1px 3px rgba(16, 24, 40, .06);
    --sh-lg: 0 12px 32px rgba(16, 24, 40, .12);

    --sp: 16px;
    --container: 1280px;
    --header-h: 60px;
    --tabbar-h: 56px;

    --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    --trans: .22s cubic-bezier(.4, 0, .2, 1);
}

/* ---------------------------------------------------------------
 | 基础重置
 --------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.6;
    color: var(--c-text);
    background: var(--c-bg);
    -webkit-font-smoothing: antialiased;
    /* 移动端底部导航预留空间 */
    padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px));
}

h1, h2, h3, h4, h5 { margin: 0; font-weight: 600; line-height: 1.35; }
p { margin: 0 0 .6em; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
table { border-collapse: collapse; width: 100%; }

svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* 可访问性：仅键盘可见的聚焦环 */
:focus-visible { outline: 2px solid var(--c-brand); outline-offset: 2px; border-radius: 4px; }

/* 工具类 */
.pf-container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--sp); }
.pf-muted { color: var(--c-text-muted); }
.pf-hide-sm { display: none !important; }
.pf-hidden { display: none !important; }
.pf-nowrap { white-space: nowrap; }
.pf-text-right { text-align: right; }
.pf-mt { margin-top: var(--sp); }
.pf-mb { margin-bottom: var(--sp); }

/* ---------------------------------------------------------------
 | 顶部公告条
 --------------------------------------------------------------- */
.pf-topbar {
    background: var(--c-text);
    color: #cfd4de;
    font-size: 12px;
    line-height: 32px;
}
.pf-topbar__inner { display: flex; align-items: center; gap: 14px; height: 32px; }
.pf-topbar__spacer { flex: 1; }
.pf-topbar__item { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pf-topbar__item--hide-sm { display: none; }
.pf-topbar__link { color: #fff; opacity: .82; transition: opacity var(--trans); white-space: nowrap; }
.pf-topbar__link:hover { opacity: 1; }

/* ---------------------------------------------------------------
 | 页头
 --------------------------------------------------------------- */
.pf-header {
    position: sticky;
    top: 0;
    z-index: 60;
    background: var(--c-surface);
    border-bottom: 1px solid var(--c-line);
    box-shadow: var(--sh-sm);
}
.pf-header__inner {
    display: flex;
    align-items: center;
    gap: 10px;
    height: var(--header-h);
}

.pf-burger {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    width: 44px;
    height: 44px;
    padding: 10px;
    flex-shrink: 0;
}
.pf-burger span {
    display: block;
    height: 2px;
    background: var(--c-text);
    border-radius: 2px;
    transition: transform var(--trans), opacity var(--trans);
}
.pf-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.pf-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.pf-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.pf-logo { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.pf-logo__mark {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--c-brand), var(--c-accent));
    color: #fff;
    font-weight: 700;
    font-size: 16px;
}
.pf-logo__text { display: flex; flex-direction: column; line-height: 1.15; }
.pf-logo__text strong { font-size: 16px; letter-spacing: .3px; }
.pf-logo__text small { display: none; font-size: 11px; color: var(--c-text-muted); font-weight: 400; }

/* 页头搜索：移动端隐藏（抽屉里有） */
.pf-search { display: none; }
.pf-search__input {
    flex: 1;
    min-width: 0;
    height: 40px;
    padding: 0 14px;
    border: 2px solid var(--c-brand);
    border-right: none;
    border-radius: var(--r-full) 0 0 var(--r-full);
    background: var(--c-surface);
    outline: none;
}
.pf-search__input::-webkit-search-cancel-button { appearance: none; }
.pf-search__btn {
    display: grid;
    place-items: center;
    width: 68px;
    height: 40px;
    background: var(--c-brand);
    border-radius: 0 var(--r-full) var(--r-full) 0;
    color: #fff;
    transition: background var(--trans);
}
.pf-search__btn svg { width: 19px; height: 19px; stroke-width: 2.4; }
.pf-search__btn:hover { background: var(--c-brand-dark); }

.pf-header__actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }

.pf-cart-btn {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
    height: 44px;
    padding: 0 12px;
    border-radius: var(--r-md);
    color: var(--c-text);
    transition: background var(--trans);
}
.pf-cart-btn svg { width: 22px; height: 22px; }
.pf-cart-btn__label { display: none; }
.pf-cart-btn:hover { background: var(--c-brand-light); }

.pf-badge {
    position: absolute;
    top: 4px;
    right: 2px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: var(--r-full);
    background: var(--c-brand);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    line-height: 18px;
    text-align: center;
}
.pf-badge--tab { position: absolute; top: 2px; right: 50%; transform: translateX(16px); }

/* ---------------------------------------------------------------
 | 主导航（移动端 = 抽屉）
 --------------------------------------------------------------- */
.pf-nav {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 90;
    width: 82%;
    max-width: 320px;
    height: 100%;
    overflow-y: auto;
    background: var(--c-surface);
    transform: translateX(-102%);
    transition: transform .28s cubic-bezier(.4, 0, .2, 1);
    box-shadow: var(--sh-lg);
    -webkit-overflow-scrolling: touch;
}
.pf-nav.is-open { transform: translateX(0); }
.pf-nav__inner { display: flex; flex-direction: column; padding: 12px 0 calc(24px + env(safe-area-inset-bottom, 0px)); }
.pf-nav__link {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 48px;
    padding: 0 20px;
    font-size: 15px;
    border-bottom: 1px solid var(--c-line);
    transition: background var(--trans), color var(--trans);
}
.pf-nav__link:hover, .pf-nav__link.is-active { background: var(--c-brand-light); color: var(--c-brand); }
.pf-nav__count {
    margin-left: auto;
    padding: 1px 8px;
    border-radius: var(--r-full);
    background: var(--c-bg);
    font-size: 11px;
    color: var(--c-text-muted);
}

.pf-drawer-mask {
    position: fixed;
    inset: 0;
    z-index: 80;
    background: rgba(16, 24, 40, .45);
    backdrop-filter: blur(2px);
    animation: pf-fade .2s ease;
}
@keyframes pf-fade { from { opacity: 0 } to { opacity: 1 } }

/*
 * 抽屉打开时，把整个页头抬到遮罩之上。
 * ------------------------------------------------------------------
 * .pf-nav 在 .pf-header 内部，而 .pf-header 是 position:sticky + z-index，
 * 本身会形成一个层叠上下文。于是 .pf-nav 的 z-index:90 只在页头内部有效，
 * 整个页头这层（60）却排在遮罩（80）下面 —— 抽屉滑出来了，
 * 但每个链接的点击点都被遮罩接走，看起来就是“菜单点不动”。
 *
 * 抬到 95：高于遮罩 80，低于闪存提示 100 与弹窗 200。
 * 只在打开时抬，平时页头层级不动，不干扰其它浮层。
 */
body.is-nav-open .pf-header { z-index: 95; }

/* 抽屉内的移动版搜索 */
.pf-nav__search { padding: 0 16px 12px; }
.pf-nav__search .pf-search { display: flex; }
.pf-nav__search .pf-search__input { border-radius: var(--r-full) 0 0 var(--r-full); }

/* ---------------------------------------------------------------
 | 闪存提示
 --------------------------------------------------------------- */
.pf-flashes {
    position: fixed;
    top: 72px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    width: calc(100% - 32px);
    max-width: 460px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.pf-flash {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border-radius: var(--r-md);
    background: var(--c-surface);
    box-shadow: var(--sh-lg);
    border-left: 4px solid var(--c-info);
    animation: pf-slide-in .26s ease;
}
@keyframes pf-slide-in { from { opacity: 0; transform: translateY(-12px) } to { opacity: 1; transform: translateY(0) } }
.pf-flash__icon {
    flex-shrink: 0;
    display: grid;
    place-items: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--c-info);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}
.pf-flash__text { flex: 1; font-size: 13px; }
.pf-flash__close { flex-shrink: 0; width: 24px; height: 24px; font-size: 18px; line-height: 1; color: var(--c-text-muted); }
.pf-flash--success { border-left-color: var(--c-success); }
.pf-flash--success .pf-flash__icon { background: var(--c-success); }
.pf-flash--error { border-left-color: var(--c-danger); }
.pf-flash--error .pf-flash__icon { background: var(--c-danger); }
.pf-flash--warning { border-left-color: var(--c-warning); }
.pf-flash--warning .pf-flash__icon { background: var(--c-warning); }

/* ---------------------------------------------------------------
 | 主体 / 通用组件
 --------------------------------------------------------------- */
.pf-main { min-height: 60vh; padding: 16px 0 32px; }

.pf-card {
    background: var(--c-surface);
    border-radius: var(--r-md);
    box-shadow: var(--sh-sm);
    overflow: hidden;
}
.pf-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--c-line);
}
.pf-card__title { font-size: 15px; font-weight: 600; }
.pf-card__body { padding: 16px; }

.pf-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 44px;
    padding: 0 18px;
    border-radius: var(--r-md);
    border: 1px solid transparent;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    transition: background var(--trans), border-color var(--trans), color var(--trans), transform .1s;
}
.pf-btn:active { transform: scale(.985); }
.pf-btn--primary { background: var(--c-brand); color: #fff; }
.pf-btn--primary:hover { background: var(--c-brand-dark); }
.pf-btn--accent { background: var(--c-accent); color: #fff; }
.pf-btn--accent:hover { filter: brightness(.94); }
.pf-btn--outline { border-color: var(--c-line-strong); color: var(--c-text); background: var(--c-surface); }
.pf-btn--outline:hover { border-color: var(--c-brand); color: var(--c-brand); }
.pf-btn--ghost { color: var(--c-text-sub); }
.pf-btn--ghost:hover { background: var(--c-bg); }
.pf-btn--danger { background: var(--c-danger); color: #fff; }
.pf-btn--block { width: 100%; }
.pf-btn--lg { min-height: 50px; font-size: 16px; padding: 0 26px; }
.pf-btn--sm { min-height: 34px; padding: 0 12px; font-size: 13px; }
.pf-btn[disabled], .pf-btn.is-disabled { opacity: .5; pointer-events: none; }

.pf-tag {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: var(--r-sm);
    font-size: 12px;
    line-height: 1.6;
    white-space: nowrap;
}
.pf-tag--brand { background: var(--c-brand-light); color: var(--c-brand); }
.pf-tag--accent { background: var(--c-accent-light); color: var(--c-accent); }
.pf-tag--success { background: var(--c-success-bg); color: var(--c-success); }
.pf-tag--warning { background: var(--c-warning-bg); color: var(--c-warning); }
.pf-tag--danger { background: var(--c-danger-bg); color: var(--c-danger); }
.pf-tag--info { background: var(--c-info-bg); color: var(--c-info); }
.pf-tag--muted { background: var(--c-bg); color: var(--c-text-muted); }

.pf-field { margin-bottom: 16px; }
.pf-field__label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 500; color: var(--c-text-sub); }
.pf-field__label .req { color: var(--c-danger); }
.pf-field__hint { margin-top: 6px; font-size: 12px; color: var(--c-text-muted); }
.pf-input, .pf-select, .pf-textarea {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid var(--c-line-strong);
    border-radius: var(--r-md);
    background: var(--c-surface);
    outline: none;
    transition: border-color var(--trans), box-shadow var(--trans);
}
.pf-textarea { min-height: 96px; resize: vertical; line-height: 1.6; }
.pf-input:focus, .pf-select:focus, .pf-textarea:focus {
    border-color: var(--c-brand);
    box-shadow: 0 0 0 3px rgba(200, 16, 46, .12);
}
.pf-input--error { border-color: var(--c-danger); }
.pf-err { margin-top: 5px; font-size: 12px; color: var(--c-danger); }

.pf-empty { padding: 56px 20px; text-align: center; color: var(--c-text-muted); }
.pf-empty__icon { font-size: 46px; margin-bottom: 12px; opacity: .5; }
.pf-empty__text { margin-bottom: 18px; }

.pf-alert { padding: 12px 14px; border-radius: var(--r-md); font-size: 13px; margin-bottom: 14px; }
.pf-alert--info { background: var(--c-info-bg); color: #174ea6; }
.pf-alert--warning { background: var(--c-warning-bg); color: #8a4b00; }
.pf-alert--danger { background: var(--c-danger-bg); color: #9b1c13; }
.pf-alert--success { background: var(--c-success-bg); color: #0b6b3d; }

/* ---------------------------------------------------------------
 | 商品网格（1 → 2 → 3 → 4 列）
 --------------------------------------------------------------- */
.pf-grid { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }

/*
 * 列宽用 minmax(0, 1fr) 而不是 1fr。
 * 1fr 等于 minmax(auto, 1fr)，网格列不会窄于内容的 min-content——
 * 商品标题、价格、销量这一排一旦不能再碎，整列就被撑宽，
 * 手机上就出现“页面比屏幕宽”。加 minmax(0, …) 让列允许收缩，
 * 再由卡片内部自己去截断文字。
 */
.pf-product {
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: var(--c-surface);
    border-radius: var(--r-md);
    box-shadow: var(--sh-sm);
    overflow: hidden;
    transition: transform var(--trans), box-shadow var(--trans);
}
.pf-product:hover { transform: translateY(-2px); box-shadow: var(--sh-md); }
.pf-product__media {
    position: relative;
    aspect-ratio: 1 / 1;
    background: var(--c-bg);
    overflow: hidden;
}
.pf-product__img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.pf-product:hover .pf-product__img { transform: scale(1.04); }
.pf-product__badges {
    position: absolute;
    top: 8px;
    left: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: flex-start;
}
.pf-product__body { padding: 10px 12px 14px; display: flex; flex-direction: column; flex: 1; min-width: 0; }
.pf-product__title {
    font-size: 13px;
    font-weight: 500;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.9em;
    margin-bottom: 6px;
}
.pf-product__spec { font-size: 12px; color: var(--c-text-muted); margin-bottom: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-product__price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 4px; color: var(--c-brand); margin-bottom: 4px; }
.pf-product__price .sym { font-size: 12px; font-weight: 600; }
.pf-product__price .val { font-size: 19px; font-weight: 700; line-height: 1; }
.pf-product__price .unit { font-size: 11px; color: var(--c-text-muted); white-space: nowrap; }
.pf-product__market { font-size: 12px; color: var(--c-text-muted); text-decoration: line-through; white-space: nowrap; }
.pf-product__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    margin-top: auto;
    padding-top: 8px;
    border-top: 1px dashed var(--c-line);
    font-size: 11px;
    color: var(--c-text-muted);
}
.pf-product__moq { color: var(--c-accent); font-weight: 600; }

/* ---------------------------------------------------------------
 | 首页 Hero
 --------------------------------------------------------------- */
.pf-hero {
    background: linear-gradient(135deg, #c8102e 0%, #e8455f 46%, #ff8a3d 100%);
    color: #fff;
    margin-bottom: 20px;
}
.pf-hero__inner { padding: 30px 0 26px; }
.pf-hero__title { font-size: 24px; line-height: 1.3; margin-bottom: 10px; letter-spacing: .4px; }
.pf-hero__sub { font-size: 13.5px; line-height: 1.8; opacity: .94; margin-bottom: 18px; }
.pf-hero__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.pf-hero__actions .pf-btn--primary { background: #fff; color: var(--c-brand); }
.pf-hero__actions .pf-btn--primary:hover { background: #fff5f6; }
.pf-hero__actions .pf-btn--outline { border-color: rgba(255,255,255,.7); color: #fff; background: transparent; }
.pf-hero__actions .pf-btn--outline:hover { background: rgba(255,255,255,.14); color: #fff; }
.pf-hero__stats { display: flex; gap: 26px; margin-top: 24px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.24); }
.pf-hero__stat { display: flex; flex-direction: column; gap: 2px; }
.pf-hero__stat strong { font-size: 26px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.pf-hero__stat span { font-size: 12px; opacity: .85; }

/* ---------------------------------------------------------------
 | 区块通用
 --------------------------------------------------------------- */
.pf-section { margin-bottom: 32px; }
.pf-section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.pf-section__title { font-size: 18px; }
.pf-section__more { font-size: 13px; color: var(--c-text-muted); transition: color var(--trans); }
.pf-section__more:hover { color: var(--c-brand); }

/* 分类磁贴 */
.pf-cat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.pf-cat {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 15px 14px;
    background: var(--c-surface);
    border-radius: var(--r-md);
    box-shadow: var(--sh-sm);
    transition: transform var(--trans), box-shadow var(--trans);
}
.pf-cat:hover { transform: translateY(-2px); box-shadow: var(--sh-md); }
.pf-cat__icon { font-size: 22px; margin-bottom: 3px; }

/* 分类配图（后台可上传，取代 emoji 图标） */
.pf-cat__icon--image {
    display: block;
    width: 48px;
    height: 48px;
    margin-bottom: 6px;
    border-radius: 10px;
    overflow: hidden;
    background: var(--c-surface-alt);
}
.pf-cat__icon--image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.pf-cat__name { font-size: 14px; font-weight: 600; }
.pf-cat__count { font-size: 12px; color: var(--c-text-muted); }

/* MOQ 规则横幅 */
.pf-rule-banner {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 16px;
    margin-bottom: 30px;
    border-radius: var(--r-md);
    background: linear-gradient(135deg, #fff8f0, #fff2e8);
    border: 1px solid #ffd9b3;
}
.pf-rule-banner__icon {
    flex-shrink: 0;
    display: grid;
    place-items: center;
    min-width: 54px;
    height: 54px;
    padding: 0 8px;
    border-radius: var(--r-md);
    background: var(--c-accent);
    color: #fff;
    font-size: 18px;
    font-weight: 700;
}
.pf-rule-banner__body h3 { font-size: 15px; margin-bottom: 6px; color: #8a3c00; }
.pf-rule-banner__body p { margin: 0; font-size: 13px; line-height: 1.75; color: #a04a00; }
.pf-rule-banner__body strong { color: var(--c-brand); }

/* 支付方式卡片 */
.pf-pay-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.pf-pay-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
    background: var(--c-surface);
    border-radius: var(--r-md);
    box-shadow: var(--sh-sm);
}
.pf-pay-card.is-off { opacity: .68; }
.pf-pay-card__idx {
    position: absolute;
    top: 12px;
    right: 14px;
    font-size: 12px;
    font-weight: 700;
    color: var(--c-line-strong);
}
.pf-pay-card h4 { font-size: 14.5px; }
.pf-pay-card p { margin: 0; font-size: 12.5px; color: var(--c-text-muted); line-height: 1.65; }

/* ---------------------------------------------------------------
 | 列表页布局
 --------------------------------------------------------------- */
.pf-listing { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.pf-listing__side { display: none; }
.pf-side-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 40px;
    padding: 0 12px;
    border-radius: var(--r-sm);
    font-size: 13.5px;
    transition: background var(--trans), color var(--trans);
}
.pf-side-link:hover { background: var(--c-bg); color: var(--c-brand); }
.pf-side-link.is-active { background: var(--c-brand-light); color: var(--c-brand); font-weight: 600; }

.pf-cat-scroll { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 12px; scrollbar-width: none; }
.pf-cat-scroll::-webkit-scrollbar { display: none; }

.pf-sortbar { display: flex; gap: 4px; overflow-x: auto; padding: 10px 12px; margin-bottom: 14px; background: var(--c-surface); border-radius: var(--r-md); box-shadow: var(--sh-sm); scrollbar-width: none; }
.pf-sortbar::-webkit-scrollbar { display: none; }
.pf-sortbar__item { flex: 0 0 auto; padding: 7px 13px; border-radius: var(--r-sm); font-size: 13px; color: var(--c-text-sub); transition: all var(--trans); }
.pf-sortbar__item:hover { color: var(--c-brand); background: var(--c-brand-light); }
.pf-sortbar__item.is-active { background: var(--c-brand); color: #fff; font-weight: 500; }

/* ---------------------------------------------------------------
 | 页面标题条
 --------------------------------------------------------------- */
.pf-page-head { margin-bottom: 14px; }
.pf-page-head__title { font-size: 19px; }
.pf-page-head__sub { font-size: 13px; color: var(--c-text-muted); margin-top: 3px; }
.pf-breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12px; color: var(--c-text-muted); margin-bottom: 10px; }
.pf-breadcrumb a:hover { color: var(--c-brand); }
.pf-breadcrumb__sep { opacity: .5; }

/* ---------------------------------------------------------------
 | 详情页布局（移动端单列 → 桌面端两列）
 --------------------------------------------------------------- */
.pf-detail { display: grid; grid-template-columns: 1fr; gap: 16px; }

/* ---------- 多图轮播 ---------- */
.pf-gallery { background: var(--c-surface); border-radius: var(--r-md); box-shadow: var(--sh-sm); overflow: hidden; }
.pf-gallery__stage {
    position: relative;
    aspect-ratio: 1 / 1;
    background: var(--c-surface-alt);
    overflow: hidden;
    touch-action: pan-y;
    cursor: zoom-in;
}
.pf-gallery__track {
    display: flex;
    height: 100%;
    transition: transform .32s cubic-bezier(.4, 0, .2, 1);
    will-change: transform;
}
.pf-gallery__slide { flex: 0 0 100%; height: 100%; }
.pf-gallery__slide img { width: 100%; height: 100%; object-fit: contain; background: #fff; }

.pf-gallery__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .92);
    color: var(--c-text);
    box-shadow: var(--sh-md);
    opacity: 0;
    transition: opacity var(--trans), background var(--trans);
}
.pf-gallery__arrow svg { width: 20px; height: 20px; stroke-width: 2.4; }
.pf-gallery__arrow--prev { left: 10px; }
.pf-gallery__arrow--next { right: 10px; }
.pf-gallery__stage:hover .pf-gallery__arrow { opacity: 1; }
.pf-gallery__arrow:hover { background: #fff; color: var(--c-brand); }
.pf-gallery__arrow[disabled] { opacity: .28 !important; pointer-events: none; }

.pf-gallery__counter {
    position: absolute;
    right: 12px;
    bottom: 12px;
    padding: 3px 10px;
    border-radius: var(--r-full);
    background: rgba(16, 24, 40, .62);
    color: #fff;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    backdrop-filter: blur(4px);
}
.pf-gallery__zoom {
    position: absolute;
    left: 12px;
    bottom: 12px;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .92);
    color: var(--c-text);
    box-shadow: var(--sh-sm);
}
.pf-gallery__zoom svg { width: 17px; height: 17px; }

/* 缩略图条：横向滚动，触控友好 */
.pf-gallery__thumbs {
    display: flex;
    gap: 8px;
    padding: 10px 12px;
    overflow-x: auto;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}
.pf-gallery__thumbs::-webkit-scrollbar { height: 4px; }
.pf-gallery__thumbs::-webkit-scrollbar-thumb { background: var(--c-line-strong); border-radius: 4px; }
.pf-gallery__thumb {
    flex: 0 0 auto;
    width: 58px;
    height: 58px;
    border-radius: var(--r-sm);
    border: 2px solid var(--c-line);
    overflow: hidden;
    background: #fff;
    transition: border-color var(--trans), transform var(--trans);
}
.pf-gallery__thumb img { width: 100%; height: 100%; object-fit: cover; }
.pf-gallery__thumb:hover { border-color: var(--c-line-strong); }
.pf-gallery__thumb.is-active { border-color: var(--c-brand); }

/* 圆点指示器（移动端优先） */
.pf-gallery__dots { display: flex; justify-content: center; gap: 6px; padding: 0 12px 10px; }
.pf-gallery__dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--c-line-strong);
    transition: all var(--trans);
}
.pf-gallery__dot.is-active { width: 18px; border-radius: var(--r-full); background: var(--c-brand); }

/* 图片放大预览 */
.pf-lightbox {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(12, 15, 20, .94);
    animation: pf-fade .2s ease;
}
.pf-lightbox__img { max-width: 96vw; max-height: 88vh; object-fit: contain; }
.pf-lightbox__close {
    position: absolute;
    top: 16px;
    right: 16px;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .16);
    color: #fff;
    font-size: 24px;
    line-height: 1;
}
.pf-lightbox__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .16);
    color: #fff;
}
.pf-lightbox__nav svg { width: 22px; height: 22px; stroke-width: 2.4; }
.pf-lightbox__nav--prev { left: 12px; }
.pf-lightbox__nav--next { right: 12px; }
.pf-lightbox__counter { position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%); color: #fff; font-size: 13px; }

/* ---------- 商品信息 ---------- */
.pf-info { background: var(--c-surface); border-radius: var(--r-md); box-shadow: var(--sh-sm); padding: 16px; }
.pf-info__title { font-size: 17px; line-height: 1.45; margin-bottom: 6px; }
.pf-info__subtitle { font-size: 13px; color: var(--c-text-sub); margin-bottom: 12px; }
.pf-info__price-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px;
    padding: 14px;
    border-radius: var(--r-md);
    background: linear-gradient(135deg, #fff5f6, #fff9f4);
    margin-bottom: 14px;
}
.pf-info__price { color: var(--c-brand); display: flex; align-items: baseline; gap: 3px; }
.pf-info__price .sym { font-size: 15px; font-weight: 600; }
.pf-info__price .val { font-size: 30px; font-weight: 700; line-height: 1; }
.pf-info__price .unit { font-size: 12px; color: var(--c-text-sub); }
.pf-info__market { color: var(--c-text-muted); text-decoration: line-through; font-size: 13px; }

.pf-info__kvs { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; font-size: 13px; margin-bottom: 14px; }
.pf-info__kvs dt { color: var(--c-text-muted); white-space: nowrap; }
.pf-info__kvs dd { margin: 0; }

/* MOQ 规则提示条 —— 全站最关键的提示 */
.pf-moq-note {
    display: flex;
    gap: 10px;
    padding: 12px 14px;
    border-radius: var(--r-md);
    background: var(--c-accent-light);
    border: 1px dashed var(--c-accent);
    margin-bottom: 14px;
}
.pf-moq-note__icon {
    flex-shrink: 0;
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: var(--c-accent);
    color: #fff;
    font-weight: 700;
    font-size: 15px;
}
.pf-moq-note__body { flex: 1; min-width: 0; }
.pf-moq-note__title { font-size: 13px; font-weight: 600; color: #8a3c00; margin-bottom: 3px; }
.pf-moq-note__text { font-size: 12.5px; color: #a04a00; line-height: 1.6; }
.pf-moq-note__chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.pf-moq-chip {
    padding: 3px 10px;
    border-radius: var(--r-full);
    background: #fff;
    border: 1px solid var(--c-accent);
    color: var(--c-accent);
    font-size: 12px;
    font-weight: 600;
    transition: all var(--trans);
}
.pf-moq-chip:hover, .pf-moq-chip.is-active { background: var(--c-accent); color: #fff; }

/* 阶梯价表 */
.pf-tier-table { width: 100%; font-size: 13px; margin-bottom: 14px; border: 1px solid var(--c-line); border-radius: var(--r-md); overflow: hidden; }
.pf-tier-table th, .pf-tier-table td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--c-line); }
.pf-tier-table th { background: var(--c-surface-alt); font-weight: 500; color: var(--c-text-sub); font-size: 12px; }
.pf-tier-table tr:last-child td { border-bottom: none; }
.pf-tier-table tr.is-active td { background: var(--c-brand-light); font-weight: 600; color: var(--c-brand); }
.pf-tier-table__save { color: var(--c-success); font-size: 12px; }

/* 数量选择器 —— 倍数步进 */
.pf-qty { margin-bottom: 14px; }
.pf-qty__row { display: flex; align-items: stretch; gap: 0; max-width: 100%; }
.pf-qty__btn {
    display: grid;
    place-items: center;
    width: 46px;
    min-width: 46px;
    height: 48px;
    border: 1px solid var(--c-line-strong);
    background: var(--c-surface);
    color: var(--c-text);
    font-size: 20px;
    font-weight: 400;
    transition: background var(--trans), border-color var(--trans), color var(--trans);
}
.pf-qty__btn:first-child { border-radius: var(--r-md) 0 0 var(--r-md); }
.pf-qty__btn:last-child { border-radius: 0 var(--r-md) var(--r-md) 0; }
.pf-qty__btn:hover:not([disabled]) { border-color: var(--c-brand); color: var(--c-brand); background: var(--c-brand-light); }
.pf-qty__btn[disabled] { opacity: .4; cursor: not-allowed; }
.pf-qty__input-wrap { position: relative; flex: 1; min-width: 0; }
.pf-qty__input {
    width: 100%;
    height: 48px;
    padding: 0 42px 0 12px;
    border: 1px solid var(--c-line-strong);
    border-left: none;
    border-right: none;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    outline: none;
    background: var(--c-surface);
}
.pf-qty__input:focus { border-color: var(--c-brand); box-shadow: inset 0 0 0 1px var(--c-brand); }
.pf-qty__input.is-invalid { border-color: var(--c-danger); box-shadow: inset 0 0 0 1px var(--c-danger); color: var(--c-danger); }
.pf-qty__suffix {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 13px;
    color: var(--c-text-muted);
    pointer-events: none;
}
.pf-qty__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    margin-top: 8px;
    font-size: 12px;
    color: var(--c-text-muted);
}
.pf-qty__multiple { color: var(--c-accent); font-weight: 600; }
.pf-qty__msg { font-size: 12.5px; margin-top: 8px; padding: 8px 10px; border-radius: var(--r-sm); display: none; }
.pf-qty__msg.is-error { display: block; background: var(--c-danger-bg); color: #9b1c13; }
.pf-qty__msg.is-warn { display: block; background: var(--c-warning-bg); color: #8a4b00; }
.pf-qty__msg.is-ok { display: block; background: var(--c-success-bg); color: #0b6b3d; }

/* 快捷数量 */
.pf-quick-qty { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.pf-quick-qty__btn {
    min-height: 36px;
    padding: 0 14px;
    border: 1px solid var(--c-line-strong);
    border-radius: var(--r-full);
    background: var(--c-surface);
    font-size: 13px;
    transition: all var(--trans);
}
.pf-quick-qty__btn:hover, .pf-quick-qty__btn.is-active { border-color: var(--c-brand); background: var(--c-brand-light); color: var(--c-brand); font-weight: 600; }

/* 金额汇总 */
.pf-summary { border-top: 1px dashed var(--c-line); padding-top: 12px; margin-bottom: 14px; font-size: 13px; }
.pf-summary__row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 5px 0; }
.pf-summary__row--total { font-size: 15px; font-weight: 600; padding-top: 10px; margin-top: 6px; border-top: 1px solid var(--c-line); }
.pf-summary__total { color: var(--c-brand); font-size: 22px; font-weight: 700; }

.pf-info__actions { display: flex; gap: 10px; }
.pf-info__actions .pf-btn { flex: 1; }

.pf-info__trust { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--c-line); font-size: 12px; color: var(--c-text-muted); }
.pf-info__trust span { display: flex; align-items: center; gap: 5px; }
.pf-info__trust .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--c-success); }

/* 详情描述 */
.pf-desc { margin-top: 16px; background: var(--c-surface); border-radius: var(--r-md); box-shadow: var(--sh-sm); overflow: hidden; }
.pf-desc__head { display: flex; gap: 20px; padding: 0 16px; border-bottom: 1px solid var(--c-line); overflow-x: auto; }
.pf-desc__tab {
    position: relative;
    min-height: 48px;
    padding: 0 2px;
    font-size: 14px;
    color: var(--c-text-sub);
    white-space: nowrap;
    transition: color var(--trans);
}
.pf-desc__tab.is-active { color: var(--c-brand); font-weight: 600; }
.pf-desc__tab.is-active::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 2px;
    background: var(--c-brand);
    border-radius: 2px;
}
.pf-desc__panel { padding: 16px; font-size: 14px; line-height: 1.85; color: var(--c-text-sub); white-space: pre-line; word-break: break-word; }
.pf-desc__panel[hidden] { display: none; }
.pf-desc__highlights { display: grid; gap: 10px; }
.pf-desc__highlight { display: flex; gap: 10px; align-items: flex-start; }
.pf-desc__highlight .idx {
    flex-shrink: 0;
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--c-brand-light);
    color: var(--c-brand);
    font-size: 12px;
    font-weight: 700;
}

/* ---------------------------------------------------------------
 | 购物车
 --------------------------------------------------------------- */
.pf-cart-list { display: flex; flex-direction: column; gap: 12px; }
.pf-cart-item {
    display: grid;
    grid-template-columns: 84px 1fr;
    gap: 12px;
    padding: 12px;
    background: var(--c-surface);
    border-radius: var(--r-md);
    box-shadow: var(--sh-sm);
}
.pf-cart-item__media { width: 84px; aspect-ratio: 1/1; border-radius: var(--r-sm); overflow: hidden; background: var(--c-bg); }
.pf-cart-item__media img { width: 100%; height: 100%; object-fit: cover; }
.pf-cart-item__title { font-size: 13.5px; font-weight: 500; line-height: 1.45; margin-bottom: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pf-cart-item__spec { font-size: 12px; color: var(--c-text-muted); margin-bottom: 6px; }
.pf-cart-item__price { color: var(--c-brand); font-size: 15px; font-weight: 700; }
.pf-cart-item__price small { font-size: 11px; font-weight: 400; color: var(--c-text-muted); }
.pf-cart-item__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; }
.pf-cart-item__qty { display: flex; align-items: stretch; }
.pf-cart-item__qty button {
    width: 34px;
    height: 34px;
    min-width: 34px;
    border: 1px solid var(--c-line-strong);
    background: var(--c-surface);
    font-size: 17px;
    display: grid;
    place-items: center;
    transition: all var(--trans);
}
.pf-cart-item__qty button:first-child { border-radius: var(--r-sm) 0 0 var(--r-sm); }
.pf-cart-item__qty button:last-child { border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.pf-cart-item__qty button:hover:not([disabled]) { border-color: var(--c-brand); color: var(--c-brand); background: var(--c-brand-light); }
.pf-cart-item__qty button[disabled] { opacity: .38; cursor: not-allowed; }
.pf-cart-item__qty input {
    width: 64px;
    height: 34px;
    border: 1px solid var(--c-line-strong);
    border-left: none;
    border-right: none;
    text-align: center;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    outline: none;
}
.pf-cart-item__qty input.is-invalid { border-color: var(--c-danger); color: var(--c-danger); }
.pf-cart-item__sub { font-weight: 700; color: var(--c-text); }
.pf-cart-item__remove { font-size: 12px; color: var(--c-text-muted); padding: 6px; }
.pf-cart-item__remove:hover { color: var(--c-danger); }
.pf-cart-item__issue { grid-column: 1 / -1; font-size: 12px; color: var(--c-danger); background: var(--c-danger-bg); padding: 7px 10px; border-radius: var(--r-sm); }

/* 结算汇总条 */
.pf-checkout-bar {
    position: sticky;
    bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px));
    z-index: 40;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    margin-top: 16px;
    background: var(--c-surface);
    border-radius: var(--r-md);
    box-shadow: var(--sh-md);
}
.pf-checkout-bar__info { flex: 1; min-width: 0; font-size: 12px; color: var(--c-text-muted); }
.pf-checkout-bar__total { color: var(--c-brand); font-size: 21px; font-weight: 700; }
.pf-checkout-bar__total small { font-size: 12px; font-weight: 400; color: var(--c-text-sub); }

/* 地址卡片 */
.pf-addr { padding: 12px; border: 1px solid var(--c-line); border-radius: var(--r-md); margin-bottom: 10px; transition: border-color var(--trans), background var(--trans); }
.pf-addr:hover { border-color: var(--c-line-strong); }
.pf-addr.is-default { border-color: var(--c-brand); background: var(--c-brand-light); }
.pf-addr__head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14px; margin-bottom: 5px; }
.pf-addr__body { font-size: 13px; color: var(--c-text-sub); line-height: 1.7; }
.pf-addr__actions { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.pf-addr__actions .pf-btn { min-height: 32px; padding: 0 10px; font-size: 12.5px; }

/* 银行信息框（线下支付） */
.pf-bank-box { background: var(--c-surface-alt); border: 1px solid var(--c-line); border-radius: var(--r-md); overflow: hidden; }
.pf-bank-box__row { display: grid; grid-template-columns: 88px 1fr; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--c-line); font-size: 13.5px; align-items: baseline; }
.pf-bank-box__row:last-child { border-bottom: none; }
.pf-bank-box__k { color: var(--c-text-muted); font-size: 13px; }
.pf-bank-box__v { font-weight: 500; word-break: break-all; }
.pf-bank-box__v--mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .5px; font-size: 15px; font-weight: 600; }
.pf-bank-box__v--amount { color: var(--c-brand); font-size: 20px; font-weight: 700; }

/* 订单结果页 */
.pf-result { max-width: 560px; margin: 0 auto; text-align: center; padding: 30px 0; }
.pf-result__icon { display: grid; place-items: center; width: 76px; height: 76px; margin: 0 auto 18px; border-radius: 50%; font-size: 38px; }
.pf-result__icon--success { background: var(--c-success-bg); color: var(--c-success); }
.pf-result__icon--warning { background: var(--c-warning-bg); color: var(--c-warning); }
.pf-result__icon--info { background: var(--c-info-bg); color: var(--c-info); }
.pf-result__title { font-size: 21px; margin-bottom: 8px; }
.pf-result__sub { color: var(--c-text-muted); font-size: 13.5px; margin-bottom: 22px; line-height: 1.8; }
.pf-result__actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }

/* 客服 / 步骤列表 */
.pf-steps { display: flex; flex-direction: column; gap: 14px; }
.pf-step { display: flex; gap: 12px; align-items: flex-start; }
.pf-step__idx { flex-shrink: 0; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--c-brand-light); color: var(--c-brand); font-size: 13px; font-weight: 700; }
.pf-step__body { flex: 1; font-size: 13.5px; line-height: 1.75; }
.pf-step__body strong { display: block; margin-bottom: 2px; }

/* ---------------------------------------------------------------
 | 结算 / 支付
 --------------------------------------------------------------- */
.pf-pay-list { display: flex; flex-direction: column; gap: 10px; }
.pf-pay-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border: 2px solid var(--c-line);
    border-radius: var(--r-md);
    background: var(--c-surface);
    cursor: pointer;
    transition: border-color var(--trans), background var(--trans);
}
.pf-pay-option:hover:not(.is-disabled) { border-color: var(--c-line-strong); }
.pf-pay-option.is-selected { border-color: var(--c-brand); background: var(--c-brand-light); }
.pf-pay-option.is-disabled { opacity: .55; cursor: not-allowed; background: var(--c-surface-alt); }
.pf-pay-option input { position: absolute; opacity: 0; pointer-events: none; }
.pf-pay-option__icon {
    flex-shrink: 0;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: var(--r-sm);
    color: #fff;
    font-size: 17px;
    font-weight: 700;
}
.pf-pay-option__icon--balance { background: linear-gradient(135deg, #f59e0b, #d97706); }
.pf-pay-option__icon--offline { background: linear-gradient(135deg, #475569, #1e293b); }
.pf-pay-option__icon--wechat { background: linear-gradient(135deg, #22c55e, #15803d); }
.pf-pay-option__icon--alipay { background: linear-gradient(135deg, #1677ff, #0958d9); }
.pf-pay-option__body { flex: 1; min-width: 0; }
.pf-pay-option__title { font-size: 14.5px; font-weight: 600; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pf-pay-option__desc { font-size: 12.5px; color: var(--c-text-muted); margin-top: 2px; }
.pf-pay-option__check {
    flex-shrink: 0;
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid var(--c-line-strong);
    color: transparent;
    font-size: 13px;
    transition: all var(--trans);
}
.pf-pay-option.is-selected .pf-pay-option__check { border-color: var(--c-brand); background: var(--c-brand); color: #fff; }

/* 二维码容器 */
.pf-qrcode-box { text-align: center; padding: 24px 16px; }
.pf-qrcode-box img, .pf-qrcode-box canvas { display: inline-block; width: 200px; height: 200px; border: 1px solid var(--c-line); border-radius: var(--r-md); background: #fff; padding: 8px; }
.pf-qrcode-box__tip { margin-top: 14px; font-size: 13px; color: var(--c-text-sub); }
.pf-qrcode-box__amount { font-size: 26px; font-weight: 700; color: var(--c-brand); margin: 10px 0; }

/* 订单商品行 */
.pf-order-line { display: grid; grid-template-columns: 66px 1fr auto; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--c-line); align-items: center; }
.pf-order-line:last-child { border-bottom: none; }
.pf-order-line__media { width: 66px; aspect-ratio: 1/1; border-radius: var(--r-sm); overflow: hidden; background: var(--c-bg); }
.pf-order-line__media img { width: 100%; height: 100%; object-fit: cover; }
.pf-order-line__title { font-size: 13.5px; line-height: 1.45; margin-bottom: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pf-order-line__meta { font-size: 12px; color: var(--c-text-muted); }
.pf-order-line__amount { text-align: right; font-weight: 600; white-space: nowrap; }
.pf-order-line__qty { font-size: 12.5px; color: var(--c-text-sub); font-weight: 400; }

/* ---------------------------------------------------------------
 | 订单列表 / 详情
 --------------------------------------------------------------- */
.pf-tabs { display: flex; gap: 4px; overflow-x: auto; padding: 0 0 12px; scrollbar-width: none; }
.pf-tabs::-webkit-scrollbar { display: none; }
.pf-tabs__item {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 5px;
    min-height: 38px;
    padding: 0 15px;
    border-radius: var(--r-full);
    font-size: 13px;
    color: var(--c-text-sub);
    background: var(--c-surface);
    border: 1px solid var(--c-line);
    transition: all var(--trans);
}
.pf-tabs__item:hover { border-color: var(--c-brand); color: var(--c-brand); }
.pf-tabs__item.is-active { background: var(--c-brand); border-color: var(--c-brand); color: #fff; font-weight: 500; }
.pf-tabs__count { font-size: 11px; opacity: .75; }

.pf-order-card { background: var(--c-surface); border-radius: var(--r-md); box-shadow: var(--sh-sm); margin-bottom: 12px; overflow: hidden; }
.pf-order-card__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 12px 14px;
    background: var(--c-surface-alt);
    border-bottom: 1px solid var(--c-line);
    font-size: 12.5px;
}
.pf-order-card__no { font-weight: 600; font-variant-numeric: tabular-nums; }
.pf-order-card__body { padding: 4px 14px; }
.pf-order-card__foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    border-top: 1px solid var(--c-line);
    background: var(--c-surface-alt);
}
.pf-order-card__total { font-size: 14px; }
.pf-order-card__total strong { color: var(--c-brand); font-size: 18px; }
.pf-order-card__actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* 订单详情信息网格 */
.pf-kv-grid { display: grid; grid-template-columns: 1fr; gap: 0; font-size: 13px; }
.pf-kv-grid__row { display: grid; grid-template-columns: 96px 1fr; gap: 10px; padding: 9px 0; border-bottom: 1px dashed var(--c-line); }
.pf-kv-grid__row:last-child { border-bottom: none; }
.pf-kv-grid__k { color: var(--c-text-muted); }
.pf-kv-grid__v { word-break: break-word; }

/* 时间线 */
.pf-timeline { display: flex; flex-direction: column; gap: 0; }
.pf-timeline__item { display: grid; grid-template-columns: 24px 1fr; gap: 12px; padding-bottom: 16px; position: relative; }
.pf-timeline__item:last-child { padding-bottom: 0; }
.pf-timeline__dot { display: grid; place-items: center; }
.pf-timeline__dot span { width: 10px; height: 10px; border-radius: 50%; background: var(--c-line-strong); }
.pf-timeline__item.is-done .pf-timeline__dot span { background: var(--c-success); box-shadow: 0 0 0 4px var(--c-success-bg); }
.pf-timeline__item.is-current .pf-timeline__dot span { background: var(--c-brand); box-shadow: 0 0 0 4px var(--c-brand-light); }
.pf-timeline__item:not(:last-child) .pf-timeline__dot::after {
    content: '';
    position: absolute;
    top: 22px;
    left: 11px;
    width: 2px;
    height: calc(100% - 12px);
    background: var(--c-line);
}
.pf-timeline__label { font-size: 13.5px; font-weight: 500; }
.pf-timeline__time { font-size: 12px; color: var(--c-text-muted); margin-top: 2px; }

/* ---------------------------------------------------------------
 | 表单页
 --------------------------------------------------------------- */
.pf-form-narrow { max-width: 520px; margin: 0 auto; }
/* ---------- 登录 / 注册页 ----------
 | 居中用 margin:auto 而不是 place-items:center：
 | 后者在内容比视口高时（注册页字段多、或手机横屏）会把卡片顶部顶出屏幕，
 | 而且会把网格项缩成「按内容宽度」，卡片被挤窄、输入框里的占位文字被截断。
 */
.pf-auth-wrap { display: flex; min-height: 100vh; padding: 24px 16px; background: linear-gradient(160deg, #fff5f6 0%, #f5f6f8 46%, #f0f4fa 100%); }
.pf-auth-card { width: 100%; max-width: 420px; margin: auto; background: var(--c-surface); border-radius: var(--r-lg); box-shadow: var(--sh-lg); padding: 28px 22px; }
.pf-auth-card__brand { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-bottom: 22px; }
.pf-auth-card__mark { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 16px; background: linear-gradient(135deg, var(--c-brand), var(--c-accent)); color: #fff; font-size: 25px; font-weight: 700; }
.pf-auth-card__title { font-size: 20px; }
.pf-auth-card__sub { font-size: 13px; color: var(--c-text-muted); }
.pf-auth-card__foot { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--c-line); text-align: center; font-size: 13px; color: var(--c-text-muted); }
.pf-auth-card__foot a { color: var(--c-brand); font-weight: 500; }
.pf-auth-side { display: none; }

/* ---------------------------------------------------------------
 | 后台
 --------------------------------------------------------------- */
.pf-admin { background: var(--c-bg); }
.pf-admin__layout { display: grid; grid-template-columns: 1fr; min-height: 100vh; }
.pf-admin__sidebar {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 90;
    width: 232px;
    height: 100%;
    overflow-y: auto;
    background: #12161f;
    color: #b9c0cd;
    transform: translateX(-102%);
    transition: transform .28s cubic-bezier(.4, 0, .2, 1);
}
.pf-admin__sidebar.is-open { transform: translateX(0); }
.pf-admin__brand { display: flex; align-items: center; gap: 10px; height: 58px; padding: 0 18px; color: #fff; font-weight: 600; border-bottom: 1px solid rgba(255,255,255,.08); }
.pf-admin__brand span.mark { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: linear-gradient(135deg, var(--c-brand), var(--c-accent)); font-size: 14px; }
.pf-admin__nav { padding: 12px 0 32px; }
.pf-admin__nav-group { padding: 14px 18px 6px; font-size: 11px; letter-spacing: .6px; color: #5d6675; text-transform: uppercase; }
.pf-admin__nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    padding: 0 18px;
    font-size: 13.5px;
    border-left: 3px solid transparent;
    transition: all var(--trans);
}
.pf-admin__nav-link:hover { background: rgba(255,255,255,.05); color: #fff; }
.pf-admin__nav-link.is-active { background: rgba(200,16,46,.16); border-left-color: var(--c-brand); color: #fff; font-weight: 500; }
.pf-admin__nav-link .pf-nav__count { background: rgba(255,255,255,.1); color: #cbd2de; }
.pf-admin__nav-link .cnt { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--r-full); background: var(--c-brand); color: #fff; font-size: 11px; line-height: 20px; text-align: center; }

.pf-admin__main { min-width: 0; display: flex; flex-direction: column; }
.pf-admin__topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 12px;
    height: 58px;
    padding: 0 16px;
    background: var(--c-surface);
    border-bottom: 1px solid var(--c-line);
}
.pf-admin__content { padding: 16px; flex: 1; }
.pf-admin__burger { display: grid; place-items: center; width: 40px; height: 40px; border-radius: var(--r-sm); }
.pf-admin__burger:hover { background: var(--c-bg); }
.pf-admin__burger svg { width: 22px; height: 22px; }
.pf-admin__title { font-size: 16px; font-weight: 600; }
.pf-admin__user { margin-left: auto; display: flex; align-items: center; gap: 10px; font-size: 13px; }
.pf-admin__mask { position: fixed; inset: 0; z-index: 80; background: rgba(16,24,40,.5); }

/* 后台统计卡 */
.pf-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 16px; }
.pf-stat { padding: 14px; background: var(--c-surface); border-radius: var(--r-md); box-shadow: var(--sh-sm); }
.pf-stat__label { font-size: 12px; color: var(--c-text-muted); margin-bottom: 6px; }
.pf-stat__value { font-size: 22px; font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; }
.pf-stat__value small { font-size: 12px; font-weight: 400; color: var(--c-text-muted); }
.pf-stat--brand .pf-stat__value { color: var(--c-brand); }
.pf-stat--success .pf-stat__value { color: var(--c-success); }
.pf-stat--warning .pf-stat__value { color: var(--c-warning); }

/* 弹层 */
.pf-modal { position: fixed; inset: 0; z-index: 200; display: flex; align-items: flex-start; justify-content: center; overflow-y: auto; padding: 20px 12px; background: rgba(16,24,40,.5); backdrop-filter: blur(2px); }
.pf-modal[hidden] { display: none; }
.pf-modal__panel { width: 100%; max-width: 560px; margin: auto; background: var(--c-surface); border-radius: var(--r-lg); box-shadow: var(--sh-lg); overflow: hidden; animation: pf-slide-in .22s ease; }
.pf-modal__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--c-line); }
.pf-modal__body { padding: 16px; }

/* 后台底部操作条 */
.pf-admin-actionbar {
    position: sticky;
    bottom: 0;
    z-index: 30;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    padding: 12px 0;
    margin-top: 8px;
    background: linear-gradient(180deg, rgba(245,246,248,0), var(--c-bg) 40%);
}

/* 后台两栏自适应网格 */
.pf-admin-grid { display: grid; grid-template-columns: 1fr; gap: 16px; margin-bottom: 16px; }

/* 通道健康行 */
.pf-health-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px dashed var(--c-line); }
.pf-health-row:last-child { border-bottom: none; }
.pf-health-row__idx { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--c-bg); color: var(--c-text-muted); font-size: 11px; font-weight: 700; }
.pf-health-row__name { flex: 1; font-size: 13.5px; }

/* 低库存行 */
.pf-lowstock-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--c-line); font-size: 13px; }
.pf-lowstock-row:last-child { border-bottom: none; }
.pf-lowstock-row a:hover { color: var(--c-brand); }

/* 规格提示 */
.pf-help { font-size: 12px; color: var(--c-text-muted); line-height: 1.65; }
.pf-help code { background: var(--c-bg); padding: 1px 5px; border-radius: 4px; font-size: 11.5px; }

/* ---------------------------------------------------------------
 | 后台表格 → 移动端卡片化
 --------------------------------------------------------------- */
.pf-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.pf-table { width: 100%; min-width: 640px; font-size: 13px; background: var(--c-surface); }
.pf-table th, .pf-table td { padding: 11px 12px; text-align: left; border-bottom: 1px solid var(--c-line); vertical-align: middle; }
.pf-table th { background: var(--c-surface-alt); font-weight: 500; font-size: 12px; color: var(--c-text-sub); white-space: nowrap; }
.pf-table tbody tr:hover { background: var(--c-surface-alt); }
.pf-table td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.pf-table__thumb { width: 44px; height: 44px; border-radius: var(--r-sm); object-fit: cover; background: var(--c-bg); }
.pf-table__actions { display: flex; flex-wrap: wrap; gap: 6px; }

.pf-filterbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; padding: 14px; background: var(--c-surface); border-radius: var(--r-md); box-shadow: var(--sh-sm); margin-bottom: 16px; }
.pf-filterbar .pf-field { margin-bottom: 0; min-width: 140px; flex: 1 1 140px; }
.pf-filterbar__actions { display: flex; gap: 8px; }

/* 支付通道卡片 */
.pf-gateway { background: var(--c-surface); border-radius: var(--r-md); box-shadow: var(--sh-sm); margin-bottom: 14px; overflow: hidden; }
.pf-gateway__head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 14px; border-bottom: 1px solid var(--c-line); }
.pf-gateway__icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: var(--r-sm); color: #fff; font-size: 17px; font-weight: 700; flex-shrink: 0; }
.pf-gateway__title { font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pf-gateway__desc { font-size: 12.5px; color: var(--c-text-muted); margin-top: 2px; }
.pf-gateway__switch { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.pf-gateway__body { padding: 14px; }
.pf-gateway__grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.pf-index-badge { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--c-text); color: #fff; font-size: 11px; font-weight: 700; }

/* 开关 */
.pf-switch { position: relative; display: inline-block; width: 46px; height: 26px; flex-shrink: 0; }
.pf-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.pf-switch__track { position: absolute; inset: 0; border-radius: var(--r-full); background: var(--c-line-strong); transition: background var(--trans); pointer-events: none; }
.pf-switch__track::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    box-shadow: var(--sh-sm);
    transition: transform var(--trans);
}
.pf-switch input:checked + .pf-switch__track { background: var(--c-success); }
.pf-switch input:checked + .pf-switch__track::after { transform: translateX(20px); }
.pf-switch input:focus-visible + .pf-switch__track { box-shadow: 0 0 0 3px rgba(200,16,46,.16); }

/* 迷你趋势图 */
.pf-spark { display: flex; align-items: flex-end; gap: 4px; height: 92px; padding: 8px 0; }
.pf-spark__bar { flex: 1; min-height: 3px; background: linear-gradient(180deg, var(--c-brand), #f8a9b6); border-radius: 3px 3px 0 0; position: relative; transition: opacity var(--trans); }
.pf-spark__bar:hover { opacity: .78; }
.pf-spark__labels { display: flex; gap: 4px; font-size: 10px; color: var(--c-text-muted); }
.pf-spark__labels span { flex: 1; text-align: center; }

/* 分页 */
.pf-pager { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; margin-top: 22px; }
.pf-pager__item {
    display: grid;
    place-items: center;
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    border-radius: var(--r-sm);
    border: 1px solid var(--c-line);
    background: var(--c-surface);
    font-size: 13px;
    transition: all var(--trans);
}
.pf-pager__item:hover { border-color: var(--c-brand); color: var(--c-brand); }
.pf-pager__item.is-active { background: var(--c-brand); border-color: var(--c-brand); color: #fff; font-weight: 600; }
.pf-pager__item.is-disabled { opacity: .45; pointer-events: none; }
.pf-pager__info { width: 100%; text-align: center; font-size: 12px; color: var(--c-text-muted); margin-top: 8px; }

/* ---------------------------------------------------------------
 | 页脚 + 底部导航
 --------------------------------------------------------------- */
.pf-footer { background: #12161f; color: #99a1b0; padding: 28px 0 0; margin-top: 32px; font-size: 13px; }
.pf-footer__grid { display: grid; grid-template-columns: 1fr; gap: 22px; padding-bottom: 24px; }
.pf-footer__col h4 { color: #fff; font-size: 14px; margin-bottom: 10px; }
.pf-footer__desc { line-height: 1.75; font-size: 12.5px; }
.pf-footer__col ul { display: flex; flex-direction: column; gap: 7px; font-size: 12.5px; }
.pf-footer__col a:hover { color: #fff; }
.pf-footer__bottom { border-top: 1px solid rgba(255,255,255,.08); padding: 14px 0; font-size: 12px; }
.pf-footer__bottom .pf-container { display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; }
.pf-footer__tech { color: #5d6675; }

.pf-tabbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 70;
    display: flex;
    height: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--c-line);
}
.pf-tabbar__item {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    font-size: 11px;
    color: var(--c-text-muted);
    transition: color var(--trans);
}
.pf-tabbar__item svg { width: 21px; height: 21px; }
.pf-tabbar__item.is-active { color: var(--c-brand); }

/* ---------------------------------------------------------------
 | 加载态
 --------------------------------------------------------------- */
.pf-loading { position: relative; pointer-events: none; opacity: .6; }
.pf-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: pf-spin .7s linear infinite;
    vertical-align: -2px;
}
@keyframes pf-spin { to { transform: rotate(360deg); } }

/* 骨架屏 */
.pf-skeleton { background: linear-gradient(90deg, #eef0f4 25%, #f7f8fa 50%, #eef0f4 75%); background-size: 200% 100%; animation: pf-shimmer 1.4s infinite; border-radius: var(--r-sm); }
@keyframes pf-shimmer { from { background-position: 200% 0 } to { background-position: -200% 0 } }

/* ---------------------------------------------------------------
 | 服务性快速导航侧栏（文章页 / 说明页）
 | 这些页面正文偏短，单栏居中时宽屏两侧大片留白；
 | 补一列服务导航后整页更饱满，访客也随时能去分类、热卖与会员中心。
 --------------------------------------------------------------- */
.pf-service {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    max-width: 880px;   /* 未转两列时，与原来的阅读宽度一致 */
    margin: 0 auto;
}
.pf-service__main { min-width: 0; order: 1; }   /* 窄屏：正文优先 */
.pf-service__side { min-width: 0; order: 2; }   /* 侧栏随后 */

.pf-aside { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }

/* 平板区间：侧栏横排两列，免得卡片被拉成一条。
   写成区间而不是「≥640」，是为了与下面的两列断点互不重叠 ——
   两条规则同时命中时只能靠源码先后决定胜负，很容易改错。 */
@media (min-width: 640px) and (max-width: 1199.98px) {
    .pf-aside { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.pf-aside__card { background: var(--c-surface); border-radius: var(--r-md); box-shadow: var(--sh-sm); overflow: hidden; }
.pf-aside__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 12px 14px;
    font-size: 14px;
    font-weight: 700;
    color: var(--c-text);
    border-bottom: 1px solid var(--c-line);
}
.pf-aside__head a { font-size: 12.5px; font-weight: 500; color: var(--c-text-muted); transition: color var(--trans); }
.pf-aside__head a:hover { color: var(--c-brand); }

.pf-aside__nav { display: flex; flex-direction: column; gap: 2px; padding: 6px; }
.pf-aside__arrow { color: var(--c-line-strong); font-weight: 400; transition: color var(--trans), transform var(--trans); }
.pf-side-link:hover .pf-aside__arrow { color: var(--c-brand); transform: translateX(2px); }
.pf-aside__badge {
    display: inline-block;
    min-width: 18px;
    margin-left: 6px;
    padding: 0 5px;
    border-radius: var(--r-full);
    background: var(--c-brand);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
}

/* 已登录：小档案 */
.pf-aside__me { display: flex; align-items: center; gap: 10px; padding: 12px 14px 4px; }
.pf-aside__me-avatar {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--c-brand-light);
    font-size: 16px;
}
.pf-aside__me-info { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pf-aside__me-name { font-size: 14px; font-weight: 600; color: var(--c-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-aside__me-sub { font-size: 12px; color: var(--c-text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 未登录：引导 */
.pf-aside__hint { margin: 0; padding: 12px 14px 0; font-size: 12.5px; line-height: 1.7; color: var(--c-text-muted); }
.pf-aside__btns { display: flex; flex-direction: column; gap: 8px; padding: 10px 14px 6px; }

/* 产品分类 */
.pf-aside__cat {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 38px;
    padding: 0 10px;
    border-radius: var(--r-sm);
    font-size: 13.5px;
    color: var(--c-text-sub);
    transition: background var(--trans), color var(--trans);
}
.pf-aside__cat:hover { background: var(--c-bg); color: var(--c-brand); }
.pf-aside__cat-name { display: flex; align-items: center; gap: 7px; min-width: 0; }
.pf-aside__cat-img { flex: 0 0 20px; width: 20px; height: 20px; border-radius: 4px; object-fit: cover; }
.pf-aside__cat-icon { font-size: 14px; line-height: 1; }
.pf-aside__cat-count { flex: 0 0 auto; font-size: 12px; color: var(--c-text-muted); }

/* 热卖商品 */
.pf-aside__hots { display: flex; flex-direction: column; gap: 2px; padding: 6px; }
.pf-aside__hot { display: flex; gap: 10px; padding: 6px; border-radius: var(--r-sm); transition: background var(--trans); }
.pf-aside__hot:hover { background: var(--c-bg); }
.pf-aside__hot-img { flex: 0 0 54px; width: 54px; height: 54px; border-radius: var(--r-sm); overflow: hidden; background: var(--c-bg); }
.pf-aside__hot-img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pf-aside__hot-body { min-width: 0; display: flex; flex-direction: column; gap: 3px; justify-content: center; }
.pf-aside__hot-title {
    font-size: 12.5px;
    line-height: 1.45;
    color: var(--c-text-sub);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color var(--trans);
}
.pf-aside__hot:hover .pf-aside__hot-title { color: var(--c-brand); }
.pf-aside__hot-price { font-size: 13.5px; font-weight: 700; color: var(--c-brand); }
.pf-aside__hot-price .sym { font-size: 11px; }
.pf-aside__hot-price .unit { font-size: 11px; font-weight: 400; color: var(--c-text-muted); }
.pf-aside__hot-moq { font-size: 11.5px; color: var(--c-text-muted); }

/* 采购帮助 */
.pf-aside__contact { display: flex; flex-direction: column; gap: 5px; padding: 12px 14px 8px; }
.pf-aside__contact-phone { font-size: 17px; font-weight: 700; color: var(--c-brand); letter-spacing: .4px; }
.pf-aside__contact-line { font-size: 12.5px; color: var(--c-text-muted); line-height: 1.6; }

/* =====================================================================
   响应式断点
   ===================================================================== */

/* ---------- ≥480px：大屏手机 ---------- */
@media (min-width: 480px) {
    :root { --sp: 18px; }
    .pf-grid { gap: 14px; }
    .pf-product__title { font-size: 14px; }
    .pf-product__price .val { font-size: 21px; }
    .pf-info__price .val { font-size: 34px; }
    .pf-stats { grid-template-columns: repeat(2, 1fr); }
    .pf-topbar__item--hide-sm { display: inline; }
    .pf-cart-item { grid-template-columns: 100px 1fr; }
    .pf-cart-item__media { width: 100px; }
    .pf-gallery__thumb { width: 66px; height: 66px; }
}

/* ---------- ≥640px：小平板 ---------- */
@media (min-width: 640px) {
    .pf-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .pf-kv-grid { grid-template-columns: repeat(2, 1fr); gap: 0 24px; }
    .pf-gateway__grid { grid-template-columns: repeat(2, 1fr); }
    .pf-stats { grid-template-columns: repeat(3, 1fr); }
    .pf-order-line { grid-template-columns: 76px 1fr auto; }
    .pf-order-line__media { width: 76px; }
    .pf-footer__grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- ≥768px：平板竖屏 ---------- */
@media (min-width: 768px) {
    body { font-size: 14.5px; padding-bottom: 0; }
    :root { --sp: 22px; --header-h: 68px; }

    /* 平板：主导航横向展开 */
    .pf-nav {
        position: static;
        width: auto;
        max-width: none;
        height: auto;
        transform: none;
        box-shadow: none;
        background: transparent;
        border-top: 1px solid var(--c-line);
        overflow: visible;
    }
    .pf-nav__inner { flex-direction: row; padding: 0; gap: 2px; overflow-x: auto; scrollbar-width: none; }
    .pf-nav__inner::-webkit-scrollbar { display: none; }
    .pf-nav__link { min-height: 46px; padding: 0 14px; font-size: 14px; border-bottom: 2px solid transparent; white-space: nowrap; }
    .pf-nav__link:hover, .pf-nav__link.is-active { background: transparent; border-bottom-color: var(--c-brand); }
    .pf-nav__search, .pf-burger, .pf-drawer-mask, .pf-tabbar { display: none !important; }

    .pf-hide-sm { display: inline-flex !important; }
    .pf-search--header { display: flex; flex: 1; max-width: 420px; margin: 0 14px; }
    .pf-logo__text small { display: block; }
    .pf-cart-btn__label { display: inline; font-size: 13px; }
    .pf-cart-btn { padding: 0 14px; }
    .pf-badge { position: static; }
    .pf-badge--tab { display: none; }

    /* 详情页两列 */
    .pf-detail { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
    .pf-detail__media { position: sticky; top: calc(var(--header-h) + 46px + 16px); }
    .pf-gallery__arrow { opacity: 1; }
    .pf-info__title { font-size: 20px; }
    .pf-info__price .val { font-size: 38px; }

    .pf-page-head__title { font-size: 22px; }

    /* 结算页两列 */
    .pf-checkout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
    .pf-checkout__side { position: sticky; top: calc(var(--header-h) + 46px + 16px); }
    .pf-checkout-bar { position: static; flex-direction: column; align-items: stretch; gap: 12px; }

    .pf-form-narrow { max-width: 560px; }

    /* 列表页侧栏 */
    .pf-listing { grid-template-columns: 236px minmax(0, 1fr); gap: 20px; align-items: start; }
    .pf-listing__side { display: block; position: sticky; top: calc(var(--header-h) + 46px + 16px); }
    .pf-cat-scroll { display: none; }
    .pf-cat-grid { grid-template-columns: repeat(3, 1fr); }
    .pf-hero__inner { padding: 44px 0 40px; }
    .pf-hero__title { font-size: 34px; }
    .pf-hero__sub { font-size: 15px; }
    .pf-hero__stat strong { font-size: 30px; }
    .pf-section__title { font-size: 20px; }
    .pf-pay-grid { grid-template-columns: repeat(4, 1fr); }
    .pf-rule-banner { padding: 20px 24px; }

    .pf-admin__sidebar { transform: none; }
    .pf-admin__main { margin-left: 232px; }
    .pf-admin__mask { display: none !important; }
    .pf-admin__burger { display: none; }
    .pf-admin__content { padding: 20px; }
    .pf-stats { grid-template-columns: repeat(4, 1fr); gap: 14px; }
    .pf-admin-grid { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 18px; }

    .pf-footer__grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
    .pf-footer { margin-top: 44px; }
    .pf-table { min-width: 0; }
}

/* ---------- ≥1024px：平板横屏 / 小笔记本 ---------- */
@media (min-width: 1024px) {
    body { padding-bottom: 0; }
    .pf-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
    .pf-detail { grid-template-columns: minmax(0, 440px) minmax(0, 1fr); gap: 24px; }
    .pf-checkout { grid-template-columns: minmax(0, 1fr) 380px; gap: 20px; }
    .pf-info { padding: 20px; }
    .pf-main { padding: 20px 0 48px; }
    .pf-order-line { grid-template-columns: 84px 1fr auto; }
    .pf-order-line__media { width: 84px; }
    .pf-gateway__grid { grid-template-columns: repeat(3, 1fr); }
    /* 两栏都铺满各自那一半：默认的 place-items:center 会把左侧品牌区
       缩成一个居中的小方块，和右边的表单各浮各的，看起来就是「错位」。
       注意要写 display:grid —— 基础规则是 flex，
       只写 grid-template-columns 对 flex 容器是无效的（两栏不会生效）。 */
    .pf-auth-wrap { display: grid; grid-template-columns: 1fr 1fr; padding: 0; place-items: stretch; }
    .pf-auth-side {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 18px;
        padding: 60px;
        background: linear-gradient(150deg, #c8102e, #ff6a00);
        color: #fff;
    }
    .pf-auth-side h2 { font-size: 30px; line-height: 1.35; }
    .pf-auth-side p { opacity: .9; font-size: 15px; line-height: 1.8; }
    .pf-auth-side ul { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; font-size: 14px; }
    .pf-auth-side li { display: flex; gap: 8px; align-items: flex-start; }
    .pf-auth-card { width: 100%; max-width: 400px; padding: 34px 26px; }
    /* 用 flex + margin:auto：卡片在右半栏居中，且内容高于视口时
       不会把顶部切掉（外面是 min-height，会跟着长高） */
    .pf-auth-wrap .pf-auth-inner { display: flex; min-height: 100vh; padding: 40px 24px; }
}

/* ---------- ≥1200px：文章页 / 说明页转为两列（左服务导航 + 右正文） ----------
 | 断点定在 1200 而不是 768：
 | 若从 768 就分两列，834px 的平板上正文只剩 500 多像素，
 | 比原来的单栏 840 还窄，阅读反而变差。
 | 1200 时：容器 1156 = 236 侧栏 + 22 间隔 + 约 898 正文，与原来相当。
 ------------------------------------------------------------------------- */
@media (min-width: 1200px) {
    .pf-service {
        grid-template-columns: 236px minmax(0, 1fr);
        gap: 22px;
        max-width: 1160px;   /* 236 侧栏 + 22 间隔 + 约 900 正文 */
        align-items: start;
    }
    .pf-service__main, .pf-service__side { order: 0; }
    .pf-service__side {
        position: sticky;
        top: calc(var(--header-h) + 46px + 16px);
        /* 侧栏比视口高时改为内部滚动，否则底部内容永远够不到 */
        max-height: calc(100vh - var(--header-h) - 78px);
        overflow-y: auto;
        scrollbar-width: thin;
        padding-right: 2px;
    }
}

/* ---------- ≥1280px：桌面宽屏 ---------- */
@media (min-width: 1280px) {
    :root { --container: 1320px; }
    .pf-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .pf-product__title { font-size: 14.5px; }
    .pf-stats { grid-template-columns: repeat(5, 1fr); }
}

/* ---------- 打印 ---------- */
@media print {
    .pf-header, .pf-footer, .pf-tabbar, .pf-topbar, .pf-checkout-bar, .pf-info__actions { display: none !important; }
    body { background: #fff; padding: 0; }
    .pf-card, .pf-info { box-shadow: none; border: 1px solid #ddd; }
}

/* ---------- 偏好减弱动效 ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
    html { scroll-behavior: auto; }
}

/* ---------- 深色模式（跟随系统） ---------- */
@media (prefers-color-scheme: dark) {
    :root {
        --c-text: #e8eaed;
        --c-text-sub: #b8bec9;
        --c-text-muted: #858c99;
        --c-line: #2b303a;
        --c-line-strong: #3a414e;
        --c-bg: #14171d;
        --c-surface: #1c2028;
        --c-surface-alt: #232830;
        --c-brand-light: #3a1a20;
        --c-accent-light: #3a2a18;
        --c-success-bg: #14301f;
        --c-warning-bg: #33260f;
        --c-danger-bg: #3a1a18;
        --c-info-bg: #152a44;
    }
    .pf-topbar { background: #0e1116; }
    .pf-footer { background: #0e1116; }
    .pf-tabbar { background: rgba(28, 32, 40, .96); }
    .pf-info__price-row { background: linear-gradient(135deg, #2a1a1e, #2a2118); }
    .pf-gallery__slide img { background: var(--c-surface); }
    .pf-gallery__thumb { background: var(--c-surface); }
    .pf-qrcode-box img, .pf-qrcode-box canvas { background: #fff; }
    .pf-admin__sidebar { background: #0e1116; }
}

/* =====================================================================
   文章资讯与富文本内容（内容管理）
   ===================================================================== */

/* ---------- 文章列表卡片 ---------- */
.pf-article-list { display: grid; gap: 14px; }
.pf-article-card {
    background: var(--c-surface);
    border: 1px solid var(--c-line);
    border-radius: var(--r-lg);
    box-shadow: var(--sh-sm);
    overflow: hidden;
    transition: box-shadow var(--trans);
}
.pf-article-card:hover { box-shadow: var(--sh-md); }
.pf-article-card__cover { display: block; }
.pf-article-card__cover img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--c-surface-alt); }
.pf-article-card__body { padding: 16px 18px 14px; }
.pf-article-card__title { font-size: 17px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pf-article-card__title > a { min-width: 0; }
.pf-article-card__title > a:hover { color: var(--c-brand); }
.pf-article-card__summary { margin: 8px 0 0; font-size: 13.5px; color: var(--c-text-sub); line-height: 1.75; }
.pf-article-card__meta { margin-top: 10px; font-size: 12px; color: var(--c-text-muted); display: flex; gap: 6px; flex-wrap: wrap; }
.pf-article-card__dot { opacity: .6; }

/* ---------- 文章详情 ---------- */
.pf-article__title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pf-article__meta { margin-top: 8px; font-size: 12.5px; color: var(--c-text-muted); display: flex; gap: 6px; flex-wrap: wrap; }
.pf-article__cover { margin: 0 0 16px; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--c-line); }
.pf-article__cover img { width: 100%; max-height: 380px; object-fit: cover; }
.pf-article__links { display: grid; gap: 2px; }
.pf-article__links li { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; font-size: 13.5px; padding: 7px 0; border-bottom: 1px dashed var(--c-line); }
.pf-article__links li:last-child { border-bottom: none; }
.pf-article__links a { min-width: 0; }
.pf-article__links a:hover { color: var(--c-brand); }
.pf-article__links .pf-muted { flex: none; font-size: 12px; }

/* ---------- 正文排版（适配编辑器输出的富文本） ---------- */
.pf-article__content { font-size: 15px; line-height: 1.95; color: var(--c-text-sub); word-break: break-word; }
.pf-article__content > *:first-child { margin-top: 0; }
.pf-article__content > *:last-child { margin-bottom: 0; }
.pf-article__content p { margin: 0 0 .9em; }
.pf-article__content h1, .pf-article__content h2, .pf-article__content h3, .pf-article__content h4, .pf-article__content h5 {
    color: var(--c-text);
    margin: 1.3em 0 .55em;
    line-height: 1.4;
}
.pf-article__content h2 { font-size: 20px; }
.pf-article__content h3 { font-size: 17px; }
.pf-article__content h4 { font-size: 15.5px; }
.pf-article__content ul { list-style: disc; padding-left: 1.5em; margin: 0 0 .9em; }
.pf-article__content ol { list-style: decimal; padding-left: 1.5em; margin: 0 0 .9em; }
.pf-article__content li { margin: .3em 0; }
.pf-article__content blockquote {
    margin: .9em 0;
    padding: .7em 1em;
    border-left: 3px solid var(--c-brand);
    background: var(--c-surface-alt);
    border-radius: 0 var(--r-sm) var(--r-sm) 0;
    color: var(--c-text-sub);
}
.pf-article__content blockquote p:last-child { margin-bottom: 0; }
.pf-article__content a { color: var(--c-info); text-decoration: underline; text-underline-offset: 2px; }
.pf-article__content strong { color: var(--c-text); }
.pf-article__content img { border-radius: var(--r-md); margin: .7em 0; }
.pf-article__content hr { border: none; border-top: 1px solid var(--c-line); margin: 1.4em 0; }
.pf-article__content code { background: var(--c-surface-alt); border: 1px solid var(--c-line); padding: .1em .4em; border-radius: 5px; font-size: .92em; }
.pf-article__content pre { background: #10151f; color: #e8eaed; padding: 13px 15px; border-radius: var(--r-sm); overflow-x: auto; font-size: 13px; line-height: 1.7; margin: 0 0 .9em; }
.pf-article__content pre code { background: transparent; border: none; padding: 0; color: inherit; }
.pf-article__content table { width: 100%; margin: .9em 0; font-size: 14px; }
.pf-article__content th, .pf-article__content td { border: 1px solid var(--c-line); padding: 8px 10px; text-align: left; vertical-align: top; }
.pf-article__content th { background: var(--c-surface-alt); color: var(--c-text); font-weight: 600; }
.pf-article__content figure { margin: 1em 0; }
.pf-article__content figcaption { font-size: 12.5px; color: var(--c-text-muted); text-align: center; margin-top: .45em; }

/* ---------- 首页「最新资讯」 ---------- */
.pf-news-grid { display: grid; gap: 12px; }
.pf-news {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    background: var(--c-surface);
    border: 1px solid var(--c-line);
    border-radius: var(--r-md);
    padding: 14px 16px;
    box-shadow: var(--sh-sm);
    transition: box-shadow var(--trans), border-color var(--trans);
}
.pf-news:hover { box-shadow: var(--sh-md); border-color: var(--c-line-strong); }
.pf-news__cover { flex: 0 0 64px; width: 64px; height: 64px; border-radius: var(--r-sm); overflow: hidden; background: var(--c-surface-alt); }
.pf-news__cover img { width: 100%; height: 100%; object-fit: cover; }
.pf-news__body { min-width: 0; display: grid; gap: 4px; }
.pf-news__title { font-weight: 600; font-size: 14px; line-height: 1.5; color: var(--c-text); }
.pf-news:hover .pf-news__title { color: var(--c-brand); }
.pf-news__summary { font-size: 12.5px; color: var(--c-text-sub); line-height: 1.6; }
.pf-news__meta { font-size: 11.5px; color: var(--c-text-muted); }

/* ---------- 后台富文本编辑器（Quill，本地内置） ---------- */
/* 编辑器区域固定浅色底：富文本排版以白底为基准，与后台深色模式解耦 */
.pf-rich { position: relative; }
.pf-rich__mount { background: #fff; color: #1a1d24; border-radius: var(--r-md); }
.pf-rich--ready [data-rich-input] { display: none; }
.pf-rich .ql-toolbar.ql-snow {
    border: 1px solid var(--c-line-strong);
    border-bottom: none;
    border-radius: var(--r-md) var(--r-md) 0 0;
    background: #fafbfc;
}
.pf-rich .ql-container.ql-snow {
    border: 1px solid var(--c-line-strong);
    border-radius: 0 0 var(--r-md) var(--r-md);
    font-family: var(--font);
    font-size: 14px;
}
.pf-rich .ql-editor { min-height: 360px; line-height: 1.85; color: #1a1d24; }
.pf-rich .ql-editor.ql-blank::before { color: #8b92a1; font-style: normal; }
.pf-rich .ql-editor img { border-radius: 8px; }
.pf-rich .ql-editor h2 { font-size: 20px; }
.pf-rich .ql-editor h3 { font-size: 17px; }
.pf-rich .ql-editor h4 { font-size: 15.5px; }
.pf-rich .ql-editor a { color: #1a73e8; text-decoration: underline; }

/* 标题级别下拉的中文标签（覆盖雪主题默认英文，选择后随 data-value 自动切换） */
.pf-rich .ql-toolbar.ql-snow .ql-picker.ql-header { width: 104px; }
.pf-rich .ql-toolbar.ql-snow .ql-picker.ql-header .ql-picker-label::before,
.pf-rich .ql-toolbar.ql-snow .ql-picker.ql-header .ql-picker-item::before { content: '正文'; }
.pf-rich .ql-toolbar.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="2"]::before,
.pf-rich .ql-toolbar.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="2"]::before { content: '标题 2'; }
.pf-rich .ql-toolbar.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="3"]::before,
.pf-rich .ql-toolbar.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="3"]::before { content: '标题 3'; }
.pf-rich .ql-toolbar.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="4"]::before,
.pf-rich .ql-toolbar.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="4"]::before { content: '标题 4'; }

.pf-rich__status { min-height: 18px; margin-top: 6px; font-size: 12.5px; color: var(--c-text-muted); }
.pf-rich__status.is-error { color: var(--c-danger); }

/* ---------- 内容管理的响应式增强 ---------- */
@media (min-width: 640px) {
    .pf-article-card.has-cover { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 0; align-items: stretch; }
    .pf-article-card.has-cover .pf-article-card__cover { height: 100%; }
    .pf-article-card.has-cover .pf-article-card__cover img { height: 100%; aspect-ratio: auto; }
    .pf-news-grid { grid-template-columns: repeat(2, 1fr); }
}

/* =====================================================================
   图片上传组件（后台商品图 / 分类图）
   ---------------------------------------------------------------------
   注意：下面这些块用了 display: grid / flex，
   会盖掉 HTML 的 hidden 属性，因此每个都配了一条 [hidden] 规则。
   ===================================================================== */

.pf-upload { display: block; }

/* ---------- 已选图片 ---------- */
.pf-upload__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}
.pf-upload__grid[hidden] { display: none; }

.pf-upload__item {
    position: relative;
    margin: 0;
    aspect-ratio: 1 / 1;
    border: 1px solid var(--c-line);
    border-radius: 10px;
    overflow: hidden;
    background: var(--c-surface-alt);
}

.pf-upload__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.pf-upload__badge {
    position: absolute;
    top: 6px;
    left: 6px;
    padding: 2px 7px;
    font-size: 11px;
    line-height: 1.5;
    color: #fff;
    background: var(--c-accent);
    border-radius: 999px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .2);
}
.pf-upload__badge[hidden] { display: none; }

/* 操作按钮：桌面悬停显示，触屏常驻 */
.pf-upload__tools {
    position: absolute;
    inset: auto 0 0 0;
    display: flex;
    gap: 1px;
    background: rgba(16, 20, 28, .62);
    opacity: 0;
    transition: opacity .16s ease;
}
.pf-upload__item:hover .pf-upload__tools,
.pf-upload__item:focus-within .pf-upload__tools { opacity: 1; }

@media (hover: none) {
    .pf-upload__tools { opacity: 1; }
}

.pf-upload__tool {
    flex: 1 1 auto;
    padding: 5px 0;
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 12px;
    line-height: 1.4;
    cursor: pointer;
    transition: background .15s ease;
}
.pf-upload__tool:hover:not(:disabled) { background: rgba(255, 255, 255, .18); }
.pf-upload__tool:disabled { opacity: .35; cursor: default; }
.pf-upload__tool--danger:hover:not(:disabled) { background: var(--c-danger); }

/* ---------- 空状态 ---------- */
.pf-upload__empty {
    padding: 22px 16px;
    margin-bottom: 12px;
    text-align: center;
    border: 1px dashed var(--c-line-strong);
    border-radius: 10px;
    background: var(--c-surface-alt);
}
.pf-upload__empty[hidden] { display: none; }
.pf-upload__empty-title { font-size: 14px; color: var(--c-text-sub); }
.pf-upload__empty-hint { margin-top: 4px; font-size: 12.5px; color: var(--c-text-muted); }

/* ---------- 拖放区 ---------- */
.pf-upload__drop {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 20px 16px;
    text-align: center;
    border: 1.5px dashed var(--c-line-strong);
    border-radius: 10px;
    background: var(--c-surface);
    cursor: pointer;
    transition: border-color .16s ease, background .16s ease;
}
.pf-upload__drop:hover { border-color: var(--c-accent); background: var(--c-accent-light); }
.pf-upload__drop.is-dragover {
    border-color: var(--c-accent);
    background: var(--c-accent-light);
    box-shadow: inset 0 0 0 2px rgba(255, 106, 0, .18);
}
.pf-upload__drop-icon { font-size: 20px; line-height: 1; color: var(--c-accent); }
.pf-upload__drop-title { font-size: 14px; color: var(--c-text); }
.pf-upload__drop-hint { font-size: 12px; color: var(--c-text-muted); }

/* ---------- 进度与结果 ---------- */
.pf-upload__progress {
    margin-top: 10px;
    font-size: 13px;
    color: var(--c-accent);
}
.pf-upload__progress[hidden] { display: none; }

.pf-upload__status {
    margin-top: 10px;
    font-size: 13px;
    line-height: 1.7;
    color: var(--c-text-sub);
}
.pf-upload__status[hidden] { display: none; }
.pf-upload__status--ok { color: var(--c-success); }
.pf-upload__status--warn { color: var(--c-warning); }
.pf-upload__status--error { color: var(--c-danger); }

/* ---------- 高级选项 ---------- */
.pf-upload__advanced {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--c-line);
}
.pf-upload__advanced > summary {
    font-size: 13px;
    color: var(--c-text-muted);
    cursor: pointer;
    list-style: revert;
}
.pf-upload__advanced > summary:hover { color: var(--c-text-sub); }

/* 窄屏：缩小缩略图、放大操作区，便于手指点击 */
@media (max-width: 639px) {
    .pf-upload__grid { grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; }
    .pf-upload__tool { padding: 7px 0; font-size: 13px; }
}

/* =====================================================================
   二级分类树（后台分类管理 / 商品表单多选）
   ---------------------------------------------------------------------
   袜子这套分类有六十多个二级项，平铺很难找，因此：
     · 后台列表：一级加粗、二级缩进带 └ 与分组标签
     · 商品表单：按一级分组 + 关键字过滤 + 主分类单选
   注意：下面用了 display: grid / flex 的元素都配了 [hidden] 规则，
   否则会盖掉 HTML 的 hidden 属性（这个坑之前踩过一次）。
   ===================================================================== */

/* ---------- 后台分类列表 ---------- */
.pf-cat-row--top > td { background: var(--c-surface-alt); }
.pf-cat-row--top strong { font-size: 14.5px; }
.pf-cat-row--child .pf-table__actions .pf-btn { font-size: 12px; }

/* ---------- 商品表单：分类多选 ---------- */
.pf-cat-picker { border: 1px solid var(--c-line); border-radius: var(--r-md); overflow: hidden; }
.pf-cat-picker__search {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    background: var(--c-surface-alt);
    border-bottom: 1px solid var(--c-line);
}
.pf-cat-picker__search .pf-input { max-width: 260px; }
.pf-cat-picker__search span { font-size: 12px; white-space: nowrap; }
.pf-cat-picker__list { max-height: 340px; overflow-y: auto; scrollbar-width: thin; }
.pf-cat-picker__empty { padding: 24px 14px; text-align: center; font-size: 13px; color: var(--c-text-muted); }

.pf-cat-picker__group + .pf-cat-picker__group { border-top: 1px solid var(--c-line); }
.pf-cat-picker__group[hidden] { display: none; }
.pf-cat-picker__group-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 12px;
    background: var(--c-bg);
    font-size: 12.5px;
    font-weight: 700;
    color: var(--c-text-sub);
    position: sticky;
    top: 0;
    z-index: 1;
}
.pf-cat-picker__items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 2px 10px;
    padding: 8px 12px 12px;
}
.pf-cat-picker__item {
    display: flex;
    align-items: center;
    gap: 7px;
    min-height: 32px;
    padding: 0 6px;
    border-radius: var(--r-sm);
    font-size: 13px;
    transition: background var(--trans);
}
.pf-cat-picker__item[hidden] { display: none; }
.pf-cat-picker__item:hover { background: var(--c-bg); }
.pf-cat-picker__item.is-on { background: var(--c-brand-light); }
.pf-cat-picker__item input[type="checkbox"] { flex: none; width: auto; margin: 0; }
.pf-cat-picker__name { flex: 1 1 auto; min-width: 0; cursor: pointer; color: var(--c-text-sub); }
.pf-cat-picker__item.is-on .pf-cat-picker__name { color: var(--c-brand); font-weight: 600; }
.pf-cat-picker__primary {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: none;
    font-size: 11.5px;
    color: var(--c-text-muted);
}
.pf-cat-picker__primary input[type="radio"] { width: auto; margin: 0; }
.pf-cat-picker__primary label { cursor: pointer; }
.pf-cat-picker__primary input:checked + label { color: var(--c-brand); font-weight: 600; }

/* =====================================================================
   前台：二级分类标签行（列表页）与详情页所属分类
   ===================================================================== */
.pf-subcat {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    padding: 12px 14px;
    background: var(--c-surface);
    border-radius: var(--r-md);
    box-shadow: var(--sh-sm);
}
.pf-subcat__item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border: 1px solid var(--c-line);
    border-radius: var(--r-full);
    background: var(--c-surface);
    font-size: 13px;
    color: var(--c-text-sub);
    white-space: nowrap;
    transition: background var(--trans), border-color var(--trans), color var(--trans);
}
.pf-subcat__item:hover { border-color: var(--c-brand); color: var(--c-brand); }
.pf-subcat__item.is-active {
    background: var(--c-brand);
    border-color: var(--c-brand);
    color: #fff;
    font-weight: 600;
}
.pf-subcat__item--all { font-weight: 600; }
.pf-subcat__count {
    padding: 0 6px;
    border-radius: var(--r-full);
    background: var(--c-bg);
    font-size: 11px;
    line-height: 17px;
    color: var(--c-text-muted);
}
.pf-subcat__item.is-active .pf-subcat__count { background: rgba(255, 255, 255, .22); color: #fff; }

.pf-subcat__more { flex: 1 1 100%; }
.pf-subcat__more > summary {
    font-size: 12.5px;
    color: var(--c-text-muted);
    cursor: pointer;
    list-style: revert;
}
.pf-subcat__more > summary:hover { color: var(--c-brand); }
.pf-subcat__more-body {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 10px 0 2px;
}
.pf-subcat__group {
    flex: 0 0 100%;
    margin-top: 4px;
    font-size: 12px;
    font-weight: 700;
    color: var(--c-text-muted);
}

/* ---------- 详情页：所属分类 ---------- */
.pf-info__cats {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
    margin: 0 0 14px;
    font-size: 12.5px;
}
.pf-info__cat {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 11px;
    border-radius: var(--r-full);
    background: var(--c-bg);
    color: var(--c-text-sub);
    transition: background var(--trans), color var(--trans);
}
.pf-info__cat:hover { background: var(--c-brand-light); color: var(--c-brand); }
.pf-info__cat-star {
    padding: 0 5px;
    border-radius: var(--r-full);
    background: var(--c-brand);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 15px;
}

/* 窄屏：标签行少占点高度 */
@media (max-width: 639px) {
    .pf-subcat { gap: 6px; padding: 10px; }
    .pf-subcat__item { padding: 5px 10px; font-size: 12.5px; }
}

/* =====================================================================
   分类导航：可折叠的二级分类（列表页侧栏）
   ---------------------------------------------------------------------
   用原生 details/summary，无需 JS：键盘操作与无障碍属性都由浏览器管，
   也不会因为脚本报错而整个导航失效。
     默认          全部一级，二级收起
     当前所在那一组  自动展开（open），选中的二级高亮
   ===================================================================== */
.pf-catnav { margin: 1px 0; }
.pf-catnav__head {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 10px;
    border-radius: var(--r-sm);
    font-size: 13.5px;
    color: var(--c-text);
    cursor: pointer;
    list-style: none;
    transition: background var(--trans), color var(--trans);
}
.pf-catnav__head::-webkit-details-marker { display: none; }
.pf-catnav__head:hover { background: var(--c-bg); color: var(--c-brand); }
.pf-catnav__head.is-open { background: var(--c-brand-light); color: var(--c-brand); font-weight: 600; }
.pf-catnav__name { flex: 1 1 auto; min-width: 0; }
.pf-catnav__count { flex: 0 0 auto; font-size: 12px; color: var(--c-text-muted); }
.pf-catnav__head.is-open .pf-catnav__count { color: var(--c-brand); }

/* 右侧小三角：收起时朝右，展开时朝下 */
.pf-catnav__caret {
    flex: 0 0 auto;
    width: 0;
    height: 0;
    margin-left: 2px;
    border-left: 4px solid currentColor;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    opacity: .55;
    transition: transform var(--trans);
}
.pf-catnav[open] > .pf-catnav__head .pf-catnav__caret { transform: rotate(90deg); }

.pf-catnav__body { padding: 2px 0 6px; }
.pf-catnav__group {
    display: block;
    padding: 6px 10px 2px 22px;
    font-size: 11.5px;
    font-weight: 700;
    color: var(--c-text-muted);
}
.pf-catnav__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 34px;
    padding: 0 10px 0 22px;
    border-radius: var(--r-sm);
    font-size: 13px;
    color: var(--c-text-sub);
    transition: background var(--trans), color var(--trans);
}
.pf-catnav__item:hover { background: var(--c-bg); color: var(--c-brand); }
.pf-catnav__item--all { color: var(--c-text); font-weight: 600; }

/* 选中的二级：实心色块，与同组其它二级一眼区分 */
.pf-catnav__item.is-active,
.pf-catnav__item--all.is-active {
    background: var(--c-brand);
    color: #fff;
    font-weight: 600;
}
.pf-catnav__item.is-active .pf-catnav__count { color: rgba(255, 255, 255, .85); }

/* 桌面端：二级分类改在侧栏以折叠树呈现，正文上方的标签行就不重复了 */
@media (min-width: 768px) {
    .pf-subcat { display: none; }

    /* 展开后侧栏会很高，让它自身可滚动，
       否则 sticky 卡住之后底部内容永远看不到 */
    .pf-listing__side {
        max-height: calc(100vh - var(--header-h) - 78px);
        overflow-y: auto;
        scrollbar-width: thin;
        padding-right: 2px;
    }
}

/* =============================================================================
   退出登录
   =============================================================================
   退出会改变服务端状态，必须带 CSRF 令牌，所以只能用 POST 表单提交，
   不能再用普通链接 —— 以前这里就是链接，而控制器要求令牌，
   结果两个 logout() 都会校验失败：点了退出什么也不会发生。

   表单本体放在文档最末尾（见布局末尾），按钮用 form="..." 引用它。
   这样做而不是把表单直接写在按钮外面，是因为：
   放在页面中间会让 document.querySelector('form') 选到退出表单，
   任何“提交页面上第一个表单”的脚本都会变成“把自己登出”。实际踩过。

   .pf-linkbtn 用 :where() 把特异性归零，
   否则会盖掉 .pf-side-link / .pf-admin__nav-link 自己的 padding 与 color。
   ============================================================================= */
:where(.pf-linkbtn) {
    background: none;
    border: 0;
    padding: 0;
    margin: 0;
    font: inherit;
    color: inherit;
    cursor: pointer;
    text-align: left;
}

/* =============================================================================
   悬浮在线客服
   =============================================================================
   固定在右下角，纵向一列：QQ / 电话 / 微信二维码 / 回到顶部。
   没配的项不渲染（由模板决定），三项都没配时整块不出现。

   类名用 pf-cs 而不是 pf-service：后者已被文章页 / 说明页的两栏容器占用
   （那个 .pf-service 是栅格容器，还带 1200px 断点的 grid-template-columns）。
   这里复用它会直接把文章页布局顶掉 —— 实际踩过，桌面端正文区变空、
   侧栏错位。取名前先搜一遍 CSS 与模板，确认不撞。
   ============================================================================= */
.pf-cs {
    position: fixed;
    right: 14px;
    /* 底部留出移动端标签栏的高度，避免两者叠在一起 */
    bottom: 96px;
    z-index: 60;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pf-cs__item {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    padding: 0;
    border: 1px solid var(--c-line);
    border-radius: 12px;
    background: var(--c-surface);
    box-shadow: var(--sh-md);
    color: var(--c-text);
    cursor: pointer;
    text-decoration: none;
    transition: background .2s, border-color .2s, color .2s, transform .2s;
}

.pf-cs__item:hover,
.pf-cs__item:focus-visible {
    background: var(--c-brand);
    border-color: var(--c-brand);
    color: #fff;
    transform: translateX(-2px);
}

.pf-cs__ico { display: grid; place-items: center; width: 22px; height: 22px; }
.pf-cs__ico svg { width: 22px; height: 22px; fill: currentColor; }

/* 悬停时从左侧滑出的文字泡 */
.pf-cs__label {
    position: absolute;
    right: calc(100% + 8px);
    top: 50%;
    transform: translateY(-50%);
    white-space: nowrap;
    padding: 6px 10px;
    border-radius: 6px;
    background: rgba(17, 24, 39, .92);
    color: #fff;
    font-size: 12.5px;
    line-height: 1;
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s;
}

.pf-cs__item:hover .pf-cs__label,
.pf-cs__item:focus-visible .pf-cs__label { opacity: 1; }

/* 二维码那一项不弹文字泡，改成展开二维码 */
.pf-cs__item--qr .pf-cs__label { display: none; }

.pf-cs__qr {
    position: absolute;
    right: calc(100% + 10px);
    bottom: -4px;
    display: none;
    width: 176px;
    padding: 10px;
    border: 1px solid var(--c-line);
    border-radius: 10px;
    background: #fff;
    box-shadow: var(--sh-lg);
}

/* 桌面靠悬停，手机靠点击（由页面里那几行脚本切换 is-open） */
.pf-cs__item--qr:hover .pf-cs__qr,
.pf-cs__item--qr.is-open .pf-cs__qr,
.pf-cs__item--qr:focus-visible .pf-cs__qr { display: block; }

.pf-cs__qr img { display: block; width: 100%; border-radius: 6px; }
.pf-cs__qr p {
    margin: 8px 0 0;
    font-size: 12.5px;
    line-height: 1.5;
    color: var(--c-text-muted);
    text-align: center;
}

@media (max-width: 767px) {
    .pf-cs { right: 10px; bottom: 82px; gap: 6px; }
    .pf-cs__item { width: 46px; height: 46px; border-radius: 10px; }
    .pf-cs__ico, .pf-cs__ico svg { width: 20px; height: 20px; }
    .pf-cs__qr { width: 150px; padding: 8px; }
}

@media (prefers-reduced-motion: reduce) {
    .pf-cs__item, .pf-cs__label { transition: none; }
}

/* =============================================================================
   订单查询页
   =============================================================================
   单栏时桌面端右侧空一大片，显得单薄。这里改成两栏：
   左栏查询与结果，右栏状态说明与帮助入口。窄屏自动退回单栏。
   ============================================================================= */
.pf-track { display: grid; gap: 20px; }

.pf-track__main { min-width: 0; }
.pf-track__side { min-width: 0; }

@media (min-width: 992px) {
    /* 左宽右窄：主任务是查询，右栏是补充信息 */
    .pf-track { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); align-items: start; }
}

/* 订单状态说明：标签与文字对齐成两列，比直接堆段落好扫 */
.pf-status-guide { display: flex; flex-direction: column; gap: 12px; }

.pf-status-guide__row {
    display: grid;
    grid-template-columns: 70px 1fr;
    gap: 10px;
    align-items: start;
}

.pf-status-guide__row .pf-tag { justify-self: start; }

.pf-status-guide__text {
    font-size: 13px;
    line-height: 1.7;
    color: var(--c-text-muted);
}

.pf-status-guide__text strong {
    display: block;
    color: var(--c-text);
    font-weight: 600;
}

.pf-track__contact {
    margin: 0 0 12px;
    padding: 0;
    list-style: none;
    font-size: 13px;
    line-height: 2;
    color: var(--c-text-muted);
}

.pf-track__contact a { color: var(--c-brand); font-weight: 600; }


/* ==================================================================
 | 企业会员 / 供求信息模块
 | ------------------------------------------------------------------
 | 1. 注册身份选择
 | 2. 会员中心（我的发布、配图、会员服务与套餐）
 | 3. 供求信息频道（栏目入口、列表、详情）
 | 4. 企业主页
 | 命名统一 pf- 前缀，且成块写入，方便整块回滚。
 ================================================================== */

/* ---------- 1. 注册身份选择 ---------- */

.pf-roles {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.pf-role {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 13px 14px;
    border: 1.5px solid var(--c-line);
    border-radius: 10px;
    cursor: pointer;
    background: var(--c-surface);
    transition: border-color .15s, background .15s, box-shadow .15s;
}

.pf-role:hover { border-color: var(--c-line-strong); }

.pf-role.is-active {
    border-color: var(--c-brand);
    background: var(--c-brand-light);
    box-shadow: 0 0 0 3px rgba(200, 16, 46, .08);
}

.pf-role input { margin-top: 3px; accent-color: var(--c-brand); flex: none; }

.pf-role__body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }

.pf-role__title {
    font-size: 14px;
    font-weight: 700;
    color: var(--c-text);
}

.pf-role__desc {
    font-size: 12px;
    line-height: 1.55;
    color: var(--c-text-muted);
}


/* ---------- 2. 会员中心 ---------- */

/* 栏目单选 */
.pf-channels {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pf-channel {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1.5px solid var(--c-line);
    border-radius: 999px;
    font-size: 13.5px;
    cursor: pointer;
    background: var(--c-surface);
    transition: all .15s;
}

.pf-channel input { display: none; }

.pf-channel:hover { border-color: var(--c-line-strong); }

.pf-channel.is-active {
    border-color: var(--c-brand);
    background: var(--c-brand-light);
    color: var(--c-brand);
    font-weight: 600;
}

.pf-channel__icon { font-size: 15px; line-height: 1; }
.pf-channel__name { white-space: nowrap; }

/* 发布配图 */
.pf-biz-images {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.pf-biz-images__item {
    position: relative;
    width: 96px;
    height: 96px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--c-line);
    background: var(--c-surface-alt);
}

.pf-biz-images__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.pf-biz-images__del {
    position: absolute;
    top: 3px;
    right: 3px;
    width: 20px;
    height: 20px;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, .55);
    color: #fff;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}

/* 我的发布 */
.pf-mypost {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 14px 16px;
    border-bottom: 1px solid var(--c-line);
}

.pf-mypost:last-child { border-bottom: 0; }

.pf-mypost__main { flex: 1; min-width: 0; }

.pf-mypost__head {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}

.pf-mypost__title {
    font-size: 14.5px;
    font-weight: 600;
    color: var(--c-text);
    margin-bottom: 5px;
    overflow-wrap: anywhere;
}

.pf-mypost__ops {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: flex-start;
    flex: none;
}

.pf-mypost__ops form { margin: 0; }

/* 会员服务状态条 */
.pf-member-status {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    padding: 14px 16px;
    border-radius: 10px;
    background: var(--c-success-bg);
    border: 1px solid rgba(15, 157, 88, .18);
}

.pf-member-status__main { flex: 1; min-width: 160px; }

.pf-member-status__days {
    font-size: 14px;
    color: var(--c-text-sub);
    margin-bottom: 3px;
}

.pf-member-status__days strong {
    font-size: 24px;
    color: var(--c-success);
    margin: 0 3px;
}

.pf-member-status__ops { display: flex; gap: 8px; flex-wrap: wrap; }

/* 套餐卡 */
.pf-plans {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.pf-plan {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 18px 16px 16px;
    border: 1.5px solid var(--c-line);
    border-radius: 12px;
    background: var(--c-surface);
    text-align: center;
}

.pf-plan.is-featured {
    border-color: var(--c-brand);
    box-shadow: 0 4px 18px rgba(200, 16, 46, .1);
}

.pf-plan.is-disabled { opacity: .5; }

.pf-plan__badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    padding: 2px 10px;
    border-radius: 999px;
    background: var(--c-brand);
    color: #fff;
    font-size: 11.5px;
    white-space: nowrap;
    font-weight: 600;
}

.pf-plan__name {
    font-size: 14px;
    font-weight: 700;
    color: var(--c-text);
}

.pf-plan__price {
    color: var(--c-brand);
    line-height: 1.1;
    margin: 2px 0;
}

.pf-plan__price strong { font-size: 30px; font-weight: 800; }
.pf-plan__cur { font-size: 15px; font-weight: 600; margin-right: 1px; }

.pf-plan__days {
    font-size: 12.5px;
    color: var(--c-text-muted);
    margin-bottom: 4px;
}

.pf-plan form { margin: 0; }


/* ---------- 3. 供求信息频道 ---------- */

.pf-crumb {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    font-size: 12.5px;
    color: var(--c-text-muted);
    padding: 12px 0;
}

.pf-crumb a { color: var(--c-text-muted); }
.pf-crumb a:hover { color: var(--c-brand); }

/* 富文本（信息正文 / 企业简介） */
.pf-richtext {
    font-size: 14.5px;
    line-height: 1.85;
    color: var(--c-text-sub);
    overflow-wrap: anywhere;
}

.pf-richtext p { margin: 0 0 12px; }
.pf-richtext p:last-child { margin-bottom: 0; }
.pf-richtext img { max-width: 100%; height: auto; border-radius: 8px; }
.pf-richtext h2, .pf-richtext h3 { color: var(--c-text); margin: 18px 0 10px; }
.pf-richtext ul, .pf-richtext ol { padding-left: 20px; margin: 0 0 12px; }
.pf-richtext a { color: var(--c-brand); }

/* 统计条 */
.pf-biz-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}

.pf-biz-stats__item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 14px 16px;
    border-radius: 10px;
    background: var(--c-surface);
    border: 1px solid var(--c-line);
    text-align: center;
}

.pf-biz-stats__item strong {
    font-size: 22px;
    font-weight: 800;
    color: var(--c-brand);
    line-height: 1.2;
}

.pf-biz-stats__item span { font-size: 12.5px; color: var(--c-text-muted); }

/* 六栏目入口 */
.pf-channels-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.pf-channel-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-radius: 12px;
    border: 1px solid var(--c-line);
    background: var(--c-surface);
    transition: all .16s;
}

.pf-channel-card:hover {
    border-color: var(--c-brand);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(26, 29, 36, .08);
}

.pf-channel-card__icon {
    flex: none;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: var(--c-brand-light);
    font-size: 21px;
}

.pf-channel-card__body {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
    flex: 1;
}

.pf-channel-card__name {
    font-size: 15px;
    font-weight: 700;
    color: var(--c-text);
}

.pf-channel-card__desc {
    font-size: 12px;
    color: var(--c-text-muted);
    line-height: 1.5;
}

.pf-channel-card__count {
    flex: none;
    font-size: 13px;
    font-weight: 700;
    color: var(--c-text-muted);
    background: var(--c-surface-alt);
    border-radius: 999px;
    padding: 3px 10px;
}

/* 信息卡片 */
.pf-biz-list { display: flex; flex-direction: column; gap: 10px; }

.pf-biz-card {
    display: flex;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid var(--c-line);
    border-radius: 10px;
    background: var(--c-surface);
    transition: all .16s;
}

.pf-biz-card:hover {
    border-color: var(--c-brand);
    box-shadow: 0 4px 16px rgba(26, 29, 36, .07);
}

.pf-biz-card__badge {
    flex: none;
    align-self: flex-start;
    padding: 3px 9px;
    border-radius: 6px;
    background: var(--c-brand-light);
    color: var(--c-brand);
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.pf-biz-card__main {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
    flex: 1;
}

.pf-biz-card__title {
    font-size: 14.5px;
    font-weight: 600;
    color: var(--c-text);
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.pf-biz-card__summary {
    font-size: 13px;
    color: var(--c-text-muted);
    line-height: 1.55;
}

.pf-biz-card__meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 12px;
    color: var(--c-text-muted);
    margin-top: 2px;
}

.pf-biz-card__price { color: var(--c-accent); font-weight: 700; }

/* 栏目切换条 */
.pf-biz-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.pf-biz-tabs__item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid var(--c-line);
    background: var(--c-surface);
    font-size: 13.5px;
    color: var(--c-text-sub);
    transition: all .15s;
}

.pf-biz-tabs__item:hover { border-color: var(--c-brand); color: var(--c-brand); }

.pf-biz-tabs__item.is-active {
    background: var(--c-brand);
    border-color: var(--c-brand);
    color: #fff;
    font-weight: 600;
}

.pf-biz-tabs__count {
    font-size: 11.5px;
    opacity: .75;
}

/* 筛选栏 */
.pf-biz-filter {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    padding: 12px 14px;
    margin-bottom: 14px;
    border: 1px solid var(--c-line);
    border-radius: 10px;
    background: var(--c-surface);
}

.pf-biz-filter .pf-input { flex: 1; min-width: 160px; }

/* 分页 */
.pf-biz-pager {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin: 20px 0 8px;
}

.pf-biz-pager__item {
    min-width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    padding: 0 8px;
    border: 1px solid var(--c-line);
    border-radius: 8px;
    background: var(--c-surface);
    font-size: 13px;
    color: var(--c-text-sub);
}

.pf-biz-pager__item:hover { border-color: var(--c-brand); color: var(--c-brand); }

.pf-biz-pager__item.is-active {
    background: var(--c-brand);
    border-color: var(--c-brand);
    color: #fff;
    font-weight: 600;
}

/* 详情两栏 */
.pf-biz-detail {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 16px;
    align-items: start;
}

.pf-biz-detail__title {
    font-size: 21px;
    font-weight: 700;
    line-height: 1.45;
    color: var(--c-text);
    margin: 0 0 10px;
    overflow-wrap: anywhere;
}

.pf-biz-detail__summary {
    margin: 0 0 12px;
    padding: 10px 12px;
    border-left: 3px solid var(--c-brand);
    background: var(--c-surface-alt);
    border-radius: 0 8px 8px 0;
    font-size: 13.5px;
    line-height: 1.7;
    color: var(--c-text-sub);
}

.pf-biz-detail__price {
    font-size: 22px;
    font-weight: 800;
    color: var(--c-accent);
    margin-bottom: 14px;
}

.pf-biz-detail__images {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.pf-biz-detail__images img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--c-line);
    display: block;
}

/* 联系方式行 */
.pf-biz-contact {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px dashed var(--c-line);
    font-size: 13.5px;
}

.pf-biz-contact:last-child { border-bottom: 0; }
.pf-biz-contact > span { color: var(--c-text-muted); flex: none; }
.pf-biz-contact strong, .pf-biz-contact a {
    color: var(--c-text);
    font-weight: 600;
    text-align: right;
    overflow-wrap: anywhere;
}
.pf-biz-contact a { color: var(--c-brand); }

/* 侧栏小条目 */
.pf-biz-mini {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 6px;
    border-bottom: 1px solid var(--c-line);
    font-size: 13px;
}

.pf-biz-mini:last-child { border-bottom: 0; }
.pf-biz-mini:hover .pf-biz-mini__title { color: var(--c-brand); }

.pf-biz-mini__tag { flex: none; font-size: 12px; }

.pf-biz-mini__title {
    color: var(--c-text-sub);
    line-height: 1.45;
    overflow-wrap: anywhere;
}


/* ---------- 4. 企业主页 ---------- */

.pf-company__hero {
    background: linear-gradient(135deg, #1f2430 0%, #2c3446 55%, #3a2430 100%);
    padding: 30px 0;
    margin-bottom: 18px;
}

.pf-company__hero-inner {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}

.pf-company__logo {
    flex: none;
    width: 84px;
    height: 84px;
    border-radius: 16px;
    overflow: hidden;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .18);
    color: #fff;
    font-size: 32px;
    font-weight: 700;
}

.pf-company__logo img { width: 100%; height: 100%; object-fit: cover; display: block; }

.pf-company__intro { flex: 1; min-width: 200px; }

.pf-company__name {
    margin: 0 0 6px;
    font-size: 22px;
    font-weight: 800;
    color: #fff;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.pf-company__meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 13px;
    color: rgba(255, 255, 255, .72);
}

.pf-company__biz {
    margin-top: 8px;
    font-size: 13px;
    color: rgba(255, 255, 255, .82);
    line-height: 1.6;
}

.pf-company__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 16px;
    align-items: start;
}

/* 后台：企业简介预览 */
.pf-admin-preview {
    margin-top: 12px;
    padding: 12px 14px;
    border-radius: 8px;
    background: var(--c-surface-alt);
    border: 1px solid var(--c-line);
    font-size: 13px;
    line-height: 1.75;
    color: var(--c-text-sub);
    max-height: 220px;
    overflow: auto;
    overflow-wrap: anywhere;
}

.pf-admin-preview img { max-width: 100%; height: auto; border-radius: 6px; }


/* ---------- 响应式 ---------- */

@media (max-width: 1024px) {
    .pf-plans { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .pf-channels-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .pf-biz-detail,
    .pf-company__grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 640px) {
    .pf-roles { grid-template-columns: 1fr; }
    .pf-plans { grid-template-columns: 1fr; }
    .pf-channels-grid { grid-template-columns: 1fr; }
    .pf-biz-stats { grid-template-columns: repeat(3, 1fr); gap: 6px; }
    .pf-biz-stats__item { padding: 10px 8px; }
    .pf-biz-stats__item strong { font-size: 18px; }

    .pf-mypost { flex-direction: column; gap: 10px; }
    .pf-mypost__ops { width: 100%; }

    .pf-biz-card { flex-direction: column; gap: 8px; }
    .pf-biz-card__badge { align-self: flex-start; }

    .pf-biz-detail__title { font-size: 18px; }
    .pf-biz-detail__images img { width: 88px; height: 88px; }

    .pf-company__logo { width: 64px; height: 64px; font-size: 25px; border-radius: 12px; }
    .pf-company__name { font-size: 18px; }
    .pf-company__hero { padding: 20px 0; }

    .pf-biz-filter .pf-input,
    .pf-biz-filter .pf-select { width: 100% !important; max-width: none !important; }

    .pf-member-status { flex-direction: column; align-items: flex-start; }
}

/* 第三方支付可用状态卡 */
.pf-pay-opt {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 16px;
    border: 1px solid var(--c-line);
    border-radius: 10px;
    background: var(--c-surface);
    font-size: 13px;
    min-width: 120px;
}

.pf-pay-opt strong { color: var(--c-text); }
.pf-pay-opt span { color: var(--c-success); font-size: 12px; }

.pf-pay-opt.is-off { background: var(--c-surface-alt); opacity: .72; }
.pf-pay-opt.is-off span { color: var(--c-text-muted); }


/* ==================================================================
 | 广告位
 ================================================================== */

/* ---------- 首页全屏轮播 ---------- */
.pf-ads {
    position: relative;
    overflow: hidden;
    background: #0f1319;
    aspect-ratio: 8 / 3;
    max-height: 62vh;
}

.pf-ads__track { position: absolute; inset: 0; }

.pf-ads__slide {
    position: absolute;
    inset: 0;
    display: block;
    opacity: 0;
    transform: scale(1.04);
    transition: opacity .7s ease, transform 6s ease;
    pointer-events: none;
}

.pf-ads__slide.is-active {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
    z-index: 1;
}

/* 图片：铺满 + 慢推镜头（Ken Burns），让轮播不那么“死” */
.pf-ads__slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    user-select: none;
}

.pf-ads__slide.is-active img {
    animation: pf-ads-zoom 9s ease-out both;
}

@keyframes pf-ads-zoom {
    from { transform: scale(1); }
    to   { transform: scale(1.06); }
}

.pf-ads__text {
    display: grid;
    place-items: center;
    height: 100%;
    padding: 24px;
    color: #fff;
    font-size: clamp(18px, 3vw, 34px);
    font-weight: 700;
    text-align: center;
    background: linear-gradient(135deg, #1f2430, #3a2430);
}

/* 底部轻微压暗，保证圆点看得清 */
.pf-ads::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 34%;
    background: linear-gradient(to top, rgba(0, 0, 0, .38), transparent);
    pointer-events: none;
    z-index: 2;
}

.pf-ads__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: rgba(15, 19, 25, .38);
    color: #fff;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    opacity: 0;
    transition: opacity .2s, background .2s, transform .2s;
    backdrop-filter: blur(4px);
}

.pf-ads:hover .pf-ads__nav { opacity: 1; }
.pf-ads__nav:hover { background: rgba(15, 19, 25, .62); }
.pf-ads__nav--prev { left: 16px; }
.pf-ads__nav--next { right: 16px; }

.pf-ads__dots {
    position: absolute;
    left: 50%;
    bottom: 14px;
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    gap: 7px;
    align-items: center;
}

.pf-ads__dot {
    width: 8px;
    height: 8px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, .5);
    cursor: pointer;
    transition: width .25s, background .25s;
}

.pf-ads__dot.is-active {
    width: 22px;
    background: #fff;
}

/* ---------- 模块横幅 / 页面图片位 ---------- */
.pf-ad-banner,
.pf-ad-slot {
    position: relative;
    margin: 0 auto 16px;
    max-width: var(--container, 1200px);
    padding: 0 var(--sp, 16px);
}

.pf-ad-banner__item {
    display: block;
    border-radius: 12px;
    overflow: hidden;
    background: var(--c-surface-alt);
    line-height: 0;
    transition: box-shadow .2s, transform .2s;
}

.pf-ad-banner__item:hover {
    box-shadow: 0 6px 22px rgba(16, 24, 40, .12);
}

.pf-ad-banner__item img {
    width: 100%;
    height: auto;
    display: block;
}

.pf-ad-banner__text {
    display: block;
    padding: 18px 20px;
    font-size: 15px;
    line-height: 1.5;
    color: var(--c-text-sub);
}

/* “广告”标识：不是装饰，是合规要求，不能删 */
.pf-ad-banner__label {
    position: absolute;
    right: calc(var(--sp, 16px) + 8px);
    bottom: 8px;
    padding: 1px 7px;
    border-radius: 4px;
    background: rgba(15, 19, 25, .45);
    color: rgba(255, 255, 255, .9);
    font-size: 11px;
    line-height: 1.6;
    pointer-events: none;
}

/* ---------- 违禁词词条 ---------- */
.pf-words {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-height: 360px;
    overflow-y: auto;
}

.pf-word {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 6px 4px 10px;
    border: 1px solid var(--c-line);
    border-radius: 999px;
    background: var(--c-surface-alt);
    font-size: 13px;
}

.pf-word form { margin: 0; line-height: 0; }

.pf-word__del {
    width: 18px;
    height: 18px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--c-text-muted);
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}

.pf-word__del:hover { background: var(--c-danger-bg); color: var(--c-danger); }


/* ---------- 广告位响应式 ---------- */
@media (max-width: 767px) {
    .pf-ads { aspect-ratio: 16 / 10; max-height: none; }
    .pf-ads__nav { display: none; }
    .pf-ads__dots { bottom: 10px; }
    .pf-ad-banner, .pf-ad-slot { margin-bottom: 12px; padding: 0 12px; }
    .pf-ad-banner__item { border-radius: 10px; }
}

/* 尊重「减少动态效果」：关掉推镜头与淡入 */
@media (prefers-reduced-motion: reduce) {
    .pf-ads__slide,
    .pf-ads__slide.is-active img { animation: none !important; transition: opacity .01s linear; }
}

