/* ==========================================
 * 产品收藏与收藏列表样式表 (CSS)
 * ========================================== */

/* 收藏按钮样式 - 回归精致尺寸 */
.product-like-button { 
    margin: 15px 0 !important; 
}

.like-button { 
    display: inline-flex; 
    align-items: center; 
    padding: 8px 15px; 
    border: 1px solid #ddd; 
    border-radius: 4px; 
    text-decoration: none; 
    transition: all 0.3s; 
    color: #333; 
    cursor: pointer; 
    background: #fff; 
    font-size: 14px; 
}

.like-button:hover { 
    background: #f8f8f8; 
    border-color: #bbb; 
}

.like-icon { 
    margin-right: 8px; 
    font-size: 18px; 
    line-height: 1; 
    vertical-align: middle; 
    transition: transform 0.2s; 
}

.liked .like-icon { 
    color: #e2401c; 
}

.not-liked .like-icon { 
    color: #ccc; 
}

.like-button:hover .like-icon { 
    transform: scale(1.1); 
}

/* 收藏列表样式 - 恢复合理比例 */
.woocommerce-favorites { 
    padding: 10px 0; 
    max-width: 1000px; 
    margin: 0 auto; 
}

.woocommerce-favorites h2 { 
    margin-bottom: 25px; 
    border-bottom: 2px solid #f0f0f0; 
    padding-bottom: 12px; 
    font-size: 18px; 
    font-weight: 500; 
}

.favorites-products { 
    display: grid; 
    grid-template-columns: repeat(4, 1fr); 
    gap: 15px; 
}

.favorite-product { 
    background: #fff; 
    border: 1px solid #eee; 
    border-radius: 8px; 
    overflow: hidden; 
    transition: all 0.3s ease; 
}

.favorite-product:hover { 
    box-shadow: 0 4px 12px rgba(0,0,0,0.08); 
    transform: translateY(-2px); 
}

.favorite-product .product-image { 
    position: relative; 
    padding-top: 100%; 
    overflow: hidden; 
    background: #fdfdfd; 
}

.favorite-product .product-image img { 
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    object-fit: contain; 
    padding: 15px; 
    transition: transform 0.3s; 
}

.favorite-product:hover .product-image img { 
    transform: scale(1.05); 
}

.favorite-product .product-info { 
    padding: 12px; 
    text-align: center; 
}

.favorite-product h3 { 
    margin: 0 0 8px; 
    font-size: 13px; 
    line-height: 1.4; 
    height: 36px; 
    overflow: hidden; 
}

.favorite-product h3 a { 
    color: #333; 
    text-decoration: none; 
    display: -webkit-box; 
    -webkit-line-clamp: 2; 
    -webkit-box-orient: vertical; 
    overflow: hidden; 
}

.favorite-product h3 a:hover { 
    color: #e2401c; 
}

.favorite-product .price { 
    color: #e2401c; 
    font-size: 15px; 
    font-weight: 600; 
    margin-bottom: 10px; 
}

.favorite-product .actions { 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    gap: 6px; 
    font-size: 12px; 
    color: #999; 
}

.favorite-product .view-details, 
.favorite-product .remove-favorite { 
    color: #666; 
    text-decoration: none; 
}

.favorite-product .view-details:hover { 
    color: #333; 
}

.favorite-product .remove-favorite:hover { 
    color: #e2401c; 
}

.favorite-product .action-separator { 
    color: #ddd; 
}

/* 响应式适配 */
@media screen and (max-width: 1024px) { 
    .favorites-products { 
        grid-template-columns: repeat(3, 1fr); 
    } 
}

@media screen and (max-width: 768px) { 
    .favorites-products { 
        grid-template-columns: repeat(2, 1fr); 
        gap: 10px; 
    } 
}
