/* 商城页面图标颜色优化样式 */

/* 导入基础变量 */
@import url('../base/variables.css');

/* 导航栏图标优化 */
.navbar .nav-link i {
    color: var(--dark-color);
    transition: all 0.3s ease;
}

.navbar .nav-link:hover i {
    color: var(--primary-color);
    transform: scale(1.1);
}

.navbar .nav-link.active i {
    color: var(--primary-color);
    font-weight: 900;
}

/* 购物车图标优化 */
.cart-icon {
    background: white;
    color: var(--dark-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.cart-icon:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
    border-color: var(--primary-color);
}

.cart-icon i {
    color: inherit;
    font-size: 1.2rem;
}

/* 登录按钮图标优化 */
.auth-button i {
    color: white;
}

/* 用户菜单图标优化 */
.user-menu i {
    color: var(--dark-color);
}

.dropdown-item i {
    color: var(--primary-color);
    width: 20px;
    text-align: center;
}

.dropdown-item:hover i {
    color: var(--primary-light);
}

/* 商品卡片图标优化 */
.favorite-btn {
    background: white;
    color: #ff6b9d; /* 更鲜艳的粉色 */
    box-shadow: 0 4px 12px rgba(255, 107, 157, 0.3); /* 粉色阴影 */
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    width: 42px;
    height: 42px;
    border: 2px solid transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 50%;
    position: relative;
    overflow: hidden;
}

.favorite-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s;
}

.favorite-btn:hover::before {
    left: 100%;
}

.favorite-btn:hover {
    background: #fff0f5;
    color: #ff4757; /* 亮红色 */
    transform: scale(1.18) rotate(5deg);
    box-shadow: 0 6px 16px rgba(255, 71, 87, 0.4); /* 红色阴影 */
}

.favorite-btn.active {
    background: linear-gradient(135deg, #ff4757, #ff6b9d); /* 渐变背景 */
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 6px 20px rgba(255, 71, 87, 0.6), 0 0 0 4px rgba(255, 107, 157, 0.2); /* 增强发光效果 */
    animation: pulse 1.2s infinite ease-in-out; /* 优化脉冲动画 */
    transform: scale(1.1);
}

.favorite-btn.active:hover {
    transform: scale(1.2) rotate(10deg);
    box-shadow: 0 8px 24px rgba(255, 71, 87, 0.7), 0 0 0 4px rgba(255, 107, 157, 0.3);
}

.favorite-btn i {
    color: inherit;
    font-size: 1.3rem; /* 增大图标 */
    transition: all 0.3s ease;
}

.favorite-btn.active i {
    animation: heartBeat 1.5s infinite;
}

/* 收藏按钮脉冲动画 */
@keyframes pulse {
    0% {
        box-shadow: 0 6px 20px rgba(255, 71, 87, 0.6), 0 0 0 0 rgba(255, 107, 157, 0.4);
    }
    70% {
        box-shadow: 0 6px 20px rgba(255, 71, 87, 0.6), 0 0 0 12px rgba(255, 107, 157, 0);
    }
    100% {
        box-shadow: 0 6px 20px rgba(255, 71, 87, 0.6), 0 0 0 0 rgba(255, 107, 157, 0);
    }
}

/* 心跳动画 */
@keyframes heartBeat {
    0% {
        transform: scale(1);
    }
    14% {
        transform: scale(1.2);
    }
    28% {
        transform: scale(1);
    }
    42% {
        transform: scale(1.2);
    }
    70% {
        transform: scale(1);
    }
}

/* 评分图标优化 */
.rating-stars {
    color: #f39c12;
}

.rating-stars i {
    color: inherit;
}

/* 加入购物车按钮图标优化 */
.add-to-cart-btn i {
    color: white;
    margin-right: 0.5rem;
}

/* 筛选按钮图标优化 */
.filter-btn i {
    color: inherit;
    margin-right: 0.5rem;
}

.filter-btn.active {
    background: linear-gradient(135deg, var(--primary-color), #E55A2B);
    color: white;
}

/* 搜索按钮图标优化 */
.search-btn i {
    color: #a0aec0;
}

.search-btn:hover i {
    color: var(--primary-color);
}

/* 页脚图标优化 */
footer i {
    color: var(--primary-color);
}

.footer-social-link i {
    color: inherit;
}

.footer-social-link:hover i {
    color: white;
}

/* 通知图标优化 */
.notification-icon {
    color: var(--primary-color);
}

.notification.success .notification-icon {
    color: #2ecc71;
}

.notification.error .notification-icon {
    color: #e74c3c;
}

/* 微信咨询按钮图标优化 */
#wechatBtn i {
    color: white;
}

/* 通用图标悬停效果 */
i[class*="fa-"] {
    transition: all 0.3s ease;
}

i[class*="fa-"]:hover {
    transform: scale(1.1);
}

/* 确保图标在所有背景上清晰可见 */
.icon-visible {
    color: var(--dark-color) !important;
    text-shadow: 0 0 1px rgba(255, 255, 255, 0.5);
}

.icon-visible:hover {
    color: var(--primary-color) !important;
}

/* 深色背景上的图标 */
.icon-light {
    color: white !important;
    text-shadow: 0 0 1px rgba(0, 0, 0, 0.5);
}

.icon-light:hover {
    color: var(--primary-light) !important;
}

/* 加载动画图标 */
.loading-spinner i {
    color: var(--primary-color);
}