/* ============================================================
   会员套餐「续费 / 开通」公共样式 —— 全站唯一一份
   ============================================================
   覆盖：manage.html / profile.html / cert/member.html 三个页面的套餐弹框（弹框+内联卡片）。

   ★为什么必须抽成公共文件：这三个页面里 manage.html **没有引入 common.css**，
     所以本文件的按钮样式必须自带全量（height/radius/font-family/cursor），
     不能依赖 .btn 基类。历史上就是因为三页各写一份，出现了
     「立即开通」是原生灰按钮、报告档位乱序、卡片高矮不一 等问题。
   ★弹框遮罩 .modal-mask / .modal-box 的基础规则在 manage.css 与 profile.css 里各有一份，
     本文件统一接管（后引入即可覆盖），页面里那两份可以逐步删掉。
   ============================================================ */

/* ===== 遮罩与弹框外壳 ===== */
.modal-mask {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .45);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    overflow-y: auto;
    overscroll-behavior: contain;
    z-index: 1000;
    padding: 24px 16px;
    text-align: left;   /* 弹框内文字一律靠左 */
}
.modal-mask .modal-box {
    margin: auto 0;
    max-width: 560px;
    width: 92%;
    transform: none;
    padding: 18px 22px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 18px 48px rgba(58, 42, 34, .18);
}
/* 2×2 下每张卡约 330px 宽，权益表格「其他权益」一行放得下 */
.modal-mask .vip-box { max-width: 720px; }
.modal-mask .modal-hd {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.05rem;
    font-weight: 700;
    color: #2c2b28;
    margin-bottom: 4px;
}
.modal-mask .modal-hd .x { border: none; background: none; font-size: 1.25rem; cursor: pointer; color: #aaa; line-height: 1; }
.modal-mask .modal-sub { font-size: .82rem; color: #b0a8a0; margin-bottom: 10px; }
.modal-mask .modal-foot { margin-top: 8px; font-size: .78rem; color: #b0a8a0; text-align: left; }

/* ===== 卡片网格 ===== */
.pkg-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (max-width: 480px) { .pkg-grid { grid-template-columns: 1fr; } }

.pkg-card {
    position: relative;
    display: flex;
    flex-direction: column;   /* 让表格撑满、按钮统一贴底对齐 */
    border: 1px solid #ece5dc;
    border-radius: 14px;
    padding: 10px 12px 12px;
    background: #fff;
    transition: border-color .2s, box-shadow .2s;
    cursor: pointer;          /* 整卡可点选 */
    text-align: left;
}
/* 「最受欢迎」只保留角标，不给红框 —— 红框是"选中"语义，必须由用户点选触发 */
.pkg-card.hot { border-color: #ece5dc; }
/* 选中态：点哪张亮哪张，默认没有任何一张是亮的 */
.pkg-card.selected { border-color: #eb1313; box-shadow: 0 0 0 2px rgba(235, 19, 19, .12); }
.pkg-card:hover { border-color: #e0d3c4; }
.pkg-card.selected:hover { border-color: #eb1313; }

/* 「最受欢迎」角标（标在季度会员那一档） */
.pkg-card .pkg-flag {
    position: absolute; top: -1px; right: 12px;
    background: linear-gradient(90deg, #eb1313, #f0553a);
    color: #fff;
    font-size: .66rem;
    line-height: 1.8;
    padding: 0 9px;
    border-radius: 0 0 8px 8px;
    letter-spacing: .3px;
}

.pkg-card .pname { font-weight: 700; font-size: .96rem; color: #2c2b28; }
.pkg-card .pprice { color: #eb1313; font-weight: 800; font-size: 1.22rem; margin: 3px 0 0; }
.pkg-card .pprice small { font-size: .7rem; font-weight: 400; color: #b0a8a0; }
/* 划线原价：四档后台都有 original_price，直接展示更有说服力 */
.pkg-card .pprice .pori {
    margin-left: 6px;
    font-size: .72rem;
    font-weight: 400;
    color: #b8b0a6;
}

/* ===== 权益表格（简化描述）=====
   固定 3 行：AI 测算 / 文档下载 / 其他权益。几张卡行列完全对齐、整体更矮。
   ★`<th>` 浏览器默认 text-align:center，必须显式改回 left。 */
.pkg-card .vip-table {
    flex: 1 1 auto;
    width: 100%;
    margin-top: 6px;
    table-layout: fixed;
    border-collapse: collapse;
    text-align: left;
}
.pkg-card .vip-table th,
.pkg-card .vip-table td {
    padding: 3px 0;
    font-size: .73rem;
    font-weight: 400;
    line-height: 1.45;
    text-align: left;
    vertical-align: top;
    word-break: break-word;
}
.pkg-card .vip-table th { width: 62px; color: #b0a8a0; white-space: nowrap; letter-spacing: .2px; }
.pkg-card .vip-table td { color: #6f665c; }
.pkg-card .vip-table tr + tr th,
.pkg-card .vip-table tr + tr td { border-top: 1px dashed #f2eae2; }

/* ===== 浅底信息块（.pdur）=====
   会员卡已改用 .vip-table；这里保留给**积分商城卡 / AI 次数包 / 下载次数包**的说明行。 */
.pkg-card .pdur {
    flex: 1 1 auto;
    margin-top: 8px;
    padding: 8px 10px;
    background: #fdfaf7;
    border: 1px solid #f4ece4;
    border-radius: 10px;
    font-size: .74rem;
    color: #8c8378;
    line-height: 1.6;
}
.pkg-card .pdur-line { position: relative; padding-left: 11px; }
.pkg-card .pdur-line + .pdur-line { margin-top: 3px; }
.pkg-card .pdur-line::before {
    content: '';
    position: absolute;
    left: 2px;
    top: .58em;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #d9c7b6;
}

/* ===== 主操作按钮 =====
   ★自带全量样式：manage.html 未引入 common.css，没有 .btn 基础规则。 */
.pkg-card .pkg-btn {
    margin-top: 10px;
    width: 100%;
    height: 34px;
    padding: 0 14px;
    border-radius: 30px;
    border: 1px solid transparent;
    font-size: .88rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: .2s;
}
.pkg-card .pkg-btn.btn-gold { background: #b47a2a; border-color: #b47a2a; color: #fff; }
.pkg-card .pkg-btn.btn-gold:hover { background: #9a6520; border-color: #9a6520; color: #fff; }
/* 四档按钮样式保持完全一致：区分只体现在角标与「选中」边框上 */
.pkg-card .pkg-btn:disabled {
    background: #e8e0d8;
    border-color: #e8e0d8;
    cursor: not-allowed;
    color: #999;
}
.empty-tip { text-align: center; color: #b0a8a0; font-size: .85rem; padding: 12px; }
