/* 产品中心 - 左侧分类 + 右侧列表 布局
 * 仅在 product.php 中通过 <link> 引入，不会影响首页或其他页面 */

.pc-wrap {
    max-width: 1200px;
    margin: 30px auto 60px;
    padding: 0 15px;
    display: flex;
    gap: 24px;
    font-family: "微软雅黑", "Microsoft YaHei", Arial, sans-serif;
    color: #333;
    box-sizing: border-box;
}

.pc-wrap *,
.pc-wrap *::before,
.pc-wrap *::after {
    box-sizing: border-box;
}

/* 左侧分类 */
.pc-sidebar {
    width: 210px;
    flex-shrink: 0;
}

.pc-sidebar-title {
    background: #2aa7e0;
    color: #fff;
    font-size: 22px;
    text-align: center;
    padding: 22px 10px;
    letter-spacing: 2px;
    font-weight: normal;
}

.pc-cat-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.pc-cat-item {
    margin-top: 6px;
}

.pc-cat-item a {
    display: block;
    background: #eaeaea;
    color: #444;
    text-decoration: none;
    font-size: 14px;
    padding: 13px 18px;
    text-align: center;
    transition: background 0.2s, color 0.2s;
}

.pc-cat-item a:hover {
    background: #d5d5d5;
    color: #2aa7e0;
}

.pc-cat-item.active a {
    background: #2aa7e0;
    color: #fff;
}

/* 右侧主体 */
.pc-content {
    flex: 1;
    min-width: 0;
}

.pc-breadcrumb {
    border-bottom: 1px solid #e5e5e5;
    padding-bottom: 14px;
    margin-bottom: 22px;
    font-size: 13px;
    color: #888;
}

.pc-breadcrumb a {
    color: #888;
    text-decoration: none;
}

.pc-breadcrumb a:hover {
    color: #2aa7e0;
}

.pc-breadcrumb span {
    color: #2aa7e0;
}

/* 产品网格 */
.pc-product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    width: 100%;
}

.pc-product-card {
    display: block;
    text-decoration: none;
    color: #333;
    background: #fff;
    transition: box-shadow 0.25s, transform 0.25s;
    /* 允许网格项目收缩到内容以下，避免长标题撑破列宽 */
    min-width: 0;
    overflow: hidden;
}

.pc-product-card:hover {
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.pc-product-imgbox {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 100%; /* 1:1 比例占位 */
    overflow: hidden;
    background: #f7f7f7;
}

.pc-product-imgbox img {
    /* 覆盖全局 img{width:100%;margin:0 10px} 造成的溢出 */
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0;
    object-fit: contain;
    display: block;
    transition: transform 0.3s;
}

.pc-product-card:hover .pc-product-imgbox img {
    transform: scale(1.05);
}

.pc-product-title {
    font-size: 13px;
    color: #555;
    padding: 10px 4px 4px;
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.4;
}

.pc-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 0;
    color: #999;
    font-size: 14px;
}

/* 统计 & 分页 */
.pc-pager {
    text-align: center;
    margin-top: 35px;
    font-size: 13px;
}

.pc-pager-total {
    color: #666;
    margin-bottom: 12px;
}

.pc-pager-nums a {
    display: inline-block;
    min-width: 30px;
    padding: 6px 12px;
    margin: 0 3px;
    border: 1px solid #ddd;
    color: #555;
    text-decoration: none;
    background: #fff;
    border-radius: 2px;
}

.pc-pager-nums a:hover {
    color: #2aa7e0;
    border-color: #2aa7e0;
}

.pc-pager-nums a.active {
    background: #2aa7e0;
    color: #fff;
    border-color: #2aa7e0;
}

/* 响应式 */
@media (max-width: 991px) {
    .pc-product-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
    .pc-wrap {
        flex-direction: column;
        gap: 16px;
        margin: 20px auto 40px;
    }
    .pc-sidebar { width: 100%; }
    .pc-sidebar-title {
        font-size: 18px;
        padding: 14px 10px;
    }
    .pc-cat-list {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        margin-top: 6px;
    }
    .pc-cat-item {
        margin-top: 0;
        flex: 0 0 calc(50% - 3px);
    }
    .pc-cat-item a {
        padding: 10px 8px;
        font-size: 13px;
    }
    .pc-product-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 420px) {
    .pc-product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .pc-product-title { font-size: 12px; }
}
