.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.header img {
    height: 40px;
}

.header-buttons {
    display: flex;
    gap: 10px;
}

.header-button {
    padding: 8px 24px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
}

.headerTit header .goLogin>a {
    display: inline-block;
    padding: 0 23px;
    font-size: 14px;
    line-height: 32px;
    text-align: center;
    background-color: #4185f1;
    border-radius: 20px;
}

.login-action-btn,
.register-action-btn {
    background: rgb(0 186 255) !important
}

.product-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    /* 1行4个商品 */
    gap: 20px;
    margin-bottom: 40px;
    padding: 0 20px;
}

.product-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s;
}

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

.card-header {
    display: block;
    position: relative;
    padding-top: 100%;
    /* 1:1 宽高比 */
}

.card-header img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-body {
    padding: 15px;
}

.product-title {
    display: block;
    font-size: 16px;
    color: #333;
    text-decoration: none;
    line-height: 1.4;
    margin-bottom: 12px;
    height: 44.8px;
    /* 固定2行高度: 16px * 1.4 * 2 */
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

a.product-title {
    display: -webkit-box;
}

.product-title:hover {
    color: #0080F1;
}

/* 标签样式 */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    height: 64px;
    /* 固定2行高度：(24px行高 + 8px间距) * 2 */
    overflow: hidden;
}

.tag {
    display: inline-flex;
    align-items: center;
    height: 24px;
    padding: 0 10px;
    font-size: 12px;
    line-height: 24px;
    border-radius: 5px;
    white-space: nowrap;
}

.tag-location {
    background: #f0f9eb;
    color: #67c23a;
}

.tag-age {
    background: #fdf6ec;
    color: #e6a23c;
}

.tag-delivery {
    background: #fef0f0;
    color: #f56c6c;
}

.tag-free {
    background: #f0f2f5;
    color: #909399;
}

.tag-flow {
    background: #ecf5ff;
    color: #409eff;
}

.tag-default {
    background: #f5f7fa;
    color: #666;
}

/* 新闻卡片样式 */
.news-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 40px;
    padding: 0 20px;
}

.news-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.news-card-header {
    display: block;
    position: relative;
    padding-top: 56.25%; /* 16:9 宽高比 */
    overflow: hidden;
}

.news-card-header img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.news-card:hover .news-card-header img {
    transform: scale(1.05);
}

.news-card-body {
    padding: 15px;
}

.news-title {
    display: block;
    font-size: 16px;
    color: #333;
    font-weight: 500;
    line-height: 1.5;
    margin-bottom: 10px;
    height: 48px; /* 固定2行高度 */
    overflow: hidden;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.news-title:hover {
    color: #0080F1;
}

.news-summary {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* 响应式布局 */
@media screen and (max-width: 1200px) {
    .product-list,
    .news-list {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media screen and (max-width: 768px) {
    .product-list,
    .news-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 480px) {
    .product-list,
    .news-list {
        grid-template-columns: repeat(1, 1fr);
    }
}