@import "init.css";

.container {
    width: 1230px;
    margin: 0 auto;
}

/*筛选菜单*/
.dropdown-container {
    width: 100%;
    margin: 125px auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-column-gap: 26px;
    grid-row-gap: 60px;
}

.dropdown-open,
.dropdown-closebtn,
.dropdown-title,
.btmtext {
    display: none;
}

.dropdown-select {
    min-width: 200px;
    position: relative;
}

.dropdown-header {
    padding: 10px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #adabaa;
    color: #fff;
    font-size: 16px;
}

    .dropdown-header:hover {
        background-color: #4b4340;
    }

.dropdown-list {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
	max-height:245px;
    background-color: #fff;
    border: 1px solid #ccc;
    color: #000;
    display: none;
    z-index: 10;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    border-radius: 0 0 8px 8px;
    overflow-y: auto;
}

    .dropdown-list li {
        list-style: none;
        padding: 10px 20px;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

        .dropdown-list li:hover {
            background-color: #f0f0f0;
        }

    .dropdown-list input[type="checkbox"] {
        width: 16px;
        height: 16px;
        margin-right: 10px;
        cursor: pointer;
    }

    /* 隐藏原始checkbox */
    .dropdown-list input[type="checkbox"] {
        display: none;
    }

    /*checkbox样式 */
    .dropdown-list label {
        position: relative;
        font-size: 14px;
        cursor: pointer;
        width: 100%;
    }

    /* checkbox的外观 */
    .dropdown-list input[type="checkbox"] + label::before {
        content: '';
        position: absolute;
        right: 0%;
        top: -3px;
        width: 18px;
        height: 18px;
        background-color: #fff;
        border: 1px solid #000;
        transition: background-color 0.3s, border-color 0.3s;
    }

    /* 选中时的背景色和边框变化 */
    .dropdown-list input[type="checkbox"]:checked + label::before {
        background-color: #332d2b;
        border-color: #000;
    }

    /*选中时的勾选符号 */
    .dropdown-list input[type="checkbox"]:checked + label::after {
        font-family: "iconfont" !important;
        content: '\e630';
        position: absolute;
        right: 0;
        top: 0;
        color: #fff;
        font-size: 18px;
    }


.dropdown-menu.active .dropdown-list {
    display: block;
}

.icon-xiajiantou {
    transition: transform 0.3s ease;
}

/* 点击时箭头翻转 */
.dropdown-header.open .icon-xiajiantou {
    transform: rotate(180deg);
}

.message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translateX(-50%);
    padding: 10px 20px;
    background-color: gray;
    color: white;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0,0,0,0.2);
    display: none;
    z-index: 999999;
    font-size: 14px;
    font-weight: normal;
}

.empty-products {
    width: 100%;
    height: auto;
    text-align: center;
    line-height: 1.5em;
    margin: 0 auto;
    font-size: 16px;
}
/*列表*/
.plist-container {
    display: flex;
    width: 100%;
    padding-bottom: 95px;
    justify-content: space-between;
}

    .plist-container .empty-list {
        width: 90%;
        height: auto;
        margin: 0 auto;
        text-align: center;
        line-height: 1.5em;
        font-size: 16px;
    }

.plistleft {
    width: 18.5%;
    padding-left: 15px;
    border-left: 1px solid #9f9c9b;
    border-bottom: 1px solid #9f9c9b;
}

.plistright {
    width: 76%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    /* 默认 3 列，每列宽度均分 */
    gap: 20px;
}

.plistleft .text1 {
    font-size: 30px;
    line-height: 1;
}

.plistleft .text2 {
    font-size: 16px;
    color: #948885;
    margin-top: 28px;
}

.pitem {
    position: relative;
    overflow: hidden;
    display: block;
    text-decoration: none;
}

    .pitem img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: all 0.5s;
        aspect-ratio: 1 / 1;
    }

    .pitem::after {
        content: "";
        position: absolute;
        border: 4px solid #948885;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        box-sizing: border-box;
        opacity: 0;
        transition: all 0.3s ease;
        pointer-events: none;
    }

    .pitem:hover::after {
        opacity: 1;
    }

    .pitem:hover img {
        scale: 1.1;
    }

.list-info {
    position: absolute;
    bottom: 5%;
    left: 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 90%;
}

    .list-info .text1 {
        font-size: 16px;
        color: #1e1e1e;
        font-weight: 500;
        font-family: "enMedium", "Noto Sans SC";
    }

    .list-info .text2 {
        font-size: 12px;
        color: #1e1e1e;
        font-weight: 600;
    }

.viewall-btn {
    display: block;
    width: 424px;
    height: 52px;
    line-height: 52px;
    border-radius: 50px;
    background-color: #bcb09d;
    color: #fff;
    font-size: 16px;
    text-align: center;
    margin: 110px auto;
    transition: background-color 0.4s;
}

    .viewall-btn a:hover {
        text-decoration: underline;
    }

/* 响应式布局 */
@media (max-width: 1024px) {
    .container {
        width: 87.2%;
    }

    .dropdown-container {
        width: 100%;
        grid-template-columns: repeat(2, 1fr);
    }
	
		.plistright {
        width: 76%;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        min-height: auto;
    }
}


@media (max-width: 960px) {
    

    /*筛选器*/
    .dropdown-container {
        position: fixed;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100vh;
        z-index: 100;
        background-color: #fff;
        color: #151515;
        padding: 6.4%;
        margin: 0;
        grid-template-columns: repeat(1, 1fr);
        grid-row-gap: 1rem;
        align-content: start;
        overflow-y: auto;
        transition: all 0.4s;
    }

        .dropdown-container.open {
            left: 0;
        }

    .dropdown-closebtn {
        width: 100%;
        height: 0.51rem;
        display: flex;
        justify-content: flex-end;
    }

    .dropdown-open {
        display: block;
        width: 100%;
        height: 0.94rem;
        line-height: 0.94rem;
        text-align: center;
        background-color: #bcb09d;
        border-radius: 5px;
        font-size: 0.29rem;
        color: #fff;
        margin: 1.3rem 0 1.1rem;
        cursor: pointer;
    }

        .dropdown-open .icon-shaixuan {
            font-size: 0.4rem;
            margin-right: 6px;
        }

    .dropdown-closebtn .icon-close {
        font-size: 0.51rem;
    }

    .dropdown-title {
        display: block;
        font-size: 0.58rem;
    }

        .dropdown-title .icon-shaixuan {
            font-size: 0.54rem;
            margin-right: 6px;
        }

    .btmtext {
        display: block;
        font-size: 0.21rem;
        text-align: center;
        padding-bottom: 30px;
    }

    .dropdown-header {
        padding: 10px;
        cursor: pointer;
        display: flex;
        justify-content: space-between;
        align-items: center;
        border-bottom: 1px solid #adabaa;
        color: #151515;
        font-size: 0.33rem;
    }

    .dropdown-list li {
        padding: 0.3rem 0.8rem;
    }

    .dropdown-select {
        height: 37px;
    }

    .dropdown-header:hover {
        background-color: #fff;
    }

    .icon-xiajiantou {
        font-size: 0.3rem;
    }

    .dropdown-list label {
        font-size: 0.33rem;
    }

    /* checkbox的外观 */
    .dropdown-list input[type="checkbox"] + label::before {
        content: '';
        position: absolute;
        right: 0%;
        top: 0;
        width: 0.36rem;
        height: 0.36rem;
        background-color: #fff;
        border: 1px solid #000;
        transition: background-color 0.3s, border-color 0.3s;
    }

    /* 选中时的背景色和边框变化 */
    .dropdown-list input[type="checkbox"]:checked + label::before {
        background-color: #332d2b;
        border-color: #000;
    }

    /* 修改选中时的勾选符号 */
    .dropdown-list input[type="checkbox"]:checked + label::after {
        font-family: "iconfont" !important;
        content: '\e630';
        position: absolute;
        right: 0;
        top: 0;
        color: #fff;
        font-size: 0.36rem;
    }

    .plist-container {
        width: 100%;
        flex-direction: column;
        padding-bottom: 1rem;
        height: auto;
        align-items: stretch;
    }

    .plistleft {
        width: 100%;
        margin-bottom: 0.23rem;
    }

        .plistleft .text1 {
            font-size: 0.46rem;
        }

        .plistleft .text2 {
            font-size: 0.25rem;
            margin: 0.27rem 0 0.88rem;
        }

    .plistright {
        width: 100%;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.2rem;
        min-height: auto;
    }

    .list-info .text1 {
        font-size: 0.27rem;
    }

    .list-info .text2 {
        font-size: 0.17rem;
    }

    .viewall-btn {
        display: block;
        width: 100%;
        height: 0.94rem;
        line-height: 0.94rem;
        border-radius: 52px;
        background-color: #bcb09d;
        color: #fff;
        font-size: 0.29rem;
        text-align: center;
        margin: 1.46rem auto 1.64rem;
    }
}
