/* ==============================================
   CardShop 发卡网 - 前台样式
   ============================================== */

/* ---- CSS 变量 ---- */
:root {
    --primary:        #2c7da0;
    --primary-dark:   #1f5f7a;
    --primary-light:  #3a86ff;
    --primary-bg:     #edf6fb;
    --secondary:      #3a86ff;
    --success:        #10b981;
    --success-bg:     #ecfdf5;
    --warning:        #f59e0b;
    --warning-bg:     #fffbeb;
    --danger:         #ef4444;
    --danger-bg:      #fef2f2;
    --info:           #3b82f6;
    --info-bg:        #eff6ff;

    --bg:             #f8f9fa;
    --bg-card:        #ffffff;
    --text:           #333333;
    --text-muted:     #666666;
    --text-light:     #94a3b8;
    --border:         #e2e8f0;
    --border-focus:   #6366f1;

    --shadow-sm:  0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
    --shadow:     0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -1px rgba(0,0,0,.06);
    --shadow-lg:  0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -2px rgba(0,0,0,.05);
    --shadow-xl:  0 20px 25px -5px rgba(0,0,0,.1), 0 10px 10px -5px rgba(0,0,0,.04);

    --radius-sm:  6px;
    --radius:     10px;
    --radius-lg:  10px;
    --radius-xl:  10px;

    --transition: .2s ease;
}

/* ---- 重置 & 基础 ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
    scroll-behavior: smooth;
    /* 始终预留滚动条空间，防止内容展开时页面抖动（scrollbar reflow） */
    overflow-y: scroll;
    scrollbar-gutter: stable;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC',
                 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle at 20% 10%, rgba(44, 125, 160, .06), transparent 28%),
        radial-gradient(circle at 85% 80%, rgba(58, 134, 255, .05), transparent 30%),
        linear-gradient(180deg, rgba(255,255,255,.25), rgba(248,249,250,.45));
    pointer-events: none;
    z-index: -1;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; display: block; }

/* ---- 布局容器 ---- */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ---- 顶部导航 ---- */
.site-header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.header-inner {
    display: flex;
    align-items: center;
    height: 64px;
    gap: 20px;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    flex-shrink: 0;
}

.logo-text { background: linear-gradient(135deg, var(--primary), var(--secondary)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.site-logo-icon-img { width: 32px; height: 32px; object-fit: cover; border-radius: 6px; display: block; flex-shrink: 0; }

.site-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.site-nav a {
    padding: 8px 20px;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: all var(--transition);
}

.site-nav a:hover, .site-nav a.active {
    background: var(--primary-bg);
    color: var(--primary);
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    margin-left: auto;
    padding: 4px 8px;
    color: var(--text);
}

/* 移动端抽屉 */
.nav-drawer {
    display: none;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg-card);
    z-index: 99;
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 12px 20px;
    gap: 4px;
    box-shadow: var(--shadow);
    transform: translateY(-8px);
    opacity: 0;
    transition: all var(--transition);
}

.nav-drawer.open {
    display: flex;
    transform: translateY(0);
    opacity: 1;
}

.nav-drawer a {
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    font-size: .95rem;
    color: var(--text);
}

.nav-drawer a:hover { background: var(--primary-bg); color: var(--primary); }

.nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.25);
    z-index: 98;
}
.nav-overlay.open { display: block; }

/* ---- 主内容 ---- */
.main-content { flex: 1; padding: 28px 0 40px; }

.page-shell {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid #e9eef5;
    border-radius: 10px;
    padding: 14px;
    box-shadow: 0 8px 18px rgba(15, 23, 42, .08);
}

.section-block {
    background: #ffffff;
    border: 1px solid #e8edf3;
    border-radius: 10px;
    padding: 16px 18px;
    box-shadow: 0 4px 14px rgba(15, 23, 42, .06);
    width: 100%;
}

/* ---- 页脚 ---- */
.site-footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    padding: 24px 0;
    text-align: center;
    color: var(--text-muted);
    font-size: .85rem;
}

.site-footer a { color: var(--text-muted); }
.site-footer a:hover { color: var(--primary); }
.footer-sub { margin-top: 4px; color: var(--text-light); font-size: .8rem; }

/* ---- 公告横幅 ---- */
.announcement-outer {
    padding: 6px 0;
}

.site-announcement {
    background: #eef6ff;
    border: 1px solid #cfe5ff;
    border-radius: 10px;
    padding: 9px 16px;
    font-size: .875rem;
    color: #1f4d7a;
    text-align: center;
    line-height: 1.5;
}

.site-announcement a { color: #2c7da0; text-decoration: underline; }

/* 公告内 steps 横排布局（兼容旧公告 HTML 结构） */
.site-announcement .steps {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px 8px;
}
.site-announcement .step {
    display: inline-flex;
    align-items: center;
    background: #fff;
    padding: 3px 12px;
    border-radius: 20px;
    font-weight: 500;
    color: #1e293b;
    font-size: .85rem;
    box-shadow: 0 1px 2px rgba(0,0,0,.04);
}
.site-announcement .arrow {
    color: #94a3b8;
    font-size: .85rem;
}
.site-announcement .tip {
    display: block;
    margin-top: 6px;
    font-size: .8rem;
    color: #b45309;
}
.site-announcement .top-bar { background: none; border: none; padding: 0; box-shadow: none; }
@media (max-width: 640px) {
    .site-announcement .arrow { display: none; }
    .site-announcement .steps { gap: 4px 4px; }
}

/* ---- 区块标题 ---- */
.section-header {
    padding: 24px 0 0;
    text-align: center;
    margin-bottom: 22px;
}
.section-header h2 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 800;
    color: var(--text);
    margin-bottom: 8px;
}
.section-header p {
    font-size: .95rem;
    color: var(--text-muted);
    margin-bottom: 16px;
}

/* ---- 商品卡片网格 ---- */
.product-grid,
.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 28px;
}

.product-section {
    background: #ffffff;
    border: 1px solid #e8edf3;
    border-radius: 12px;
    box-shadow: 0 6px 16px rgba(15, 23, 42, .06);
    padding: 24px;
}

.product-wrapper {
    width: 100%;
}

.category-info,
.category-current-info {
    margin-bottom: 18px;
    padding: 4px 2px;
}

.category-info h3,
.category-current-title {
    font-size: 1.12rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 6px;
}

.category-info p,
.category-current-desc {
    font-size: .9rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.category-info-highlight > h3 {
    text-align: center;
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.category-info-highlight > p {
    text-align: center;
    font-size: 1rem;
    margin-bottom: 14px;
}

.category-info .category-nav {
    margin-top: 12px;
    margin-bottom: 0;
}

.category-info .category-select-wrap {
    margin-top: 12px;
    margin-bottom: 0;
}

.product-card {
    background: var(--bg-card);
    border-radius: 10px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition);
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.product-card-cover {
    aspect-ratio: 16 / 9;
    width: 100%;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary-bg) 0%, #e0e7ff 100%);
    flex-shrink: 0;
}

.product-card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .3s ease;
}

.product-card:hover .product-card-cover img {
    transform: scale(1.04);
}

.product-card-cover-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
}

.product-card-body {
    padding: 14px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.product-card-category {
    display: inline-block;
    font-size: .73rem;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--bg);
    padding: 3px 10px;
    border-radius: 20px;
    align-self: flex-start;
}

.product-card-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.4;
}

.product-card-desc {
    font-size: .8rem;
    color: var(--text-muted);
    line-height: 1.6;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card-price-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.product-price {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--warning);
}

.price-from {
    font-size: .78rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-left: 4px;
}

.price-currency {
    font-size: .8rem;
    font-weight: 400;
    color: var(--text-muted);
    margin-left: 4px;
}

.product-stock {
    font-size: .78rem;
    color: var(--text-muted);
    background: var(--bg);
    padding: 3px 10px;
    border-radius: 20px;
}
.product-stock.low { color: var(--warning); background: var(--warning-bg); }
.product-stock.out { color: var(--danger);  background: var(--danger-bg); }

.btn-detail {
    display: block;
    text-align: center;
    height: 40px;
    line-height: 38px;
    padding: 0 16px;
    border: 2px solid var(--primary);
    border-radius: 6px;
    color: var(--primary);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all var(--transition);
    margin-top: auto;
}
.btn-detail:hover {
    background: var(--primary);
    color: #fff;
}

.btn-buy {
    display: block;
    text-align: center;
    height: 40px;
    line-height: 38px;
    padding: 0 16px;
    border: 2px solid var(--primary);
    border-radius: 6px;
    color: var(--primary);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all var(--transition);
    margin-top: auto;
}

.btn-buy:hover {
    background: var(--primary);
    color: #fff;
}
.btn-detail-out {
    border-color: var(--border);
    color: var(--text-muted);
    pointer-events: none;
    opacity: .6;
}

/* ---- 按钮 ---- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 40px;
    padding: 0 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all var(--transition);
    text-decoration: none;
    line-height: 1;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}
.btn-primary:hover {
    background: var(--primary-dark);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(79,70,229,.35);
}

.btn-secondary {
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--border);
}
.btn-secondary:hover { background: var(--border); color: var(--text); }

.btn-success {
    background: var(--success);
    color: #fff;
}
.btn-success:hover { background: #059669; color: #fff; }

.btn-danger {
    background: var(--danger);
    color: #fff;
}
.btn-danger:hover { background: #dc2626; color: #fff; }

.btn-lg { height: 44px; padding: 0 22px; font-size: 16px; border-radius: 8px; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none !important; }

/* 支付方式按钮 */
.pay-btn-alipay {
    background: linear-gradient(135deg, #00a0e9, #0076c0);
    color: #fff;
    flex: 1;
}
.pay-btn-alipay:hover { opacity: .9; color: #fff; box-shadow: 0 4px 12px rgba(0,160,233,.4); }

.pay-btn-wxpay {
    background: linear-gradient(135deg, #07c160, #06ae56);
    color: #fff;
    flex: 1;
}
.pay-btn-wxpay:hover { opacity: .9; color: #fff; box-shadow: 0 4px 12px rgba(7,193,96,.4); }

/* ---- 卡片容器 ---- */
.card {
    background: var(--bg-card);
    border-radius: 10px;
    box-shadow: var(--shadow);
    padding: 24px;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.card-header h2 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text);
}

/* ---- 表单 ---- */
.form-group { margin-bottom: 16px; }

.form-label {
    display: block;
    font-size: .875rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
}

.form-label .required { color: var(--danger); margin-left: 2px; }

.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: .9rem;
    color: var(--text);
    background: var(--bg-card);
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
}

.form-control:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(99,102,241,.15);
}

.form-control:invalid:not(:placeholder-shown) {
    border-color: var(--danger);
}

.form-hint {
    font-size: .78rem;
    color: var(--text-muted);
    margin-top: 5px;
}

.form-error {
    font-size: .78rem;
    color: var(--danger);
    margin-top: 5px;
}

/* 数量输入器 */
.qty-input-group {
    display: flex;
    align-items: center;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    width: fit-content;
}

.qty-btn {
    width: 40px;
    height: 40px;
    background: var(--bg);
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--text);
    transition: background var(--transition);
}

.qty-btn:hover { background: var(--border); }

.qty-input {
    width: 60px;
    height: 40px;
    text-align: center;
    border: none;
    border-left: 1.5px solid var(--border);
    border-right: 1.5px solid var(--border);
    font-size: .95rem;
    font-weight: 600;
    color: var(--text);
    outline: none;
}

/* ---- 徽章 ---- */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: .75rem;
    font-weight: 600;
}

.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: #92400e; }
.badge-danger  { background: var(--danger-bg);  color: var(--danger); }
.badge-info    { background: var(--info-bg);    color: var(--info); }
.badge-gray    { background: var(--bg);         color: var(--text-muted); }

/* ---- 警告提示 ---- */
.alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    font-size: .9rem;
    border-left: 4px solid;
}

.alert span { flex: 1; }

.alert-close {
    background: none;
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
    opacity: .5;
    padding: 0;
    line-height: 1;
    flex-shrink: 0;
}

.alert-close:hover { opacity: 1; }

.alert-success { background: var(--success-bg); color: #065f46; border-color: var(--success); }
.alert-error   { background: var(--danger-bg);  color: #991b1b; border-color: var(--danger); }
.alert-warning { background: var(--warning-bg); color: #92400e; border-color: var(--warning); }
.alert-info    { background: var(--info-bg);    color: #1e40af; border-color: var(--info); }

/* ---- 订单详情 ---- */
.order-info-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .9rem;
}

.order-info-table tr { border-bottom: 1px solid var(--border); }
.order-info-table tr:last-child { border-bottom: none; }

.order-info-table th {
    text-align: left;
    padding: 10px 16px 10px 0;
    color: var(--text-muted);
    font-weight: 500;
    white-space: nowrap;
    width: 140px;
}

.order-info-table td {
    padding: 10px 0;
    color: var(--text);
    word-break: break-all;
}

/* ---- 卡密列表 ---- */
.card-list { display: flex; flex-direction: column; gap: 12px; }

.card-item {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px 16px;
    position: relative;
}

.card-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.card-item-no {
    font-size: .78rem;
    color: var(--text-muted);
    font-weight: 500;
}

.card-item-data {
    font-family: 'Courier New', Courier, monospace;
    font-size: .88rem;
    color: var(--text);
    word-break: break-all;
    white-space: pre-wrap;
    line-height: 1.7;
}

.copy-btn {
    background: var(--primary-bg);
    color: var(--primary);
    border: none;
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    font-size: .78rem;
    cursor: pointer;
    font-weight: 600;
    transition: all var(--transition);
    flex-shrink: 0;
}

.copy-btn:hover { background: var(--primary); color: #fff; }
.copy-btn.copied { background: var(--success-bg); color: var(--success); }

.copy-all-btn {
    margin-bottom: 16px;
}

/* ---- 支付页 ---- */
.pay-page { max-width: 520px; margin: 0 auto; }

.pay-main-block,
.return-main-block,
.buy-main-block {
    padding: 24px;
}

.pay-main-block .card-header,
.return-main-block .card-header,
.buy-main-block .card-header {
    margin-bottom: 18px;
}

.pay-main-block .pay-page-tip {
    margin-bottom: 0;
}

.pay-amount-display {
    text-align: center;
    padding: 28px 0;
}

.pay-amount-display .amount {
    font-size: 2.8rem;
    font-weight: 900;
    color: var(--danger);
    line-height: 1;
}

.pay-amount-display .amount .unit {
    font-size: 1.2rem;
    font-weight: 600;
    vertical-align: super;
}

.pay-amount-display .label {
    font-size: .85rem;
    color: var(--text-muted);
    margin-top: 8px;
}

.pay-methods {
    display: flex;
    gap: 14px;
    margin: 24px 0;
}

.pay-method-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 20px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    background: var(--bg-card);
    transition: all var(--transition);
    font-size: .9rem;
    font-weight: 600;
}

.pay-method-btn .icon { font-size: 2rem; }
.pay-method-btn .icon .pay-icon { width: 2.2rem; height: 2.2rem; display: block; object-fit: contain; }
.pay-method-btn:hover { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79,70,229,.12); }
.pay-method-btn.selected-alipay { border-color: #00a0e9; background: #e8f6fd; color: #0076c0; }
.pay-method-btn.selected-wxpay  { border-color: #07c160; background: #e8f9ef; color: #059652; }
.pay-method-btn.selected-usdt   { border-color: #26a17b; background: #e6f6f1; color: #1a7a5c; }
.pay-method-disabled { opacity: .55; cursor: not-allowed; }
.pay-method-disabled:hover { border-color: var(--border) !important; box-shadow: none !important; }
.usdt-notice {
    margin: -6px 0 14px;
    padding: 10px 14px;
    background: #fff8e1;
    border: 1px solid #ffca28;
    border-radius: 8px;
    font-size: .85rem;
    color: #7a5800;
}

/* 倒计时 */
.countdown-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--warning-bg);
    color: #92400e;
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    font-size: .85rem;
    margin-bottom: 20px;
}

#countdown { font-weight: 700; font-size: 1rem; font-variant-numeric: tabular-nums; }

/* ---- 成功页 ---- */
.success-icon {
    width: 72px;
    height: 72px;
    background: var(--success-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 20px;
}

.success-title {
    text-align: center;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--success);
    margin-bottom: 8px;
}

.success-subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: .9rem;
    margin-bottom: 32px;
}

/* ---- 查询页 ---- */
.query-page { max-width: 1200px; margin: 0 auto; }

.query-main-block {
    padding: 0;
    overflow: hidden;
}

/* Tab 导航栏 */
.qry-tabs {
    display: flex;
    border-bottom: 2px solid var(--border);
    padding: 0 24px;
    gap: 4px;
}

.qry-tab {
    position: relative;
    padding: 14px 20px;
    background: none;
    border: none;
    font-size: .95rem;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    transition: color var(--transition);
    outline: none;
}

.qry-tab::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    border-radius: 2px 2px 0 0;
    background: var(--primary);
    transform: scaleX(0);
    transition: transform var(--transition);
}

.qry-tab.active {
    color: var(--primary);
    font-weight: 700;
}

.qry-tab.active::after {
    transform: scaleX(1);
}

.qry-tab:hover:not(.active) {
    color: var(--text);
}

/* Tab 内容区 */
.qry-panel-inner {
    padding: 24px;
}

.query-title-wrap {
    text-align: center;
    padding: 20px 24px 16px;
    border-bottom: 1px solid var(--border);
}

.query-title {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 6px;
}

.query-subtitle {
    color: var(--text-muted);
    font-size: .92rem;
}

.query-form-wrap {
    padding: 20px;
}

.query-order-block {
    margin: 0 20px 20px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg-card);
    padding: 18px;
}

.query-order-block .card-header {
    margin-bottom: 18px;
    padding-bottom: 14px;
}

/* ---- 空状态 ---- */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state .icon { font-size: 3rem; margin-bottom: 16px; }
.empty-state p { font-size: .9rem; }

/* ---- 分页（管理后台用） ---- */
.pagination {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin-top: 28px;
}

.page-item a, .page-item span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: var(--radius-sm);
    font-size: .85rem;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text);
    transition: all var(--transition);
}

.page-item a:hover { border-color: var(--primary); color: var(--primary); }
.page-item.active span { background: var(--primary); color: #fff; border-color: var(--primary); }
.page-item.disabled span { opacity: .4; cursor: not-allowed; }

/* ---- 加载动画 ---- */
.spinner {
    width: 22px;
    height: 22px;
    border: 3px solid rgba(255,255,255,.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin .7s linear infinite;
    display: inline-block;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ---- 响应式 ---- */
@media (max-width: 768px) {
    .main-content { padding: 24px 0 48px; }
    .product-grid,
    .products-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
    .site-nav { display: none; }
    .nav-toggle { display: block; }
    .pay-methods { flex-direction: column; }
}

@media (max-width: 480px) {
    .product-grid,
    .products-grid { grid-template-columns: 1fr; }
    .order-info-table th { width: 100px; }
    .pay-amount-display .amount { font-size: 2.2rem; }
}

/* ======================================================
   商品详情页 — 左图右信息布局
   ====================================================== */

/* 面包屑 */
.breadcrumb-bar {
    margin-bottom: 20px;
    font-size: .85rem;
    color: var(--text-muted);
}
.breadcrumb-bar a { color: var(--text-muted); }
.breadcrumb-bar a:hover { color: var(--primary); }

/* =========================================================
   分类导航栏（前台）
   ========================================================= */
.category-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 24px;
    /* 横滑支持（移动端生效） */
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.category-nav::-webkit-scrollbar { display: none; }
.category-nav-item {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text);
    font-size: .875rem;
    text-decoration: none;
    transition: background .15s, color .15s, border-color .15s;
    white-space: nowrap;
    flex-shrink: 0;
}
.category-nav-item:hover {
    border-color: var(--primary);
    color: var(--primary);
}
.category-nav-item.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    font-weight: 600;
}

.section-header .section-block {
    margin: 0 auto;
}

/* 移动端分类下拉（<768px 时替换水平分类栏） */
.category-select-wrap {
    display: none;
    margin-bottom: 20px;
}
.category-select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    color: var(--text);
    font-size: .9rem;
}

/* 商品详情页分类标签 */
.product-category-tag {
    display: inline-block;
    padding: 5px 16px;
    border-radius: 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: .88rem;
    font-weight: 600;
    text-decoration: none;
    transition: color .15s, border-color .15s;
}
.product-category-tag:hover {
    color: var(--primary);
    border-color: var(--primary);
}

@media (max-width: 768px) {
    .category-nav        { flex-wrap: nowrap; padding-bottom: 4px; }
    .category-select-wrap { display: none; }
}

/* 主布局容器 */
.product-detail-layout {
    display: flex;
    gap: 40px;
    align-items: flex-start;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 32px;
    margin-bottom: 28px;
}

/* 左侧：图片区 */
.product-image-area {
    flex: 0 0 340px;
    max-width: 340px;
}

.product-main-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: var(--radius);
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary-bg), #ddd6fe);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    border: 1px solid var(--border);
}

.product-main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-image-placeholder {
    font-size: 5rem;
    line-height: 1;
    user-select: none;
}

/* 缩略图轮播占位 */
.product-thumb-strip {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.thumb-item {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-sm);
    border: 2px solid var(--border);
    overflow: hidden;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    font-size: 1.4rem;
    transition: border-color var(--transition);
}

.thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumb-item.active,
.thumb-item:hover {
    border-color: var(--primary);
}

/* 右侧：购买区 */
.product-buy-area {
    flex: 1;
    min-width: 0;
}

.product-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.product-detail-name {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text);
    line-height: 1.4;
    margin-bottom: 0;
}

.product-detail-price-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding: 14px 16px;
    background: var(--danger-bg);
    border-radius: var(--radius-sm);
}

.product-detail-price {
    font-size: 2rem;
    font-weight: 900;
    color: var(--danger);
    line-height: 1;
}

.product-detail-desc {
    font-size: .9rem;
    color: var(--text-muted);
    line-height: 1.8;
    white-space: pre-wrap;
    padding: 12px 0;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

/* 表单中：输入框错误高亮 */
.form-control.input-error {
    border-color: var(--danger);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, .12);
}

/* 应付金额汇总行 */
.price-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--primary-bg);
    border-radius: var(--radius-sm);
    padding: 14px 18px;
    margin-bottom: 20px;
}

.price-summary-label {
    font-size: .9rem;
    color: var(--text-muted);
}

.price-summary-hint {
    font-size: .85rem;
    color: var(--text-muted);
    margin-right: 6px;
}

.price-summary-total {
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--danger);
}

/* ======================================================
   商品详情富文本区域
   ====================================================== */
.product-detail-section {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-bottom: 32px;
}

.product-detail-section-title {
    padding: 16px 28px;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    background: var(--bg);
    border-bottom: 1px solid var(--border);
}

.product-detail-html {
    padding: 28px;
    font-size: .95rem;
    line-height: 1.9;
    color: var(--text);
}

.product-detail-html h1, .product-detail-html h2, .product-detail-html h3 {
    margin: 1em 0 .5em;
    font-weight: 700;
    color: var(--text);
}

.product-detail-html p  { margin-bottom: .8em; }
.product-detail-html ul, .product-detail-html ol { padding-left: 1.6em; margin-bottom: .8em; }
.product-detail-html li { margin-bottom: .3em; }

.product-detail-html img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
    margin: 8px 0;
}

.product-detail-html table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1em;
    font-size: .9rem;
}

.product-detail-html table th,
.product-detail-html table td {
    border: 1px solid var(--border);
    padding: 8px 12px;
    text-align: left;
}

.product-detail-html table th {
    background: var(--bg);
    font-weight: 600;
}

/* ======================================================
   响应式：移动端详情页上下排列
   ====================================================== */
@media (max-width: 900px) {
    .product-detail-layout {
        flex-direction: column;
        gap: 24px;
        padding: 20px;
    }
    .product-image-area {
        flex: none;
        max-width: 100%;
        width: 100%;
    }
    .product-main-image {
        aspect-ratio: 16 / 9;
    }
}

@media (max-width: 480px) {
    .product-title-row {
        flex-wrap: wrap;
        align-items: flex-start;
        gap: 8px;
    }
    .product-detail-name { font-size: 1.2rem; }
    .product-detail-price { font-size: 1.6rem; }
    .price-summary-total { font-size: 1.3rem; }
    .product-detail-html { padding: 16px; }
}

/* ======================================================
   商品规格 SKU 选择按钮
   ====================================================== */
.sku-btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}

.sku-btn {
    min-width: 132px;
    padding: 10px 14px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    color: var(--text);
    font-size: .9rem;
    cursor: pointer;
    transition: border-color .15s, background .15s, color .15s, box-shadow .15s, transform .15s;
    line-height: 1.3;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    text-align: left;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}

.sku-btn-name {
    font-size: .88rem;
    font-weight: 600;
    color: inherit;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.sku-btn-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.sku-btn-price {
    font-size: .82rem;
    font-weight: 700;
    color: var(--warning);
}

.sku-btn-status {
    font-size: .74rem;
    font-weight: 600;
    color: var(--danger);
}

.sku-btn:hover:not(:disabled) {
    border-color: var(--primary);
    background: rgba(99, 102, 241, .06);
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(99, 102, 241, .10);
}

.sku-btn.active {
    border-color: var(--primary);
    background: rgba(99, 102, 241, .1);
    color: var(--primary);
    font-weight: 600;
    box-shadow: 0 10px 24px rgba(99, 102, 241, .14);
}

.sku-btn.active .sku-btn-price {
    color: var(--primary);
}

.sku-btn.out-of-stock,
.sku-btn:disabled {
    opacity: .58;
    cursor: not-allowed;
    border-color: var(--border);
    box-shadow: none;
    transform: none;
}

.sku-btn.out-of-stock .sku-btn-price,
.sku-btn:disabled .sku-btn-price {
    color: var(--text-muted);
}

@media (max-width: 640px) {
    .sku-btn {
        min-width: calc(50% - 4px);
        flex: 1 1 calc(50% - 4px);
    }
}

/* ======================================================
   封面图上传组件
   ====================================================== */
.cover-upload-wrap {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cover-preview {
    width: 160px;
    height: 120px;
    border: 2px dashed var(--border);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: var(--bg);
    flex-shrink: 0;
    transition: border-color var(--transition);
}

.cover-preview:hover { border-color: var(--primary-light); }

.cover-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cover-placeholder {
    font-size: .8rem;
    color: var(--text-muted);
    text-align: center;
    padding: 8px;
    line-height: 1.4;
}

.cover-upload-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.cover-upload-row .form-control { flex: 1; min-width: 200px; }

/* ======================================================
   WangEditor 富文本编辑器容器
   ====================================================== */
.wang-editor-wrap {
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    transition: border-color var(--transition);
}

.wang-editor-wrap:focus-within {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(99,102,241,.12);
}

/* WangEditor 工具栏 */
.wang-editor-wrap .w-e-toolbar {
    background: var(--bg) !important;
    border-bottom: 1px solid var(--border) !important;
    border-top: none !important;
    border-left: none !important;
    border-right: none !important;
    flex-wrap: wrap;
}

/* WangEditor 编辑区 */
.wang-editor-wrap .w-e-text-container {
    min-height: 260px;
    background: var(--bg-card) !important;
    border: none !important;
}

.wang-editor-wrap [data-slate-editor] {
    min-height: 260px;
    padding: 14px 16px !important;
    font-size: .9rem !important;
    line-height: 1.8 !important;
    color: var(--text) !important;
}

/* 覆盖 WangEditor 默认外框样式 */
.w-e-toolbar,
.w-e-text-container {
    border-color: transparent !important;
}

/* ===== 抽奖页面 ===== */
.lottery-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 0 32px;
    position: relative;
}

.lottery-main-block {
    padding: 22px 24px;
}

.lottery-main-footer {
    text-align: center;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.lottery-header {
    text-align: center;
    padding: 24px 0 12px;
}

.lottery-title-icon {
    font-size: 3.2rem;
    line-height: 1;
    margin-bottom: 8px;
}

.lottery-title {
    font-size: 2rem;
    font-weight: 800;
    margin: 0 0 8px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.lottery-subtitle {
    font-size: .95rem;
    color: var(--text-muted);
    margin: 0;
}

/* 奖品环 */
.lottery-prizes-ring {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-bottom: 20px;
}

.lottery-prize-badge {
    background: #f4f7fb;
    border: 1px solid #dce5ef;
    border-radius: 20px;
    padding: 6px 14px;
    font-size: .82rem;
    color: var(--text);
    transition: all var(--transition);
}

.lottery-prize-badge:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.lottery-prize-badge .badge-prob {
    margin-left: 6px;
    color: var(--text-muted);
    font-size: .72rem;
}

/* 转盘 */
.lottery-wheel-wrap {
    text-align: center;
    margin: 0 0 20px;
}

.lottery-ring {
    width: 230px;
    height: 230px;
    border-radius: 50%;
    border: 3px solid #d8dee6;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: border-color .3s;
    box-shadow: 0 4px 18px rgba(15, 23, 42, .08);
    background: conic-gradient(
        #ffffff 0deg 45deg,
        #f4f7fb 45deg 90deg,
        #ffffff 90deg 135deg,
        #f4f7fb 135deg 180deg,
        #ffffff 180deg 225deg,
        #f4f7fb 225deg 270deg,
        #ffffff 270deg 315deg,
        #f4f7fb 315deg 360deg
    );
}

.lottery-ring::before {
    content: '';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 16px solid var(--primary);
    filter: drop-shadow(0 2px 2px rgba(15,23,42,.15));
}

.lottery-ring.spinning {
    animation: lotterySpinRing 0.7s linear infinite;
    border-style: solid;
    border-color: #9cb3c8;
}

@keyframes lotterySpinRing {
    to { transform: rotate(360deg); }
}

.lottery-ring-inner {
    width: 172px;
    height: 172px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,.96);
    border: 1px solid #e3eaf2;
}

/* =========================================================
   公告弹窗 (Announcement Popup)
   ========================================================= */
.ann-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    animation: fadeInOverlay .2s ease;
}
@keyframes fadeInOverlay {
    from { opacity: 0; }
    to   { opacity: 1; }
}
.ann-popup-modal {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0,0,0,.25);
    width: 100%;
    max-width: 560px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    animation: slideUpModal .25s cubic-bezier(.34,1.56,.64,1);
    overflow: hidden;
}
@keyframes slideUpModal {
    from { transform: translateY(40px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}
.ann-popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px 12px;
    border-bottom: 1px solid var(--border-color, #e8ecf0);
    flex-shrink: 0;
}
.ann-popup-header h3 {
    margin: 0;
    font-size: 1.05rem;
    color: var(--text-primary, #1a202c);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ann-popup-counter {
    font-size: .78rem;
    color: var(--text-muted, #718096);
    flex-shrink: 0;
    margin-left: 12px;
}
.ann-popup-body {
    padding: 16px 20px;
    overflow-y: auto;
    flex: 1;
    line-height: 1.7;
    color: var(--text-primary, #1a202c);
}
.ann-popup-footer {
    padding: 12px 20px;
    border-top: 1px solid var(--border-color, #e8ecf0);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    gap: 8px;
    flex-wrap: wrap;
}
.ann-popup-footer .btn-group {
    display: flex;
    gap: 8px;
}
.ann-popup-close-x {
    background: none;
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
    color: var(--text-muted, #718096);
    line-height: 1;
    padding: 0 4px;
    transition: color .15s;
}
.ann-popup-close-x:hover { color: var(--text-primary, #1a202c); }

/* =========================================================
   公告列表卡片 (.ann-card-list)
   ========================================================= */
.ann-card-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 760px;
    margin: 0 auto;
}
.ann-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,.07);
    border: 1px solid rgba(0,0,0,.04);
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: box-shadow .2s, transform .2s;
}
.ann-card:hover {
    box-shadow: 0 8px 28px rgba(0,0,0,.12);
    transform: translateY(-2px);
    text-decoration: none;
    color: inherit;
}
.ann-card-icon {
    width: 48px;
    height: 48px;
    min-width: 48px;
    background: #e8f0ff;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}
.ann-card-body {
    flex: 1;
    min-width: 0;
}
.ann-card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
}
.ann-card-tag {
    background: #3b82f6;
    color: #fff;
    border-radius: 4px;
    padding: 1px 8px;
    font-size: .7rem;
    font-weight: 600;
    letter-spacing: .02em;
}
.ann-card-date {
    font-size: .8rem;
    color: var(--text-muted, #718096);
}
.ann-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary, #1a202c);
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color .15s;
}
.ann-card:hover .ann-card-title { color: var(--primary, #4a6fa5); }
.ann-card-excerpt {
    font-size: .83rem;
    color: var(--text-secondary, #4a5568);
    line-height: 1.5;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ann-card-arrow {
    font-size: 1.2rem;
    color: #c8d0dc;
    flex-shrink: 0;
    transition: transform .2s, color .2s;
    margin-left: 4px;
}
.ann-card:hover .ann-card-arrow {
    color: var(--primary, #4a6fa5);
    transform: translateX(4px);
}
@media (max-width: 600px) {
    .ann-card { padding: 14px 16px; gap: 12px; }
    .ann-card-icon { width: 40px; height: 40px; min-width: 40px; font-size: 1.2rem; }
    .ann-card-excerpt { display: none; }
}

/* 桌面端：隐藏手风琴内容体和箭头，保持原有 tab 外观 */
.ann-tab-summary {
    display: block;
}
@media (min-width: 721px) {
    .ann-tab-chevron { display: none; }
    .ann-tab-body    { display: none; }
}

/* =========================================================
   公告分栏布局 (.ann-split)
   ========================================================= */
.ann-panel-page .page-hero {
    text-align: center;
    padding: 40px 0 28px;
}
.ann-split {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: 480px;
    overflow: hidden;
    padding: 0 !important;
}
.ann-tab-list {
    border-right: 1px solid var(--border-color, #e8ecf0);
    overflow-y: auto;
    max-height: 620px;
}
.ann-tab-item {
    padding: 14px 18px;
    cursor: pointer;
    border-left: 3px solid transparent;
    border-bottom: 1px solid var(--border-color, #e8ecf0);
    transition: background .15s, border-color .15s;
    user-select: none;
}
.ann-tab-item:last-child { border-bottom: none; }
.ann-tab-item:hover { background: var(--bg-alt, #f5f7fa); }
.ann-tab-item.active {
    border-left-color: var(--primary, #4a6fa5);
    background: #eef2ff;
}
.ann-tab-title {
    font-size: .9rem;
    font-weight: 600;
    color: var(--text-primary, #1a202c);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 4px;
    transition: color .15s;
}
.ann-tab-item.active .ann-tab-title,
.ann-tab-item:hover .ann-tab-title { color: var(--primary, #4a6fa5); }
.ann-tab-date {
    font-size: .74rem;
    color: var(--text-muted, #a0aec0);
}
.ann-content-area {
    padding: 28px 32px;
    overflow-y: auto;
    max-height: 620px;
}
.ann-content-panel { display: none; }
.ann-content-panel.active { display: block; }
.ann-content-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary, #1a202c);
    line-height: 1.35;
    margin-bottom: 8px;
}
.ann-content-meta {
    font-size: .84rem;
    color: var(--text-muted, #718096);
    margin-bottom: 4px;
}
@media (max-width: 720px) {
    .ann-split {
        grid-template-columns: 1fr;
        min-height: unset;
    }
    /* 移动端隐藏右侧内容区（内容内嵌入tab-item） */
    .ann-content-area { display: none; }

    /* tab 列表改为竖列卡片 */
    .ann-tab-list {
        border-right: none;
        border-bottom: none;
        max-height: unset;
        display: flex;
        flex-direction: column;
        overflow: unset;
        gap: 8px;
        padding: 0 0 16px;
        background: transparent;
    }
    .ann-tab-item {
        flex-shrink: unset;
        border-left: 3px solid transparent;
        border-bottom: none;
        border-right: none;
        min-width: unset;
        max-width: unset;
        border-radius: 10px;
        background: #fff;
        box-shadow: 0 1px 6px rgba(0,0,0,.08);
        padding: 0;
        overflow: hidden;
        transition: box-shadow .18s;
    }
    .ann-tab-item.active {
        border-left-color: var(--primary, #4a6fa5);
        background: #fff;
        box-shadow: 0 3px 12px rgba(74,111,165,.18);
    }
    /* 标题行 */
    .ann-tab-summary {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 13px 16px;
        cursor: pointer;
        user-select: none;
    }
    .ann-tab-chevron {
        width: 18px;
        height: 18px;
        flex-shrink: 0;
        margin-left: 10px;
        border-radius: 50%;
        background: var(--border-color, #e8ecf0);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: .65rem;
        color: #64748b;
        transition: transform .22s ease, background .18s;
    }
    .ann-tab-chevron::after { content: '▼'; }
    .ann-tab-item.active .ann-tab-chevron {
        transform: rotate(180deg);
        background: var(--primary, #4a6fa5);
        color: #fff;
    }
    /* 手风琴内容体 */
    .ann-tab-body {
        display: block;
        max-height: 0;
        overflow: hidden;
        transition: max-height .3s ease;
        padding: 0 16px;
        border-top: 1px solid transparent;
    }
    .ann-tab-item.active .ann-tab-body {
        border-top-color: var(--border-color, #e8ecf0);
        padding: 14px 16px 16px;
    }
    .ann-content-area { padding: 0; }
}

/* =========================================================
   公告/文章详情通用
   ========================================================= */
.ann-detail-header {
    margin-bottom: 16px;
}
.ann-detail-title {
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-primary, #1a202c);
    margin-bottom: 8px;
}
.ann-detail-meta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    font-size: .84rem;
    color: var(--text-muted, #718096);
}
.ann-divider {
    border: none;
    border-top: 1px solid var(--border-color, #e8ecf0);
    margin: 20px 0;
}

/* =========================================================
   文章列表卡片网格 (.blog-grid / .blog-card)
   ========================================================= */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
@media (max-width: 960px) {
    .blog-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .blog-grid { grid-template-columns: 1fr; }
}
.blog-card {
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 2px 16px rgba(0,0,0,.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: box-shadow .22s, transform .22s;
}
.blog-card:hover {
    box-shadow: 0 10px 36px rgba(0,0,0,.14);
    transform: translateY(-4px);
    text-decoration: none;
    color: inherit;
}
.blog-card-cover {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    display: block;
    background: #e8ecf0;
}
.blog-card-cover-placeholder {
    width: 100%;
    aspect-ratio: 16/9;
    background: linear-gradient(135deg, #e8ecf5 0%, #d6dce8 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.4rem;
}
.blog-card-body {
    padding: 20px 20px 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.blog-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.blog-card-tag {
    background: #3b82f6;
    color: #fff;
    border-radius: 20px;
    padding: 3px 12px;
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .02em;
}
.blog-card-date {
    font-size: .82rem;
    color: var(--text-muted, #718096);
}
.blog-card-title {
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.4;
    color: var(--text-primary, #1a202c);
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color .15s;
}
.blog-card:hover .blog-card-title { color: var(--primary, #4a6fa5); }
.blog-card-excerpt {
    font-size: .88rem;
    color: var(--text-secondary, #4a5568);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
    margin-bottom: 14px;
}
.blog-card-divider {
    border: none;
    border-top: 1px solid var(--border-color, #e8ecf0);
    margin: 0 0 12px;
}
.blog-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: .82rem;
    color: var(--text-muted, #a0aec0);
}
.blog-card-readmore {
    color: var(--primary, #4a6fa5);
    font-weight: 600;
    font-size: .85rem;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: gap .18s;
}
.blog-card:hover .blog-card-readmore { gap: 8px; }

/* =========================================================
   文章详情页
   ========================================================= */
.article-detail-block {
    padding: 32px;
}
@media (max-width: 600px) {
    .article-detail-block { padding: 16px; }
}
.article-detail-cover {
    width: 100%;
    max-height: 380px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 24px;
    display: block;
}
.article-detail-header { margin-bottom: 16px; }
.article-detail-title {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-primary, #1a202c);
    margin-bottom: 8px;
}
@media (max-width: 600px) {
    .article-detail-title { font-size: 1.35rem; }
}
.article-detail-meta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    font-size: .84rem;
    color: var(--text-muted, #718096);
}

/* =========================================================
   富文本内容区
   ========================================================= */
.rich-content {
    line-height: 1.8;
    font-size: .97rem;
    color: var(--text-primary, #1a202c);
    word-break: break-word;
    overflow-wrap: break-word;
}
.rich-content h1, .rich-content h2, .rich-content h3,
.rich-content h4, .rich-content h5, .rich-content h6 {
    margin: 1.4em 0 .5em;
    line-height: 1.3;
    font-weight: 700;
}
.rich-content p  { margin: 0 0 1em; }
.rich-content a  { color: var(--primary, #4a6fa5); }
.rich-content ul, .rich-content ol { padding-left: 1.6em; margin: .8em 0; }
.rich-content li { margin-bottom: .3em; }
.rich-content img { max-width: 100%; height: auto; border-radius: 6px; display: block; margin: 1em auto; }
.rich-content pre, .rich-content code {
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: .88em;
}
.rich-content pre {
    background: var(--bg-alt, #f5f7fa);
    border: 1px solid var(--border-color, #e8ecf0);
    border-radius: 8px;
    padding: 12px 16px;
    overflow-x: auto;
    margin: 1em 0;
}
.rich-content code {
    background: var(--bg-alt, #f5f7fa);
    padding: 1px 5px;
    border-radius: 4px;
}
.rich-content blockquote {
    border-left: 4px solid var(--primary, #4a6fa5);
    margin: 1em 0;
    padding: .5em 1em;
    color: var(--text-secondary, #4a5568);
    background: var(--bg-alt, #f5f7fa);
    border-radius: 0 6px 6px 0;
}
.rich-content table { border-collapse: collapse; width: 100%; margin: 1em 0; }
.rich-content th, .rich-content td {
    border: 1px solid var(--border-color, #e8ecf0);
    padding: 8px 12px;
    text-align: left;
}
.rich-content th { background: var(--bg-alt, #f5f7fa); font-weight: 600; }

/* =========================================================
   分页 (.pagination)
   ========================================================= */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 32px;
    padding: 16px 0;
}
.pagi-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: 8px;
    font-size: .875rem;
    text-decoration: none;
    border: 1px solid var(--border-color, #e8ecf0);
    color: var(--text-secondary, #4a5568);
    background: #fff;
    transition: background .15s, color .15s, border-color .15s;
}
.pagi-btn:hover {
    background: var(--bg-alt, #f5f7fa);
    color: var(--primary, #4a6fa5);
    border-color: var(--primary, #4a6fa5);
    text-decoration: none;
}
.pagi-btn.active {
    background: var(--primary, #4a6fa5);
    color: #fff;
    border-color: var(--primary, #4a6fa5);
    pointer-events: none;
}
.pagi-btn.disabled {
    opacity: .4;
    pointer-events: none;
}
.pagi-info {
    font-size: .84rem;
    color: var(--text-muted, #718096);
    text-align: center;
    margin-bottom: 8px;
}

/* =========================================================
   Page Hero（列表页顶部大标题区）
   ========================================================= */
.page-hero {
    padding: 40px 0 28px;
    text-align: center;
}
.page-hero h1 {
    font-size: 1.8rem;
    font-weight: 800;
    margin: 0 0 8px;
    color: var(--text-primary, #1a202c);
}
.page-hero p {
    font-size: .95rem;
    color: var(--text-muted, #718096);
    margin: 0;
}


.lottery-btn-wrap {
    position: relative;
}

.lottery-draw-btn {
    min-width: 220px;
    width: auto;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, #2c7da0, #3a86ff);
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all var(--transition);
    box-shadow: 0 6px 14px rgba(44, 125, 160, .30);
}

.lottery-draw-btn:hover:not(:disabled) {
    transform: scale(1.06);
    box-shadow: var(--shadow-xl);
}

.lottery-draw-btn:active:not(:disabled) {
    transform: scale(.97);
}

.lottery-draw-btn:disabled {
    background: #d8e1ea;
    color: #7a8793;
    cursor: not-allowed;
    box-shadow: none;
}

.lottery-btn-icon {
    font-size: 1.6rem;
    line-height: 1;
}

.lottery-quota-info {
    margin-top: 12px;
    font-size: .88rem;
    color: var(--text-muted);
}

.lottery-quota-info strong {
    color: var(--primary);
}

/* 历史记录 */
.lottery-history {
    background: transparent;
    border: 0;
    border-radius: 10px;
    padding: 0;
    margin-top: 20px;
    box-shadow: none;
}

.lottery-history-title {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 12px;
}

.lottery-history-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.lottery-history-list li {
    font-size: .85rem;
    color: var(--text);
    padding: 6px 10px;
    background: #f6f9fc;
    border-radius: var(--radius);
}

/* 结果弹窗 */
.lottery-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .6);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.lottery-modal {
    background: #ffffff;
    border: 1px solid #dfe7f0;
    border-radius: 10px;
    padding: 40px 32px 32px;
    max-width: 380px;
    width: 90%;
    text-align: center;
    animation: modalPop .35s cubic-bezier(.34,1.56,.64,1);
    position: relative;
}

@keyframes modalPop {
    from { transform: scale(.7); opacity: 0; }
    to   { transform: scale(1);  opacity: 1; }
}

.modal-result-icon {
    font-size: 3.5rem;
    line-height: 1;
    margin-bottom: 12px;
}

.modal-result-title {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 6px;
}

.modal-prize-name {
    font-size: 1.1rem;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 16px;
}

.modal-prize-data {
    background: #f6f9fc;
    border-radius: var(--radius);
    padding: 14px 16px;
    margin-bottom: 16px;
    text-align: left;
}

.modal-prize-data-label {
    font-size: .78rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.modal-prize-content {
    font-family: monospace;
    word-break: break-all;
    font-size: .9rem;
    margin: 0;
    color: var(--text);
}

@media (max-width: 768px) {
    .container {
        padding: 0 12px;
    }

    .page-shell {
        padding: 10px;
    }

    .section-block {
        padding: 12px;
    }

    .section-header {
        padding: 18px 0 0;
        margin-bottom: 16px;
    }

    .product-grid,
    .products-grid {
        gap: 10px;
        margin-bottom: 16px;
    }

    .product-section {
        padding: 14px;
    }

    .category-info,
    .category-current-info {
        margin-bottom: 12px;
    }

    .category-info h3,
    .category-current-title {
        font-size: 1rem;
    }

    .category-info p,
    .category-current-desc {
        font-size: .86rem;
    }

    .card {
        padding: 14px;
    }

    .form-group {
        margin-bottom: 12px;
    }

    .card-list {
        gap: 8px;
    }

    .lottery-prizes-ring {
        margin-bottom: 16px;
    }

    .lottery-wheel-wrap {
        margin-bottom: 12px;
    }

    .lottery-history {
        margin-top: 16px;
        padding: 0;
    }
}

/* 查询页卡片间距（覆盖模板内联 margin，保持紧凑） */
.query-page .card.section-block {
    margin-bottom: 16px !important;
}

/* 概率条（admin 用） */
.prob-bar-wrap {
    background: var(--border);
    border-radius: 4px;
    height: 6px;
    width: 80px;
    display: inline-block;
    margin-right: 6px;
    vertical-align: middle;
    overflow: hidden;
}

.prob-bar {
    background: var(--primary);
    height: 100%;
    border-radius: 4px;
}

.btn-xs {
    padding: 3px 9px;
    font-size: .76rem;
    line-height: 1.4;
}


