/* IGET Legend 产品页面样式 */

/* 页面基本布局 */
body {
    font-family: Arial, sans-serif;
    background-color: #d2aceb; /* 匹配主页背景颜色 */
    color: #333;
    line-height: 1.6;
}

.back-to-home {
    padding: 20px;
    text-align: left;
}

.back-to-home a {
    color: #333;
    text-decoration: none;
    font-size: 16px;
}

.page-header {
    text-align: center;
    padding: 20px 0;
}

.page-header h1 {
    margin-bottom: 10px;
}

.page-subtitle {
    color: #666;
}

/* 产品网格 */
.products-container {
    padding: 10px; /* 减小内边距，让整体更宽 */
}

.products-grid {
    display: grid; /* 匹配主页样式 */
    grid-template-columns: repeat(2, 1fr); /* 匹配主页样式 */
    gap: 10px; /* 减小卡片间距，让卡片更宽 */
    justify-content: center;
}

.product-grid-item {
    background-color: #dde1e6;
    border-radius: 15px; /* 匹配主页样式 */
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1); /* 匹配主页样式 */
    transition: all 0.3s ease; /* 匹配主页样式 */
    /* width 属性由 grid 控制，不再需要 */
    display: flex;
    flex-direction: column;
}

.product-grid-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15); /* 匹配主页样式 */
}

.product-element-top {
    position: relative;
    overflow: hidden;
    height: 140px; /* 匹配主页样式 */
}

.product-image-link img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 裁剪并填充容器 */
    display: block;
    transition: transform 0.3s ease; /* 匹配主页样式 */
}

.product-grid-item:hover .product-image-link img {
    transform: scale(1.1); /* 匹配主页样式 */
}

.product-labels {
    position: absolute;
    top: 10px;
    left: 10px;
}

.onsale {
    background-color: #ff4d4d;
    color: #fff;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 14px;
}

.hover-img {
    display: none; /* 根据需要可以实现悬停效果 */
}

.wd-buttons {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 5px;
}

.wd-action-btn a {
    background-color: rgba(255, 255, 255, 0.8);
    padding: 8px;
    border-radius: 50%;
    display: block;
    line-height: 1;
}

.product-element-bottom {
    padding: 15px;
    text-align: center; /* 匹配主页样式 */
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* 均匀分布内容 */
}

.wd-entities-title {
    min-height: 42px; /* 为标题设置固定高度，确保对齐 */
    display: flex;
    align-items: center;
    justify-content: center;
}

.wd-entities-title a {
    color: #2c3e50; /* 匹配主页样式 */
    text-decoration: none;
    font-size: 14px; /* 缩小字体以显示全名 */
    font-weight: 600; /* 匹配主页样式 */
    line-height: 1.3; /* 调整行高 */
}

.wd-product-stock, .price {
    font-size: 13px; /* 匹配主页样式 */
    color: #666; /* 匹配主页样式 */
    margin: 8px 0 0 0; /* 调整间距 */
    line-height: 1.4; /* 匹配主页样式 */
    font-weight: normal; /* 移除加粗 */
}

.price del {
    color: #999;
    margin-right: 10px;
}

.wd-add-btn {
    margin-top: auto;
}

.button.add-to-cart-loop {
    background-color: #28a745;
    color: #fff;
    padding: 10px 15px;
    text-decoration: none;
    border-radius: 5px;
    display: inline-block;
    transition: background-color 0.2s;
}

.button.add-to-cart-loop:hover {
    background-color: #218838;
}

/* 响应式设计: 移除所有媒体查询，确保全端两列 */
