/* 产品卡片 - 优化版 */
.product-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
    width: 100%; /* ✅ 充满网格项 */
    display: flex;
    flex-direction: column;
    border: 1px solid #f0f0f0;
    position: relative;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(24, 144, 255, 0.15);
    border-color: #1890ff;
}

/* 品牌标签 */
.product-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #1890ff, #52c41a);
    z-index: 2;
}

/* 图片区域 */
.product-card__image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 3 / 1;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.product-card__image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.product-card:hover .product-card__image img {
    transform: scale(1.08);
}

/* 内容区域 */
.product-card__content {
    padding: 5px 10px 10px 10px; /* 上边距从10px改为6px */
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

/* 品牌和产品名一行布局 */
.product-card__header {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 0;
}

.product-card__brand {
    flex-shrink: 0;
    color: #666;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: #f0f7ff;
    color: #1890ff;
    padding: 4px 8px;
    border-radius: 4px;
    line-height: 1.2;
    margin-top: 2px; /* 与标题对齐 */
}

.product-card__title {
    margin: 0;
    font-size: 1.125rem;
    line-height: 1.4;
    font-weight: 600;
    color: #1a1a1a;
    flex: 1; /* 标题占据剩余空间 */
    min-width: 0; /* 重要：允许文本截断 */
}

.product-card__title a {
    color: inherit;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* 最多显示2行 */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card__title a:hover {
    color: #1890ff;
}

/* 价格和评分 */
.product-card__pricing {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0;
    border-bottom: 1px solid #f0f0f0;
}

.product-card__price {
    font-size: 1.25rem;
    font-weight: 700;
    color: #ff4d4f;
    background: linear-gradient(135deg, #ff4d4f, #ff7a45);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.product-card__rating {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.875rem;
    color: #fa8c16;
    background: #fff7e6;
    padding: 4px 8px;
    border-radius: 20px;
    border: 1px solid #ffd591;
}

/* 统计数据 */
.product-card__stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 8px 0;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.stat-item:hover {
    background: #e9ecef;
    transform: translateY(-1px);
}

.stat-label {
    font-size: 0.7rem;
    color: #666;
    margin-bottom: 4px;
}

.stat-value {
    font-size: 0.875rem;
    font-weight: 600;
    color: #333;
}

.product-card__actions {
    margin-top: auto;
    width: 100%;
    display: flex;
    gap: 10px; /* 新增：按钮间距 */
}

.product-card__view-details,
.product-card__purchase-btn {
    flex: 1; /* 各占一半宽度 */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.product-card__view-details {
    background: linear-gradient(135deg, #1890ff, #096dd9);
}

.product-card__purchase-btn {
    background: linear-gradient(135deg, #ff6b6b, #ff5252);
}

.product-card__view-details::before,
.product-card__purchase-btn::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.product-card__view-details:hover,
.product-card__purchase-btn:hover {
    transform: translateY(-2px);
}

.product-card__view-details:hover {
    box-shadow: 0 4px 12px rgba(24, 144, 255, 0.3);
}

.product-card__purchase-btn:hover {
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
}

.product-card__view-details:hover::before,
.product-card__purchase-btn:hover::before {
    left: 100%;
}