/* ============================================================
   皮肤：ember「橙色市场」（1006，hao8899）
   个性：白色顶栏 + 居中圆角搜索 + 橙色主按钮；浅灰底；
         白色大圆角门面卡（大标题 + 两个按钮 + 右侧漂浮平台图标）；
         分类 = 平台图标方块 + 名称；商品 = 4 列卡片（平台图标、标题、库存、价格、查看详情）
   ============================================================ */
html[data-skin="ember"] {
    --em-o: #f57c00;
    --em-o-dark: #e06c00;
    --em-o-soft: #fff4e8;
    --em-ink: #111827;
    --em-text: #374151;
    --em-muted: #6b7280;
    --em-line: #e5e7eb;
    --em-bg: #f3f4f6;
    --bx-primary: #f57c00;
    --bx-primary-dark: #e06c00;
    --bx-primary-soft: #fff4e8;
    --bx-ink: #111827;
    --bx-text: #374151;
    --bx-muted: #6b7280;
    --bx-line: #e5e7eb;
    --bx-bg: #f3f4f6;
    --bx-radius: 12px;
    --primary-blue: #f57c00;
    --primary-blue-dark: #e06c00;
    --pf-accent: #f57c00;
    --pf-accent-dark: #e06c00;
    --pf-accent-soft: #fff4e8;
    --pf-accent-line: #fdba74;
    --pf-ico-bg: #fff;
    --pf-ink: #111827;
    --pf-muted: #6b7280;
    --pf-line: #e5e7eb;
    --pf-card: #fff;
    --pf-radius: 16px;
    --pf-radius-sm: 12px;
    --pf-price: #f57c00;
    --pf-hero-bg: #fff;
    --pf-hero-ink: #111827;
    --pf-hero-dim: #4b5563;
    --pf-hero-price: #f57c00;
    --pf-badge-bg: #fff4e8;
    --pf-badge-ink: #e06c00;
}
html[data-skin="ember"] body { background: #f3f4f6 !important; }

/* ---------------- 顶栏 ---------------- */
html[data-skin="ember"] .site-header,
html[data-skin="ember"] .site-header.scrolled,
html[data-skin="ember"] .header-bar {
    background: #fff !important;
    border-bottom: 1px solid #e5e7eb !important;
    box-shadow: 0 1px 8px rgba(17, 24, 39, .06) !important;
}
html[data-skin="ember"] .site-header .logo-text,
html[data-skin="ember"] .header-logo .logo-text,
html[data-skin="ember"] .header-logo:hover .logo-text,
html[data-skin="ember"] .header-bar .logo-text {
    color: #f57c00 !important;
    -webkit-text-fill-color: #f57c00 !important;
    font-weight: 800 !important;
    letter-spacing: .02em !important;
    text-transform: none !important;
}
html[data-skin="ember"] .site-header .logo-text::before,
html[data-skin="ember"] .header-bar .logo-text::before {
    content: ''; display: inline-block; width: 22px; height: 22px; margin-right: 8px; vertical-align: -4px;
    border-radius: 7px; background: linear-gradient(135deg, #ffb74d, #f57c00 60%, #e65100);
    box-shadow: 0 3px 8px rgba(245, 124, 0, .35);
}
html[data-skin="ember"] .site-header .search-group { max-width: 560px; }
html[data-skin="ember"] .site-header .search-input {
    background: #fff !important;
    color: #111827 !important;
    border: 1px solid #d1d5db !important;
    border-radius: 999px 0 0 999px !important;
    padding-left: 18px !important;
}
html[data-skin="ember"] .site-header .search-input::placeholder { color: #9ca3af !important; }
html[data-skin="ember"] .site-header .search-input:focus { border-color: #f57c00 !important; box-shadow: 0 0 0 3px rgba(245, 124, 0, .12) !important; }
html[data-skin="ember"] .site-header .search-btn {
    background: #fff !important; color: #6b7280 !important;
    border: 1px solid #d1d5db !important; border-left: 0 !important;
    border-radius: 0 999px 999px 0 !important;
}
html[data-skin="ember"] .site-header .search-btn:hover { color: #f57c00 !important; }
html[data-skin="ember"] .site-header .header-action-link,
html[data-skin="ember"] .site-header .header-username,
html[data-skin="ember"] .header-bar a { color: #374151 !important; }
html[data-skin="ember"] .site-header .header-action-link:hover,
html[data-skin="ember"] .header-bar a:hover { color: #f57c00 !important; background: #fff4e8 !important; }
/* 未登录的「登录/注册」做成橙色主按钮 */
html[data-skin="ember"] .site-header .header-action-link[href*="authentication/login"] {
    background: #f57c00 !important; color: #fff !important; border-radius: 8px !important;
    padding: 8px 16px !important; font-weight: 700 !important; box-shadow: 0 4px 10px rgba(245, 124, 0, .25);
}
html[data-skin="ember"] .site-header .header-action-link[href*="authentication/login"]:hover { background: #e06c00 !important; color: #fff !important; }
html[data-skin="ember"] .header-bar .hb-user { color: #111827 !important; background: #fff4e8 !important; }
html[data-skin="ember"] .sub-nav { background: #fff !important; border-color: #e5e7eb !important; }
html[data-skin="ember"] .sub-nav-link { color: #374151 !important; }
html[data-skin="ember"] .sub-nav-link:hover,
html[data-skin="ember"] .sub-nav-link.active { color: #f57c00 !important; border-bottom-color: #f57c00 !important; }
html[data-skin="ember"] .notice-bar { background: #fff4e8 !important; border-color: #fed7aa !important; color: #9a3412 !important; }

/* ---------------- 门面：白卡 + 大标题 + 双按钮 + 漂浮图标 ---------------- */
html[data-skin="ember"] .pfhero-inner {
    background: #fff; border: 1px solid #e5e7eb; border-radius: 16px;
    box-shadow: 0 1px 3px rgba(17, 24, 39, .04); padding: 36px 40px; min-height: 280px;
}
html[data-skin="ember"] .pfhero-inner::after { display: none !important; }
html[data-skin="ember"] .pfhero-badge { background: #fff4e8; color: #e06c00; border: 0; font-weight: 700; }
html[data-skin="ember"] .pfhero-title { font-size: 2.15rem; line-height: 1.25; font-weight: 800; color: #111827; max-width: 15em; }
html[data-skin="ember"] .pfhero-sub { color: #4b5563; font-size: 1rem; line-height: 1.7; max-width: 32em; }
html[data-skin="ember"] .pfhero-stats,
html[data-skin="ember"] .pfhero-steps { display: none !important; }
html[data-skin="ember"] .em-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 22px; }
html[data-skin="ember"] .em-btn {
    display: inline-flex; align-items: center; gap: 8px; padding: 12px 24px; border-radius: 8px;
    font-size: 1.02rem; font-weight: 700; text-decoration: none; transition: all .15s; border: 1px solid #f57c00;
}
html[data-skin="ember"] .em-btn-main { background: #f57c00; color: #fff; box-shadow: 0 6px 14px rgba(245, 124, 0, .25); }
html[data-skin="ember"] .em-btn-main:hover { background: #e06c00; color: #fff; }
html[data-skin="ember"] .em-btn-ghost { background: #fff; color: #f57c00; }
html[data-skin="ember"] .em-btn-ghost:hover { background: #fff4e8; color: #e06c00; }
html[data-skin="ember"] .em-art { position: relative; flex: 0 0 380px; height: 220px; }
html[data-skin="ember"] .em-art-core { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }
html[data-skin="ember"] .em-art-mark {
    width: 96px; height: 96px; border-radius: 28px; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #ffb74d, #f57c00 55%, #e65100); color: #fff;
    box-shadow: 0 14px 30px rgba(245, 124, 0, .35); font-size: 2.6rem;
}
html[data-skin="ember"] .em-art-mark b { font-weight: 900; }
html[data-skin="ember"] .em-float {
    position: absolute; width: 38px; height: 38px; border-radius: 11px; background: #fff;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 6px 16px rgba(17, 24, 39, .1); animation: emFloat 5s ease-in-out infinite;
}
html[data-skin="ember"] .em-float svg { width: 20px; height: 20px; fill: var(--em-c); }
html[data-skin="ember"] .em-float.is-letter b { color: var(--em-c); font-size: .8rem; }
html[data-skin="ember"] .em-f0 { left: 14%; top: 8%; }
html[data-skin="ember"] .em-f1 { left: 72%; top: 2%; animation-delay: -1s; }
html[data-skin="ember"] .em-f2 { left: 4%; top: 46%; animation-delay: -2s; }
html[data-skin="ember"] .em-f3 { left: 86%; top: 36%; animation-delay: -3s; }
html[data-skin="ember"] .em-f4 { left: 20%; top: 80%; animation-delay: -1.5s; }
html[data-skin="ember"] .em-f5 { left: 46%; top: 88%; animation-delay: -2.5s; }
html[data-skin="ember"] .em-f6 { left: 76%; top: 76%; animation-delay: -.5s; }
html[data-skin="ember"] .em-f7 { left: 38%; top: 0%; animation-delay: -3.5s; }
html[data-skin="ember"] .em-f8 { left: 92%; top: 4%; animation-delay: -4s; }
@keyframes emFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@media (prefers-reduced-motion: reduce) { html[data-skin="ember"] .em-float { animation: none; } }

/* ---------------- 分类：平台图标方块 ---------------- */
html[data-skin="ember"] .pfhero-grid-wrap {
    background: #fff; border: 1px solid #e5e7eb; border-radius: 14px; padding: 18px 20px; margin-top: 18px;
}
html[data-skin="ember"] .pfhero-grid-title { font-size: 1.15rem; font-weight: 800; color: #111827; }
html[data-skin="ember"] .pfhero-grid-title i { color: #f57c00; }
html[data-skin="ember"] .pfhero-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px 8px; }
html[data-skin="ember"] .pfhero-card {
    flex-direction: column; align-items: center; justify-content: flex-start; text-align: center; gap: 7px;
    padding: 10px 4px 8px; border: 1px solid transparent; background: transparent; border-radius: 12px;
}
html[data-skin="ember"] .pfhero-card:hover { background: #fafafa; border-color: #fde0c2; box-shadow: none; transform: translateY(-2px); }
html[data-skin="ember"] .pfhero-ico {
    width: 46px; height: 46px; border-radius: 12px; background: #fff; border: 1px solid #eef0f3;
    box-shadow: 0 3px 10px rgba(17, 24, 39, .07); font-size: 1.15rem; color: #f57c00;
    display: flex; align-items: center; justify-content: center;
}
html[data-skin="ember"] .pfhero-ico.em-ico svg { width: 26px; height: 26px; fill: var(--em-c); }
html[data-skin="ember"] .pfhero-ico.em-ico.is-letter b { color: var(--em-c); font-size: .95rem; font-weight: 800; }
html[data-skin="ember"] .pfhero-card-txt { display: block; width: 100%; }
html[data-skin="ember"] .pfhero-card-name { font-size: .8rem; font-weight: 600; color: #374151; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html[data-skin="ember"] .pfhero-card-num { font-size: .7rem; color: #9ca3af; }
html[data-skin="ember"] .pfhero-card.active { background: #fff4e8; border-color: #fdba74; }
html[data-skin="ember"] .pfhero-card.active .pfhero-card-name { color: #e06c00; }
html[data-skin="ember"] .pfhero-all .pfhero-ico { background: #f57c00; color: #fff; border-color: #f57c00; }
html[data-skin="ember"] .pfhero-more { border-radius: 8px; color: #f57c00; border-color: #fdba74; }

/* ---------------- 商品：4 列卡片 ---------------- */
html[data-skin="ember"] .products-header { border-bottom: 0 !important; background: transparent !important; padding-left: 2px !important; }
html[data-skin="ember"] .products-header-title { font-size: 1.35rem !important; font-weight: 800 !important; color: #111827 !important; text-transform: none !important; }
html[data-skin="ember"] .products-header-title i { color: #f57c00 !important; }
html[data-skin="ember"] .sort-btn { border-radius: 8px !important; }
html[data-skin="ember"] body .product-list-card {
    display: grid !important; grid-template-columns: repeat(4, minmax(0, 1fr)) !important; gap: 16px !important;
    background: transparent !important; border: 0 !important; box-shadow: none !important; padding: 4px 0 !important;
}
html[data-skin="ember"] body .product-list-card > :not(.product-card) { grid-column: 1 / -1; }
html[data-skin="ember"] body .product-list-card .product-card {
    display: flex !important; flex-direction: column !important; align-items: stretch !important; gap: 8px !important;
    background: #fff !important; border: 1px solid #e5e7eb !important; border-radius: 12px !important;
    padding: 14px !important; min-height: 0 !important; height: auto !important; margin: 0 !important;
    box-shadow: 0 1px 2px rgba(17, 24, 39, .04) !important; transition: border-color .15s, box-shadow .15s, transform .15s !important;
    position: relative !important;
}
html[data-skin="ember"] body .product-list-card .product-card:hover {
    border-color: #f9a24b !important; box-shadow: 0 8px 22px rgba(17, 24, 39, .08) !important; transform: translateY(-2px);
    background: #fff !important;
}
html[data-skin="ember"] body .product-list-card .product-card.pf-hide,
html[data-skin="ember"] body .product-list-card .product-card[hidden],
html[data-skin="ember"] body .product-list-card .product-card[style*="display: none"],
html[data-skin="ember"] body .product-list-card .product-card[style*="display:none"] { display: none !important; }
html[data-skin="ember"] .product-card > * { width: 100% !important; max-width: none !important; flex: 0 0 auto !important; }
html[data-skin="ember"] .em-thumb {
    display: flex !important; align-items: center; justify-content: center; height: 76px; border-radius: 10px;
    background: linear-gradient(135deg, #fafafa, #f3f4f6); text-decoration: none; order: 0;
}
html[data-skin="ember"] .em-logo {
    width: 52px; height: 52px; border-radius: 14px; background: #fff; display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 12px rgba(17, 24, 39, .1);
}
html[data-skin="ember"] .em-logo svg { width: 30px; height: 30px; fill: var(--em-c); }
html[data-skin="ember"] .em-logo.is-letter b { color: var(--em-c); font-weight: 900; font-size: 1.05rem; }
html[data-skin="ember"] .product-card .card-section-top {
    order: 2; display: flex !important; justify-content: space-between !important; align-items: center !important; padding: 0 !important;
}
html[data-skin="ember"] .product-card .card-supplier { font-size: .74rem !important; color: #6b7280 !important; }
html[data-skin="ember"] .product-card .card-supplier .supplier-label { display: none !important; }
html[data-skin="ember"] .product-card .card-supplier .supplier-name::before {
    content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 2px; background: #f57c00; margin-right: 5px; vertical-align: 0;
}
html[data-skin="ember"] .product-card .card-follow-btn { position: absolute !important; top: 18px; right: 18px; background: #fff !important; border-radius: 999px !important; padding: 3px 7px !important; border: 1px solid #e5e7eb !important; color: #9ca3af !important; }
html[data-skin="ember"] .product-card .card-follow-btn .follow-text { display: none !important; }
html[data-skin="ember"] .product-card .card-section-title { order: 1; padding: 0 !important; min-height: 2.7em !important; }
html[data-skin="ember"] .product-card .card-product-name {
    font-size: .9rem !important; font-weight: 700 !important; color: #111827 !important; line-height: 1.35 !important;
    display: -webkit-box !important; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; white-space: normal !important;
}
html[data-skin="ember"] .product-card .card-product-name:hover { color: #f57c00 !important; }
html[data-skin="ember"] .product-card .card-section-meta { order: 3; padding: 0 !important; min-width: 0 !important; }
html[data-skin="ember"] .product-card .card-meta-row { font-size: .78rem !important; color: #6b7280 !important; background: none !important; border: 0 !important; padding: 0 !important; }
html[data-skin="ember"] .product-card .card-section-meta > * { background: none !important; border: 0 !important; box-shadow: none !important; }
html[data-skin="ember"] .product-card .card-meta-row strong::before {
    content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #22c55e; margin: 0 5px 1px 2px;
}
html[data-skin="ember"] .product-card .stock-meter { display: none !important; }
html[data-skin="ember"] .product-card .card-section-price {
    order: 4; display: flex !important; align-items: center !important; justify-content: space-between !important;
    gap: 8px; margin-top: auto !important; padding: 6px 0 0 !important; text-align: left !important;
}
html[data-skin="ember"] .product-card .card-price-label { display: none !important; }
html[data-skin="ember"] .product-card .card-price-value { color: #f57c00 !important; font-size: 1.15rem !important; font-weight: 800 !important; }
html[data-skin="ember"] .em-go {
    display: inline-flex; align-items: center; padding: 7px 14px; border-radius: 6px; background: #f57c00; color: #fff !important;
    font-size: .8rem; font-weight: 700; text-decoration: none !important; white-space: nowrap;
}
html[data-skin="ember"] .em-go:hover { background: #e06c00; }

/* 号型筛选 / 分页 */
html[data-skin="ember"] .pflt-chip.is-on,
html[data-skin="ember"] .pflt-chip.active,
html[data-skin="ember"] .pflt .on { background: #f57c00 !important; border-color: #f57c00 !important; color: #fff !important; }

/* 页脚 / 其它页面强调色 */
html[data-skin="ember"] .site-footer { background: #fff !important; border-top: 1px solid #e5e7eb !important; }
html[data-skin="ember"] .layui-nav-tree .layui-this a { background: rgba(245, 124, 0, .22) !important; }
html[data-skin="ember"] .layui-input:focus,
html[data-skin="ember"] .layui-textarea:focus { box-shadow: 0 0 0 3px rgba(245, 124, 0, .14) !important; }

@media (max-width: 1100px) {
    html[data-skin="ember"] body .product-list-card { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
    html[data-skin="ember"] .em-art { flex-basis: 300px; }
}
@media (max-width: 860px) {
    html[data-skin="ember"] body .product-list-card { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 10px !important; }
    html[data-skin="ember"] .em-art { display: none; }
    html[data-skin="ember"] .pfhero-inner { padding: 26px 22px; min-height: 0; }
    html[data-skin="ember"] .pfhero-title { font-size: 1.55rem; }
}
@media (max-width: 640px) {
    html[data-skin="ember"] .pfhero-title { font-size: 1.35rem; }
    html[data-skin="ember"] .pfhero-sub { font-size: .9rem; }
    html[data-skin="ember"] .em-btn { padding: 10px 16px; font-size: .92rem; }
    html[data-skin="ember"] .pfhero-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px 4px; }
    html[data-skin="ember"] .pfhero-ico { width: 40px; height: 40px; }
    html[data-skin="ember"] .pfhero-card-num { display: none; }
    html[data-skin="ember"] body .product-list-card .product-card { padding: 10px !important; gap: 6px !important; }
    html[data-skin="ember"] .em-thumb { height: 60px; }
    html[data-skin="ember"] .em-logo { width: 42px; height: 42px; }
    html[data-skin="ember"] .em-logo svg { width: 24px; height: 24px; }
    html[data-skin="ember"] .product-card .card-product-name { font-size: .82rem !important; }
    html[data-skin="ember"] .product-card .card-section-price { flex-direction: column !important; align-items: stretch !important; }
    html[data-skin="ember"] .em-go { justify-content: center; }
    html[data-skin="ember"] .product-card .card-follow-btn { top: 14px; right: 14px; }
}

/* 1006 防闪：旧横排分类条一开始就藏（新分类方块 8 秒没出来才由 ember.js 放出来兜底）；
   分类宫格加载时先占高度；商品卡图标位先占位，脚本补图标时不跳 */
html[data-skin="ember"]:not(.em-showbar) .sidebar-categories { display: none !important; }
html[data-skin="ember"] .pfhero-grid { min-height: 196px; }
html[data-skin="ember"] .pfhero-skel { height: 86px; border-radius: 12px; background: linear-gradient(90deg, #f3f4f6, #e5e7eb, #f3f4f6); background-size: 200% 100%; animation: emSkel 1.2s linear infinite; }
@keyframes emSkel { from { background-position: 200% 0; } to { background-position: -200% 0; } }
html[data-skin="ember"] body .product-list-card .product-card:not([data-em]):not(.product-card--skeleton)::before {
    content: ''; display: block; height: 76px; border-radius: 10px; background: linear-gradient(135deg, #fafafa, #f3f4f6); order: 0;
}
html[data-skin="ember"] body .product-list-card .product-card:not([data-em]) .card-section-price::after {
    content: '查看详情'; display: inline-flex; padding: 7px 14px; border-radius: 6px; background: #f57c00; color: #fff; font-size: .8rem; font-weight: 700;
}
@media (max-width: 640px) {
    html[data-skin="ember"] body .product-list-card .product-card:not([data-em]):not(.product-card--skeleton)::before { height: 60px; }
}
