
    a {
        text-decoration: none;
        color: #000; /* 可选：设置颜色 */
    }
    body {
        font-family: Arial, sans-serif;
        margin: 0;
        padding: 0;
        background-color: #f8f8f8;
    }
    .container {
        max-width: 1200px;
        margin: auto;
        padding: 20px;
    }
    .products {
        display: flex;
        flex-wrap: wrap;
        gap: 15px; /* 增加间距控制 */
        justify-content: flex-start; /* 确保项目从起始位置排列 */
    }
    .product {
        background: #fff;
        border-radius: 12px;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
        text-align: center;
        overflow: hidden;
        transition: transform 0.3s ease, box-shadow 0.3s ease;
        cursor: pointer;
        padding: 10px; /* 减少内边距 */
        flex: 0 0 calc(12.5% - 15px); /* 电脑端8列，禁止拉伸 */
        box-sizing: border-box; /* 确保padding不影响宽度 */
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .product:hover {
        transform: translateY(-5px);
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    }
    .product img {
        width: 100%;
        height: auto;
        margin: 0 auto 5px; /* 减少图片与标题的上下间距 */
        display: block;
        border-radius: 8px; /* 图片圆角 */
    }
    .product-title {
        font-size: 1em; /* 稍微减小字体大小 */
        margin: 5px 0; /* 减少标题的上下间距 */
        color: #333;
        font-weight: 600;
        text-align: center;
        line-height: 1.2; /* 调整行高，避免文字过于紧凑 */
    }
    @media (max-width: 768px) {
        .product {
            flex: 0 0 calc(33.33% - 15px); /* 移动端4列，禁止拉伸 */
            padding: 8px; /* 移动端内边距更小 */
        }
        .product img {
            margin: 0 auto 5px; /* 移动端图片与标题间距更小 */
        }
        .product-title {
            font-size: 0.9em; /* 移动端字体更小 */
        }
    }
