/* --- 产品列表主体容器 --- */
.list-container {
    width: 100%;
    margin: 120px auto 60px;
}

/* --- 搜索栏 Search Bar (修复细节) --- */
.search-bar {
    width: 100%;
    border-bottom: 1px solid #eee;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 10px;
}

.search-bar input {
    width: 100%;
    border: none;
    outline: none;
    font-size: 16px;
    font-family: inherit;
    background: transparent;
    color: #333;
}

.search-bar .search-icon {
    width: 20px;
    height: 20px;
    cursor: pointer;
    opacity: 0.6;
    transition: 0.3s;
}

.search-bar .search-icon:hover {
    opacity: 1;
}

/* --- 筛选按钮样式 --- */
.filter-left {
    position: relative;
    cursor: pointer;
    transition: 0.3s;
    display: inline-block;
}

.filter-left:hover {
    color: #333;
}

.filter-left::after {
    content: '';
    position: absolute;
    left: 100%;
    margin-left: 5px;
    top: 50%;
    transform: translateY(-50%) rotate(0deg);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid #666;
    transition: transform 0.3s ease;
}

/* 当筛选面板打开时，三角形向下 */
.filter-controls:has(+ .filter-matrix.active) .filter-left::after {
    transform: translateY(-50%) rotate(180deg);
}

/* --- 筛选矩阵 Filter Matrix --- */
.filter-matrix {
    height: 0;
    overflow: hidden;
    transition: 0.5s;
    background: #fafafa;
}

.filter-matrix.active {
    height: auto;
    padding: 40px;
    border: 1px solid #eee;
    margin-bottom: 40px;
}

.matrix-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}

.matrix-col h4 {
    font-size: 11px;
    color: #bbb;
    margin-bottom: 15px;
    font-weight: normal;
}

.matrix-col label {
    display: block;
    font-size: 12px;
    margin-bottom: 10px;
    cursor: pointer;
    color: #555;
}

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

/* 产品卡片 */
.product-card {
    position: relative;
    width: 100%;
    background: #fff;
    transition: transform 0.3s;
}

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

/* 图片容器（6:9 比例） */
.product-image {
    position: relative;
    width: 100%;
    aspect-ratio: 6 / 9;
    overflow: hidden;
    background: #f5f5f5;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

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

/* 文字信息层（绝对定位在图片底部） */
.product-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 15px;
    /* background: linear-gradient(0deg, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0) 100%); */
    text-align: center;
    color: #fff;
    transition: opacity 0.3s;
}

.product-title {
    font-size: 16px;
    font-weight: 500;
    margin: 0 0 8px;
    color: #000000;
}

.product-price {
    font-size: 14px;
    color: rgba(0, 0, 0, 0.9);
    margin: 0;
}

/* --- 产品列表移动端专项适配 --- */
@media screen and (max-width: 768px) {
    /* 1. 调整容器间距 */
    .list-container {
        width: 90% !important; /* 增加手机端可用宽度 */
        margin: 100px auto 40px !important; /* 适配 60px 的导航栏 */
    }

    /* 2. 筛选控制条调整 */
    .filter-controls {
        display: flex;
        justify-content: space-between;
        font-size: 12px !important;
        margin-bottom: 20px !important;
    }

    /* 3. 筛选矩阵：从 5 列变为 2 列 */
    .filter-matrix.active {
        padding: 20px !important;
    }

    .matrix-grid {
        grid-template-columns: repeat(2, 1fr) !important; /* 手机端双列排布 */
        gap: 20px !important;
    }

    .matrix-col h4 {
        margin-top: 10px;
    }

    /* 4. 产品网格：从 4 列变为 2 列 */
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .product-info {
        padding: 10px;
    }
    
    .product-title {
        font-size: 14px;
        margin-bottom: 4px;
    }
    
    .product-price {
        font-size: 12px;
    }

    /* 5. 调整搜索栏字体 */
    .search-bar input {
        font-size: 14px !important;
    }

    /* 6. 按钮微调 */
    .btn-clear {
        width: 100%; /* 清除按钮在手机上占满整行方便点击 */
        padding: 12px !important;
        font-size: 12px !important;
    }
}