/* 侧边栏桌面端修复 - 仅在大屏幕生效 */
/* 解决浮动负边距布局失效问题 */

@media (min-width: 1025px) {
    /* 桌面端：使用绝对定位替代浮动 */
    .content-wrap {
        position: relative !important;
        width: 100% !important;
        min-height: 1px !important;
    }
    
    /* 内容区：为侧边栏预留空间 */
    .single .content,
    .page-template-default .content,
    .post-type-archive-blog .content,
    .page-template-tougao .content,
    .page-template-ask .content,
    .page-template-tuan .content,
    .page-template-all .content,
    .page-template-all-vip .content,
    .archive .content,
    .search .content,
    .home:not(.page-template-links) .content {
        margin-right: 320px !important;
        width: auto !important;
        float: none !important;
        display: block !important;
        /* 不添加 box-sizing 和 padding，避免宽度计算问题 */
    }
    
    /* 侧边栏：绝对定位在右侧 */
    .sidebar {
        position: absolute !important;
        right: 0 !important;
        top: 0 !important;
        width: 300px !important;
        margin-left: 0 !important;
        float: none !important;
        z-index: 10 !important;
    }
    
    /* 确保容器正确 */
    .main .container.clearfix {
        position: relative !important;
        overflow: visible !important;
    }
    
    /* 清除浮动辅助 */
    .content-wrap:after,
    .main .container.clearfix:after {
        content: "" !important;
        display: table !important;
        clear: both !important;
    }
}

/* 移动端（≤1024px）：完全不干预，使用主题原有布局 */
/* 主题已有正确的移动端规则 */
