/* ==========================================================================
   UniShelf Mall — 图标升级（2026-09-02）
   通用图标：Font Awesome 5 → Phosphor Icons（现代线条风，自托管）
   品牌图标（fa-facebook-f / fa-x-twitter / fa-tiktok 等）：保留 FA（品牌识别必须）
   用法：无需改模板，CSS 覆盖 FA 类的字形与字体族。
   ========================================================================== */

@font-face {
    font-family: 'Phosphor';
    src: url('fonts/Phosphor-icons.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

/* ---------- 通用图标映射（FA 类 → Phosphor） ---------- */

/* 搜索 */
.fa-search::before {
    font-family: 'Phosphor' !important;
    font-weight: 400 !important;
    content: '\e30c'; /* magnifying-glass */
}

/* 用户/账户 */
.fa-user::before,
.fa-user-circle::before {
    font-family: 'Phosphor' !important;
    font-weight: 400 !important;
    content: '\e4c2'; /* user */
}

/* 购物车 */
.fa-cart-shopping::before,
.fa-shopping-cart::before,
.fa-shopping-bag::before,
.fa-shopping-basket::before {
    font-family: 'Phosphor' !important;
    font-weight: 400 !important;
    content: '\e41e'; /* shopping-cart */
}

/* 首页 */
.fa-home::before {
    font-family: 'Phosphor' !important;
    font-weight: 400 !important;
    content: '\e2c2'; /* house */
}

/* 返回顶部 */
.fa-arrow-up::before {
    font-family: 'Phosphor' !important;
    font-weight: 400 !important;
    content: '\e08e'; /* arrow-up */
}

/* 商店网格 */
.fa-grid-2::before,
.fa-th-large::before {
    font-family: 'Phosphor' !important;
    font-weight: 400 !important;
    content: '\e464'; /* squares-four */
}

/* 闪电/快捷 */
.fa-bolt::before {
    font-family: 'Phosphor' !important;
    font-weight: 400 !important;
    content: '\e2de'; /* lightning */
}

/* 分类列表 */
.fa-list-ul::before,
.fa-list::before {
    font-family: 'Phosphor' !important;
    font-weight: 400 !important;
    content: '\e2f0'; /* list */
}

/* 展开箭头（2026-09-14 校正：原 e126/e6f4/e3a8/e3a6 与本字体码位不符 ——
   e3a6 在字体中根本不存在（渲染为空白），e3a8/e6f4 是别的图标。
   经逐字扫描字体 cmap + 字形比对，本字体实际码位：
   caret-down=e136 / caret-up=e13c / caret-left=e138 / caret-right=e13a /
   caret-double-down=e126 / caret-double-up=e12c / caret-double-left=e128 / caret-double-right=e12a */
.fa-angle-double-down::before {
    font-family: 'Phosphor' !important;
    font-weight: 400 !important;
    content: '\e126'; /* caret-double-down */
}

.fa-angle-double-left::before {
    font-family: 'Phosphor' !important;
    font-weight: 400 !important;
    content: '\e128'; /* caret-double-left */
}

.fa-angle-double-right::before {
    font-family: 'Phosphor' !important;
    font-weight: 400 !important;
    content: '\e12a'; /* caret-double-right */
}

.fa-chevron-down::before,
.fa-angle-down::before {
    font-family: 'Phosphor' !important;
    font-weight: 400 !important;
    content: '\e136'; /* caret-down */
}

.fa-chevron-up::before,
.fa-angle-up::before {
    font-family: 'Phosphor' !important;
    font-weight: 400 !important;
    content: '\e13c'; /* caret-up */
}

.fa-chevron-right::before,
.fa-angle-right::before {
    font-family: 'Phosphor' !important;
    font-weight: 400 !important;
    content: '\e13a'; /* caret-right */
}

.fa-chevron-left::before,
.fa-angle-left::before {
    font-family: 'Phosphor' !important;
    font-weight: 400 !important;
    content: '\e138'; /* caret-left */
}

/* 信任条：退货 */
.fa-rotate-left::before,
.fa-undo::before,
.fa-undo-alt::before {
    font-family: 'Phosphor' !important;
    font-weight: 400 !important;
    content: '\e038'; /* arrow-counter-clockwise */
}

/* 信任条：正品/安全 */
.fa-shield-halved::before,
.fa-shield-alt::before {
    font-family: 'Phosphor' !important;
    font-weight: 400 !important;
    content: '\e40c'; /* shield-check */
}

/* 信任条：物流 */
.fa-truck::before {
    font-family: 'Phosphor' !important;
    font-weight: 400 !important;
    content: '\e4b4'; /* truck */
}

/* 信任条：COD/支付 */
.fa-money-bill-wave::before,
.fa-money-bill-alt::before {
    font-family: 'Phosphor' !important;
    font-weight: 400 !important;
    content: '\e588'; /* money */
}

.fa-credit-card::before {
    font-family: 'Phosphor' !important;
    font-weight: 400 !important;
    content: '\e1d2'; /* credit-card */
}

/* 常用：心/星/电话/邮箱/定位/对勾/叉/眼睛 */
.fa-heart::before,
.fa-heart-o::before {
    font-family: 'Phosphor' !important;
    font-weight: 400 !important;
    content: '\e2a8'; /* heart */
}

.fa-star::before,
.fa-star-half::before {
    font-family: 'Phosphor' !important;
    font-weight: 400 !important;
    content: '\e46a'; /* star */
}

.fa-phone::before,
.fa-phone-alt::before {
    font-family: 'Phosphor' !important;
    font-weight: 400 !important;
    content: '\e3b8'; /* phone */
}

.fa-envelope::before,
.fa-envelope-open::before {
    font-family: 'Phosphor' !important;
    font-weight: 400 !important;
    content: '\e214'; /* envelope */
}

.fa-map-marker-alt::before,
.fa-map-pin::before {
    font-family: 'Phosphor' !important;
    font-weight: 400 !important;
    content: '\e316'; /* map-pin */
}

.fa-check::before {
    font-family: 'Phosphor' !important;
    font-weight: 400 !important;
    content: '\e182'; /* check */
}

.fa-times::before,
.fa-close::before {
    font-family: 'Phosphor' !important;
    font-weight: 400 !important;
    content: '\e4f6'; /* x */
}

.fa-eye::before {
    font-family: 'Phosphor' !important;
    font-weight: 400 !important;
    content: '\e220'; /* eye */
}

.fa-eye-slash::before {
    font-family: 'Phosphor' !important;
    font-weight: 400 !important;
    content: '\e222'; /* eye-slash */
}

/* 交流/评论 */
.fa-comments::before,
.fa-comment::before,
.fa-comment-dots::before {
    font-family: 'Phosphor' !important;
    font-weight: 400 !important;
    content: '\e16c'; /* chat-circle-dots */
}

/* 齿轮/设置 */
.fa-cog::before,
.fa-gear::before {
    font-family: 'Phosphor' !important;
    font-weight: 400 !important;
    content: '\e270'; /* gear */
}

/* 收藏 */
.fa-bookmark::before {
    font-family: 'Phosphor' !important;
    font-weight: 400 !important;
    content: '\e0e8'; /* bookmark */
}

/* 加减 */
.fa-plus::before,
.fa-plus-circle::before {
    font-family: 'Phosphor' !important;
    font-weight: 400 !important;
    content: '\e3d4'; /* plus */
}

.fa-minus::before,
.fa-minus-circle::before {
    font-family: 'Phosphor' !important;
    font-weight: 400 !important;
    content: '\e32a'; /* minus */
}

/* 加载中 */
.fa-spinner::before,
.fa-circle-notch::before {
    font-family: 'Phosphor' !important;
    font-weight: 400 !important;
    content: '\e66a'; /* spinner */
    animation: unishelf-spin 1s linear infinite;
}

@keyframes unishelf-spin {
    100% { transform: rotate(360deg); }
}

/* Phosphor 字形对齐微调（继承 FA 的尺寸上下文） */
.fa-search,
.fa-user,
.fa-cart-shopping,
.fa-home,
.fa-arrow-up,
.fa-grid-2,
.fa-bolt,
.fa-list-ul,
.fa-angle-double-down,
.fa-angle-double-left,
.fa-angle-double-right,
.fa-rotate-left,
.fa-shield-halved,
.fa-truck,
.fa-money-bill-wave,
.fa-credit-card,
.fa-heart,
.fa-star,
.fa-phone,
.fa-envelope,
.fa-map-marker-alt,
.fa-check,
.fa-times,
.fa-eye,
.fa-comments,
.fa-cog,
.fa-bookmark,
.fa-plus,
.fa-minus,
.fa-spinner,
.fa-circle-notch,
.fa-chevron-down,
.fa-chevron-up,
.fa-chevron-right,
.fa-chevron-left,
.fa-angle-down,
.fa-angle-up,
.fa-angle-right,
.fa-angle-left,
.fa-shopping-cart,
.fa-shopping-bag,
.fa-shopping-basket,
.fa-user-circle,
.fa-heart-o,
.fa-phone-alt,
.fa-envelope-open,
.fa-map-pin,
.fa-close,
.fa-eye-slash,
.fa-comment,
.fa-comment-dots,
.fa-gear,
.fa-plus-circle,
.fa-minus-circle,
.fa-circle-notch,
.fa-undo,
.fa-undo-alt,
.fa-shield-alt,
.fa-money-bill-alt,
.fa-star-half {
    line-height: 1;
    vertical-align: -0.125em;
}

/* 首页信任行图标（emoji 替换后） */
.unishelf-trust-ico {
    color: var(--wf-main-color);
    margin: 0 0.4rem 0 0.8rem;
    font-size: 1.15em;
}
