:root {
    --hfm-primary: #0a4d8c;
    --hfm-primary-dark: #073a6b;
    --hfm-primary-light: #e7f0fa;
    --hfm-accent: #e8a33d;
    --hfm-text: #2b3a4a;
    --hfm-muted: #6b7c8d;
    --hfm-border: #e3e9f0;
    --hfm-bg: #f5f8fc;
}

* { box-sizing: border-box; }

body {
    font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--hfm-text);
    background: #fff;
    line-height: 1.7;
}

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

/* ===== 顶部条 ===== */
.topbar {
    background: var(--hfm-primary-dark);
    color: #cfe0f2;
    font-size: 13px;
}
.topbar a { color: #cfe0f2; }
.topbar a:hover { color: #fff; }
.topbar .lang-switch a { margin-left: 10px; }
.topbar .lang-switch a.active { color: var(--hfm-accent); font-weight: 700; }

/* ===== 导航 ===== */
.site-header { background: #fff; box-shadow: 0 2px 14px rgba(10,77,140,.06); }
.site-header .navbar-brand { font-weight: 800; color: var(--hfm-primary); font-size: 22px; }
.site-header .navbar-brand small { display: block; font-size: 12px; color: var(--hfm-muted); font-weight: 400; }
.site-nav .nav-link {
    color: var(--hfm-text); font-weight: 600; padding: 10px 16px; position: relative;
}
.site-nav .nav-link:hover, .site-nav .nav-link.active { color: var(--hfm-primary); }
.site-nav .nav-link.active::after {
    content: ""; position: absolute; left: 16px; right: 16px; bottom: 4px; height: 3px;
    background: var(--hfm-accent); border-radius: 3px;
}

/* ===== 区块通用 ===== */
.section { padding: 56px 0; }
.section-gray { background: var(--hfm-bg); }
.section-title { text-align: center; margin-bottom: 36px; }
.section-title h2 { font-weight: 800; color: var(--hfm-primary); position: relative; display: inline-block; padding-bottom: 12px; }
.section-title h2::after {
    content: ""; position: absolute; left: 50%; transform: translateX(-50%); bottom: 0;
    width: 56px; height: 4px; background: var(--hfm-accent); border-radius: 4px;
}
.section-title p { color: var(--hfm-muted); margin-top: 8px; }

/* ===== 首页轮播 ===== */
.hero-carousel .carousel-item { height: 460px; background-size: cover; background-position: center; }
.hero-carousel .carousel-caption {
    background: rgba(7,58,107,.55); right: 0; left: 0; bottom: 0; padding: 26px; text-align: left;
}
.hero-carousel .carousel-caption h3 { font-weight: 800; }
.hero-carousel .carousel-caption a.btn { margin-top: 10px; }

/* ===== 卡片 ===== */
.card-product, .card-news {
    border: 1px solid var(--hfm-border); border-radius: 10px; overflow: hidden; transition: .25s; height: 100%;
    background: #fff;
}
.card-product:hover, .card-news:hover { box-shadow: 0 10px 28px rgba(10,77,140,.12); transform: translateY(-4px); }
.card-product img, .card-news img { width: 100%; height: 200px; object-fit: cover; }
.card-product .card-body, .card-news .card-body { padding: 16px; }
.card-product h5, .card-news h5 { font-size: 17px; font-weight: 700; margin-bottom: 6px; }
.card-news .date { color: var(--hfm-muted); font-size: 13px; }

/* ===== 关于首页摘要 ===== */
.about-text { font-size: 15px; color: #445; }

/* ===== 按钮 ===== */
.btn-hfm { background: var(--hfm-primary); color: #fff; border-radius: 30px; padding: 9px 26px; font-weight: 600; }
.btn-hfm:hover { background: var(--hfm-primary-dark); color: #fff; }
.btn-accent { background: var(--hfm-accent); color: #fff; border-radius: 30px; font-weight: 700; }
.btn-accent:hover { color: #fff; filter: brightness(.95); }

/* ===== 页脚 ===== */
.site-footer { background: var(--hfm-primary-dark); color: #cfe0f2; padding: 44px 0 18px; }
.site-footer h5 { color: #fff; font-size: 16px; margin-bottom: 16px; border-left: 3px solid var(--hfm-accent); padding-left: 10px; }
.site-footer a { color: #cfe0f2; }
.site-footer a:hover { color: #fff; }
.site-footer .friend-links a { display: inline-block; margin: 4px 12px 4px 0; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 26px; padding-top: 16px; font-size: 13px; color: #9fb6d2; text-align: center; }

/* ===== 内容页 ===== */
.page-content { font-size: 16px; line-height: 1.9; }
.page-content img { max-width: 100%; height: auto; }

/* ===== 表单 ===== */
.form-label { font-weight: 600; }
.search-bar { background: var(--hfm-primary-light); padding: 18px; border-radius: 10px; }

/* ===== 回到顶部 ===== */
#backTop {
    position: fixed; right: 18px; bottom: 24px; width: 44px; height: 44px; border-radius: 50%;
    background: var(--hfm-primary); color: #fff; border: none; display: none; z-index: 999; font-size: 20px;
}

/* ===== 后台 ===== */
.admin-body { background: #f0f2f5; }
.admin-sidebar { background: #1f2d3d; min-height: 100vh; }
.admin-sidebar .brand { color: #fff; padding: 18px; font-weight: 800; border-bottom: 1px solid #2c3e50; }
.admin-sidebar a { color: #c5d2de; display: block; padding: 11px 18px; }
.admin-sidebar a:hover, .admin-sidebar a.active { background: var(--hfm-primary); color: #fff; }
.admin-topbar { background: #fff; border-bottom: 1px solid #e3e9f0; padding: 12px 20px; }
.table img.thumb { width: 60px; height: 60px; object-fit: cover; border-radius: 6px; }
