/* 1) 彻底禁用横向滚动（灰条立刻消失） */
html, body { overflow-x: hidden !important; width: 100% !important; }

/* 2) 最常见元凶：写了 100vw 的元素（横幅、条幅、粘顶条） */
*[style*="100vw"] { width: 100% !important; max-width: 100% !important; }

/* 3) Elementor/拉伸区块常见溢出 */
.elementor-section-stretched,
.e-con { max-width: 100% !important; }

/* 4) 浮动工具条/右侧客服按钮：别超出屏幕边缘，也别把页面撑宽 */
[class*="whatsapp"], [class*="kefu"], [class*="float"], [class*="tool"],
[class*="chat"], [class*="crisp"], [class*="contact"] {
  right: max(12px, env(safe-area-inset-right)) !important; /* 留12px安全距 */
  left: auto !important;
  max-width: calc(100vw - 24px) !important;
  overflow-x: clip !important;
}

/* 5) 媒体元素不超容器 */
img, video, iframe, embed, object { max-width: 100% !important; height: auto; }

/* 6) 轮播/无缝滚动轨道经常撑宽：收敛布局边界 */
.marquee, .ticker, .slider-track, .swiper-wrapper { contain: layout paint; }

/* 7) 页头/页脚/分隔线保持 100%（不受 100%→max-width 影响） */
header, footer, .site-footer, hr, .divider, .separator { max-width: 100%; }

/* 8) 提供一个“安全全屏贴边”工具类（替代 100vw） */
:root { --sbw: calc(100vw - 100%); }             /* 滚动条宽度 */
.full-bleed {
  width: calc(100vw - var(--sbw));               /* 等价可视宽 */
  margin-left: calc(-50vw + 50% + var(--sbw)/2);
  margin-right: calc(-50vw + 50% + var(--sbw)/2);
  max-width: none !important;
}
