/* ============================================
   号卡套餐展示系统 - 统一样式
   ============================================ */

/* --- CSS 变量 --- */
:root {
    --primary: #1677FF;
    --primary-light: #e6f0ff;
    --success: #00A870;
    --danger: #E8302F;
    --warning: #FF6B00;
    --bg: #f5f6fa;
    --bg-white: #fff;
    --text: #333;
    --text-secondary: #666;
    --text-muted: #999;
    --border: #e8e8e8;
    --shadow: 0 2px 12px rgba(0,0,0,0.08);
    --radius: 12px;
    --transition: 0.3s ease;
    
    /* 运营商品牌色 */
    --carrier-mobile: #1677FF;
    --carrier-unicom: #E8302F;
    --carrier-telecom: #00A870;
    --carrier-broadcast: #FF6B00;
}

/* --- 基础重置 --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
}
a { color: var(--primary); text-decoration: none; }
img { max-width: 100%; vertical-align: middle; }
input, textarea, select, button { font-family: inherit; font-size: inherit; }

/* --- 通用工具 --- */
.text-center { text-align: center; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }

/* --- 按钮 --- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 8px 20px; border: 1px solid transparent; border-radius: 8px;
    cursor: pointer; font-size: 14px; font-weight: 500; transition: var(--transition);
    white-space: nowrap; user-select: none;
}
.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: #0958d9; }
.btn-success { background: var(--success); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #c62828; }
.btn-outline { background: #fff; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: var(--primary-light); }
.btn-sm { padding: 4px 12px; font-size: 12px; }
.btn-lg { padding: 12px 32px; font-size: 16px; }
.btn-block { width: 100%; }
.btn-icon { width: 32px; height: 32px; padding: 0; border: 1px solid var(--border); background: #fff; border-radius: 6px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; transition: var(--transition); color: #666; }
.btn-icon:hover { color: var(--primary); border-color: var(--primary); background: var(--primary-light); }
.btn-icon.danger:hover { color: var(--danger); border-color: var(--danger); background: #fff2f0; }

/* --- 输入框 --- */
.form-group { margin-bottom: 16px; }
.form-label { display: block; margin-bottom: 6px; font-size: 13px; color: var(--text-secondary); font-weight: 500; }
.form-label .required { color: var(--danger); margin-left: 2px; }
.form-input, .form-select, .form-textarea {
    width: 100%; padding: 10px 14px; border: 1px solid var(--border);
    border-radius: 8px; font-size: 14px; outline: none; transition: var(--transition);
    background: #fff; color: var(--text);
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
    border-color: var(--primary); box-shadow: 0 0 0 2px rgba(22,119,255,0.1);
}
.form-input.error, .form-select.error, .form-textarea.error {
    border-color: var(--danger); box-shadow: 0 0 0 2px rgba(232,48,47,0.1);
}
.form-error { color: var(--danger); font-size: 12px; margin-top: 4px; display: none; }
.form-error.show { display: block; }
.form-textarea { min-height: 80px; resize: vertical; }
.form-hint { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.form-row { display: flex; gap: 12px; }
.form-row > * { flex: 1; }

/* --- 图片上传 --- */
.upload-area {
    border: 2px dashed var(--border); border-radius: 8px; padding: 20px;
    text-align: center; cursor: pointer; transition: var(--transition); min-height: 80px;
    display: flex; align-items: center; justify-content: center; flex-direction: column;
}
.upload-area:hover { border-color: var(--primary); background: var(--primary-light); }
.upload-area.has-image { padding: 8px; }
.upload-area img { max-height: 120px; border-radius: 8px; }
.upload-icon { font-size: 32px; color: var(--text-muted); }
.upload-text { color: var(--text-muted); font-size: 13px; margin-top: 4px; }

/* --- Toast 提示 --- */
.toast-container { position: fixed; top: 24px; left: 50%; transform: translateX(-50%); z-index: 10000; display: flex; flex-direction: column; gap: 8px; }
.toast { padding: 12px 24px; border-radius: 8px; color: #fff; font-size: 14px; animation: slideDown 0.3s ease; box-shadow: 0 4px 16px rgba(0,0,0,0.15); white-space: nowrap; }
.toast-success { background: var(--success); }
.toast-error { background: var(--danger); }
.toast-info { background: var(--primary); }
@keyframes slideDown { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }

/* --- Modal 弹窗 --- */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5); z-index: 9000; display: flex;
    align-items: center; justify-content: center; animation: fadeIn 0.2s ease;
}
.modal-content {
    background: #fff; border-radius: 12px; padding: 24px; width: 400px; max-width: 90vw;
    box-shadow: 0 8px 40px rgba(0,0,0,0.15);
}
.modal-title { font-size: 16px; font-weight: 600; margin-bottom: 12px; }
.modal-body { color: var(--text-secondary); margin-bottom: 20px; line-height: 1.6; }
.modal-footer { display: flex; justify-content: flex-end; gap: 10px; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* --- 抽屉面板 --- */
.drawer-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5); z-index: 8000; animation: fadeIn 0.2s ease;
}
.drawer {
    position: fixed; top: 0; right: 0; width: 480px; max-width: 100vw; height: 100%;
    background: #fff; z-index: 8001; display: flex; flex-direction: column;
    box-shadow: -4px 0 20px rgba(0,0,0,0.1); animation: slideInRight 0.3s ease;
}
.drawer-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px; border-bottom: 1px solid var(--border);
}
.drawer-header h3 { font-size: 16px; font-weight: 600; }
.drawer-close {
    width: 32px; height: 32px; border: none; background: none; cursor: pointer;
    font-size: 20px; color: var(--text-muted); display: flex; align-items: center; justify-content: center; border-radius: 6px;
}
.drawer-close:hover { background: #f5f5f5; color: var(--text); }
.drawer-body { flex: 1; overflow-y: auto; padding: 20px; }
.drawer-footer { display: flex; gap: 10px; padding: 16px 20px; border-top: 1px solid var(--border); justify-content: flex-end; }
@keyframes slideInRight { from { transform: translateX(100%); } to { transform: translateX(0); } }

body.admin-modal-open {
    overflow: hidden;
}

.drawer.drawer-xl {
    left: 50%;
    right: auto;
    top: 4vh;
    bottom: auto;
    width: min(1280px, calc(100vw - 48px));
    max-width: min(1280px, calc(100vw - 48px));
    height: 92vh;
    border-radius: 24px;
    box-shadow: 0 30px 90px rgba(15, 23, 42, 0.24);
    transform: translateX(-50%);
    animation: drawerPopIn 0.25s ease;
}

.drawer.drawer-xl .drawer-header,
.drawer.drawer-xl .drawer-footer {
    padding-left: 28px;
    padding-right: 28px;
}

.drawer.drawer-xl .drawer-body {
    padding: 0;
}

.product-editor-layout {
    display: grid;
    grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
    min-height: 0;
    height: 100%;
}

.editor-ai-panel {
    background:
        radial-gradient(circle at top left, rgba(22,119,255,0.18), transparent 28%),
        linear-gradient(180deg, #f7faff 0%, #eef5ff 100%);
    border-right: 1px solid rgba(22,119,255,0.12);
    padding: 28px;
    overflow-y: auto;
}

.editor-ai-panel h4 {
    font-size: 24px;
    line-height: 1.25;
    margin-bottom: 10px;
    color: #0f172a;
}

.editor-ai-panel p {
    color: #526075;
    font-size: 14px;
    margin-bottom: 22px;
}

.editor-panel-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    margin-bottom: 16px;
    border-radius: 999px;
    background: rgba(22,119,255,0.1);
    color: var(--primary);
    font-size: 12px;
    font-weight: 600;
}

.editor-form-panel {
    padding: 28px;
    overflow-y: auto;
}

.editor-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 16px;
}

.form-group-span-2 {
    grid-column: span 2;
}

.upload-area.upload-area-lg {
    min-height: 220px;
    justify-content: center;
    background: rgba(255,255,255,0.72);
}

.upload-area.upload-area-lg img {
    max-height: 180px;
    object-fit: contain;
}

.img-preview-card {
    position: relative;
    width: 100%;
}

.img-preview-card img {
    width: 100%;
    max-height: 220px;
    object-fit: contain;
    border-radius: 12px;
}

.img-preview-card .remove-img {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 50%;
    background: rgba(15,23,42,0.72);
    color: #fff;
    cursor: pointer;
}

.editor-ai-textarea {
    min-height: 220px;
    resize: vertical;
}

.ai-result-summary {
    margin-top: 16px;
    padding: 14px 16px;
    border-radius: 14px;
    background: rgba(255,255,255,0.76);
    border: 1px solid rgba(22,119,255,0.08);
    color: #64748b;
    line-height: 1.7;
}

.ai-result-summary.has-content {
    color: #1e293b;
}

@keyframes drawerPopIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(18px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0) scale(1);
    }
}

/* --- 加载动画 --- */
.loading { display: flex; align-items: center; justify-content: center; padding: 40px; color: var(--text-muted); }
.spinner {
    width: 32px; height: 32px; border: 3px solid var(--border);
    border-top-color: var(--primary); border-radius: 50%; animation: spin 0.8s linear infinite; margin-right: 10px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* --- 空状态 --- */
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.empty-state svg { width: 80px; height: 80px; margin-bottom: 16px; opacity: 0.3; }
.empty-state p { font-size: 14px; }

/* ============================================
   H5 前端展示页样式 - 复刻维兆通信风格
   ============================================ */

:root {
    --primary-color: #0d6efd;
    --secondary-color: #f5f5f5;
}

.h5-page {
    font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
    background-color: #f5f5f5;
    margin: 0;
    padding: 0;
    font-size: 14px;
    display: flex;
    justify-content: center;
}

/* 移动端容器 */
.mobile-container {
    width: 100%;
    max-width: 480px;
    position: relative;
    overflow-x: hidden;
    min-height: 100vh;
}

.container-fluid {
    padding: 0;
    background-color: #f9fafb;
    padding-bottom: calc(8px + env(safe-area-inset-bottom));
}

/* 头部 */
.header {
    background-color: white;
    padding: 12px 15px;
    box-shadow: 0 1px 5px rgba(0,0,0,0.05);
    padding-bottom: 5px;
}

/* 搜索框 */
.search-container {
    display: flex;
    align-items: center;
    background-color: #fff;
    border-radius: 20px;
    padding: 5px;
    margin-bottom: 10px;
    border: solid 1px var(--primary-color);
}
.search-input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-size: 14px;
    padding: 0 8px;
}
.search-btn {
    color: #fff;
    background: none;
    border: none;
    font-size: 14px;
    background-color: var(--primary-color);
    border-radius: 15px;
    padding: 5px 15px;
    white-space: nowrap;
    cursor: pointer;
}

/* 店铺信息 */
.shop-info-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin: 15px 0;
}
.shop-info-left {
    flex: 1;
}
.shop-name {
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 5px;
}
.shop-rating-container {
    display: flex;
    align-items: center;
}
.shop-reputation {
    font-size: 12px;
    margin-right: 0px;
    border: solid 1px #ffe8ee;
    padding: 2px 5px;
    color: #ff3d63;
    border-radius: 5px 0px 0px 5px;
    font-family: sans-serif;
    font-weight: bold;
}
.shop-rating {
    color: #ff3d63;
    font-weight: bold;
    margin-right: 5px;
    background: #ffe8ee;
    padding: 0 5px;
    border: solid 1px #ffe8ee;
    font-size: 14px;
    font-style: italic;
    height: 24px;
    border-radius: 0px 5px 5px 0px;
}
.shop-rating .rating-level {
    font-style: normal;
    color: #ff3d63;
    font-weight: bold;
}
.shop-badge {
    background-color: #f3f6fd;
    color: #667490;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
}
.shop-info-right {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}
.shop-action-btn {
    background: none;
    border: none;
    color: #343a40;
    font-size: 13px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0;
    cursor: pointer;
    text-decoration: none;
}
.shop-action-btn i {
    font-size: 18px;
    margin-bottom: 2px;
}

/* 客服弹窗 */
.service-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}
.service-modal.show {
    display: flex;
}
.service-modal-content {
    background: white;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    position: relative;
    max-width: 280px;
    width: 80%;
}
.service-modal-content img {
    width: 200px;
    height: 200px;
    object-fit: contain;
    border-radius: 8px;
    border: 1px solid #eee;
}
.service-tip {
    font-size: 13px;
    color: #666;
    margin-top: 10px;
}
.service-close-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    font-size: 18px;
    color: #999;
    cursor: pointer;
}
.service-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1999;
    display: none;
}
.service-overlay.show {
    display: block;
}

/* 筛选区域 */
.filter-container {
    background-color: white;
    padding: 5px 15px;
    margin-bottom: 10px;
    position: relative;
    z-index: 20;
}

/* 运营商授权横幅 */
.auth-banner {
    margin: 0 15px 10px;
    border-radius: 10px;
    overflow: hidden;
    background: linear-gradient(135deg, #0d6efd 0%, #4dabf7 50%, #0d6efd 100%);
    padding: 18px 20px;
    position: relative;
    box-shadow: 0 2px 10px rgba(13,110,253,0.3);
}
.auth-decor {
    position: absolute;
    border-radius: 50%;
    z-index: 0;
}
.auth-decor-1 {
    top: -20px;
    right: -20px;
    width: 100px;
    height: 100px;
    background: rgba(255,255,255,0.1);
}
.auth-decor-2 {
    bottom: -30px;
    right: 50px;
    width: 80px;
    height: 80px;
    background: rgba(255,255,255,0.08);
}
.auth-decor-3 {
    top: 10px;
    right: 120px;
    width: 30px;
    height: 30px;
    background: rgba(255,255,255,0.12);
}
.auth-decor-phone {
    position: absolute;
    bottom: 5px;
    right: 15px;
    font-size: 40px;
    opacity: 0.2;
    z-index: 0;
}
.auth-banner-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 1;
}
.auth-banner-title {
    color: white;
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 6px;
}
.auth-banner-subtitle {
    display: flex;
    gap: 6px;
}
.auth-sub-badge {
    color: white;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 10px;
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
}
.auth-banner-icons {
    display: flex;
    gap: 8px;
}
.auth-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
    backdrop-filter: blur(4px);
}
.auth-icon.mobile-icon { background: rgba(22,119,255,0.6); }
.auth-icon.unicom-icon { background: rgba(232,48,47,0.6); }
.auth-icon.telecom-icon { background: rgba(0,168,112,0.6); }
.filter-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 5px;
    padding-bottom: 5px;
    margin: 5px 0px;
    align-items: stretch;
    overflow: visible;
    position: relative;
    z-index: 30;
}
.filter-row::-webkit-scrollbar {
    display: none;
}
.filter-group {
    position: relative;
    min-width: 0;
    z-index: 40;
    display: flex;
    justify-content: space-around;
    align-items: center;
}
.filter-select-btn {
    width: 100%;
    padding: 8px 0px;
    border-radius: 4px;
    border: none;
    background-color: white;
    text-align: left;
    font-size: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    white-space: nowrap;
    gap: 4px;
    padding-inline: 8px;
    position: relative;
    z-index: 1001;
    cursor: pointer;
}
.filter-select-btn i {
    font-size: 10px;
    transition: transform 0.2s;
}
.filter-select-btn.active i {
    transform: rotate(180deg);
}
.filter-options {
    position: absolute;
    top: 100%;
    left: 0;
    width: max-content;
    min-width: 100%;
    max-width: min(240px, calc(100vw - 24px));
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    max-height: 200px;
    overflow-y: auto;
    display: none;
    z-index: 1200;
}
.filter-options.show {
    display: block;
}
.filter-option {
    padding: 8px 12px;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.2s;
    white-space: nowrap;
}
.filter-option:hover {
    background-color: #f0f7ff;
}
.filter-option.selected {
    color: var(--primary-color);
    font-weight: bold;
}
.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    border-top: solid 1px #eee;
    padding-top: 10px;
    position: relative;
    z-index: 10;
}
.filter-button {
    padding: 4px 15px;
    border-radius: 15px;
    background-color: var(--secondary-color);
    font-size: 14px;
    border: none;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s ease;
}
.filter-button.active {
    background-color: var(--primary-color);
    color: white;
}
.filter-button:hover {
    opacity: 0.85;
}

/* 套餐卡片列表 */
.product-list {
    padding: 0 15px;
    position: relative;
    z-index: 0;
}

/* 卡片项 */
.card-item {
    background-color: white;
    border-radius: 8px;
    margin-bottom: 12px;
    padding: 10px;
    box-shadow: 0px 0px 20px 0px rgba(0,0,0,0.05);
    border: solid 1px rgba(0,0,0,0.05);
    position: relative;
}

/* 主推标签 */
.topping-tag {
    position: absolute;
    top: 5px;
    left: 5px;
    z-index: 2;
}
.topping-badge {
    display: inline-block;
    background: linear-gradient(135deg, #ff6b6b, #ff3d63);
    color: white;
    font-size: 10px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(255,61,99,0.4);
}

/* 运营商标记 */
.operator-icon {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 34px;
    height: 34px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    z-index: 1;
    font-size: 11px;
    font-weight: bold;
    color: #333;
    overflow: hidden;
    padding: 3px;
}
.operator-icon-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* 卡片上半部分：图片+信息 横向排列 */
.card-actionsh {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}
.card-image {
    width: 30%;
    border-radius: 8px;
    object-fit: cover;
    height: 120px;
    flex-shrink: 0;
}
.card-info {
    margin: 0;
    width: 70%;
    padding: 0px 10px;
    min-width: 0;
}
.card-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.card-subtitle {
    font-size: 13px;
    color: #666;
    margin-bottom: 5px;
}

/* 特性标签（无需选号/无需照片）*/
.card-features-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 5px 0;
    padding: 0;
    border: none;
    justify-content: flex-start;
}
.feature-badge {
    flex: none;
    padding: 4px 8px;
    border-radius: 4px;
    display: flex;
    align-items: center;
}
.feature-badge .feature-badge-text {
    font-size: 12px;
    display: flex;
    align-items: center;
}
.feature-badge .feature-badge-text i {
    margin-right: 4px;
}
.feature-badge.blue {
    background: #f0f9ff;
}
.feature-badge.blue .feature-badge-text {
    color: #1890ff;
}
.feature-badge.orange {
    background: #fff7f0;
}
.feature-badge.orange .feature-badge-text {
    color: #fa8c16;
}

/* 四格数据展示 */
.card-features {
    display: flex;
    margin: 10px 0;
    border: solid 1px #eee;
}
.feature-item {
    flex: 1;
    text-align: center;
    padding: 5px;
}
.feature-value {
    font-size: 16px;
    font-weight: bold;
    color: var(--primary-color);
}
.feature-label {
    font-size: 12px;
    color: #666;
}
.card-price {
    font-weight: bold;
    color: #ff3d63;
}

/* 卡片操作区 */
.card-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
    align-items: center;
    gap: 8px;
}
.card-actions .age-info {
    font-size: 12px;
    color: #666;
}
.card-actions .age-info i {
    margin-right: 4px;
}
.card-actions .action-btns {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}
.btn-share {
    background-color: #f0f0f0;
    color: #666;
    border: none;
    border-radius: 20px;
    padding: 6px 12px;
    font-size: 13px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.btn-buy {
    background-color: var(--primary-color);
    border: none;
    border-radius: 20px;
    padding: 6px 16px;
    font-size: 13px;
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    text-decoration: none;
}

/* 卡片标签区 */
.card-tags {
    margin-top: 10px;
    padding-top: 10px;
    border-top: solid 1px #eee;
}
.card-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    margin-right: 5px;
    margin-bottom: 5px;
    transition: all 0.2s ease;
}
.card-tag:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
/* 标签颜色系统 */
.card-tag.blue { background-color: #f0f9ff; color: #1890ff; }
.card-tag.green { background-color: #f6ffed; color: #52c41a; }
.card-tag.orange { background-color: #fff7e6; color: #fa8c16; }
.card-tag.red { background-color: #fff2f0; color: #f5222d; }
.card-tag.purple { background-color: #f9f0ff; color: #722ed1; }

/* 常见问题 */
.h5-faq-section { padding: 0 12px 24px; }
.h5-faq-title { font-size: 16px; font-weight: 600; margin-bottom: 12px; padding: 0 4px; }
.h5-faq-item { background: #fff; border-radius: 10px; margin-bottom: 8px; overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,0.04); }
.h5-faq-q {
    padding: 14px 16px; display: flex; justify-content: space-between; align-items: center;
    cursor: pointer; font-size: 14px; font-weight: 500; user-select: none;
}
.h5-faq-q::after { content: '+'; font-size: 20px; color: var(--text-muted); transition: var(--transition); }
.h5-faq-item.open .h5-faq-q::after { content: '−'; }
.h5-faq-a { padding: 0 16px 14px; font-size: 13px; color: var(--text-secondary); line-height: 1.8; display: none; }
.h5-faq-item.open .h5-faq-a { display: block; }

/* 底部 */
.h5-footer { text-align: center; padding: 20px; font-size: 12px; color: var(--text-muted); }
.site-admin-entry {
    display: inline-flex;
    align-items: center;
    margin-left: 10px;
    padding-left: 10px;
    border-left: 1px solid #d9d9d9;
    color: #667490;
}
.site-admin-entry:hover { color: var(--primary-color); }

/* 浮动按钮 */
.floating-buttons {
    position: fixed;
    right: 15px;
    bottom: calc(20px + env(safe-area-inset-bottom));
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.floating-button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
}
.floating-button.show {
    opacity: 1;
    pointer-events: auto;
}
.floating-button:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}
.floating-button i {
    font-size: 20px;
}

/* 响应式 - 桌面端居中 */
@media (min-width: 481px) {
    body.h5-page {
        background-color: #f0f0f0;
    }
    .mobile-container {
        margin: 0;
    }
}

/* ============================================
   后台管理页样式
   ============================================ */

.admin-layout { display: flex; min-height: 100vh; }

/* 左侧导航 */
.admin-sidebar {
    width: 220px; background: #001529; color: #fff; display: flex; flex-direction: column;
    flex-shrink: 0; position: fixed; top: 0; left: 0; bottom: 0; z-index: 100;
}
.admin-logo { padding: 20px; font-size: 16px; font-weight: 600; border-bottom: 1px solid rgba(255,255,255,0.1); display: flex; align-items: center; gap: 8px; }
.admin-logo span { color: var(--primary); }
.admin-nav { flex: 1; padding: 12px 0; }
.admin-nav-item {
    display: flex; align-items: center; gap: 10px; padding: 12px 20px; cursor: pointer;
    font-size: 14px; color: rgba(255,255,255,0.65); transition: var(--transition); border-left: 3px solid transparent;
}
.admin-nav-item:hover { color: #fff; background: rgba(255,255,255,0.05); }
.admin-nav-item.active { color: #fff; background: var(--primary); border-left-color: var(--primary); }
.admin-sidebar-bottom { padding: 16px 20px; border-top: 1px solid rgba(255,255,255,0.1); }
.admin-session-card {
    margin-bottom: 12px;
    padding: 12px;
    border-radius: 10px;
    background: rgba(255,255,255,0.08);
}

@media (max-width: 480px) {
    .container-fluid {
        padding-bottom: calc(12px + env(safe-area-inset-bottom));
    }

    .header,
    .filter-container,
    .product-list,
    .h5-faq-section {
        padding-left: 12px;
        padding-right: 12px;
    }

    .auth-banner {
        margin-left: 12px;
        margin-right: 12px;
    }

    .shop-rating-container {
        flex-wrap: wrap;
        gap: 4px;
    }

    .card-item {
        padding: 10px 9px;
    }

    .card-image {
        width: 34%;
        height: 112px;
    }

    .card-info {
        width: 66%;
        padding: 0 0 0 8px;
    }

    .card-title {
        font-size: 15px;
    }

    .card-actions {
        align-items: flex-start;
    }

    .card-actions .action-btns {
        gap: 6px;
    }

    .btn-share,
    .btn-buy {
        padding: 6px 10px;
        font-size: 12px;
    }

    .site-admin-entry {
        display: block;
        margin: 6px 0 0;
        padding: 0;
        border-left: 0;
    }
}

@media (max-width: 380px) {
    .search-btn {
        padding: 5px 10px;
        font-size: 12px;
    }

    .shop-info-container {
        flex-direction: column;
        align-items: stretch;
    }

    .shop-info-right {
        justify-content: flex-end;
    }

    .filter-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .filter-group {
        min-width: 0;
    }

    .filter-select-btn {
        font-size: 11px;
    }

    .card-actionsh {
        flex-direction: column;
    }

    .card-image,
    .card-info {
        width: 100%;
    }

    .card-image {
        height: 150px;
    }

    .card-info {
        padding: 6px 0 0;
    }

    .card-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .card-actions .action-btns {
        width: 100%;
    }

    .btn-share,
    .btn-buy {
        flex: 1;
        justify-content: center;
    }
}
.admin-session-label { font-size: 12px; color: rgba(255,255,255,0.65); }
.admin-session-name { color: #fff; font-size: 14px; font-weight: 600; margin-top: 2px; }

/* 右侧内容区 */
.admin-main { margin-left: 220px; flex: 1; padding: 24px; min-width: 0; }
.admin-breadcrumb { margin-bottom: 16px; font-size: 13px; color: var(--text-muted); }
.admin-breadcrumb span { color: var(--text-secondary); }
.admin-content { background: #fff; border-radius: 8px; box-shadow: 0 1px 4px rgba(0,0,0,0.04); min-height: calc(100vh - 140px); }

/* 内容区头部 */
.admin-section-header {
    display: flex; align-items: center; justify-content: space-between; padding: 16px 20px;
    border-bottom: 1px solid var(--border); flex-wrap: wrap; gap: 12px;
}
.admin-section-title { font-size: 18px; font-weight: 600; }
.admin-toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* 套餐表格 */
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th {
    padding: 12px 16px; text-align: left; font-weight: 500; font-size: 13px;
    color: var(--text-secondary); background: #fafafa; border-bottom: 1px solid var(--border);
}
.admin-table td { padding: 12px 16px; border-bottom: 1px solid var(--border); font-size: 13px; }
.admin-table tr:hover td { background: #fafafa; }
.admin-table .product-img { width: 60px; height: 60px; object-fit: cover; border-radius: 8px; }
.admin-table .product-title { font-weight: 500; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 运营商标签 */
.carrier-tag { font-size: 11px; padding: 2px 8px; border-radius: 4px; color: #fff; white-space: nowrap; }
.carrier-tag.mobile { background: var(--carrier-mobile); }
.carrier-tag.unicom { background: var(--carrier-unicom); }
.carrier-tag.telecom { background: var(--carrier-telecom); }
.carrier-tag.broadcast { background: var(--carrier-broadcast); }

/* Toggle 开关 */
.toggle-switch {
    position: relative; width: 44px; height: 24px; display: inline-block; cursor: pointer;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider { position: absolute; inset: 0; background: #ccc; border-radius: 24px; transition: 0.3s; }
.toggle-slider::before {
    content: ''; position: absolute; width: 18px; height: 18px; left: 3px; bottom: 3px;
    background: #fff; border-radius: 50%; transition: 0.3s;
}
.toggle-switch input:checked + .toggle-slider { background: var(--primary); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(20px); }

/* 设置卡片 */
.settings-cards { padding: 20px; display: flex; flex-direction: column; gap: 20px; }
.settings-card { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.settings-card-header {
    padding: 14px 20px; background: #fafafa; border-bottom: 1px solid var(--border);
    font-weight: 600; font-size: 14px;
}
.settings-card-body { padding: 20px; }

/* FAQ 管理 */
.faq-list-item {
    display: flex; align-items: center; gap: 12px; padding: 12px 16px;
    border: 1px solid var(--border); border-radius: 8px; margin-bottom: 8px; background: #fafafa;
}
.faq-list-item .order { width: 28px; text-align: center; font-weight: 600; color: var(--text-muted); }
.faq-list-item .content { flex: 1; }
.faq-list-item .q { font-weight: 500; font-size: 13px; }
.faq-list-item .a { font-size: 12px; color: var(--text-muted); margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 400px; }
.faq-list-item .actions { display: flex; gap: 4px; flex-shrink: 0; }

/* 数据管理 */
.data-actions { padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.data-action-card {
    display: flex; align-items: center; gap: 16px; padding: 20px;
    border: 1px solid var(--border); border-radius: 8px;
}
.data-action-card .icon { font-size: 32px; }
.data-action-card .info { flex: 1; }
.data-action-card .title { font-weight: 600; font-size: 14px; }
.data-action-card .desc { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* 图片预览区 */
.img-preview { margin-top: 8px; position: relative; display: inline-block; }
.img-preview img { max-height: 120px; border-radius: 8px; border: 1px solid var(--border); }
.img-preview .remove-img {
    position: absolute; top: -8px; right: -8px; width: 22px; height: 22px;
    background: var(--danger); color: #fff; border: none; border-radius: 50%;
    cursor: pointer; font-size: 12px; display: flex; align-items: center; justify-content: center;
}

/* 响应式 */
@media (max-width: 900px) {
    .admin-layout {
        display: block;
    }

    .admin-sidebar {
        position: static;
        width: 100%;
        height: auto;
        min-height: 0;
        border-bottom: 1px solid rgba(255,255,255,0.14);
    }

    .admin-logo {
        padding: 14px 16px;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }

    .admin-nav {
        flex: none;
        display: flex;
        overflow-x: auto;
        padding: 8px 10px;
        gap: 8px;
    }

    .admin-nav-item {
        border-left: none;
        border-radius: 8px;
        padding: 10px 12px;
        flex: none;
        white-space: nowrap;
    }

    .admin-nav-item.active {
        border-left-color: transparent;
    }

    .admin-sidebar-bottom {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 12px 14px 14px;
        border-top: 1px solid rgba(255,255,255,0.1);
    }

    .admin-session-card {
        margin-bottom: 0;
        min-width: 0;
        flex: 1;
    }

    .admin-sidebar-bottom .btn {
        width: auto;
        padding-left: 12px;
        padding-right: 12px;
    }

    .admin-main {
        margin-left: 0;
        padding: 14px;
    }

    .admin-content {
        min-height: 0;
    }

    .admin-section-header {
        padding: 14px;
    }

    .admin-toolbar {
        width: 100%;
        gap: 8px;
    }

    .admin-toolbar .form-input,
    .admin-toolbar .form-select,
    .admin-toolbar .btn {
        width: 100% !important;
    }

    .admin-table th,
    .admin-table td {
        padding: 10px 8px;
        font-size: 12px;
    }

    .settings-cards,
    .data-actions {
        padding: 14px;
    }

    .settings-card-body {
        padding: 14px;
    }

    .data-action-card {
        align-items: flex-start;
        flex-direction: column;
    }

    .faq-list-item {
        align-items: flex-start;
        gap: 8px;
    }

    .faq-list-item .actions {
        width: 100%;
        justify-content: flex-end;
    }
}

@media (max-width: 640px) {
    .admin-main {
        padding: 10px;
    }

    .admin-breadcrumb {
        margin-bottom: 10px;
        font-size: 12px;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .drawer {
        width: 100%;
        max-width: 100%;
    }

    .drawer-body,
    .drawer-footer,
    .drawer-header {
        padding-left: 14px;
        padding-right: 14px;
    }

    .drawer-footer .btn {
        flex: 1;
    }

    .drawer.drawer-xl {
        width: calc(100vw - 12px);
        max-width: calc(100vw - 12px);
        height: 96vh;
        top: 2vh;
        border-radius: 18px;
    }

    .product-editor-layout {
        grid-template-columns: 1fr;
    }

    .editor-ai-panel,
    .editor-form-panel {
        padding: 16px;
    }

    .editor-form-grid {
        grid-template-columns: 1fr;
    }

    .form-group-span-2 {
        grid-column: auto;
    }

    #faqDrawer {
        width: calc(100% - 20px) !important;
        max-width: calc(100% - 20px) !important;
        left: 10px !important;
        right: 10px;
        transform: none !important;
    }

    .admin-sidebar-bottom {
        flex-wrap: wrap;
    }

    .admin-sidebar-bottom .btn {
        flex: 1;
        min-width: 120px;
    }
}

/* ============================================
   后台登录页
   ============================================ */
.admin-login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background:
        radial-gradient(circle at top left, rgba(22,119,255,0.18), transparent 32%),
        linear-gradient(135deg, #f3f7ff 0%, #eef2ff 45%, #f8fbff 100%);
}
.admin-login-shell {
    width: 100%;
    max-width: 1040px;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 24px;
    align-items: stretch;
}
.admin-login-brand,
.admin-login-card {
    background: rgba(255,255,255,0.92);
    border: 1px solid rgba(22,119,255,0.08);
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(16,24,40,0.08);
}
.admin-login-brand {
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.admin-login-badge {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--primary-light);
    color: var(--primary);
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 18px;
}
.admin-login-brand h1 {
    font-size: 34px;
    line-height: 1.2;
    margin-bottom: 14px;
    color: #0f172a;
}
.admin-login-brand p {
    max-width: 420px;
    color: #526075;
    font-size: 15px;
    margin-bottom: 24px;
}
.admin-login-card {
    padding: 32px;
}
.admin-login-card-header h2 {
    font-size: 24px;
    margin-bottom: 8px;
    color: #0f172a;
}
.admin-login-card-header p {
    color: var(--text-secondary);
    margin-bottom: 24px;
}
.admin-login-form { margin-bottom: 20px; }
.admin-login-tips {
    padding: 14px 16px;
    border-radius: 12px;
    background: #f7f9fc;
    color: #667085;
    font-size: 13px;
    line-height: 1.8;
}

@media (max-width: 900px) {
    .admin-login-shell {
        grid-template-columns: 1fr;
    }
    .admin-login-brand {
        padding: 28px;
    }
    .admin-login-card {
        padding: 24px;
    }
}
