/**
 * 自定义分类页面样式 - 左右布局 (使用自定义类名避免冲突)
 */
.keda-category-wrapper {
    width: 100%;
    background-color: #fff;
}

.keda-category-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.keda-category-header {
    padding: 20px 10px;
    border-bottom: 1px solid #eee;
    text-align: left;
    background-color: #f9f9f9;
    margin: 20px 0;
    border-radius: 10px;
}

.keda-category-title {
    font-size: 28px;
    margin-bottom: 10px;
    color: #333;
    font-weight: 600;
}

.keda-category-breadcrumb {
    font-size: 14px;
    color: #666;
}

.keda-category-breadcrumb a {
    color: #666;
    text-decoration: none;
}

.keda-category-breadcrumb a:hover {
    color: #0066cc;
}

.keda-breadcrumb-separator {
    margin: 0 8px;
    color: #999;
}

.keda-current-category {
    color: #666;
}

/* 左右布局容器 */
.keda-layout-wrapper {
    display: flex;
    gap: 40px;
    margin-bottom: 40px;
}

/* 左侧产品区域 */
.keda-products-wrapper {
    flex: 1;
    width: 75%;
}

.keda-products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.keda-product-item {
    border: 1px solid #eaeaea;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    background-color: #fff;
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.keda-product-item:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-3px);
}

.keda-product-thumbnail {
    overflow: hidden;
    position: relative;
    padding-top: 100%; /* 1:1 宽高比例 */
    display: flex;
    justify-content: center;
    align-items: center;
}

.keda-product-image {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    object-fit: contain;
    transition: transform 0.5s ease;
    margin: 0 auto;
    display: block;
}

.keda-product-thumbnail:hover img {
    transform: scale(1.05);
}

.keda-product-header {
    padding: 15px 15px 5px;
}

.keda-product-title {
    font-size: 16px !important;
    margin-bottom: 8px !important;
    line-height: 1.4 !important;
    height: 44px !important;
    overflow: hidden !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    font-family: inherit !important;
    font-weight: 500 !important;
    color: #333 !important;
}

.keda-product-title a {
    color: #333 !important;
    text-decoration: none !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    font-family: inherit !important;
}

.keda-product-title a:hover {
    color: #0066cc !important;
}

.keda-product-summary {
    padding: 0 15px;
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    margin-bottom: 10px;
    flex-grow: 1;
    height: 42px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.keda-product-footer {
    padding: 10px 15px 15px;
    text-align: center;
}

.keda-product-btn {
    display: inline-block;
    padding: 6px 12px;
    background-color: #0066cc;
    color: white !important;
    text-decoration: none;
    border-radius: 3px;
    font-size: 14px;
    transition: background-color 0.3s;
    width: 100%;
    text-align: center;
}

.keda-product-btn:hover {
    background-color: #0055aa;
}

/* 右侧固定表单 */
.keda-sidebar-form {
    width: 25%;
    min-width: 320px;
    position: relative;
}

.keda-sticky-form-container {
    position: sticky;
    top: 100px;
    background-color: #f7f7f7;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
}

.keda-form-title {
    text-transform: uppercase;
    font-size: 22px;
    margin-bottom: 15px;
    color: #333;
}

.keda-form-desc {
    margin-bottom: 20px;
    font-size: 15px;
    color: #666;
}

.keda-sidebar-form-inner .ff-el-group {
    margin-bottom: 15px;
}

.keda-sidebar-form-inner .ff-btn-submit {
    width: 100%;
    padding: 10px;
    background-color: #0066cc;
    border: none;
    border-radius: 4px;
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
}

.keda-sidebar-form-inner .ff-btn-submit:hover {
    background-color: #0055aa;
}

/* 分页样式 */
.keda-pagination {
    margin-top: 40px;
    text-align: center;
}

.keda-pagination .nav-links .page-numbers {
    padding: 8px 12px;
    margin: 0 5px;
    border: 1px solid #ddd;
    text-decoration: none;
    color: #333;
    border-radius: 4px;
}

.keda-pagination .nav-links .page-numbers.current {
    background-color: #0066cc;
    color: white;
    border-color: #0066cc;
}

/* 产品卡片增加价格和认证标志样式 */
.keda-product-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 15px;
    border-top: 1px solid #f0f0f0;
}

.keda-product-price {
    font-weight: bold;
    color: #e53935;
    font-size: 16px;
}

.keda-certified-badge {
    background-color: #e8f5e9;
    color: #388e3c;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 3px;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .keda-products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .keda-layout-wrapper {
        flex-direction: column;
    }
    
    .keda-products-wrapper,
    .keda-sidebar-form {
        width: 100%;
    }
    
    .keda-sidebar-form {
        margin-top: 40px;
    }
    
    .keda-sticky-form-container {
        position: relative;
        top: 0;
    }
    
    .keda-products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .keda-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .keda-category-title {
        font-size: 24px;
    }
}

@media (max-width: 576px) {
    .keda-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .keda-category-title {
        font-size: 22px;
    }
    
    .keda-product-title {
        font-size: 14px;
        height: 40px;
    }
    
    .keda-product-summary {
        display: none;
    }
    
    .keda-product-meta {
        padding: 5px 10px;
    }
    
    .keda-product-price {
        font-size: 14px;
    }
    
    .keda-product-btn {
        padding: 5px 10px;
        font-size: 12px;
    }
}

/* 重置可能被主题影响的元素样式 */
.keda-category-wrapper * {
    box-sizing: border-box;
}

/* 提高产品标题选择器的权重，覆盖主题样式 */
.keda-category-wrapper .keda-products-wrapper .keda-products-grid .keda-product-item .keda-product-header .keda-product-title {
    font-size: 16px !important;
    line-height: 1.4 !important;
    margin: 0 0 8px 0 !important;
    padding: 0 !important;
    height: 44px !important;
    font-weight: 500 !important;
    color: #333 !important;
    font-family: inherit !important;
    text-transform: none !important;
    letter-spacing: normal !important;
}

.keda-category-wrapper .keda-products-wrapper .keda-products-grid .keda-product-item .keda-product-header .keda-product-title a {
    font-size: 16px !important;
    line-height: 1.4 !important;
    font-weight: 500 !important;
    color: #333 !important;
    font-family: inherit !important;
    text-decoration: none !important;
}

.keda-category-wrapper .keda-products-wrapper .keda-products-grid .keda-product-item .keda-product-header .keda-product-title a:hover {
    color: #0066cc !important;
    text-decoration: none !important;
}

/* SEO内容区域样式 */
.keda-seo-content {
    margin: 50px 0 30px;
    padding: 30px;
    background-color: #f9f9f9;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.keda-seo-title {
    font-size: 24px;
    margin-bottom: 20px;
    color: #333;
    font-weight: 600;
    text-align: center;
}

.keda-seo-text {
    color: #555;
    line-height: 1.7;
    font-size: 16px;
}

.keda-seo-text p {
    margin-bottom: 15px;
}

.keda-seo-text p:last-child {
    margin-bottom: 0;
}

/* 确保SEO区域的h2标签样式不受主题干扰 */
.keda-category-wrapper .keda-category-container .keda-seo-content .keda-seo-title {
    font-size: 24px !important;
    margin-bottom: 20px !important;
    color: #333 !important;
    font-weight: 600 !important;
    text-align: center !important;
    line-height: 1.3 !important;
    font-family: inherit !important;
    padding: 0 !important;
    letter-spacing: normal !important;
    text-transform: none !important;
}

@media (max-width: 768px) {
    .keda-seo-content {
        padding: 25px 20px;
        margin: 40px 0 25px;
    }
    
    .keda-seo-title {
        font-size: 22px;
    }
    
    .keda-seo-text {
        font-size: 15px;
    }
}

@media (max-width: 576px) {
    .keda-seo-content {
        padding: 20px 15px;
        margin: 30px 0 20px;
    }
    
    .keda-seo-title {
        font-size: 20px;
        margin-bottom: 15px;
    }
    
    .keda-seo-text {
        font-size: 14px;
    }
} 