/* 橙皮素材网风格样式 */

/* 头部样式 */
.chengpi-header {
    background-color: #fff;
    padding: 15px 0;
    border-bottom: 1px solid #eaeaea;
    margin-top: 20px; /* 减少顶部边距 */
}

.chengpi-title {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

/* 搜索框样式 */
.chengpi-search-form {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.chengpi-search-input {
    width: 250px;
    height: 40px;
    padding: 0 15px;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 14px;
    outline: none;
    transition: all 0.3s ease;
}

.chengpi-search-input:focus {
    border-color: #4a90e2;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.chengpi-search-btn {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #666;
    font-size: 16px;
    cursor: pointer;
}

/* 分类筛选样式 */
.sort {
    margin-top: 10px;
    background-color: #fff;
}

.sort_box {
    background-color: #fff;
    border-radius: 0;
    box-shadow: none;
    padding: 15px 0;
    margin-bottom: 15px;
    border-bottom: 1px solid #eaeaea;
}

.sort_loop {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.sort_loop:last-child {
    margin-bottom: 0;
}

.sort_loop h3 {
    font-size: 13px;
    font-weight: normal;
    color: #666;
    margin: 0;
    min-width: 70px;
}

.sort_a {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.sort_a a {
    font-size: 13px;
    color: #666;
    padding: 3px 10px;
    border-radius: 3px;
    background-color: #f5f5f5;
    text-decoration: none;
    transition: all 0.3s ease;
}

.sort_a a:hover {
    background-color: #e9ecef;
    color: #333;
}

.sort_a a.selected {
    background-color: #ff6b6b;
    color: #fff;
}

/* 素材列表样式 */
.chengpi-content {
    padding-top: 15px;
    padding-bottom: 30px;
    background-color: #f8f9fa;
    padding: 0 15px;
}

.chengpi-material-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

.chengpi-material-item {
    transition: transform 0.3s ease;
}

.chengpi-material-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.chengpi-material-card {
    background-color: #fff;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.05);
    cursor: pointer;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
}

.chengpi-material-thumb {
    position: relative;
    overflow: hidden;
    padding-top: 75%; /* 4:3 比例 */
}

.chengpi-material-thumb img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.chengpi-material-card:hover .chengpi-material-thumb img {
    transform: scale(1.05);
}

.chengpi-material-tag {
    position: absolute;
    top: 5px;
    left: 5px;
    background-color: #ff6b6b;
    color: #fff;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 2px;
    z-index: 1;
}

.chengpi-material-info {
    padding: 8px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    background-color: rgba(255, 255, 255, 0.9);
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
}

.chengpi-material-title {
    font-size: 12px;
    font-weight: normal;
    color: #333;
    margin: 0;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    text-align: left;
    float: left;
    width: 70%;
}

.chengpi-material-meta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    float: right;
    width: 30%;
}

.chengpi-material-views {
    font-size: 11px;
    color: #999;
    text-align: right;
}

.chengpi-material-views i {
    margin-right: 2px;
    font-size: 10px;
}

/* 分类导航样式 */
.chengpi-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.chengpi-categories a {
    display: inline-block;
    padding: 5px 12px;
    background-color: #f5f5f5;
    border-radius: 20px;
    color: #666;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.chengpi-categories a:hover,
.chengpi-categories a.selected {
    background-color: #ff6b6b;
    color: #fff;
}

/* 分页样式 */
.chengpi-pagination {
    text-align: center;
    margin-top: 30px;
}

.chengpi-pagination .page-numbers {
    display: inline-block;
    padding: 6px 10px;
    margin: 0 3px;
    border-radius: 2px;
    background-color: #fff;
    color: #666;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid #ddd;
}

.chengpi-pagination .page-numbers:hover {
    background-color: #f5f5f5;
    color: #333;
}

.chengpi-pagination .page-numbers.current {
    background-color: #ff6b6b;
    color: #fff;
    border-color: #ff6b6b;
}

/* 无内容样式 */
.chengpi-no-content {
    text-align: center;
    padding: 30px 0;
    background-color: #fff;
    border-radius: 4px;
    margin: 20px 0;
}

.chengpi-no-content img {
    max-width: 150px;
    margin-bottom: 15px;
}

.chengpi-no-content-text {
    font-size: 14px;
    color: #999;
}

/* 响应式调整 */
@media (max-width: 1199px) {
    .chengpi-material-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 991px) {
    .chengpi-material-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 767px) {
    .chengpi-header {
        padding: 15px 0;
        margin-top: 10px;
    }
    
    .chengpi-title {
        font-size: 18px;
        margin-bottom: 10px;
    }
    
    .chengpi-search-form {
        justify-content: flex-start;
    }
    
    .chengpi-search-input {
        width: 100%;
        height: 36px;
    }
    
    .sort_loop {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .sort_loop h3 {
        margin-bottom: 10px;
    }
    
    .chengpi-material-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .chengpi-material-title {
        font-size: 12px;
        width: 65%;
    }
    
    .chengpi-material-meta {
        width: 35%;
    }
    
    .chengpi-material-info {
        padding: 6px;
    }
}

@media (max-width: 480px) {
    .chengpi-material-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    .chengpi-material-item {
        max-width: 100%;
    }
    .chengpi-material-info {
        padding: 5px;
    }
    .chengpi-material-title {
        font-size: 11px;
        width: 60%;
    }
    .chengpi-material-meta {
        width: 40%;
    }
    .chengpi-material-views {
        font-size: 10px;
    }
    .chengpi-material-views i {
        font-size: 9px;
    }
}