.main-content {
    width: 1200px;
    display: flex;
    gap: 30px;
    margin: 100px auto 20px;
    align-items: flex-start;
}

/* 左侧分类列表 */
.category-list {
    flex: 1 1 25%;
    border: 1px solid #ddd;
    box-sizing: border-box;
    background-color: #f9f9f9;
    border-top-left-radius: 20px;
}

.category-list h3 {
    font-size: 1.2rem;
    background: #d30014;
    padding: 15px;
    border-top-left-radius: 20px;
    color: #fff;
    text-align: center;
}

.category-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-list ul li {
    position: relative;
    padding: 10px;
    cursor: pointer;
    border-bottom: 1px solid #bbb;
    transition: background-color 0.3s;
}

.category-list ul li::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 15px;
    width: 8px;
    height: 8px;
    border-top: 2px solid #999;
    border-right: 2px solid #999;
    transform: translateY(-50%) rotate(45deg);
    transition: border-color 0.3s;
}


.category-list ul li:hover,
.category-list ul li.active {
    background-color: #333;
    color: white;
}


.category-list ul li a:hover,
.category-list ul li a.active {
    background-color: #000;
    color: white;
}

/* 右侧产品列表 */
.product-list {
    flex: 3 1 75%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 0px;
}

.product-item {
    border: 1px solid #ddd;
    padding: 10px;
    box-sizing: border-box;
    background-color: #fff;
    transition: box-shadow 0.3s;
    margin: 0px 0px 25px;
}

.product-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.product-item img {
    width: 100%;
    height: auto;
    display: block;
    margin-bottom: 10px;
    object-fit: contain;
}

.product-info {
    font-size: 0.9rem;
    color: #333;
}

.product-name {
    font-weight: 600;
    margin-bottom: 5px;
    text-align: center;
}

.product-category {
    font-size: 0.85rem;
    color: #777;
    text-align: center;
}

.btn-li{
    width: 1200px;
    margin: auto;
    margin-bottom: 200px;
}

.btn-li ul li {
    display: inline-block;
    margin-left: 10px;
}

.btn-li ul li a {
    display: inline-block;
    width: 22px;
    height: 34px;
    border: 1px solid #666;
    background: #fff;
    font-size: 17px;
    color: #666;
    text-decoration: none;
    font-family: '微软雅黑';
    z-index: 1;
    position: relative;
    line-height: 34px;
    padding-left: 13px;
}

.btn-li ul li a::before {
    content: "";
    position: absolute;
    width: 36px;
    height: 34px;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background-color: #d30014;
    z-index: -1;
    transform: scale(0);
    transition: 0.5s;
}

.btn-li ul li a:hover{
    color: #fff;
}

.btn-li ul li a:hover::before {
    transform: scale(1,1);
}

.product-a{
    font-size: 20px;
    color: #000;
    font-weight: 550;
    text-decoration: none; 
    color: inherit; 
    cursor: pointer;
}
.product-a-s{
    font-size: 16px;
    font-weight: 400;
    text-decoration: none; 
    color: inherit; 
    cursor: pointer;
}

/* 移动端样式 */
@media (max-width: 768px) {
    .main-content {
        flex-direction: column;
    }

    .category-list {
        flex: none;
        width: 90%;
        margin: auto;
        margin-bottom: 20px;
    }

    .product-list {
        grid-template-columns: repeat(2, 1fr);
        flex: none;
        width: 100%;
    }
    .main-content{
        width: 100%;
    }
    .product-item{
        display: block;
        width: 90%;
        margin: auto;
    }

    .btn-li{
        width: 90%;
        margin: auto;
    }

    .btn-li ul li a{
        width: 45px;
    }
}

@media (max-width: 480px) {
    .product-list {
        grid-template-columns: 1fr;
    }
}