/* 主体内容样式 */
.second-hand-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 90px 20px 20px;
}

/* 分类导航样式 */
.category-nav {
    background: #fff;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

.category-nav::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.category-item {
    color: #666;
    text-decoration: none;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 14px;
    white-space: nowrap;
    transition: all 0.3s;
}

.category-item:hover {
    color: #6366f1;
}

.category-item.active {
    background: #6366f1;
    color: white;
}

/* 搜索筛选区样式 */
.search-filter {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.search-box {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.search-box input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 14px;
}

.search-btn {
    padding: 0 30px;
    background: #6366f1;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.search-btn:hover {
    background: #4f46e5;
}

.filter-options {
    display: flex;
    gap: 15px;
}

.filter-options select {
    padding: 8px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 14px;
    min-width: 120px;
    cursor: pointer;
}

/* 商品列表样式 */
.goods-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.goods-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.goods-card:hover {
    transform: translateY(-5px);
}

.goods-image {
    position: relative;
    width: 100%;
    padding-top: 100%; /* 1:1 宽高比 */
    overflow: hidden;
}

.goods-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.goods-tag {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(99, 102, 241, 0.9);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.goods-info {
    padding: 15px;
}

.goods-title {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 8px;
    color: #333;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.goods-desc {
    color: #666;
    font-size: 14px;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.goods-meta {
    display: flex;
    justify-content: space-between;
    color: #999;
    font-size: 12px;
    margin-bottom: 10px;
}

.goods-price {
    color: #f5222d;
    font-size: 20px;
    font-weight: 500;
}

.goods-price .unit {
    font-size: 14px;
    font-weight: normal;
    margin-left: 4px;
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 30px;
}

.page-item, .page-next {
    min-width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    color: #666;
    text-decoration: none;
    transition: all 0.3s;
}

.page-item:hover, .page-next:hover {
    border-color: #6366f1;
    color: #6366f1;
}

.page-item.active {
    background: #6366f1;
    color: white;
    border-color: #6366f1;
}

/* 响应式适配 */
@media (max-width: 768px) {
    .second-hand-main {
        padding: 70px 15px 15px;
    }

    .category-nav {
        padding: 12px 15px;
        gap: 15px;
    }

    .category-item {
        padding: 4px 12px;
        font-size: 13px;
    }

    .filter-options {
        flex-wrap: wrap;
    }

    .filter-options select {
        flex: 1;
        min-width: calc(50% - 8px);
    }

    .goods-list {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .search-box {
        flex-direction: column;
    }

    .search-btn {
        width: 100%;
        padding: 12px;
    }

    .filter-options select {
        min-width: 100%;
    }

    .goods-title {
        font-size: 14px;
    }

    .goods-desc {
        font-size: 12px;
    }

    .goods-price {
        font-size: 16px;
    }
}
