/* =========================================================================
   cohesion.css —— 全站视觉连贯层（最后加载，统一收口）
   设计原则：
     · 既有设计令牌（main.css :root）一律用 var()，并带兜底值，避免引用缺失；
     · 温和「补齐」类规则一律用 :where()，特异性 0，绝不覆盖各页已有的有意设计；
     · 新增组件（微信浮窗 / 底部 CTA 闭环）用独立命名 .xx-*，确定性生效。
   ========================================================================= */

:root{
  /* 兜底：若个别页面漏引令牌，这里守住，避免新组件塌成无样式 */
  --xx-brand: var(--brand, #0a4d8c);
  --xx-brand-2: var(--brand-2, #0e6bb8);
  --xx-ink: var(--ink, #0f1b2d);
  --xx-ink-2: var(--ink-2, #33475f);
  --xx-muted: var(--muted, #566b80);
  --xx-line: var(--line, #e4ebf3);
  --xx-bg-soft: var(--bg-soft, #f5f8fb);
  --xx-radius: var(--radius, 14px);
  --xx-radius-sm: var(--radius-sm, 9px);
  --xx-shadow-sm: var(--shadow-sm, 0 6px 18px rgba(15,27,45,.08));
  --xx-shadow: var(--shadow, 0 14px 38px rgba(15,27,45,.12));
}

/* ----------------------------- 温和补齐（:where 0 特异性，只填空缺） ----------------------------- */
/* 卡片圆角 / 描边 / 轻阴影统一：各页若已显式定义则以上方为准，不打架 */
:where(.card, .panel, .vcard, .cert-card, .svc-card, .service-card, .grid-card){
  border-radius: var(--xx-radius);
  border: 1px solid var(--xx-line);
  box-shadow: var(--xx-shadow-sm);
  transition: transform .22s var(--ease, ease), box-shadow .25s var(--ease, ease), border-color .2s;
}
:where(.card, .panel, .vcard, .cert-card, .svc-card, .service-card, .grid-card):hover{
  box-shadow: var(--xx-shadow);
}
/* 卡片内图片 / 媒体圆角化，消除方角割裂感 */
:where(.card img, figure img, .media img, .shot, .case-img){
  border-radius: var(--xx-radius-sm);
}
/* 统一的键盘可见焦点环（可达性 + 视觉一致性） */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible{
  outline: 2px solid var(--xx-brand);
  outline-offset: 2px;
  border-radius: 4px;
}

/* =========================================================================
   新增组件 ①：微信浮窗（企业微信，常驻左下）
   ========================================================================= */
.xx-wechat-fab{
  position: fixed; left: 22px; bottom: 22px; z-index: 980;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 16px 11px 13px;
  background: linear-gradient(135deg, #07c160, #06ad56);
  color: #fff; border: none; border-radius: 999px;
  font: 600 14px/1 var(--font-body, system-ui, "PingFang SC", sans-serif);
  box-shadow: 0 12px 28px rgba(6,173,86,.38);
  cursor: pointer; user-select: none;
  transition: transform .22s ease, box-shadow .25s ease, opacity .2s;
}
.xx-wechat-fab svg{ width: 20px; height: 20px; display: block; }
.xx-wechat-fab:hover{ transform: translateY(-2px); box-shadow: 0 16px 34px rgba(6,173,86,.46); }
.xx-wechat-fab.is-hidden{ display: none; }

/* R61：桌面（≥901）隐藏左下微信浮钮 —— 右下悬浮条已有常驻微信码（主引导），
   同屏两个「加微信」入口左右夹击、绿色高亮抢视觉（用户截图反馈）。
   移动端（≤900）悬浮条隐藏，浮钮是唯一微信入口，保留不动。 */
@media (min-width: 901px){
  .xx-wechat-fab{ display: none; }
}

@media (max-width: 900px){
  .xx-wechat-fab{ left: 14px; bottom: 72px; padding: 10px; }
  .xx-wechat-fab span{ display: none; }            /* 手机只露图标，避免压住底部操作条文字 */
  .xx-wechat-fab svg{ width: 22px; height: 22px; }
}

/* 微信二维码灯箱 */
.xx-wechat-lightbox{
  position: fixed; inset: 0; z-index: 1100;
  display: none; align-items: center; justify-content: center;
  background: rgba(12,20,32,.62); backdrop-filter: blur(2px);
  padding: 20px;
}
.xx-wechat-lightbox.is-open{ display: flex; }
.xx-wl-box{
  position: relative; width: min(360px, 92vw);
  background: #fff; border-radius: 18px; padding: 26px 24px 22px;
  text-align: center; box-shadow: 0 24px 60px rgba(0,0,0,.32);
  animation: xxWlIn .22s ease;
}
@keyframes xxWlIn{ from{ opacity:0; transform: translateY(10px) scale(.98);} to{ opacity:1; transform:none; } }
.xx-wl-box img{
  width: 220px; height: 220px; object-fit: contain; margin: 6px auto 12px;
  border: 1px solid var(--xx-line); border-radius: 12px; background: #fff;
}
.xx-wl-box h3{ margin: 2px 0 4px; font-size: 19px; color: var(--xx-ink); }
.xx-wl-box p{ margin: 0; font-size: 13.5px; line-height: 1.7; color: var(--xx-muted); }
.xx-wl-box .xx-wl-tag{
  display: inline-block; margin: 10px 0 2px; padding: 4px 12px;
  font-size: 12px; color: #06ad56; background: #e8f8ef; border-radius: 999px;
}
.xx-wl-box .xx-wl-tel{
  margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--xx-line);
  font-size: 13px; color: var(--xx-muted);
}
.xx-wl-box .xx-wl-tel a{ color: #0a4d8c; text-decoration: none; white-space: nowrap; }
.xx-wl-box .xx-wl-tel b{ font-weight: 700; }
.xx-wl-close{
  position: absolute; top: 10px; right: 12px; width: 32px; height: 32px;
  border: none; background: #f1f4f8; border-radius: 50%; cursor: pointer;
  font-size: 20px; line-height: 1; color: var(--xx-muted);
}
.xx-wl-close:hover{ background: #e4e9f0; }

