/* 综合调整插件样式文件 */
/* 版本: 1.3.3 */

/* 只在分类页生效（min-width:1240px时） */
@media (min-width: 1240px) {
    body.category .container {
        max-width: none !important;
        width: auto;
    }
}

/* 只隐藏 content-layout 下的 zib-widget，不影响侧边栏 */
.content-layout .zib-widget {
    display: none !important;
}

/* 针对 h2.item-heading 内的链接设置 Flex 布局（修正对齐） */
.item-heading a {
    display: flex;
    justify-content: flex-start;
    width: 100%;
}

/* 让"年款：2022"靠右对齐（关键调整） */
.item-heading .focus-color {
    margin-left: auto;
}

/* 在标题前面添加 "车型编号：" */
.item-heading a:before {
    content: "车型编号：";
    margin-right: 5px;
}

/* 在副标题前面添加 "年款：" */
.item-heading .focus-color:before {
    content: "年款：";
    margin-right: 5px;
}

/* 表格整体样式 - 固定高度和布局 */
.custom-feature-table {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0;
    font-size: 14px;
    table-layout: fixed;
    min-height: 120px; /* 固定最小高度 */
    border: 1px solid #eee; /* 确保边框始终可见 */
}

/* 单元格样式 - 垂直居中 */
.custom-feature-table td {
    padding: 8px 12px;
    border: 1px solid #eee;
    word-wrap: break-word;
    vertical-align: middle; /* 改为垂直居中 */
    line-height: 1.4; /* 调整行高 */
}

/* 特征名称列（左列）样式 - 固定宽度 */
.custom-feature-table .feature-name {
    background-color: #f5f5f5;
    font-weight: bold;
    width: 25px !important; /* 固定宽度 */
    text-align: center;
    min-width: 25px;
    max-width: 25px;
}

/* 内容列样式 */
.custom-feature-table .feature-value {
    width: 44%;
    min-height: 20px; /* 确保最小高度 */
}

/* 让 .item-tags 容器支持左右排列（确保新按钮在右侧） */
.item-tags {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

/* 自定义"下载版型"按钮样式 */
.download版型-btn {
    padding: 3px 12px;
    white-space: nowrap;
}

/* 特征筛选区域样式 - 与高级筛选区域保持一致 */
.zonghe-feature-filter {
    margin-top: 8px;
}

/* 特征筛选标题样式 - 与产品类型筛选保持一致 */
.zonghe-feature-filter .option-dropdown {
    color: #2c3e50;
    font-weight: normal !important; /* 取消加粗，与产品类型一致 */
/*  padding: 8px 16px;*/
    white-space: nowrap;
    font-size: 14px; /* 确保字体大小一致 */
    line-height: 1.5; /* 行高一致 */
}

/* 下拉框容器样式 */
.zonghe-feature-filter .option-items {
    padding: 4px 0;
}

/* 特征筛选下拉框样式 - 与高级筛选区域保持一致 */
.zonghe-feature-filter .feature-select {
    display: inline-block;
    margin: 0 8px 8px 0;
    padding: 6px 12px; /* 调整内边距，与高级筛选一致 */
    border: 1px solid #ddd;
    border-radius: 6px;
    background: white;
    font-size: 14px;
    min-width: 140px;
    height: 34px; /* 固定高度，与其他筛选框一致 */
    line-height: 20px; /* 行高调整 */
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none; /* 移除原生样式 */
    background-image: url("data:image/svg+xml;charset=US-ASCII,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'><path fill='%23333' d='M2 0L0 2h4zm0 5L0 3h4z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
    padding-right: 30px;
    box-sizing: border-box; /* 确保高度计算正确 */
}

.zonghe-feature-filter .feature-select:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.1);
}

/* 级联下拉框动画效果 */
.zonghe-feature-filter .feature-select {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.zonghe-feature-filter .feature-select[style*="display: inline-block"] {
    animation: fadeInUp 0.3s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 下拉框悬停效果 */
.zonghe-feature-filter .feature-select:hover {
    border-color: #007cba;
    background-color: #f8f9fa;
}

/* 筛选激活状态指示 */
.zonghe-feature-filter .feature-select:not([value=""]) {
    border-color: #007cba;
    background-color: #f0f8ff;
    font-weight: 500;
}

/* 确保特征筛选区域在主题更新后仍然可见 */
.zonghe-feature-filter {
    position: relative;
    z-index: 10;
}

/* 唯一结果提示样式 */
.unique-result-tip {
    padding: 8px 12px;
    margin: 8px 0;
    background-color: #e8f5e9;
    border: 1px solid #4caf50;
    border-radius: 4px;
    color: #2e7d32;
    font-size: 14px;
    text-align: center;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 不同分辨率文章卡片列表的显示个数 - 修复版 */
@media (min-width: 2201px) {
    body.category .posts-item.card {
        width: calc(24% - 10px);
        margin: 5px;
    }
}

@media (min-width: 1601px) and (max-width: 2200px) {
    body.category .posts-item.card {
        width: calc(32% - 10px);
        margin: 5px;
    }
}

@media (min-width: 997px) and (max-width: 1600px) {
    body.category .posts-item.card {
        width: calc(49% - 10px);
        margin: 5px;
    }
}

@media (max-width: 996px) {
    body.category .posts-item.card {
        width: calc(99% - 10px);
        margin: 5px;
    }
    
    /* 移动端表格调整 */
    .custom-feature-table {
        font-size: 12px;
        min-height: 100px;
    }
    
    .custom-feature-table td {
        padding: 6px 8px;
    }
    
    .custom-feature-table .feature-name {
        width: 20px !important;
        min-width: 20px;
        max-width: 20px;
        font-size: 11px;
    }
}

/* 移动端特征筛选样式优化 */
@media (max-width: 768px) {
    .zonghe-feature-filter .option-items {
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-start;
        gap: 8px;
    }
    
    .zonghe-feature-filter .feature-select {
        flex: 1 1 calc(50% - 8px);
        min-width: 120px;
        margin: 0;
        padding: 8px 12px; /* 移动端内边距调整 */
        font-size: 13px;
        height: 36px; /* 移动端高度调整 */
        border-radius: 8px;
        background-size: 10px;
        padding-right: 28px;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }
    
    .zonghe-feature-filter .feature-select:focus {
        box-shadow: 0 2px 8px rgba(0, 124, 186, 0.2);
    }
}

/* 超小屏幕优化 */
@media (max-width: 480px) {
    .zonghe-feature-filter .feature-select {
        flex: 1 1 100%;
        min-width: auto;
        margin: 0 0 8px 0;
        padding: 10px 12px;
        font-size: 14px;
        height: 40px;
    }
    
    .zonghe-feature-filter .option-items {
        gap: 6px;
    }
}

/* 空单元格样式 - 确保即使没有内容也保持高度 */
.custom-feature-table td:empty::before {
    content: " ";
    display: inline-block;
    height: 1em;
}

/* 表格行固定高度 */
.custom-feature-table tr {
    height: 40px;
    min-height: 40px;
}