/* ===== 产品中心页面样式（新版 - 参考华联机械） ===== */

/* ===== 页面横幅 ===== */
.page-banner {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #fff;
    padding: 60px 0;
    text-align: center;
}

.page-banner h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.breadcrumb {
    color: rgba(255,255,255,0.7);
}

.breadcrumb a {
    color: #e94560;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* ===== 页面布局 ===== */
.product-center-section {
    padding: 40px 0 60px;
    background: #f5f5f5;
    min-height: calc(100vh - 300px);
}

.product-center-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
}

/* ===== 左侧大分类列表 ===== */
.category-main-list {
    padding: 0;
    background: #fff;
    border: 1px solid #ddd;
}

.category-main-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    color: #333;
    font-size: 0.95rem;
    border-bottom: 1px solid #f0f0f0;
}

.category-main-item:last-child {
    border-bottom: none;
}

.category-main-item:hover {
    background: #f8f9fa;
    color: #e94560;
}

.category-main-item.active {
    background: #fff0f2;
    color: #e94560;
    font-weight: 600;
}

.category-main-item i {
    font-size: 0.8rem;
    color: #999;
    transition: transform 0.3s ease;
}

.category-main-item.active i {
    color: #e94560;
    transform: rotate(90deg);
}

/* ===== 子分类列表 ===== */
.category-series {
    background: #f9f9f9;
    border-bottom: 1px solid #f0f0f0;
    padding: 5px 0;
}

.category-series-item {
    padding: 8px 20px 8px 30px;
    cursor: pointer;
    font-size: 0.85rem;
    color: #666;
    transition: all 0.2s ease;
}

.category-series-item:hover {
    background: #f0f0f0;
    color: #e94560;
}

.category-series-item.active {
    color: #e94560;
    font-weight: 600;
    background: #fff0f2;
}

/* ===== 右侧内容区 ===== */
.product-main-content {
    background: #fff;
    padding: 30px;
}

/* 分类标题栏 */
.category-title-bar {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.category-title-info {
    margin-bottom: 10px;
    color: #666;
    font-size: 0.9rem;
}

.category-label {
    margin-right: 5px;
}

.category-count {
    color: #e94560;
    font-weight: 600;
}

.category-title-bar h2 {
    font-size: 1.8rem;
    color: #1a1a2e;
    font-weight: 600;
}

/* 筛选栏 */
.filter-bar {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-group label {
    font-size: 0.9rem;
    color: #666;
    white-space: nowrap;
}

.filter-group select {
    padding: 8px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 0.9rem;
    background: #fff;
    cursor: pointer;
}

.filter-group select:focus {
    border-color: #e94560;
    outline: none;
}

/* 产品数量 */
.product-count {
    margin-bottom: 20px;
    color: #666;
    font-size: 0.9rem;
}

.product-count span {
    color: #e94560;
    font-weight: 600;
}

/* ===== 产品网格 ===== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.product-card {
    background: #fff;
    border: none;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-2px);
}

.product-card-image {
    position: relative;
    width: 100%;
    padding: 0;
    padding-bottom: 100%; /* 正方形 1:1 */
    overflow: hidden;
    background: #f8f9fa;
    border: 1px solid #ddd;
}

.product-card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.4s ease;
    background: #fff;
    padding: 5px;
}

.product-card:hover .product-card-image img {
    transform: scale(1.1);
}

.product-card-info {
    padding: 15px;
    text-align: center;
    background: #fff;
}

.product-card-name {
    font-size: 0.95rem;
    font-weight: 500;
    color: #333;
    margin-bottom: 12px;
    line-height: 1.5;
    min-height: 42px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card-model {
    font-size: 0.8rem;
    color: #999;
    margin-bottom: 12px;
}

.product-card-actions {
    display: flex;
    gap: 8px;
}

.btn-inquiry {
    flex: 1;
    padding: 10px 15px;
    background: #eaedef;
    color: #333;
    border: 1px solid #d8dde6;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-inquiry:hover {
    background: #e94560;
    color: #fff;
    border-color: #e94560;
}

.btn-view {
    padding: 10px 15px;
    background: #fff;
    color: #666;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.btn-view:hover {
    border-color: #e94560;
    color: #e94560;
}

/* ===== 面包屑 ===== */
.breadcrumb-nav {
    padding: 15px 0;
    margin-bottom: 20px;
}

.breadcrumb-nav a {
    color: #666;
    transition: color 0.3s ease;
}

.breadcrumb-nav a:hover {
    color: #e94560;
}

.breadcrumb-nav span {
    color: #999;
    margin: 0 8px;
}

.breadcrumb-nav .current {
    color: #1a1a2e;
    font-weight: 500;
}

/* ===== 响应式 ===== */


/* ===== 搜索框 ===== */
.search-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
}

.search-bar input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

.search-bar input:focus {
    border-color: #e94560;
}

.search-btn {
    padding: 10px 16px;
    background: #e94560;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 0.9rem;
    cursor: pointer;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: background 0.3s;
}

.search-btn:hover {
    background: #d6334c;
}

/* ===== 子分类按钮（内容区域） ===== */
.sub-categories {
    display: none;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
}

.sub-cat-btn {
    display: inline-block;
    padding: 5px 12px;
    font-size: 0.8rem;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 3px;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
}

.sub-cat-btn:hover {
    border-color: #e94560;
    color: #e94560;
}

.sub-cat-btn.active {
    background: #e94560;
    color: #fff;
    border-color: #e94560;
}

@media (max-width: 1200px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}

@media (max-width: 992px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

@media (max-width: 768px) {
    .page-banner {
        padding: 20px 0;
    }
    .page-banner h1 {
        font-size: 1.2rem;
        margin-bottom: 4px;
    }
    .page-banner .breadcrumb {
        font-size: 0.75rem;
    }
    .product-center-layout {
        grid-template-columns: 1fr;
    }
    .product-center-section {
        padding: 15px 0 30px;
    }
    .category-sidebar {
        margin-bottom: 10px;
    }
    .category-main-list {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 6px !important;
        border: none !important;
        padding: 8px 4px !important;
        background: transparent !important;
    }
    .category-sidebar .category-main-item {
        display: inline-flex !important;
        padding: 6px 12px !important;
        font-size: 0.78rem !important;
        border: 1px solid #ddd !important;
        border-radius: 4px !important;
        background: #fff !important;
        color: #333 !important;
        font-weight: 500 !important;
        justify-content: center !important;
        width: auto !important;
        flex: none !important;
        border-bottom: 1px solid #ddd !important;
    }
    .category-sidebar .category-main-item i {
        display: none !important;
    }
    .category-sidebar .category-series {
        display: none !important;
    }
    
    .category-sidebar .category-series-item {
        padding: 4px 10px;
        font-size: 0.7rem;
        background: #fff;
        border: 1px solid #ddd;
        border-radius: 3px;
        cursor: pointer;
        color: #666;
    }
    
    .category-sidebar .category-series-item.active {
        background: #e94560;
        color: #fff;
        border-color: #e94560;
    }
    
    .sub-categories {
        gap: 4px;
        margin-bottom: 8px;
        padding-bottom: 8px;
    }
    
    .sub-cat-btn {
        padding: 4px 10px;
        font-size: 0.72rem;
    }
    .product-main-content {
        padding: 8px;
    }
    .breadcrumb-nav {
        display: none;
    }
    .category-title-bar {
        margin-bottom: 8px;
        padding-bottom: 6px;
    }
    .category-title-bar h2 {
        font-size: 0.9rem;
    }
    .category-title-info {
        font-size: 0.7rem;
    }
    .filter-bar {
        gap: 4px;
        margin-bottom: 8px;
        padding-bottom: 8px;
    }
    .filter-group label { font-size: 0.7rem; }
    .filter-group select { padding: 3px 5px; font-size: 0.7rem; }
    .product-count { margin-bottom: 6px; font-size: 0.75rem; }
    .search-bar { margin-bottom: 8px; gap: 4px; }
    .search-bar input { padding: 6px 10px; font-size: 0.78rem; }
    .search-btn { padding: 6px 10px; font-size: 0.78rem; }
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }
    .product-card-image {
        padding-bottom: 75%;
        border: 1px solid #eee;
    }
    .product-card-image img {
        object-fit: contain;
    }
    .product-card-info {
        padding: 4px 6px;
    }
    .product-card-name {
        font-size: 0.72rem;
        min-height: 20px;
        margin-bottom: 3px;
    }
    .btn-inquiry {
        padding: 4px 6px;
        font-size: 0.7rem;
    }
}
