/* Tableberg 表格悬停行变色 */
.wp-block-tableberg-table tr:hover {
    background-color: #e0f7fa !important;  /* 悬停时浅蓝灰，改成你喜欢的，如 #f0f0f0 或 #d4edda */
    transition: background-color 0.3s ease;  /* 平滑过渡 */
}

/* 可选：保持隔行条纹，但 hover 优先级更高 */
.wp-block-tableberg-table tr:nth-child(even):hover,
.wp-block-tableberg-table tr:nth-child(odd):hover {
    background-color: #e0f7fa !important;
}
/* ==============================================
   全局基础设置：防止横向溢出 + 允许正常缩放
============================================== */
html, body {
    margin: 0;
    padding: 0;
    overflow-x: hidden !important;          /* 防止页面整体左右偏移 */
    touch-action: auto;                     /* 允许所有手势：pan-x pan-y pinch-zoom 等 */
    -webkit-overflow-scrolling: touch;      /* iOS 顺滑滚动 */
}

/* ==============================================
   针对轮播/幻灯片容器：只限制纵向干扰，但允许缩放
   （把 .no-vertical-swipe 替换成你实际加的类名，如果不同）
============================================== */
.no-vertical-swipe,
.no-vertical-swipe *,
.no-vertical-swipe *::before,
.no-vertical-swipe *::after {
    touch-action: pan-x pinch-zoom !important;  /* 横向滑动 + 允许捏合缩放 */
    -webkit-overflow-scrolling: touch;
}

/* 确保轮播内部可横向滚动 */
.no-vertical-swipe {
    overflow-x: auto;
    overflow-y: hidden;
}

/* 常见轮播插件兼容类（根据你用的插件保留或删除不需要的） */
.swiper-container,
.swiper-wrapper,
.splide__track,
.kb-carousel-inner,
.ss-simple-slider,
.metaslider,
.wp-block-gallery {
    touch-action: pan-x pinch-zoom !important;
}

/* ==============================================
   针对 Tableberg 表格：强制允许缩放 + 横向滚动
============================================== */
.wp-block-tableberg-table,
.wp-block-tableberg-table table,
.wp-block-tableberg-table * {
    touch-action: auto !important;          /* 恢复默认手势，允许捏合放大 */
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
}

/* 手机端表格优化：最小宽度 + 可滚动 */
@media (max-width: 768px) {
    .wp-block-tableberg-table {
        overflow-x: auto;
        touch-action: auto;
    }
    .wp-block-tableberg-table table {
        min-width: 100%;
        width: max-content;  /* 让内容撑开，可横滑 */
    }
}

/* ==============================================
   防止图片/画廊导致隐形横向问题
============================================== */
img, .wp-block-image, .wp-block-gallery img {
    max-width: 100%;
    height: auto;
    display: block;
}
/* 手机端表格：允许滚动 + 放大，文字不挤 */
@media (max-width: 768px) {
    .wp-block-tableberg-table {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        touch-action: auto;  /* 确保可捏合 */
    }
    .wp-block-tableberg-table table {
        min-width: 100%;  /* 至少撑满屏 */
    }
}
/* 强制 Stackable Column 背景图片在编辑器和前端都满屏 Cover */
.stk-block-column.has-background-image,
.stk-block-column .stk-block-background__image,
.editor-styles-wrapper .stk-block-column {
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    min-height: 60vh;  /* 调整高度让预览更明显，可改成 80vh 或 100vh */
}

/* 编辑器专属修复：防止后台预览裁剪或不完整 */
.editor-styles-wrapper .stk-block-column {
    background-attachment: scroll !important;  /* 避免 Fixed 在预览卡顿 */
    overflow: hidden;  /* 防止溢出白边 */
}
/* 让子 Cover 充满父级 */
.parent-cover .child-cover {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}