/* 题引力考试软件站 —— 版式参考易考宝典软件站，独立实现
   主色蓝 #2578F3 / 价格红 #F6484E / 按钮橙 #FF7A1A */
:root {
    --primary: #2578f3;
    --primary-dark: #1a63d8;
    --primary-light: #eaf2ff;
    --danger: #f6484e;
    --orange: #ff7a1a;
    --orange-dark: #ef6a08;
    --green: #00a870;
    --bg: #f4f6fa;
    --card: #fff;
    --text: #2b2f38;
    --text-2: #646a75;
    --muted: #9aa0aa;
    --line: #ebedf2;
    --radius: 8px;
    --shadow: 0 2px 14px rgba(30, 45, 74, .07);
    --shadow-hover: 0 8px 24px rgba(30, 45, 74, .13);
    --wrap: 1200px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 14px/1.6 "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--primary); }
ul { list-style: none; margin: 0; padding: 0; }
img { border: 0; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; }

.wrap { width: var(--wrap); margin: 0 auto; }
.mslist { width: var(--wrap); margin: 0 auto; }

/* ---------------- 顶部细导航 ---------------- */
.topbar {
    background: #2b3242;
    color: #c8cdd6;
    font-size: 12px;
    line-height: 34px;
}
.topbar .wrap { display: flex; justify-content: space-between; }
.topbar a { color: #c8cdd6; margin-left: 16px; }
.topbar a:hover { color: #fff; }
.topbar .hi { color: var(--orange); }

/* ---------------- 头部 ---------------- */
header.site {
    background: #fff;
    border-bottom: 1px solid var(--line);
}
.hd-main {
    display: flex;
    align-items: center;
    gap: 28px;
    padding: 18px 0;
}
.logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.logo .mark {
    width: 40px; height: 40px; border-radius: 9px;
    background: linear-gradient(135deg, #2578f3, #1a63d8);
    color: #fff; font-size: 20px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
}
.logo .txt b { font-size: 20px; color: var(--text); display: block; line-height: 1.2; }
.logo .txt span { font-size: 11px; color: var(--muted); letter-spacing: 1px; }

.search {
    flex: 1;
    display: flex;
    height: 40px;
    border: 2px solid var(--primary);
    border-radius: 4px;
    overflow: hidden;
}
.search input {
    flex: 1;
    border: 0;
    outline: none;
    padding: 0 14px;
    font-size: 14px;
    font-family: inherit;
}
.search button {
    width: 96px;
    border: 0;
    background: var(--primary);
    color: #fff;
    font-size: 15px;
    cursor: pointer;
    font-family: inherit;
    letter-spacing: 2px;
}
.search button:hover { background: var(--primary-dark); }

.hd-cart {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 40px;
    padding: 0 18px;
    border: 1px solid var(--line);
    border-radius: 4px;
    color: var(--text-2);
    background: #fff;
}
.hd-cart:hover { border-color: var(--orange); color: var(--orange); }

/* 主导航 */
.mainnav {
    background: #fff;
    border-top: 1px solid var(--line);
}
.mainnav ul {
    display: flex;
    width: var(--wrap);
    margin: 0 auto;
}
.mainnav li a {
    display: block;
    padding: 0 26px;
    line-height: 44px;
    font-size: 15px;
    color: var(--text);
    border-bottom: 2px solid transparent;
}
.mainnav li a:hover { color: var(--primary); }
.mainnav li a.on { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
.mainnav .fr { margin-left: auto; }

/* ---------------- 通用板块标题 ---------------- */
.blk { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 16px; }
.blk-hd {
    display: flex;
    align-items: center;
    padding: 14px 20px;
    border-bottom: 1px solid var(--line);
}
.blk-hd h3 {
    font-size: 17px;
    padding-left: 11px;
    border-left: 4px solid var(--primary);
    line-height: 1.1;
}
.blk-hd .sub { color: var(--muted); font-size: 12px; margin-left: 12px; }
.blk-hd .more { margin-left: auto; color: var(--text-2); font-size: 13px; }
.blk-hd .more:hover { color: var(--primary); }
.blk-bd { padding: 18px 20px; }

/* ---------------- 分类 + 字母索引 ---------------- */
.catbar { display: flex; gap: 12px; margin-bottom: 16px; }
.cat-side {
    width: 218px;
    flex-shrink: 0;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}
.cat-side .hd {
    background: linear-gradient(135deg, #2578f3, #1a63d8);
    color: #fff;
    padding: 12px 18px;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}
.cat-side .hd svg { width: 18px; height: 18px; }
.cat-side ul { padding: 6px 0; }
.cat-side li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 18px;
    color: var(--text);
    font-size: 14px;
    border-left: 3px solid transparent;
}
.cat-side li a:hover, .cat-side li a.on {
    background: var(--primary-light);
    color: var(--primary);
    border-left-color: var(--primary);
}
.cat-side li a .ico {
    width: 24px; height: 24px; border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    background: var(--primary-light);
    flex-shrink: 0;
}
.cat-side li a .ico svg { width: 14px; height: 14px; }
.cat-side li a .n { margin-left: auto; font-size: 12px; color: var(--muted); }

.idx-main {
    flex: 1;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 16px 20px;
    min-width: 0;
}
.idx-row { display: flex; gap: 16px; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.idx-row:last-child { border-bottom: 0; }
.idx-row .lab {
    width: 52px; flex-shrink: 0;
    font-size: 13px; color: var(--primary); font-weight: 600;
    background: var(--primary-light); border-radius: 3px;
    text-align: center; line-height: 22px; height: 22px;
}
.idx-row .vals { display: flex; flex-wrap: wrap; gap: 4px 0; }
.idx-row .vals a {
    font-size: 13px; color: var(--text-2);
    padding: 0 10px; line-height: 22px;
    border-right: 1px solid var(--line);
}
.idx-row .vals a:last-child { border-right: 0; }
.idx-row .vals a:hover { color: var(--primary); }

/* ---------------- 商品卡片 ---------------- */
.grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }

.card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform .18s, box-shadow .18s, border-color .18s;
    display: flex;
    flex-direction: column;
}
.card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
    border-color: #d3e2fb;
}
.card .pic {
    position: relative;
    padding-top: 72%;
    background: #f7f9fc center/cover no-repeat;
    overflow: hidden;
}
.card .pic img {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .3s;
}
.card:hover .pic img { transform: scale(1.05); }
.card .pic .ph {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    color: #c3c9d4; font-size: 13px;
    background: linear-gradient(135deg, #f5f7fb, #eef2f8);
}
.card .pic .badge {
    position: absolute; left: 0; top: 10px;
    background: var(--danger); color: #fff;
    font-size: 11px; padding: 2px 8px;
    border-radius: 0 3px 3px 0;
}
.card .bd { padding: 10px 12px 12px; display: flex; flex-direction: column; flex: 1; }
.card .tt {
    font-size: 13px;
    line-height: 1.5;
    height: 39px;
    overflow: hidden;
    color: var(--text);
    font-weight: 400;
}
.card:hover .tt { color: var(--primary); }
.card .meta {
    font-size: 12px; color: var(--muted);
    margin-top: 6px;
    display: flex; gap: 8px;
}
.card .price {
    margin-top: 8px;
    display: flex; align-items: baseline; gap: 6px;
    flex-wrap: wrap;
}
.card .price .now { color: var(--danger); font-size: 17px; font-weight: 700; }
.card .price .now i { font-size: 12px; font-style: normal; }
.card .price .old { color: var(--muted); font-size: 12px; text-decoration: line-through; }
.card .price .free { color: var(--green); font-size: 16px; font-weight: 700; }
.card .buy {
    margin-top: 10px;
    text-align: center;
    line-height: 30px;
    border-radius: 4px;
    background: var(--orange);
    color: #fff;
    font-size: 13px;
}
.card .buy:hover { background: var(--orange-dark); color: #fff; }

/* ---------------- 相关产品 / 流程图 ---------------- */
.rel-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; }
.rel-item {
    text-align: center;
    padding: 16px 4px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    transition: .18s;
}
.rel-item:hover { border-color: var(--primary); background: var(--primary-light); }
.rel-item .ic {
    width: 40px; height: 40px; margin: 0 auto 8px;
    border-radius: 50%;
    background: var(--primary-light);
    display: flex; align-items: center; justify-content: center;
}
.rel-item .ic svg { width: 20px; height: 20px; }
.rel-item span { font-size: 13px; color: var(--text-2); }

.flow { display: flex; align-items: center; justify-content: space-between; }
.flow .step { text-align: center; flex: 1; }
.flow .step .no {
    width: 46px; height: 46px; margin: 0 auto 10px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2578f3, #1a63d8);
    color: #fff; font-size: 18px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 12px rgba(37, 120, 243, .25);
}
.flow .step p { margin: 0; font-size: 13px; color: var(--text-2); }
.flow .arrow { color: #cfd6e2; font-size: 20px; flex-shrink: 0; padding: 0 6px; }

/* 商家信息 */
.shop-info { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.shop-info .it {
    display: flex; align-items: center; gap: 12px;
    padding: 14px;
    background: #fafbfd;
    border-radius: var(--radius);
}
.shop-info .it .tag {
    width: 44px; height: 44px; flex-shrink: 0;
    border-radius: 6px;
    background: var(--primary);
    color: #fff; font-size: 14px; font-weight: 600;
    display: flex; align-items: center; justify-content: center;
    letter-spacing: 1px;
}
.shop-info .it p { margin: 0; font-size: 13px; color: var(--text-2); line-height: 1.5; }
.shop-info .it b { color: var(--primary); }

/* ---------------- 筛选条 ---------------- */
.filters { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 14px; }
.f-row { display: flex; border-bottom: 1px dashed var(--line); }
.f-row:last-child { border-bottom: 0; }
.f-row .k {
    width: 82px; flex-shrink: 0;
    padding: 12px 0 12px 20px;
    color: var(--text-2); font-size: 13px;
    background: #fafbfd;
}
.f-row .v { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 20px 10px 14px; }
.f-row .v a {
    padding: 3px 12px;
    font-size: 13px;
    color: var(--text-2);
    border-radius: 3px;
}
.f-row .v a:hover { color: var(--primary); background: var(--primary-light); }
.f-row .v a.on { background: var(--primary); color: #fff; }

.list-hd {
    display: flex; align-items: center;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 12px 20px;
    margin-bottom: 14px;
}
.list-hd .cnt { font-size: 13px; color: var(--text-2); }
.list-hd .cnt b { color: var(--danger); font-size: 15px; }
.list-hd .sorts { margin-left: auto; display: flex; gap: 4px; }
.list-hd .sorts a {
    padding: 4px 14px;
    font-size: 13px;
    color: var(--text-2);
    border: 1px solid var(--line);
    border-radius: 3px;
}
.list-hd .sorts a:hover { color: var(--primary); border-color: var(--primary); }
.list-hd .sorts a.on { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ---------------- 分页 ---------------- */
.pager { display: flex; justify-content: center; gap: 6px; padding: 24px 0 8px; flex-wrap: wrap; }
.pager a, .pager span {
    min-width: 36px; height: 34px; line-height: 32px;
    text-align: center; padding: 0 10px;
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 4px;
    font-size: 13px; color: var(--text-2);
}
.pager a:hover { border-color: var(--primary); color: var(--primary); }
.pager .on { background: var(--primary); border-color: var(--primary); color: #fff; }
.pager .dis { color: #c9cdd5; }

/* ---------------- 详情 ---------------- */
.crumb { padding: 14px 0; font-size: 13px; color: var(--muted); }
.crumb a { color: var(--text-2); }
.crumb a:hover { color: var(--primary); }

.dt { display: flex; gap: 20px; }
.dt-left {
    width: 420px; flex-shrink: 0;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 18px;
}
.dt-pic {
    width: 100%;
    padding-top: 72%;
    background: #f7f9fc center/cover no-repeat;
    border-radius: 6px;
    position: relative;
    overflow: hidden;
}
.dt-pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.dt-pic .ph {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    color: #c3c9d4;
}
.dt-shots { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: 10px; }
.dt-shots .s {
    padding-top: 66%;
    background: #f2f5f9 center/cover no-repeat;
    border-radius: 4px;
    border: 1px solid var(--line);
}

.dt-right { flex: 1; min-width: 0; }
.dt-box {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px 24px;
    margin-bottom: 14px;
}
.dt-box h1 { font-size: 20px; line-height: 1.5; margin-bottom: 12px; font-weight: 600; }
.dt-meta { font-size: 13px; color: var(--text-2); line-height: 2; }
.dt-meta .lb { color: var(--muted); margin-right: 6px; }
.dt-meta .new { background: var(--danger); color: #fff; font-size: 11px; padding: 1px 6px; border-radius: 2px; }
.dt-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.dt-tags a {
    font-size: 12px; color: var(--primary);
    background: var(--primary-light);
    padding: 3px 10px; border-radius: 3px;
}

.price-box {
    display: flex; align-items: baseline; gap: 14px;
    background: #fff8f8;
    border: 1px dashed #ffd5d7;
    border-radius: 6px;
    padding: 14px 18px;
    margin: 16px 0;
    flex-wrap: wrap;
}
.price-box .lb { font-size: 13px; color: var(--text-2); }
.price-box .now { color: var(--danger); font-size: 30px; font-weight: 700; line-height: 1; }
.price-box .now i { font-size: 17px; font-style: normal; }
.price-box .old { color: var(--muted); font-size: 13px; text-decoration: line-through; }
.price-box .sales { margin-left: auto; font-size: 13px; color: var(--text-2); }

.versions { display: flex; gap: 12px; flex-wrap: wrap; }
.ver {
    flex: 1; min-width: 160px;
    border: 2px solid var(--line);
    border-radius: 6px;
    padding: 12px 14px;
    cursor: pointer;
    transition: .18s;
    position: relative;
}
.ver:hover { border-color: #a9c8f7; }
.ver.on { border-color: var(--primary); background: var(--primary-light); }
.ver .nm { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.ver .ds { font-size: 12px; color: var(--text-2); line-height: 1.6; }
.ver .stars { color: var(--orange); font-size: 12px; letter-spacing: 1px; }
.ver .tick {
    position: absolute; right: 0; bottom: 0;
    width: 24px; height: 18px;
    background: var(--primary);
    color: #fff; font-size: 11px;
    display: none;
    align-items: center; justify-content: center;
    border-radius: 6px 0 4px 0;
}
.ver.on .tick { display: flex; }

.buy-row { display: flex; gap: 12px; margin-top: 18px; }
.btn-buy {
    flex: 1;
    background: var(--orange);
    color: #fff;
    text-align: center;
    line-height: 46px;
    font-size: 17px;
    border-radius: 6px;
    letter-spacing: 1px;
    transition: .18s;
}
.btn-buy:hover { background: var(--orange-dark); color: #fff; }
.btn-ghost {
    width: 150px;
    border: 1px solid var(--primary);
    color: var(--primary);
    text-align: center;
    line-height: 44px;
    border-radius: 6px;
    font-size: 15px;
}
.btn-ghost:hover { background: var(--primary-light); color: var(--primary); }

.dt-desc { font-size: 14px; color: var(--text-2); line-height: 1.9; }
.dt-desc p { margin: 0 0 10px; }
.dt-desc img { max-width: 100%; }

.rel-list li {
    display: flex; gap: 10px; align-items: center;
    padding: 8px 0; border-bottom: 1px dashed var(--line);
}
.rel-list li:last-child { border-bottom: 0; }
.rel-list .thumb {
    width: 56px; height: 40px; flex-shrink: 0;
    border-radius: 4px;
    background: #f2f5f9 center/cover no-repeat;
}
.rel-list .nm { font-size: 13px; line-height: 1.4; max-height: 36px; overflow: hidden; }
.rel-list .pr { margin-left: auto; color: var(--danger); font-size: 13px; flex-shrink: 0; }

.prevnext { display: flex; gap: 12px; }
.prevnext a {
    flex: 1;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 12px 16px;
    font-size: 13px;
    color: var(--text-2);
    overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.prevnext a:hover { color: var(--primary); }
.prevnext .none { opacity: .5; }

/* ---------------- 底部 ---------------- */
footer.ft { background: #2b3242; color: #aeb4bf; margin-top: 26px; padding: 30px 0 20px; }
.ft-cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.ft-cols h4 { color: #fff; font-size: 15px; margin-bottom: 12px; font-weight: 600; }
.ft-cols li { line-height: 2; font-size: 13px; }
.ft-cols a { color: #aeb4bf; }
.ft-cols a:hover { color: #fff; }
.ft-bot {
    margin-top: 24px; padding-top: 18px;
    border-top: 1px solid #3a4152;
    text-align: center; font-size: 12px; line-height: 2;
}
.ft-bot a { color: #aeb4bf; margin: 0 8px; }

/* ---------------- 后台 ---------------- */
.admin-wrap { width: 1180px; margin: 22px auto; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; }
.admin-wrap h2 { font-size: 19px; margin-bottom: 4px; }
.admin-wrap .sub { color: var(--muted); font-size: 13px; margin-bottom: 18px; }
.stat-row { display: flex; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.stat {
    flex: 1; min-width: 150px;
    background: #fafbfd; border: 1px solid var(--line);
    border-radius: var(--radius); padding: 14px 16px;
}
.stat .n { font-size: 22px; font-weight: 700; color: var(--primary); }
.stat .l { font-size: 12px; color: var(--muted); margin-top: 2px; }
table.adm { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 10px; }
table.adm th, table.adm td { border-bottom: 1px solid var(--line); padding: 8px 8px; text-align: left; vertical-align: middle; }
table.adm th { background: #fafbfd; color: var(--text-2); font-weight: 600; }
table.adm td input[type=text], table.adm td input[type=number], table.adm td select {
    border: 1px solid var(--line); border-radius: 4px; padding: 4px 6px; font-size: 13px; font-family: inherit;
}
table.adm .mini { width: 110px; }
table.adm .num { width: 56px; }
.btn {
    display: inline-block; padding: 6px 16px; border-radius: 4px;
    background: var(--primary); color: #fff; font-size: 13px; border: 0; cursor: pointer;
    font-family: inherit;
}
.btn:hover { background: var(--primary-dark); color: #fff; }
.btn.gray { background: #8b93a1; }
.btn.sm { padding: 3px 10px; font-size: 12px; }
.logs { background: #fafbfd; border: 1px solid var(--line); border-radius: 6px; padding: 12px 16px; font-size: 12px; color: var(--text-2); line-height: 1.9; max-height: 220px; overflow: auto; margin-top: 8px; }
.msg { background: #eaf7ef; border: 1px solid #b7e3c6; color: #1d7a43; padding: 10px 14px; border-radius: 6px; font-size: 13px; margin-bottom: 14px; }
.login-box { width: 340px; margin: 120px auto; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 30px; }
.login-box h2 { text-align: center; margin-bottom: 20px; }
.login-box input { width: 100%; border: 1px solid var(--line); border-radius: 4px; padding: 10px 12px; margin-bottom: 12px; font-size: 14px; font-family: inherit; }
.login-box button { width: 100%; padding: 10px; font-size: 15px; }

/* ---------------- 响应式 ---------------- */
@media (max-width: 1220px) {
    .wrap, .mslist, .mainnav ul { width: 100%; padding: 0 12px; }
    .grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 980px) {
    .catbar { flex-direction: column; }
    .cat-side { width: 100%; }
    .grid, .grid4 { grid-template-columns: repeat(3, 1fr); }
    .dt { flex-direction: column; }
    .dt-left { width: 100%; }
    .rel-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 680px) {
    .grid, .grid4 { grid-template-columns: repeat(2, 1fr); }
    .ft-cols { grid-template-columns: repeat(2, 1fr); }
    .hd-main { flex-wrap: wrap; }
}
