/* 收藏页面样式 - 与商品列表页保持一致 */
.wishlist-page {
    max-width: 1440px;
    margin: 0 auto;
    padding: 80px 0;
    background: #F4F1EB;
}

.container-max-width {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* 收藏商品部分 */
.wishlist-section {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 20px;
}

.wishlist-container {
    max-width: 1440px;
    margin: 0 auto;
}

/* 产品网格布局 - 每行3个产品 */
.goods-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px 30px;
    justify-content: space-between;
}

.goods-item {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s ease;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    position: relative;
}

.goods-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

/* 产品图片区域 - 高度调整为400px */
.goods-image-container {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
}

.goods-image-link {
    display: block;
    width: 100%;
    height: 100%;
}

.goods-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 15px 15px 0 0;
    transition: transform 0.6s ease;
}

.goods-item:hover .goods-image {
    transform: scale(1.05);
}

/* 收藏图标 */
.favorite-icon {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    z-index: 10;
}

.favorite-icon:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
}

.favorite-icon i {
    color: #ff4757;
    font-size: 18px;
    transition: color 0.3s ease;
}

.favorite-icon:hover i {
    color: #ff3742;
}

/* 产品信息 */
.goods-info {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.goods-name {
    margin: 0;
    min-height: 50px;
}

.goods-name a {
    color: #343434;
    text-decoration: none;
    font-size: 18px;
    font-weight: 500;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s ease;
}

.goods-name a:hover {
    color: #4B4945;
}

.goods-price {
    font-size: 22px;
    font-weight: 700;
    color: #343434;
    margin: 5px 0;
}

/* 加入购物车按钮 - 悬停背景改为红色 #E11111 */
.add-to-cart-btn {
    background: #fff;
    color: #343434;
    border: 5px solid #D7D2C9;
    border-radius: 50px;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: auto;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.add-to-cart-btn:hover {
    background: #E11111;
    color: #fff;
    border-color: #E11111;
    transform: translateY(-2px);
}

.add-to-cart-btn:disabled {
    background: #bdc3c7;
    border-color: #bdc3c7;
    cursor: not-allowed;
    transform: none;
}

/* 空状态 */
.empty-wishlist {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
}

.empty-state {
    color: #9A958D;
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 20px;
    color: #D7D2C9;
}

.empty-state h3 {
    font-size: 24px;
    margin-bottom: 10px;
    color: #343434;
}

.empty-state p {
    font-size: 16px;
    margin-bottom: 20px;
}

.btn-primary {
    display: inline-block;
    background: #fff;
    color: #343434;
    border: 5px solid #D7D2C9;
    border-radius: 50px;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none;
}

.btn-primary:hover {
    background: #E11111;
    color: #fff;
    border-color: #E11111;
    transform: translateY(-2px);
    text-decoration: none;
}

/* 加载状态 */
.loading-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

.loading-state p {
    color: #9A958D;
    font-size: 16px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 错误状态 */
.error-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
}

.error-state i {
    font-size: 48px;
    margin-bottom: 20px;
    color: #e74c3c;
}

.error-state p {
    color: #666;
    margin-bottom: 20px;
    font-size: 16px;
}

.error-state .btn-primary {
    margin-top: 10px;
}

/* 商品项移除动画 */
.goods-item {
    transition: all 0.3s ease;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .wishlist-page {
        padding: 60px 0;
    }
    
    .goods-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
}

@media (max-width: 992px) {
    .goods-image-container {
        height: 350px;
    }
}

@media (max-width: 768px) {
    .wishlist-page {
        padding: 40px 0;
    }
    
    .container-max-width,
    .wishlist-section {
        padding: 0 15px;
    }
    
    .goods-grid {
        grid-template-columns: 1fr;
        gap: 25px;
        max-width: 500px;
        margin: 0 auto;
    }
    
    .goods-image-container {
        height: 400px;
    }
    
    .goods-info {
        padding: 20px;
    }
}

@media (max-width: 576px) {
    .goods-image-container {
        height: 300px;
    }
    
    .goods-price {
        font-size: 20px;
    }
    
    .add-to-cart-btn {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .btn-primary {
        padding: 10px 20px;
        font-size: 14px;
    }
}

/* 大屏幕适配 */
@media (min-width: 1440px) {
    .container-max-width,
    .wishlist-section {
        /* padding: 0 40px; */
    }
}