/* =================
   煤源列表页面样式
   ================= */

/* 页面头部 */
.page-header { 
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); 
    color: white; 
    padding: 60px 0 40px; 
    margin-bottom: 40px; 
    text-align: center;
}

.page-title { 
    font-size: 36px; 
    font-weight: bold; 
    margin-bottom: 10px;
}

.page-subtitle { 
    font-size: 16px; 
    opacity: 0.9;
}

/* 筛选区域 */
.filter-section { 
    background: white; 
    border-radius: 12px; 
    padding: 25px 30px; 
    margin-bottom: 30px; 
    box-shadow: 0 2px 12px rgba(0,0,0,.08); 
}

.filter-row { 
    margin-bottom: 20px; 
    display: flex; 
    align-items: flex-start; 
}

.filter-row:last-child { 
    margin-bottom: 0; 
}

.filter-label { 
    font-weight: bold; 
    font-size: 15px; 
    color: #333; 
    min-width: 90px; 
    padding-top: 8px; 
}

.filter-content { 
    flex: 1; 
}

.filter-tag { 
    display: inline-block; 
    padding: 8px 18px; 
    margin: 5px 8px 5px 0; 
    border: 2px solid #e8e8e8; 
    border-radius: 20px; 
    cursor: pointer; 
    transition: all 0.3s; 
    font-size: 14px; 
    color: #666; 
    background: white; 
}

.filter-tag:hover { 
    border-color: #4E8EF7; 
    color: #4E8EF7; 
    transform: translateY(-2px); 
}

.filter-tag.active { 
    background: #4E8EF7; 
    color: white; 
    border-color: #4E8EF7; 
}

.filter-tag.parent { 
    font-weight: bold; 
}

.filter-tag.parent.expanded { 
    background: #f0f5ff; 
    border-color: #4E8EF7; 
    color: #4E8EF7; 
}

.filter-tag.child { 
    margin-left: 0; 
    font-size: 13px; 
}

.filter-more { 
    display: inline-block; 
    padding: 8px 18px; 
    margin: 5px 8px 5px 0; 
    border: 2px dashed #e8e8e8; 
    border-radius: 20px; 
    cursor: pointer; 
    transition: all 0.3s; 
    font-size: 14px; 
    color: #999; 
    background: white; 
}

.filter-more:hover { 
    border-color: #4E8EF7; 
    color: #4E8EF7; 
}

.parent-tags-wrapper { 
    margin-bottom: 0; 
}

.category-group { 
    display: inline-block; 
    margin-right: 0; 
}

/* 搜索框样式 */
.search-form { 
    display: flex; 
    align-items: center; 
    gap: 10px; 
}

.search-input { 
    flex: 1; 
    max-width: 400px;
    padding: 10px 18px; 
    border: 2px solid #e8e8e8; 
    border-radius: 25px; 
    font-size: 14px; 
    transition: all 0.3s;
    outline: none;
}

.search-input:focus { 
    border-color: #4E8EF7; 
    box-shadow: 0 0 0 3px rgba(78, 142, 247, 0.1);
}

.search-btn { 
    padding: 10px 24px; 
    background: #4E8EF7; 
    color: white; 
    border: none; 
    border-radius: 25px; 
    font-size: 14px; 
    cursor: pointer; 
    transition: all 0.3s;
    font-weight: 500;
}

.search-btn:hover { 
    background: #3d7de6; 
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(78, 142, 247, 0.3);
}

.search-btn i { 
    margin-right: 5px; 
}

.search-reset { 
    padding: 10px 20px; 
    background: #f5f7fa; 
    color: #909399; 
    text-decoration: none; 
    border-radius: 25px; 
    font-size: 14px; 
    transition: all 0.3s;
}

.search-reset:hover { 
    background: #e8eaed; 
    color: #606266;
    text-decoration: none;
}

.search-reset i { 
    margin-right: 5px; 
}

.add-source-btn {
    padding: 10px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
}

.add-source-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.add-source-btn i {
    margin-right: 5px;
}

.children-container { 
    margin-top: 0; 
    min-height: 0; 
}

.children-tags { 
    display: none; 
}

.children-tags.show { 
    display: flex; 
    flex-wrap: wrap; 
    gap: 5px; 
    padding: 15px 0 5px 0;
    border-top: 2px dashed #e8e8e8;
    margin-top: 10px;
    animation: slideDown 0.3s ease; 
}

@keyframes slideDown {
    from { 
        opacity: 0; 
        transform: translateY(-10px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

/* 煤源网格和卡片 */
.source-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); 
    gap: 20px; 
}

.source-card { 
    background: white; 
    border: 1px solid #e0e0e0; 
    border-radius: 10px; 
    padding: 20px; 
    transition: all 0.3s; 
    position: relative; 
}

.source-card:hover { 
    border-color: #667eea; 
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.2); 
    transform: translateY(-5px); 
}

/* 卡片链接 */
.card-link { 
    text-decoration: none; 
    color: inherit; 
    display: block; 
}

.card-link:hover { 
    text-decoration: none; 
    color: inherit; 
}

/* 收藏按钮 */
.favorite-btn { 
    position: absolute; 
    top: 15px; 
    right: 15px; 
    width: 36px; 
    height: 36px; 
    background: rgba(255,255,255,0.9); 
    border: 2px solid #e8e8e8; 
    border-radius: 50%; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    cursor: pointer; 
    transition: all 0.3s; 
    z-index: 10;
    backdrop-filter: blur(10px);
}

.favorite-btn:hover { 
    background: #fff; 
    border-color: #f5576c; 
    transform: scale(1.1);
}

.favorite-btn i { 
    font-size: 18px; 
    color: #999; 
    transition: all 0.3s;
}

.favorite-btn:hover i { 
    color: #f5576c;
}

.favorite-btn.favorited { 
    background: #fff; 
    border-color: #f5576c;
}

.favorite-btn.favorited i { 
    color: #f5576c;
}

.favorite-btn.favorited i::before { 
    content: '\f004'; /* fa-heart 实心 */
}

/* 我的标签 */
.my-tag {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 6px 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.my-tag i {
    font-size: 12px;
}

.source-name { 
    font-size: 18px; 
    font-weight: bold; 
    margin-bottom: 8px; 
}

.source-code {
    font-size: 12px;
    color: #999;
    margin-bottom: 12px;
}

.source-specs { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 10px; 
    margin-bottom: 15px; 
}

.spec-item { 
    font-size: 13px; 
    color: #666; 
}

.source-price { 
    font-size: 24px; 
    font-weight: bold; 
    color: #f5576c; 
    padding-top: 15px; 
    border-top: 1px solid #f0f0f0; 
}

/* 分页 */
.pagination-wrapper { 
    text-align: center; 
    padding: 40px 0;
}

.pagination-wrapper ul { 
    list-style: none; 
    padding: 0; 
    margin: 0; 
    display: inline-flex; 
    gap: 8px; 
}

.pagination-wrapper li { 
    list-style: none; 
}

.pagination-wrapper a, 
.pagination-wrapper span { 
    display: block;
    padding: 8px 15px; 
    border: 1px solid #e8e8e8; 
    border-radius: 6px; 
    color: #666; 
    text-decoration: none; 
    transition: all 0.2s;
    min-width: 40px;
    text-align: center;
}

.pagination-wrapper a:hover { 
    border-color: #4E8EF7; 
    color: #4E8EF7; 
    background: #f0f5ff;
}

.pagination-wrapper .active, 
.pagination-wrapper .current { 
    background: #909399; 
    color: white; 
    border-color: #909399; 
}

/* =================
   煤源列表响应式布局
   ================= */

/* 平板端适配 */
@media (max-width: 992px) {
    .page-header {
        padding: 40px 0 30px;
    }
    
    .page-title {
        font-size: 28px;
    }
    
    .filter-section {
        padding: 20px;
    }
    
    .filter-row {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .filter-label {
        margin-bottom: 10px;
        padding-top: 0;
    }
    
    .search-input {
        max-width: 100%;
    }
    
    .source-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

/* 移动端适配 */
@media (max-width: 768px) {
    .page-header {
        padding: 30px 15px 25px;
        margin-bottom: 20px;
    }
    
    .page-title {
        font-size: 24px;
        margin-bottom: 8px;
    }
    
    .page-subtitle {
        font-size: 14px;
    }
    
    /* 筛选区域 */
    .filter-section {
        padding: 15px;
        margin-bottom: 20px;
        border-radius: 8px;
    }
    
    .filter-row {
        margin-bottom: 15px;
    }
    
    .filter-label {
        font-size: 14px;
        min-width: auto;
        margin-bottom: 8px;
    }
    
    .filter-tag {
        padding: 6px 14px;
        font-size: 13px;
        margin: 3px 6px 3px 0;
        border-radius: 16px;
    }
    
    .filter-more {
        padding: 6px 14px;
        font-size: 13px;
    }
    
    /* 搜索表单 - 移动端堆叠布局 */
    .search-form {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .search-input {
        width: 100%;
        flex: none;
        max-width: 100%;
        padding: 12px 16px;
        font-size: 15px;
    }
    
    .search-btn {
        flex: 1;
        min-width: 0;
        padding: 12px 16px;
    }
    
    .search-reset {
        flex: 1;
        min-width: 0;
        padding: 12px 16px;
        text-align: center;
    }
    
    .add-source-btn {
        width: 100%;
        padding: 12px 16px;
        margin-top: 5px;
    }
    
    /* 子级分类 */
    .children-tags.show {
        padding: 12px 0 5px 0;
        margin-top: 8px;
    }
    
    /* 煤源卡片网格 */
    .source-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .source-card {
        padding: 15px;
        border-radius: 8px;
    }
    
    .source-name {
        font-size: 16px;
        padding-right: 50px;
    }
    
    .source-code {
        font-size: 11px;
    }
    
    .source-specs {
        gap: 8px;
        margin-bottom: 12px;
    }
    
    .spec-item {
        font-size: 12px;
    }
    
    .source-price {
        font-size: 20px;
        padding-top: 12px;
    }
    
    /* 收藏按钮和标签 */
    .favorite-btn {
        width: 32px;
        height: 32px;
        top: 12px;
        right: 12px;
    }
    
    .favorite-btn i {
        font-size: 16px;
    }
    
    .my-tag {
        top: 12px;
        right: 12px;
        padding: 5px 10px;
        font-size: 12px;
    }
    
    /* 分页 */
    .pagination-wrapper {
        padding: 25px 0;
    }
    
    .pagination-wrapper ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 6px;
    }
    
    .pagination-wrapper a,
    .pagination-wrapper span {
        padding: 6px 12px;
        font-size: 13px;
        min-width: 36px;
    }
    
    /* 省份弹窗 */
    #provinceModal > div {
        padding: 20px !important;
        width: 95% !important;
        max-height: 70vh !important;
    }
    
    #provinceModal h3 {
        font-size: 18px !important;
    }
    
    /* 新建煤源弹窗 */
    .el-dialog {
        width: 95% !important;
        margin: 10vh auto !important;
    }
    
    .el-dialog__body {
        padding: 15px 20px;
    }
    
    .el-form-item {
        margin-bottom: 15px;
    }
    
    .el-row .el-col-12 {
        width: 100%;
    }
}

/* 小屏手机适配 */
@media (max-width: 480px) {
    .page-title {
        font-size: 20px;
    }
    
    .search-btn,
    .search-reset {
        font-size: 13px;
        padding: 10px 12px;
    }
    
    .source-specs {
        grid-template-columns: 1fr 1fr;
    }
}
