/* ============================================================
   前台公共站点样式 · 复用后台设计令牌（admin.css :root）
   Part — 导航 / Hero / 卡片 / 页脚 / 富文本
   ============================================================ */

/* ---------- 顶部导航 ---------- */
.fw-navbar {
    position: sticky;
    top: 0;
    z-index: 1030;
    background: color-mix(in srgb, var(--surface) 88%, transparent);
    backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--border);
}
.fw-nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    height: 64px;
    display: flex;
    align-items: center;
    gap: 28px;
}
.fw-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text);
    font-weight: 700;
    font-size: 17px;
    white-space: nowrap;
}
.fw-logo {
    width: 36px; height: 36px;
    border-radius: 10px;
    display: grid; place-items: center;
    color: #fff; font-size: 18px;
    background: linear-gradient(135deg, var(--brand-600), var(--brand-400));
    overflow: hidden;
}
.fw-logo-img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; }
.fw-menu { display: flex; align-items: center; gap: 4px; flex: 1 1 auto; }
.fw-link {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 8px 14px;
    border-radius: 9px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: background .15s, color .15s;
}
.fw-link:hover { background: var(--surface-hover); color: var(--text); }
.fw-link.active { color: var(--brand-600); background: var(--brand-50); }
.fw-dropdown { position: relative; }
.fw-dropdown .dropdown-menu { margin-top: 6px; border-radius: 12px; border: 1px solid var(--border); box-shadow: 0 12px 32px rgba(15,23,42,.10); }
.fw-nav-right { display: flex; align-items: center; gap: 12px; }
.fw-admin-link {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 14px; border-radius: 9px;
    font-size: 14px; font-weight: 600; text-decoration: none;
    color: #fff; background: linear-gradient(135deg, var(--brand-600), var(--brand-400));
}
.fw-admin-link:hover { color: #fff; filter: brightness(1.05); }
.fw-burger { display: none; border: none; background: transparent; font-size: 22px; color: var(--text); cursor: pointer; }

.fw-mobile-menu {
    display: none; flex-direction: column;
    padding: 8px 20px 16px;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
}
.fw-mobile-menu[hidden] { display: none; }
.fw-mobile-menu:not([hidden]) { display: flex; }
.fw-mlink { padding: 11px 8px; color: var(--text); text-decoration: none; border-radius: 8px; font-size: 15px; }
.fw-mlink:hover { background: var(--surface-hover); }
.fw-mlink-sub { padding-left: 28px; color: var(--text-muted); font-size: 14px; }

/* ---------- 主体容器 ---------- */
.fw-main { max-width: 1200px; margin: 0 auto; padding: 32px 20px 56px; min-height: 60vh; }

/* ---------- 区块标题 ---------- */
.fw-section { margin-top: 48px; }
.fw-section-head {
    display: flex; align-items: flex-end; justify-content: space-between;
    margin-bottom: 20px; gap: 16px; flex-wrap: wrap;
}
.fw-section-title { font-size: 24px; font-weight: 750; margin: 0; letter-spacing: -.01em; }
.fw-section-title .accent { color: var(--brand-600); }
.fw-section-more { color: var(--brand-600); text-decoration: none; font-weight: 600; font-size: 14px; }
.fw-section-more:hover { text-decoration: underline; }

/* ---------- Hero / Banner 轮播 ---------- */
.fw-hero { margin-top: 0; }
.fw-hero .carousel-item { height: 420px; }
.fw-hero .fw-hero-img {
    width: 100%; height: 100%; object-fit: cover;
}
.fw-hero-caption {
    position: absolute; inset: 0;
    display: flex; flex-direction: column; justify-content: center;
    padding: 0 8%;
    background: linear-gradient(90deg, rgba(15,23,42,.72) 0%, rgba(15,23,42,.35) 55%, rgba(15,23,42,0) 100%);
    color: #fff; text-align: left;
}
.fw-hero-caption .fw-eyebrow {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 13px; font-weight: 600; letter-spacing: .04em;
    color: var(--brand-200); margin-bottom: 12px;
}
.fw-hero-caption h1 { font-size: 40px; font-weight: 800; margin: 0 0 12px; line-height: 1.2; max-width: 640px; }
.fw-hero-caption p { font-size: 17px; max-width: 560px; color: rgba(255,255,255,.86); margin: 0 0 22px; }
.fw-hero-caption .fw-hero-btn {
    align-self: flex-start;
    display: inline-flex; align-items: center; gap: 8px;
    padding: 11px 22px; border-radius: 10px;
    background: #fff; color: var(--brand-700); font-weight: 700; text-decoration: none;
}
.fw-hero-caption .fw-hero-btn:hover { filter: brightness(.96); }
.carousel-indicators { margin-bottom: 14px; }
.carousel-indicators [data-bs-target] { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,.7); }

/* ---------- 卡片网格 ---------- */
.fw-grid { display: grid; gap: 22px; }
.fw-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.fw-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.fw-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }

.fw-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    height: 100%;
    display: flex; flex-direction: column;
}
.fw-card-media { position: relative; aspect-ratio: 16 / 10; background: var(--surface-sunken); overflow: hidden; }
.fw-card-media img { width: 100%; height: 100%; object-fit: cover; }
.fw-card-badge {
    position: absolute; top: 12px; left: 12px;
    padding: 4px 10px; border-radius: 999px;
    background: rgba(255,255,255,.92); color: var(--brand-700);
    font-size: 12px; font-weight: 600; backdrop-filter: blur(4px);
}
.fw-card-body { padding: 16px 18px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1 1 auto; }
.fw-card-title { font-size: 16px; font-weight: 700; margin: 0; line-height: 1.4; }
.fw-card-title a { color: var(--text); text-decoration: none; }
.fw-card-title a:hover { color: var(--brand-600); }
.fw-card-meta { font-size: 13px; color: var(--text-muted); display: flex; gap: 12px; flex-wrap: wrap; }
.fw-card-summary { font-size: 14px; color: var(--text-muted); line-height: 1.6; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fw-card-price { font-size: 17px; font-weight: 800; color: var(--brand-600); margin-top: auto; }
.fw-card-price .unit { font-size: 12px; font-weight: 500; color: var(--text-muted); }

/* ---------- 面包屑 / 页头 ---------- */
.fw-pagehead { margin-bottom: 28px; }
.fw-pagehead h1 { font-size: 30px; font-weight: 800; margin: 8px 0 6px; letter-spacing: -.01em; }
.fw-pagehead p { color: var(--text-muted); margin: 0; }
.breadcrumb-item a { color: var(--brand-600); text-decoration: none; }

/* ---------- 筛选条 ---------- */
.fw-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.fw-chip {
    padding: 7px 14px; border-radius: 999px;
    border: 1px solid var(--border); background: var(--surface);
    color: var(--text-muted); text-decoration: none; font-size: 14px; font-weight: 500;
    transition: all .15s;
}
.fw-chip:hover { border-color: var(--brand-300); color: var(--text); }
.fw-chip.active { background: var(--brand-600); border-color: var(--brand-600); color: #fff; }

/* ---------- 详情页 ---------- */
.fw-detail-hero { width: 100%; max-height: 460px; object-fit: cover; border-radius: 16px; margin-bottom: 24px; background: var(--surface-sunken); }
.fw-detail-meta { display: flex; gap: 16px; flex-wrap: wrap; color: var(--text-muted); font-size: 14px; margin-bottom: 18px; }
.fw-detail-meta .badge-soft { font-size: 13px; }
.fw-prose { font-size: 16px; line-height: 1.85; color: var(--text); }
.fw-prose img { max-width: 100%; border-radius: 12px; margin: 16px 0; }
.fw-prose h2, .fw-prose h3 { margin: 1.4em 0 .6em; font-weight: 750; }
.fw-prose blockquote { border-left: 4px solid var(--brand-300); margin: 1.2em 0; padding: 4px 0 4px 16px; color: var(--text-muted); }
.fw-prose ul, .fw-prose ol { padding-left: 1.4em; }
.fw-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; margin: 20px 0; }
.fw-gallery img { width: 100%; aspect-ratio: 1/1; object-fit: cover; border-radius: 12px; border: 1px solid var(--border); }

.fw-spec-table { width: 100%; border-collapse: collapse; margin: 18px 0; }
.fw-spec-table th, .fw-spec-table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--border); font-size: 14px; }
.fw-spec-table th { color: var(--text-muted); font-weight: 600; width: 140px; background: var(--surface-sunken); }

/* ---------- 页脚 ---------- */
.fw-footer { background: var(--gray-900); color: var(--gray-300); margin-top: 56px; }
.fw-footer-inner {
    max-width: 1200px; margin: 0 auto; padding: 44px 20px 28px;
    display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 32px;
}
.fw-footer .fw-brand { color: #fff; }
.fw-footer-desc { color: var(--gray-400); font-size: 14px; line-height: 1.7; margin-top: 12px; max-width: 320px; }
.fw-footer-title { color: #fff; font-size: 15px; font-weight: 700; margin: 4px 0 14px; }
.fw-footer-links, .fw-footer-contact { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.fw-footer-links a { color: var(--gray-300); text-decoration: none; font-size: 14px; }
.fw-footer-links a:hover { color: #fff; }
.fw-footer-contact li { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--gray-300); }
.fw-footer-bottom {
    border-top: 1px solid rgba(255,255,255,.08);
    padding: 16px 20px; text-align: center; font-size: 13px; color: var(--gray-500);
    display: flex; gap: 14px; justify-content: center; flex-wrap: wrap;
}

/* ---------- 空状态 ---------- */
.fw-empty { text-align: center; padding: 64px 20px; color: var(--text-muted); }
.fw-empty i { font-size: 44px; color: var(--text-subtle); }
.fw-empty h3 { margin: 14px 0 6px; color: var(--text); }

/* ---------- 模板实时预览悬浮条 ---------- */
.tpl-preview-bar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 2000;
    display: flex; align-items: center; gap: 14px;
    height: 44px; padding: 0 18px;
    background: linear-gradient(90deg, #4f46e5, #7c3aed);
    color: #fff; font-size: 14px; font-weight: 600;
    box-shadow: 0 4px 18px rgba(79,70,229,.35);
}
.tpl-preview-bar .tpl-preview-tag { display: inline-flex; align-items: center; gap: 6px; }
.tpl-preview-bar .tpl-preview-name { color: rgba(255,255,255,.82); font-weight: 500; }
.tpl-preview-bar a {
    margin-left: auto; color: #fff; text-decoration: none;
    padding: 6px 14px; border-radius: 8px; font-weight: 600; font-size: 13px;
    background: rgba(255,255,255,.18);
}
.tpl-preview-bar a.tpl-preview-exit { margin-left: 0; background: rgba(255,255,255,.14); }
.tpl-preview-bar a:hover { background: rgba(255,255,255,.3); }
body.is-preview { padding-top: 44px; }
body.is-preview .fw-navbar { top: 44px; }

/* ---------- 响应式 ---------- */
@media (max-width: 991px) {
    .fw-grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
    .fw-grid.cols-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 767px) {
    .fw-menu, .fw-admin-link { display: none; }
    .fw-burger { display: block; }
    .fw-mobile-menu { display: flex; }
    .fw-hero .carousel-item { height: 300px; }
    .fw-hero-caption h1 { font-size: 26px; }
    .fw-hero-caption p { font-size: 14px; }
    .fw-grid.cols-2, .fw-grid.cols-3, .fw-grid.cols-4 { grid-template-columns: 1fr; }
    .fw-footer-inner { grid-template-columns: 1fr; gap: 24px; }
}

/* ============================================================
   区块外观编译样式（由后端 buildBlockStyleCss 注入 .tpl-block）
   入场动画 / 视差 / 响应式显隐
   ============================================================ */
@keyframes fwFadeUp   { from { opacity:0; transform:translateY(28px); } to { opacity:1; transform:none; } }
@keyframes fwFadeIn   { from { opacity:0; } to { opacity:1; } }
@keyframes fwSlideLeft{ from { opacity:0; transform:translateX(28px); } to { opacity:1; transform:none; } }
@keyframes fwZoomIn   { from { opacity:0; transform:scale(.94); } to { opacity:1; transform:none; } }

.fw-anim-fade-up    { animation: fwFadeUp    .6s cubic-bezier(.16,1,.3,1) both; }
.fw-anim-fade-in    { animation: fwFadeIn    .6s ease both; }
.fw-anim-slide-left { animation: fwSlideLeft .6s cubic-bezier(.16,1,.3,1) both; }
.fw-anim-zoom-in    { animation: fwZoomIn    .6s cubic-bezier(.16,1,.3,1) both; }
.fw-parallax        { will-change: transform; }

/* 区块级响应式显隐 */
@media (max-width: 1024px){ .fw-hide-tablet  { display:none !important; } }
@media (max-width: 768px) { .fw-hide-mobile  { display:none !important; } }
@media (min-width: 1025px){ .fw-hide-desktop { display:none !important; } }

/* 尊重用户的「减少动效」系统偏好 */
@media (prefers-reduced-motion: reduce){
    .fw-anim-fade-up, .fw-anim-fade-in, .fw-anim-slide-left, .fw-anim-zoom-in { animation: none !important; }
}

/* ===== 区块内容组件（features / image_text / logo_wall / team / stats / testimonials / faq / pricing / cta / contact） ===== */
.fw-section { max-width: 1200px; margin: 0 auto; padding: 8px 0; }
.fw-grid, .fw-feature-grid, .fw-team-grid, .fw-testi-grid, .fw-pricing-grid, .fw-stats-grid, .fw-logo-wall {
    display: grid; gap: 24px;
}
.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-4 { grid-template-columns: repeat(4, 1fr); }
.cols-5 { grid-template-columns: repeat(5, 1fr); }
.cols-6 { grid-template-columns: repeat(6, 1fr); }

/* 特性网格 */
.fw-feature { background: var(--card, #fff); border: 1px solid var(--border, #e5e7eb); border-radius: 16px; padding: 28px 24px; transition: transform .25s, box-shadow .25s, border-color .25s; }
.fw-feature:hover { transform: translateY(-6px); box-shadow: 0 16px 40px rgba(15,23,42,.10); border-color: var(--brand-600, #4f46e5); }
.fw-feature-icon { width: 56px; height: 56px; border-radius: 14px; display: flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--brand-600, #4f46e5) 12%, transparent); color: var(--brand-600, #4f46e5); font-size: 26px; margin-bottom: 16px; overflow: hidden; }
.fw-feature-icon img { width: 100%; height: 100%; object-fit: cover; }
.fw-feature h3 { font-size: 19px; font-weight: 700; margin: 0 0 8px; }
.fw-feature p { margin: 0; color: var(--text-muted, #6b7280); line-height: 1.7; font-size: 15px; }

/* 图文左右 */
.fw-image-text { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.fw-image-text.reverse .fw-it-media { order: 2; }
.fw-it-media img { width: 100%; border-radius: 18px; box-shadow: 0 20px 45px rgba(15,23,42,.14); }
.fw-it-body .fw-eyebrow { display: inline-block; color: var(--brand-600, #4f46e5); font-weight: 700; letter-spacing: .04em; margin-bottom: 10px; }
.fw-it-body h2 { font-size: 34px; line-height: 1.2; margin: 0 0 16px; font-weight: 800; letter-spacing: -.01em; }
.fw-it-desc { color: var(--text-muted, #6b7280); font-size: 16px; line-height: 1.8; margin-bottom: 22px; }

/* 品牌墙 */
.fw-logo-wall { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 18px; }
.fw-logo-item { display: flex; align-items: center; justify-content: center; padding: 22px; background: var(--card, #fff); border: 1px solid var(--border, #e5e7eb); border-radius: 14px; transition: transform .2s, box-shadow .2s, border-color .2s; min-height: 90px; }
.fw-logo-item:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(15,23,42,.10); border-color: var(--brand-600, #4f46e5); }
.fw-logo-item img { max-height: 44px; max-width: 100%; object-fit: contain; }
.fw-logo-item span { color: var(--text-muted, #6b7280); font-weight: 600; }

/* 团队 */
.fw-team { background: var(--card, #fff); border: 1px solid var(--border, #e5e7eb); border-radius: 16px; padding: 24px; text-align: center; transition: transform .25s, box-shadow .25s; }
.fw-team:hover { transform: translateY(-6px); box-shadow: 0 16px 40px rgba(15,23,42,.10); }
.fw-team-avatar { width: 88px; height: 88px; border-radius: 50%; object-fit: cover; margin: 0 auto 14px; border: 3px solid color-mix(in srgb, var(--brand-600,#4f46e5) 20%, #fff); }
.fw-team h3 { font-size: 17px; margin: 0 0 4px; }
.fw-team-role { color: var(--brand-600, #4f46e5); font-weight: 600; font-size: 14px; margin-bottom: 8px; }
.fw-team p { color: var(--text-muted, #6b7280); font-size: 14px; margin: 0; line-height: 1.6; }

/* 数据统计 */
.fw-stats-grid { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 20px; text-align: center; }
.fw-stat { padding: 24px; background: color-mix(in srgb, var(--brand-600,#4f46e5) 6%, var(--card,#fff)); border-radius: 16px; }
.fw-stat-num { font-size: 44px; font-weight: 800; color: var(--brand-600, #4f46e5); line-height: 1; letter-spacing: -.02em; }
.fw-stat-suffix { font-size: 22px; margin-left: 2px; }
.fw-stat-label { margin-top: 8px; color: var(--text-muted, #6b7280); font-weight: 600; }

/* 客户评价 */
.fw-testi { background: var(--card, #fff); border: 1px solid var(--border, #e5e7eb); border-radius: 16px; padding: 26px; margin: 0; display: flex; flex-direction: column; gap: 14px; }
.fw-testi blockquote { margin: 0; font-size: 16px; line-height: 1.8; color: var(--text, #111827); }
.fw-testi figcaption { display: flex; align-items: center; gap: 10px; }
.fw-testi-avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.fw-testi-name { font-weight: 700; }
.fw-testi-role { display: block; color: var(--text-muted, #6b7280); font-size: 13px; }

/* 常见问题 */
.fw-faq { max-width: 820px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.fw-faq-item { background: var(--card, #fff); border: 1px solid var(--border, #e5e7eb); border-radius: 12px; padding: 4px 18px; }
.fw-faq-item summary { cursor: pointer; padding: 14px 0; font-weight: 600; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.fw-faq-item summary::-webkit-details-marker { display: none; }
.fw-faq-item summary::after { content: "\002B"; color: var(--brand-600,#4f46e5); font-size: 20px; }
.fw-faq-item[open] summary::after { content: "\2212"; }
.fw-faq-a { padding: 0 0 16px; color: var(--text-muted, #6b7280); line-height: 1.8; }

/* 价格表 */
.fw-pricing-grid { align-items: stretch; }
.fw-price { background: var(--card, #fff); border: 1px solid var(--border, #e5e7eb); border-radius: 18px; padding: 30px 26px; display: flex; flex-direction: column; gap: 12px; transition: transform .25s, box-shadow .25s; }
.fw-price:hover { transform: translateY(-6px); box-shadow: 0 18px 44px rgba(15,23,42,.12); }
.fw-price.highlight { border-color: var(--brand-600, #4f46e5); box-shadow: 0 18px 44px color-mix(in srgb, var(--brand-600,#4f46e5) 22%, transparent); }
.fw-price-name { font-size: 20px; font-weight: 800; }
.fw-price-amount { font-size: 38px; font-weight: 800; color: var(--brand-600, #4f46e5); }
.fw-price-period { font-size: 15px; color: var(--text-muted, #6b7280); font-weight: 500; margin-left: 4px; }
.fw-price-feats { list-style: none; padding: 0; margin: 6px 0; display: flex; flex-direction: column; gap: 8px; color: var(--text-muted, #6b7280); }
.fw-price-feats li { display: flex; align-items: center; gap: 8px; }
.fw-price-feats i { color: var(--brand-600, #4f46e5); }

/* 行动号召 CTA */
.fw-cta { text-align: center; padding: 56px 24px; border-radius: 22px; background: linear-gradient(135deg, color-mix(in srgb, var(--brand-600,#4f46e5) 92%, #000), var(--brand-600,#4f46e5)); color: #fff; }
.fw-cta-title { font-size: 32px; font-weight: 800; margin: 0 0 12px; color: #fff; }
.fw-cta-desc { color: rgba(255,255,255,.85); font-size: 16px; margin: 0 0 22px; }
.fw-cta-btn { display: inline-flex; align-items: center; gap: 8px; background: #fff; color: var(--brand-600, #4f46e5); padding: 13px 28px; border-radius: 999px; font-weight: 700; text-decoration: none; transition: transform .2s, box-shadow .2s; }
.fw-cta-btn:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(0,0,0,.2); }

/* 联系表单 */
.fw-contact-form { max-width: 640px; margin: 0 auto; background: var(--card, #fff); border: 1px solid var(--border, #e5e7eb); border-radius: 18px; padding: 28px; }
.fw-contact-form .form-control { border-radius: 10px; }

/* 响应式：移动端网格塌缩 */
@media (max-width: 768px) {
    .fw-grid, .fw-feature-grid, .fw-team-grid, .fw-testi-grid, .fw-pricing-grid, .fw-stats-grid, .fw-logo-wall,
    .cols-2, .cols-3, .cols-4, .cols-5, .cols-6 { grid-template-columns: 1fr; }
    .fw-image-text { grid-template-columns: 1fr; gap: 24px; }
    .fw-image-text.reverse .fw-it-media { order: 0; }
    .fw-it-body h2 { font-size: 26px; }
}


/* ===== 联系表单（真实提交） ===== */
.fw-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }
.fw-contact-tip { font-size: 14px; line-height: 1.5; min-height: 21px; }
.fw-contact-tip.is-ok { color: #059669; }
.fw-contact-tip.is-err { color: #dc2626; }
.fw-contact .form-control { border-radius: 10px; }
.fw-contact button[disabled] { opacity: .65; cursor: not-allowed; }
