/* ============================================================
 * 对外展示官网样式（site）
 * 与后台管理（aifei-vip.css）刻意区分：浅色大留白、品牌色导航、卡片化内容。
 * 仅依赖 Bootstrap 的栅格/工具类，视觉层全部在此文件定义。
 * ============================================================ */

:root {
    --site-primary: #1f5fbf;
    --site-primary-dark: #16468f;
    --site-accent: #f0a500;
    --site-bg: #ffffff;
    --site-bg-soft: #f5f8fc;
    --site-text: #2c333a;
    --site-text-soft: #6b7785;
    --site-border: #e6ebf1;
    --site-radius: 10px;
    --site-shadow: 0 6px 20px rgba(31, 95, 191, 0.08);
}

* { box-sizing: border-box; }

body.site-body {
    margin: 0;
    font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    color: var(--site-text);
    background: var(--site-bg);
    line-height: 1.7;
}

a { color: var(--site-primary); text-decoration: none; }
a:hover { color: var(--site-primary-dark); }

/* ---------- 顶部导航 ---------- */
.site-nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 28px;
    padding: 0 32px;
    height: 64px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: saturate(180%) blur(8px);
    border-bottom: 1px solid var(--site-border);
}
.site-nav .brand {
    font-size: 20px;
    font-weight: 700;
    color: var(--site-primary);
    letter-spacing: 0.5px;
    white-space: nowrap;
}
.site-nav .brand small { color: var(--site-text-soft); font-weight: 400; font-size: 12px; margin-left: 6px; }
.site-nav .nav-links {
    display: flex;
    gap: 22px;
    margin-left: auto;
    align-items: center;
}
.site-nav .nav-links a {
    color: var(--site-text);
    font-size: 15px;
    padding: 6px 2px;
    border-bottom: 2px solid transparent;
    transition: all .15s ease;
}
.site-nav .nav-links a:hover,
.site-nav .nav-links a.active {
    color: var(--site-primary);
    border-bottom-color: var(--site-primary);
}

/* 注：原先此处有 .site-nav .nav-admin 规则，用于顶部「管理后台」入口。
   该入口已按要求移除（官网为纯前台内容站点，不对外暴露后台管理系统路径），
   故对应样式一并清理，避免留下无用的死代码。 */

/* ---------- 通用区块 ---------- */
.site-main { min-height: calc(100vh - 64px - 220px); }
.container { max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.section { padding: 56px 0; }
.section:nth-child(even) { background: var(--site-bg-soft); }
.section-title {
    font-size: 26px;
    font-weight: 700;
    margin: 0 0 6px;
    text-align: center;
}
.section-sub {
    text-align: center;
    color: var(--site-text-soft);
    margin: 0 0 36px;
    font-size: 15px;
}

/* ---------- Hero ---------- */
.hero {
    background: linear-gradient(135deg, var(--site-primary) 0%, var(--site-primary-dark) 100%);
    color: #fff;
    padding: 84px 0;
    text-align: center;
}
.hero h1 { font-size: 40px; font-weight: 800; margin: 0 0 16px; }
.hero p { font-size: 18px; opacity: .92; max-width: 720px; margin: 0 auto 28px; }
.hero .btn { margin: 0 8px; }

/* ---------- 按钮 ---------- */
.btn-site {
    display: inline-block;
    padding: 11px 26px;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all .15s ease;
}
.btn-site.primary { background: #fff; color: var(--site-primary); }
.btn-site.primary:hover { background: #eaf1fb; }
.btn-site.outline { background: transparent; border-color: rgba(255,255,255,.6); color: #fff; }
.btn-site.outline:hover { background: rgba(255,255,255,.12); }
.btn-site.solid { background: var(--site-primary); color: #fff; }
.btn-site.solid:hover { background: var(--site-primary-dark); }
.btn-site:disabled { opacity: .6; cursor: not-allowed; }

/* ---------- 卡片网格 ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 22px; }
.pcard {
    background: #fff;
    border: 1px solid var(--site-border);
    border-radius: var(--site-radius);
    overflow: hidden;
    box-shadow: var(--site-shadow);
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease;
    display: flex;
    flex-direction: column;
}
.pcard:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(31,95,191,.16); }
.pcard img { width: 100%; height: 170px; object-fit: cover; background: var(--site-bg-soft); }
.pcard .pcard-body { padding: 16px 18px; flex: 1; display: flex; flex-direction: column; }
.pcard .pcard-body h5 { margin: 0 0 8px; font-size: 17px; }
.pcard .pcard-body p { margin: 0; color: var(--site-text-soft); font-size: 14px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pcard .tag {
    align-self: flex-start;
    font-size: 12px;
    color: var(--site-primary);
    background: #eaf1fb;
    border-radius: 999px;
    padding: 2px 10px;
    margin-top: 10px;
}

/* ---------- 分类筛选 ---------- */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 30px;
}
.filter-bar .chip {
    padding: 7px 18px;
    border: 1px solid var(--site-border);
    border-radius: 999px;
    background: #fff;
    color: var(--site-text);
    cursor: pointer;
    font-size: 14px;
}
.filter-bar .chip.active { background: var(--site-primary); color: #fff; border-color: var(--site-primary); }

/* ---------- 新闻列表 ---------- */
.news-item {
    display: flex;
    gap: 18px;
    padding: 18px 0;
    border-bottom: 1px solid var(--site-border);
    cursor: pointer;
}
.news-item:hover h4 { color: var(--site-primary); }
.news-item img { width: 140px; height: 96px; object-fit: cover; border-radius: 8px; background: var(--site-bg-soft); flex-shrink: 0; }
.news-item .news-meta { color: var(--site-text-soft); font-size: 13px; margin-bottom: 6px; }
.news-item h4 { margin: 0 0 6px; font-size: 17px; }
.news-item p { margin: 0; color: var(--site-text-soft); font-size: 14px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- 表单 ---------- */
.contact-wrap { max-width: 640px; margin: 0 auto; }
.form-row { margin-bottom: 16px; }
.form-row label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 14px; }
.form-row .req { color: #e23b3b; }
.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--site-border);
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
}
.form-control:focus { outline: none; border-color: var(--site-primary); box-shadow: 0 0 0 3px rgba(31,95,191,.12); }
textarea.form-control { resize: vertical; min-height: 120px; }
.form-note { color: var(--site-text-soft); font-size: 13px; margin-top: 4px; }
.alert-ok {
    background: #e8f7ee; border: 1px solid #b6e3c8; color: #1c7a44;
    padding: 12px 16px; border-radius: 8px; margin-bottom: 18px;
}

/* ---------- 详情弹层（自实现，不依赖 Bootstrap modal） ---------- */
.site-modal-mask {
    position: fixed; inset: 0; background: rgba(20,28,38,.55);
    display: flex; align-items: flex-start; justify-content: center;
    padding: 60px 16px; z-index: 2000; overflow-y: auto;
}
.site-modal {
    background: #fff; border-radius: 12px; max-width: 760px; width: 100%;
    box-shadow: 0 20px 60px rgba(0,0,0,.25); overflow: hidden;
}
.site-modal .sm-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 22px; border-bottom: 1px solid var(--site-border);
}
.site-modal .sm-head h3 { margin: 0; font-size: 20px; }
.site-modal .sm-close { border: none; background: none; font-size: 24px; cursor: pointer; color: var(--site-text-soft); line-height: 1; }
.site-modal .sm-body { padding: 22px; }
.site-modal .sm-body img.cover { width: 100%; max-height: 340px; object-fit: cover; border-radius: 8px; margin-bottom: 16px; }
.site-modal .sm-meta { color: var(--site-text-soft); font-size: 13px; margin-bottom: 14px; }
.site-modal .sm-content { white-space: pre-wrap; line-height: 1.9; }

/* ---------- 空/加载 ---------- */
.empty-tip { text-align: center; color: var(--site-text-soft); padding: 50px 0; }
.loading-tip { text-align: center; color: var(--site-text-soft); padding: 40px 0; }

/* ---------- 分页 ---------- */
.pager { display: flex; gap: 8px; justify-content: center; margin-top: 34px; flex-wrap: wrap; }
.pager button {
    min-width: 38px; height: 38px; padding: 0 10px;
    border: 1px solid var(--site-border); background: #fff; border-radius: 8px; cursor: pointer;
    color: var(--site-text);
}
.pager button.active { background: var(--site-primary); color: #fff; border-color: var(--site-primary); }
.pager button:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- 页脚 ---------- */
.site-footer {
    background: #1c2530;
    color: #aeb8c4;
    padding: 48px 0 28px;
}
.site-footer .foot-grid {
    display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 36px;
}
.site-footer h5 { color: #fff; font-size: 16px; margin: 0 0 16px; }
.site-footer p { margin: 4px 0; font-size: 14px; }
.site-footer a { color: #aeb8c4; }
.site-footer a:hover { color: #fff; }
.site-footer .copyright { text-align: center; margin-top: 32px; padding-top: 18px;
    border-top: 1px solid #2c3744; font-size: 13px; color: #7f8a98; }

@media (max-width: 768px) {
    .site-nav { padding: 0 16px; gap: 14px; }
    .site-nav .nav-links { gap: 14px; }
    .site-nav .brand small { display: none; }
    .hero h1 { font-size: 30px; }
    .news-item img { width: 96px; height: 72px; }
    .site-footer .foot-grid { grid-template-columns: 1fr; }
}

/* ---------- 产品详情：基础属性 + 规格参数表 ---------- */
/* 卡片上的品牌/型号标签行 */
.pcard .pcard-meta { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0 6px; }

.site-modal .attr-list {
    margin: 0 0 18px;
    border: 1px solid var(--site-border, #e8e8e8);
    border-radius: 8px;
    overflow: hidden;
}
.site-modal .attr-row {
    display: flex;
    border-bottom: 1px solid var(--site-border, #e8e8e8);
}
.site-modal .attr-row:last-child { border-bottom: none; }
.site-modal .attr-row dt {
    flex: 0 0 96px;
    padding: 10px 14px;
    background: var(--site-bg-soft);
    color: var(--site-text-soft);
    font-size: 14px;
    font-weight: 500;
}
.site-modal .attr-row dd {
    flex: 1;
    margin: 0;
    padding: 10px 14px;
    font-size: 14px;
    color: var(--site-text);
}

.site-modal .spec-block { margin-bottom: 18px; }
.site-modal .spec-title {
    margin: 0 0 10px;
    font-size: 16px;
    font-weight: 600;
    color: var(--site-text);
}
.site-modal .spec-list {
    margin: 0;
    padding: 14px 18px 14px 34px;
    background: var(--site-bg-soft);
    border-radius: 8px;
}
.site-modal .spec-list li {
    font-size: 14px;
    line-height: 1.95;
    color: var(--site-text-soft);
}
