/* ============================================================
   内容页通用组件库（品牌：靛蓝 #1e40af / 琥珀 #f59e0b）
   服务于关于/帮助/代理/商标/AI/推广/安全/资讯/公告/活动/用户中心等
   所有页面复用 .container / .btn / .hw-btn-*（定义在 style.css / layout.css）
   ============================================================ */

:root {
    --brand: #1e40af;
    --brand-dark: #1e3a8a;
    --brand-light: #eef2ff;
    --accent: #f59e0b;
    --accent-dark: #d97706;
    --ink: #1f2937;
    --muted: #6b7280;
    --line: #e5e7eb;
    --bg-alt: #f7f8fa;
}

/* ---------- 页面英雄区 ---------- */
.cp-hero {
    background: linear-gradient(135deg, #1e40af 0%, #3730a3 100%);
    color: #fff;
    padding: 56px 0 60px;
    position: relative;
    overflow: hidden;
}
.cp-hero::after {
    content: "";
    position: absolute;
    right: -80px;
    top: -80px;
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(245,158,11,0.35), transparent 70%);
    border-radius: 50%;
}
.cp-hero-inner { position: relative; z-index: 1; }
.cp-hero h1 {
    font-size: 34px;
    margin: 0 0 14px;
    letter-spacing: 1px;
}
.cp-hero p {
    font-size: 17px;
    opacity: 0.92;
    max-width: 760px;
    line-height: 1.7;
    margin: 0;
}
.cp-crumb {
    font-size: 13px;
    margin-bottom: 18px;
    opacity: 0.85;
}
.cp-crumb a { color: #fff; opacity: 0.85; }
.cp-crumb a:hover { opacity: 1; text-decoration: underline; }
.cp-crumb span { opacity: 0.7; }
.cp-crumb i { margin: 0 8px; font-style: normal; opacity: 0.6; }

/* ---------- 两栏布局 ---------- */
.cp-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 40px;
    padding: 48px 0;
    align-items: start;
}
.cp-main { min-width: 0; }
.cp-side { position: sticky; top: 96px; }

/* ---------- 区块 ---------- */
.cp-section { padding: 48px 0; }
.cp-section-alt { background: var(--bg-alt); }
.cp-head { margin-bottom: 32px; }
.cp-head h2 {
    font-size: 26px;
    color: var(--ink);
    margin: 0 0 10px;
    position: relative;
    padding-left: 14px;
}
.cp-head h2::before {
    content: "";
    position: absolute;
    left: 0; top: 6px; bottom: 6px;
    width: 5px; border-radius: 3px;
    background: var(--brand);
}
.cp-head p { color: var(--muted); margin: 0; font-size: 15px; }

/* ---------- 卡片网格 ---------- */
.cp-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 22px;
}
.cp-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 26px 22px;
    transition: transform .2s, box-shadow .2s, border-color .2s;
}
.cp-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 30px rgba(30,64,175,0.12);
    border-color: var(--brand);
}
.cp-card-icon {
    width: 54px; height: 54px;
    border-radius: 12px;
    background: var(--brand-light);
    color: var(--brand);
    display: flex; align-items: center; justify-content: center;
    font-size: 26px; margin-bottom: 16px;
}
.cp-card h3 { font-size: 18px; margin: 0 0 10px; color: var(--ink); }
.cp-card p { color: var(--muted); line-height: 1.7; margin: 0; font-size: 14px; }

/* ---------- 步骤流 ---------- */
.cp-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    counter-reset: step;
}
.cp-step {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 24px 20px;
    position: relative;
}
.cp-step-no {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: var(--brand); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; margin-bottom: 14px;
}
.cp-step h3 { font-size: 17px; margin: 0 0 8px; color: var(--ink); }
.cp-step p { color: var(--muted); font-size: 14px; line-height: 1.6; margin: 0; }

/* ---------- FAQ ---------- */
.cp-faq { max-width: 860px; }
.cp-faq details {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 10px;
    margin-bottom: 12px;
    overflow: hidden;
}
.cp-faq summary {
    cursor: pointer;
    padding: 16px 20px;
    font-weight: 600;
    color: var(--ink);
    list-style: none;
    position: relative;
}
.cp-faq summary::-webkit-details-marker { display: none; }
.cp-faq summary::after {
    content: "+";
    position: absolute; right: 20px; top: 14px;
    font-size: 20px; color: var(--brand);
}
.cp-faq details[open] summary::after { content: "−"; }
.cp-faq .faq-a { padding: 0 20px 18px; color: var(--muted); line-height: 1.8; }

/* ---------- 侧边子导航 ---------- */
.cp-side-nav {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 10px;
}
.cp-side-nav h4 {
    font-size: 14px; color: var(--muted);
    margin: 8px 12px 10px; text-transform: uppercase; letter-spacing: 1px;
}
.cp-side-nav a {
    display: block;
    padding: 11px 14px;
    border-radius: 8px;
    color: var(--ink);
    text-decoration: none;
    font-size: 15px;
    transition: background .15s, color .15s;
}
.cp-side-nav a:hover { background: var(--brand-light); color: var(--brand); }
.cp-side-nav a.is-active {
    background: var(--brand); color: #fff; font-weight: 600;
}
.cp-side-card {
    margin-top: 18px;
    background: var(--brand-light);
    border: 1px solid #dbe3ff;
    border-radius: 12px;
    padding: 20px;
}
.cp-side-card h4 { margin: 0 0 8px; color: var(--brand); font-size: 16px; }
.cp-side-card p { margin: 0 0 14px; color: var(--muted); font-size: 13px; line-height: 1.6; }

/* ---------- 文章 / 列表 ---------- */
.cp-list { display: flex; flex-direction: column; gap: 0; }
.cp-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 4px;
    border-bottom: 1px solid var(--line);
    transition: padding-left .15s;
}
.cp-item:hover { padding-left: 8px; }
.cp-item-main { min-width: 0; }
.cp-item-title {
    font-size: 16px; color: var(--ink); margin: 0 0 6px;
    font-weight: 600;
}
.cp-item-title a { color: inherit; text-decoration: none; }
.cp-item-title a:hover { color: var(--brand); }
.cp-item-meta { color: var(--muted); font-size: 13px; }
.cp-item-date {
    color: var(--muted); font-size: 13px; white-space: nowrap;
}

.cp-article { line-height: 1.9; color: #374151; font-size: 16px; }
.cp-article p { margin: 0 0 20px; }
.cp-article h3 { color: var(--ink); margin: 28px 0 12px; }
.cp-back {
    display: inline-block; margin-bottom: 20px;
    color: var(--brand); text-decoration: none; font-size: 14px;
}

/* ---------- CTA 转化条 ---------- */
.cp-cta {
    background: linear-gradient(135deg, #1e40af 0%, #3730a3 100%);
    color: #fff;
    padding: 52px 0;
    text-align: center;
}
.cp-cta h2 { font-size: 26px; margin: 0 0 12px; }
.cp-cta p { opacity: 0.9; margin: 0 0 24px; font-size: 16px; }
.cp-cta-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ---------- 表单 ---------- */
.cp-form { max-width: 640px; }
.cp-form-wide { max-width: 860px; }
.cp-field { margin-bottom: 20px; }
.cp-label {
    display: block; font-size: 14px; color: var(--ink);
    margin-bottom: 8px; font-weight: 600;
}
.cp-label .req { color: #ef4444; margin-left: 3px; }
.cp-input, .cp-textarea, .cp-select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-size: 15px;
    color: var(--ink);
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
    box-sizing: border-box;
}
.cp-input:focus, .cp-textarea:focus, .cp-select:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(30,64,175,0.12);
}
.cp-textarea { min-height: 130px; resize: vertical; }
.cp-error-text { color: #ef4444; font-size: 13px; margin-top: 6px; }
.cp-input.has-error { border-color: #ef4444; }

/* 闪存提示 */
.cp-alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}
.cp-alert-success { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.cp-alert-error { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }

/* ---------- 表格 ---------- */
.cp-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 10px;
    overflow: hidden;
}
.cp-table th, .cp-table td {
    padding: 13px 16px;
    text-align: left;
    border-bottom: 1px solid var(--line);
    font-size: 14px;
}
.cp-table th { background: var(--bg-alt); color: var(--ink); font-weight: 600; }
.cp-table tr:last-child td { border-bottom: none; }
.cp-tag {
    display: inline-block; padding: 2px 10px;
    border-radius: 20px; font-size: 12px;
    background: var(--brand-light); color: var(--brand);
}
.cp-tag-warn { background: #fef3c7; color: #b45309; }
.cp-tag-ok { background: #d1fae5; color: #047857; }

/* ---------- 空状态 ---------- */
.cp-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--muted);
}
.cp-empty-icon { font-size: 48px; margin-bottom: 14px; }
.cp-empty a { color: var(--brand); }

/* ---------- 认证卡片（登录/注册/找回） ---------- */
.cp-auth {
    max-width: 420px;
    margin: 48px auto;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 36px 32px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}
.cp-auth h2 { text-align: center; margin: 0 0 6px; color: var(--ink); }
.cp-auth .cp-sub { text-align: center; color: var(--muted); margin: 0 0 26px; font-size: 14px; }
.cp-auth .cp-row { display: flex; gap: 12px; }
.cp-auth .cp-foot { text-align: center; margin-top: 20px; color: var(--muted); font-size: 14px; }
.cp-auth .cp-foot a { color: var(--brand); }

/* ---------- 用户中心 ---------- */
.cp-uc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 18px;
    margin-bottom: 36px;
}
.cp-uc-card {
    background: #fff; border: 1px solid var(--line);
    border-radius: 12px; padding: 22px; text-align: center;
}
.cp-uc-card .num { font-size: 30px; font-weight: 700; color: var(--brand); }
.cp-uc-card .lbl { color: var(--muted); font-size: 14px; margin-top: 6px; }
.cp-uc-block {
    background: #fff; border: 1px solid var(--line);
    border-radius: 12px; padding: 24px; margin-bottom: 24px;
}
.cp-uc-block h3 { margin: 0 0 18px; font-size: 18px; color: var(--ink); }

/* ---------- 购物车 / 结算 ---------- */
.cp-cart-item {
    display: grid;
    grid-template-columns: 80px 1fr auto auto;
    gap: 16px; align-items: center;
    padding: 16px 0; border-bottom: 1px solid var(--line);
}
.cp-cart-thumb {
    width: 80px; height: 80px; border-radius: 8px;
    background: var(--brand-light);
    display: flex; align-items: center; justify-content: center;
    font-size: 30px; color: var(--brand);
}
.cp-cart-name { font-weight: 600; color: var(--ink); }
.cp-cart-price { color: var(--accent-dark); font-weight: 700; }
.cp-cart-summary {
    background: #fff; border: 1px solid var(--line);
    border-radius: 12px; padding: 24px; margin-top: 24px;
}
.cp-cart-summary .row {
    display: flex; justify-content: space-between;
    padding: 8px 0; color: var(--muted); font-size: 15px;
}
.cp-cart-summary .total {
    border-top: 1px solid var(--line); margin-top: 8px; padding-top: 14px;
    font-size: 20px; color: var(--ink); font-weight: 700;
}
.cp-cart-summary .total b { color: var(--accent-dark); }

/* ---------- 统计数字条 ---------- */
.cp-stats {
    display: grid; grid-template-columns: repeat(4, 1fr);
    background: var(--brand); color: #fff;
    border-radius: 12px; overflow: hidden;
    margin: 0 0 8px;
}
.cp-stat { padding: 28px 16px; text-align: center; border-right: 1px solid rgba(255,255,255,0.12); }
.cp-stat:last-child { border-right: none; }
.cp-stat-num { font-size: 30px; font-weight: 700; }
.cp-stat-label { font-size: 13px; opacity: 0.9; margin-top: 6px; }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
    .cp-layout { grid-template-columns: 1fr; }
    .cp-side { position: static; order: -1; }
    .cp-stats { grid-template-columns: repeat(2, 1fr); }
    .cp-stat:nth-child(2) { border-right: none; }
    .cp-hero h1 { font-size: 26px; }
}
@media (max-width: 560px) {
    .cp-cart-item { grid-template-columns: 60px 1fr; }
    .cp-cart-item .cp-cart-price,
    .cp-cart-item .cp-cart-qty { grid-column: 2; text-align: left; }
}
