@charset "utf-8";

/* ========================================================================
   发卡系统主样式 — 生产环境精简版
   ======================================================================== */

/* ==================== 1. CSS 变量 ==================== */
:root {
    /* 品牌色 */
    --c-primary:        #FFE035;
    --c-primary-hover:  #FFD600;
    /* 语义色 */
    --c-success:        #22c55e;
    --c-danger:         #ef4444;
    --c-warning:        #d97706;
    /* 背景 / 边框 */
    --c-bg:             #fff;
    --c-bg-subtle:      #f9fafb;
    --c-bg-gray:        #f3f4f6;
    --c-border:         #e5e7eb;
    --c-border-light:   #e0e0e0;
    --c-overlay:        rgba(0,0,0,0.5);
    /* 文字 */
    --c-text:           #333;
    --c-text-secondary: #666;
    --c-text-muted:     #999;
    --c-text-inverse:   #0f0f0f;
    /* 状态背景 */
    --c-success-bg:     #dcfce7;
    --c-success-border: #bbf7d0;
    --c-error-bg:       #fee2e2;
    --c-error-border:   #fecaca;
    --c-warning-bg:     #fef3c7;
    /* 阴影 */
    --shadow-sm:        0 1px 2px rgba(0,0,0,.05);
    --shadow-md:        0 4px 6px rgba(0,0,0,.1);
    --shadow-modal:     0 8px 32px rgba(0,0,0,.18);
    --shadow-footer:    0 -2px 8px rgba(0,0,0,.06);
    /* 圆角 */
    --r-sm:             4px;
    --r-md:             8px;
    --r-lg:             12px;
    --r-round:          50px;
    /* 过渡 */
    --t-fast:           .15s;
    --t-normal:         .2s;
}

/* ==================== 2. 基础容器 ==================== */
.faka-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 16px 40px;
    min-height: 100vh;
}

/* ==================== 3. 通用组件 ==================== */

/* ---- 警告提示 ---- */
.faka-alert,
.faka-post-result-success,
.faka-post-result-error {
    padding: 12px 16px;
    border-radius: var(--r-md);
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}
.faka-alert-success,
.faka-post-result-success {
    background: var(--c-success-bg);
    color: var(--c-success);
    border: 1px solid var(--c-success-border);
}
.faka-alert-error,
.faka-post-result-error {
    background: var(--c-error-bg);
    color: var(--c-danger);
    border: 1px solid var(--c-error-border);
}

/* ---- 按钮基类 ---- */
.faka-btn,
.faka-post-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: background var(--t-normal);
    white-space: nowrap;
}
.faka-btn {
    padding: 10px 20px;
    font-size: 14px;
    height: 40px;
    border-radius: var(--r-round);
}
.faka-post-btn {
    padding: 10px 24px;
    font-size: 14px;
    border-radius: 24px;
}

/* 主按钮 */
.faka-btn-primary,
.faka-post-btn-primary {
    background: var(--c-primary);
    color: var(--c-text-inverse);
}
.faka-btn-primary:hover,
.faka-post-btn-primary:hover { background: var(--c-primary-hover); }
.faka-post-btn-primary:disabled { opacity: .6; cursor: not-allowed; }

/* 描边按钮 */
.faka-btn-outline {
    background: transparent;
    color: var(--c-text-inverse);
    border: 1px solid var(--c-border-light);
}
.faka-btn-outline:hover {
    background: var(--c-primary);
    border-color: var(--c-primary);
}
.faka-post-btn-outline {
    background: var(--c-bg);
    color: var(--c-text-secondary);
    border: 1px solid var(--c-border);
}
.faka-post-btn-outline:hover { background: var(--c-bg-subtle); }

/* ---- 输入框 ---- */
.faka-form-input,
.faka-post-input,
.faka-detail-contact-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--c-border);
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    box-sizing: border-box;
    background: var(--c-bg);
}
.faka-form-input:focus,
.faka-post-input:focus,
.faka-detail-contact-input:focus {
    border-color: var(--c-primary);
}

/* ---- 高亮文字 ---- */
.faka-highlight {
    color: var(--c-danger);
    font-weight: 600;
}

/* ---- 弹窗遮罩 ---- */
.faka-modal-overlay,
.faka-post-modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: var(--c-overlay);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}
.faka-modal-overlay.active,
.faka-post-modal-overlay.active { display: flex; }
.faka-post-modal-overlay { z-index: 9999; }

/* ---- 弹窗内容 ---- */
.faka-modal-content {
    background: var(--c-bg);
    padding: 24px;
    border-radius: var(--r-md);
    max-width: 450px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}
.faka-modal-large { max-width: 550px; }

.faka-post-modal {
    background: var(--c-bg);
    border-radius: var(--r-lg);
    max-width: 420px;
    width: 92%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 24px 20px;
    position: relative;
    box-shadow: var(--shadow-modal);
}

/* 弹窗标题 */
.faka-modal-title,
.faka-post-modal-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--c-text);
    margin: 0 0 16px 0;
    text-align: center;
}

/* 弹窗关闭按钮 */
.faka-post-modal-close {
    position: absolute;
    top: 12px; right: 14px;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--c-text-muted);
    cursor: pointer;
    line-height: 1;
    padding: 0;
}
.faka-post-modal-close:hover { color: var(--c-text); }

/* 弹窗按钮栏 */
.faka-modal-actions,
.faka-post-modal-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

/* ==================== 4. 列表页 ==================== */

/* ---- 页面头部 ---- */
.faka-header {
    text-align: center;
    margin-bottom: 24px;
    padding: 24px;
    background: var(--c-bg);
    border-radius: var(--r-md);
    box-shadow: var(--shadow-sm);
}
.faka-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--c-text);
    margin: 0 0 8px;
}
.faka-desc {
    font-size: 14px;
    color: var(--c-text-secondary);
    margin: 0 0 16px;
}

/* ---- 主布局 (Grid: 商品列表 + 侧边栏) ---- */
.faka-main {
    display: grid;
    grid-template-columns: 1fr 344px;
    gap: 24px;
}

/* ---- 商品网格 ---- */
.faka-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

/* ---- 商品卡片 ---- */
.faka-product-card {
    background: var(--c-bg);
    border-radius: var(--r-md);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    border: 2px solid transparent;
    cursor: pointer;
    display: block;
}
.faka-product-card:hover {
    border-color: var(--c-primary);
    box-shadow: var(--shadow-md);
}
.faka-product-card.selected {
    border-color: var(--c-primary);
    background: #fffdf5;
}
.faka-product-card.faka-product-disabled {
    background: #f5f5f5;
    opacity: .7;
    cursor: not-allowed;
}
.faka-product-card.faka-product-disabled:hover {
    border-color: transparent;
    box-shadow: var(--shadow-sm);
}

/* 商品头部 */
.faka-product-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}
.faka-product-icon {
    width: 24px; height: 24px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}
.faka-product-title {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
    gap: 8px;
    flex-wrap: wrap;
}
.faka-product-name {
    font-size: 16px;
    font-weight: 500;
    color: var(--c-text);
}
.has-specs-badge {
    display: inline-block;
    padding: 2px 6px;
    background: #FFE035;
    color: #0f0f0f;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    margin-left: 6px;
    vertical-align: middle;
}

/* 标签 */
.faka-product-tag {
    font-size: 11px;
    font-weight: 500;
    padding: 3px 8px;
    border-radius: var(--r-sm);
}
.faka-product-tag-spec {
    background: var(--c-primary);
    color: var(--c-text-inverse);
}

/* 角标 */
.faka-product-card {
    position: relative;
}
.faka-corner-tag {
    position: absolute;
    top: 0;
    left: 0;
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 8px 0;
    color: #fff;
    z-index: 1;
}
.faka-corner-tag-hot {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}
.faka-corner-tag-new {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}
.faka-corner-tag-recommend {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

/* 帖子链接 */
.faka-post-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    text-decoration: none;
    margin-bottom: 12px;
    padding: 6px 10px;
    background: rgba(255,224,53,.1);
    border-radius: var(--r-sm);
    width: fit-content;
    color: var(--c-text);
}
.faka-post-link:hover {
    background: rgba(255,224,53,.2);
    text-decoration: underline;
}

/* 商品描述 */
.faka-product-desc {
    font-size: 14px;
    color: var(--c-text-secondary);
    margin: 0 0 16px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 商品封面 */
.faka-product-cover img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    display: block;
    border-radius: var(--r-md);
}

/* 商品底部 */
.faka-product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.faka-product-price {
    font-size: 20px;
    font-weight: 700;
    color: var(--c-danger);
}
.faka-product-stock {
    font-size: 13px;
    color: var(--c-success);
}

/* ---- 空状态 ---- */
.faka-empty {
    grid-column: 1/-1;
    text-align: center;
    padding: 60px 20px;
    background: var(--c-bg);
    border-radius: var(--r-md);
    box-shadow: var(--shadow-sm);
}
.faka-empty-icon { font-size: 64px; margin-bottom: 16px; }
.faka-empty p { font-size: 16px; color: var(--c-text-secondary); margin: 0; }

/* ---- 侧边栏 ---- */
.faka-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.faka-section {
    background: var(--c-bg-subtle);
    border-radius: var(--r-md);
    padding: 16px;
}
.faka-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 500;
    color: var(--c-text);
    margin: 0 0 12px;
}
.faka-section-icon { font-size: 16px; }
.faka-section-content {
    font-size: 14px;
    color: var(--c-text-secondary);
    line-height: 1.6;
}

/* ==================== 5. 列表页 - 内联规格（帖子内生成） ==================== */
.faka-product-specs-inline {
    margin: 8px 0 12px;
    padding: 8px 10px;
    background: var(--c-bg-subtle);
    border-radius: 6px;
}
.faka-spec-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    font-size: 13px;
}
.faka-spec-row + .faka-spec-row { border-top: 1px dashed var(--c-border); }
.faka-spec-row-name  { color: var(--c-text); font-weight: 500; flex: 1; }
.faka-spec-row-price { color: var(--c-danger); font-weight: 600; margin: 0 10px; }
.faka-spec-row-stock { color: var(--c-success); font-size: 12px; }

/* ==================== 6. 商品详情页 ==================== */

.faka-detail-container { padding-bottom: 60px; }
.faka-back-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--c-text-secondary);
    text-decoration: none;
    font-size: 14px;
    margin-bottom: 20px;
    padding: 8px 16px;
    background: var(--c-bg);
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
}
.faka-back-link:hover {
    color: var(--c-text);
    background: var(--c-primary);
}

/* 双栏布局 (Flex) */
.faka-detail-layout {
    display: flex;
    gap: 24px;
    align-items: start;
}
.faka-detail-main {
    flex: 1;
    width: 100%;
    background: var(--c-bg);
    border-radius: var(--r-lg);
    padding: 32px;
    box-shadow: var(--shadow-sm);
}
.faka-detail-sidebar {
    width: 360px;
    flex-shrink: 0;
    position: sticky;
    top: 20px;
}

/* 购买面板 */
.faka-detail-buy-panel {
    background: var(--c-bg);
    border-radius: var(--r-lg);
    padding: 24px;
    box-shadow: var(--shadow-md);
}
.faka-detail-buy-panel .faka-detail-spec-list { grid-template-columns: 1fr; gap: 8px; }
.faka-detail-buy-panel .faka-detail-buy-row  { flex-direction: column; gap: 12px; }
.faka-detail-buy-panel .faka-detail-total-price { font-size: 24px; }

/* 缺货 */
.faka-detail-out-of-stock {
    text-align: center;
    padding: 30px;
    color: var(--c-text-muted);
    font-size: 15px;
}

/* 商品头部 */
.faka-detail-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--c-border-light);
}
.faka-detail-icon {
    width: 64px; height: 64px;
    border-radius: var(--r-lg);
    object-fit: cover;
    box-shadow: var(--shadow-sm);
}
.faka-detail-name {
    font-size: 26px;
    font-weight: 700;
    color: var(--c-text);
    margin: 0 0 6px;
}

/* 封面 */
.faka-detail-cover {
    margin-bottom: 24px;
}
.faka-detail-cover img {
    width: 100%;
    max-height: 360px;
    object-fit: cover;
    display: block;
    border-radius: var(--r-md);
}

/* 区块标题 */
.faka-detail-section-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--c-text);
    margin: 0 0 16px;
    padding-left: 10px;
    border-left: 3px solid var(--c-primary);
}

/* 描述 */
.faka-detail-desc {
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--c-border-light);
}
.faka-detail-desc-content {
    font-size: 15px;
    color: var(--c-text-secondary);
    line-height: 1.8;
}

/* 介绍按钮 */
.faka-detail-intro-section {
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--c-border-light);
}
.faka-detail-intro-btns {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.faka-detail-intro-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 38px;
    border-radius: 38px;
    font-size: 14px;
    cursor: pointer;
    border: none;
    transition: opacity var(--t-normal), transform .1s;
}
.faka-detail-intro-btn:hover {
    opacity: .9;
    transform: scale(1.02);
}

/* 规格选择 */
.faka-detail-specs { margin-bottom: 20px; }
.faka-detail-specs-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--c-text);
    margin: 0 0 10px;
}
.faka-detail-spec-list,
.faka-post-spec-list {
    display: grid;
    gap: 10px;
}
.faka-detail-spec-list { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.faka-post-spec-list   { grid-template-columns: repeat(2, 1fr); gap: 8px; }

/* 规格卡片 — 详情页 & 帖子弹窗共用 */
.faka-detail-spec-card,
.faka-post-spec-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    border: 2px solid var(--c-border);
    border-radius: 10px;
    cursor: pointer;
    background: var(--c-bg);
    transition: border-color var(--t-fast);
}
.faka-detail-spec-card { padding: 14px 16px; }
.faka-post-spec-card   { padding: 10px 12px; gap: 2px; border-radius: 8px; }

.faka-detail-spec-card:hover,
.faka-post-spec-card:hover { border-color: var(--c-primary); }
.faka-post-spec-card.active {
    border-color: var(--c-primary);
    background: #fffdf5;
}

/* radio 隐藏 */
.faka-detail-spec-card input[type="radio"] { display: none; }
.faka-detail-spec-card:has(input:checked) {
    border-color: var(--c-primary);
    background: #fffdf5;
}

/* 禁用 */
.faka-detail-spec-card.disabled {
    opacity: .5;
    cursor: not-allowed;
    background: #f5f5f5;
}
.faka-detail-spec-card.disabled:hover { border-color: var(--c-border); }

/* 规格文案 */
.faka-detail-spec-card .faka-detail-spec-name,
.faka-post-spec-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--c-text);
}
.faka-post-spec-name { font-size: 13px; }
.faka-detail-spec-card .faka-detail-spec-price,
.faka-post-spec-price {
    font-weight: 700;
    color: var(--c-danger);
}
.faka-detail-spec-card .faka-detail-spec-price { font-size: 18px; }
.faka-post-spec-price { font-size: 15px; }
.faka-detail-spec-card .faka-detail-spec-stock,
.faka-post-spec-stock {
    font-size: 12px;
    color: var(--c-success);
}
.faka-post-spec-stock { font-size: 11px; }

/* 购买表单 */
.faka-detail-buy-row {
    display: flex;
    gap: 20px;
    margin-bottom: 16px;
}
.faka-detail-buy-field { flex: 1; }
.faka-detail-buy-field label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--c-text-secondary);
    margin-bottom: 8px;
}

/* 数量选择器 */
.faka-detail-qty,
.faka-post-qty-control {
    display: flex;
    align-items: center;
    background: var(--c-bg-gray);
    border-radius: 8px;
    padding: 3px;
    width: fit-content;
}
.faka-detail-qty-btn,
.faka-post-qty-btn {
    width: 36px; height: 36px;
    border: none;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    font-size: 18px;
    font-weight: 600;
    color: var(--c-text);
}
.faka-post-qty-btn { width: 32px; height: 32px; }
.faka-detail-qty-btn:hover,
.faka-post-qty-btn:hover { background: var(--c-bg); }

.faka-detail-qty input,
.faka-post-qty-input {
    width: 50px;
    border: none;
    background: transparent;
    text-align: center;
    font-weight: 600;
}
.faka-detail-qty input { font-size: 16px; }
.faka-post-qty-input { width: 44px; height: 32px; font-size: 15px; }

/* 价格行 */
.faka-detail-price-row,
.faka-post-price-row {
    text-align: center;
    margin-bottom: 16px;
    font-size: 14px;
    color: var(--c-text-secondary);
}
.faka-post-price-row { padding: 12px 0; }

.faka-detail-total-price,
.faka-post-price {
    font-weight: 700;
    color: var(--c-danger);
}
.faka-detail-total-price { font-size: 28px; }
.faka-post-price { font-size: 22px; }

/* 购买按钮 */
.faka-detail-btn-row {
    display: flex;
    gap: 10px;
}
.faka-detail-btn-row .faka-btn-outline {
    height: 44px;
    padding: 0 16px;
    border-radius: 44px;
    flex-shrink: 0;
}
.faka-detail-buy-btn {
    flex: 1;
    height: 44px;
    background: var(--c-primary);
    color: var(--c-text-inverse);
    border: none;
    border-radius: 44px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--t-normal), transform .1s;
}
.faka-detail-buy-btn:hover {
    background: var(--c-primary-hover);
    transform: scale(1.01);
}
.faka-detail-buy-btn:disabled {
    opacity: .6;
    cursor: not-allowed;
    transform: none;
}

/* 购买结果 */
.faka-detail-result {
    margin-top: 16px;
    text-align: center;
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
}

/* ==================== 7. 帖子自助购买弹窗 ==================== */

/* -- 弹窗内标签 -- */
.faka-post-specs { margin-bottom: 16px; }
.faka-post-section-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--c-text);
    margin: 0 0 8px;
}

/* 弹窗内商品头 */
.faka-post-product-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: var(--c-bg-subtle);
    border-radius: 8px;
    margin-bottom: 16px;
}
.faka-post-product-icon {
    width: 40px; height: 40px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}
.faka-post-product-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--c-text);
    margin: 0;
}
.faka-post-product-desc {
    font-size: 12px;
    color: var(--c-text-muted);
    margin: 4px 0 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 弹窗内输入行 */
.faka-post-field { margin-bottom: 16px; }
.faka-post-qty-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

/* 收款码 */
.faka-post-qrcode-section {
    margin-bottom: 18px;
    text-align: center;
}
.faka-post-qrcode-list {
    display: flex;
    justify-content: center;
    gap: 20px;
}
.faka-post-qrcode-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}
.faka-post-qrcode-item img {
    height: 180px;
    border-radius: 8px;
    border: 1px solid var(--c-border);
}
.faka-post-qrcode-item span {
    font-size: 13px;
    color: var(--c-text-secondary);
}

/* 弹窗内结果提示 */
.faka-post-result {
    margin-top: 14px;
}

/* ==================== 8. 订单查询弹窗 ==================== */
.faka-check-form {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}
.faka-check-form .faka-form-input { flex: 1; }

/* 订单卡片 */
.faka-order-card {
    background: var(--c-bg-subtle);
    border-radius: var(--r-md);
    padding: 16px;
    margin-bottom: 16px;
}
.faka-order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.faka-order-id {
    font-weight: 600;
    color: var(--c-text);
}
.faka-order-status {
    font-size: 12px;
    font-weight: 500;
    padding: 4px 12px;
    border-radius: var(--r-round);
}
.faka-order-info {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}
.faka-order-item {
    font-size: 14px;
    color: var(--c-text-secondary);
}
.faka-order-label {
    font-weight: 500;
    color: var(--c-text);
}
.faka-order-codes {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--c-border);
}
.faka-codes-list {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.faka-code-item {
    display: block;
    background: var(--c-bg);
    padding: 10px 12px;
    border-radius: var(--r-sm);
    font-family: 'Monaco','Consolas',monospace;
    font-size: 14px;
    word-break: break-all;
    border: 1px solid var(--c-border);
}

/* 状态色 */
.faka-status-pending  { background: var(--c-warning-bg); color: var(--c-warning); }
.faka-status-approved { background: var(--c-success-bg); color: var(--c-success); }
.faka-status-rejected { background: var(--c-error-bg);   color: var(--c-danger); }

/* ==================== 9. 移动端适配 (≤850px) ==================== */
@media (max-width: 850px) {

    /* 容器 */
    .faka-container { padding: 12px 12px 80px; }

    /* 列表主布局 — 使用flex并调整顺序，让侧边栏显示在上面 */
    .faka-main {
        display: flex;
        flex-direction: column;
        gap: 16px;
    }
    .faka-sidebar {
        order: -1;
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    /* 详情布局 — flex 竖向自然排列 */
    .faka-detail-container { padding-bottom: 24px; }
    .faka-detail-layout { flex-direction: column; gap: 16px; }
    .faka-detail-main { padding: 20px 16px; }
    .faka-detail-sidebar { width: 100%; position: static; }

    /* 头部 */
    .faka-header { padding: 20px 16px; margin-bottom: 16px; }
    .faka-title { font-size: 18px; }
    .faka-desc { font-size: 13px; }

    /* 返回按钮 */
    .faka-back-link { font-size: 13px; padding: 6px 14px; margin-bottom: 14px; }

    /* 商品卡片 */
    .faka-product-grid { grid-template-columns: 1fr; gap: 12px; }
    .faka-product-card { padding: 16px; }
    .faka-product-name { font-size: 15px; }
    .faka-product-desc { font-size: 13px; -webkit-line-clamp: 3; line-clamp: 3; }
    .faka-product-cover img { height: 160px; }
    .faka-product-price { font-size: 18px; }
    .faka-product-stock { font-size: 12px; }
    .faka-post-link { font-size: 12px; padding: 5px 8px; }

    /* 空状态 */
    .faka-empty { padding: 40px 16px; }
    .faka-empty-icon { font-size: 48px; }
    .faka-empty p { font-size: 14px; }

    /* 详情页内容 */
    .faka-detail-header { gap: 12px; margin-bottom: 16px; padding-bottom: 14px; }
    .faka-detail-icon { width: 44px; height: 44px; border-radius: 10px; }
    .faka-detail-name { font-size: 18px; }
    .faka-detail-cover img { max-height: 180px; }
    .faka-detail-section-title { font-size: 15px; margin-bottom: 12px; }
    .faka-detail-desc,
    .faka-detail-intro-section { margin-bottom: 20px; padding-bottom: 16px; }
    .faka-detail-desc-content { font-size: 14px; line-height: 1.7; }
    .faka-detail-intro-btn { height: 42px; font-size: 14px; border-radius: 42px; }

    /* 购买面板 */
    .faka-detail-buy-panel { padding: 20px 16px; border-radius: var(--r-md); }
    .faka-detail-buy-panel .faka-detail-section-title { font-size: 16px; }
    .faka-detail-specs-label { font-size: 13px; }
    .faka-detail-spec-list { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .faka-detail-spec-card { padding: 12px; border-radius: 8px; }
    .faka-detail-spec-card .faka-detail-spec-name  { font-size: 13px; }
    .faka-detail-spec-card .faka-detail-spec-price { font-size: 16px; }
    .faka-detail-spec-card .faka-detail-spec-stock { font-size: 11px; }
    .faka-detail-buy-row { flex-direction: column; gap: 12px; margin-bottom: 12px; }
    .faka-detail-buy-field label { font-size: 12px; margin-bottom: 6px; }
    .faka-detail-contact-input { padding: 10px 12px; font-size: 14px; }
    .faka-detail-price-row { font-size: 13px; margin-bottom: 14px; }
    .faka-detail-total-price { font-size: 22px; }
    .faka-detail-buy-btn { height: 46px; font-size: 15px; }
    .faka-detail-result { margin-top: 12px; font-size: 13px; }

    /* 按钮 */
    .faka-btn { padding: 10px 18px; font-size: 13px; height: 42px; }

    /* 弹窗 */
    .faka-modal-overlay { padding: 0 8px; }
    .faka-modal-content {
        padding: 20px 16px;
        width: 94%;
        max-height: 85vh;
        border-radius: var(--r-md);
    }
    .faka-modal-title { font-size: 16px; margin-bottom: 12px; }
    .faka-modal-actions { flex-wrap: wrap; gap: 8px; }

    /* 订单查询 */
    .faka-check-form { flex-direction: column; gap: 10px; }
    .faka-check-form .faka-form-input { padding: 10px 12px; font-size: 14px; }
    .faka-order-info { grid-template-columns: 1fr; gap: 6px; }
    .faka-order-card { padding: 12px 14px; }
    .faka-order-header { flex-direction: column; align-items: flex-start; gap: 6px; }
    .faka-order-item { font-size: 13px; }
    .faka-code-item { font-size: 13px; padding: 8px 10px; }

    /* 帖子支付弹窗 */
    .faka-post-modal { max-width: 94%; padding: 20px 14px; border-radius: var(--r-md); }
    .faka-post-modal-title { font-size: 16px; margin-bottom: 14px; }
    .faka-post-modal-close { top: 8px; right: 10px; font-size: 22px; }
    .faka-post-product-header { padding: 10px; gap: 8px; }
    .faka-post-product-icon { width: 36px; height: 36px; }
    .faka-post-product-name { font-size: 14px; }
    .faka-post-specs { margin-bottom: 12px; }
    .faka-post-spec-list { gap: 6px; }
    .faka-post-spec-card { padding: 10px; }
    .faka-post-qrcode-list { gap: 12px; }
    .faka-post-qrcode-item span { font-size: 12px; }
    .faka-post-price { font-size: 20px; }
    .faka-post-price-row { padding: 8px 0; margin-bottom: 12px; }
    .faka-post-btn { width: 100%; padding: 12px 16px; font-size: 14px; height: 44px; }

    /* 帖子内浮窗 */
    .faka-floating-bar { display: block !important; }
}

/* 图片预览弹窗 */
.faka-image-preview-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    cursor: zoom-out;
}

.faka-image-preview-overlay.active {
    display: flex;
}

.faka-image-preview-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    border: none;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 28px;
    line-height: 1;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s;
}

.faka-image-preview-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.faka-image-preview-img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: var(--r-md);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    cursor: default;
}

/* ==================== 侧边栏标题增强 ==================== */
.faka-sidebar-header h3 {
    position: relative;
    padding-left: 14px;
    font-size: 17px;
    font-weight: 600;
    color: #1a1a1a;
    letter-spacing: .5px;
}
.faka-sidebar-header h3::before {
    content: '';
    position: absolute;
    left: 0;
    top: 2px;
    bottom: 2px;
    width: 4px;
    border-radius: 2px;
    background: linear-gradient(180deg, #4E71FE, #8B5CF6);
}
