.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tips {
    background: rgba(0, 0, 0, 0.6);
    margin: 20px 0;
    padding: 15px 20px;
    border-radius: 10px;
}

.tips p {
    margin: 5px 0;
    font-size: 12px;
}

.categories h2 {
    text-shadow: 0 0 10px #42a5f5;
    margin-bottom: 15px;
    font-size: 18px;
}

.category-bar {
    display: flex;
    flex-wrap: wrap;
}

.category-card {
    margin-right: 15px;
    margin-bottom: 15px;
    flex: 1;
    min-width: 150px;
    padding: 20px;
    background: linear-gradient(145deg, #1e1e1e, #2e2e2e);
    text-align: center;
    border-radius: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.category-card.active {
    background: linear-gradient(145deg, #42a5f5, #1e88e5);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

.search-bar {
    display: flex;
    margin-bottom: 20px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.search-bar input {
    flex: 1;
    padding: 12px 15px;
    font-size: 14px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    outline: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.search-bar button {
    padding: 12px 25px;
    border: none;
    background: linear-gradient(90deg, #42a5f5, #1e88e5);
    color: white;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.product-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    margin: 20px 0;
    gap: 15px;
}



.product-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 20px;
    height: 160px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    display: flex;
    cursor: pointer;
    margin: 10px;   /* 设置每个商品卡片的间隔 */
}


.imgDiv {
    margin-right: 28px;
}

.product-card img {
    border-radius: 8px;
    margin-bottom: 10px;
    width: 130px;
}



@media screen and (max-width: 768px) {
    .category-card {
        text-align: left;
        padding: 4px;
    }

    .search-bar input {
        width: 100%;
    }
}

@media screen and (max-width: 480px) {
    .product-card {
        width: 78%;
    }
}

@media (max-width: 768px) {
    .nav {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        padding: 10px 0;
    }

    .nav a {
        display: block; /* 使链接在小屏幕上堆叠显示 */
        padding: 10px;
        font-size: 16px;
    }
}
