/**
 * Floating Cart Icon - Unified Styles
 * 悬浮购物车图标统一样式
 */

/* ========== 悬浮购物车图标 ========== */
.shopcarInfo {
    position: fixed;
    bottom: 120px !important;
    right: 20px !important;
    width: 56px !important;
    height: 56px !important;
    background: linear-gradient(135deg, #D4AF37, #B8860B) !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    z-index: 9998 !important;
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.4) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.shopcarInfo:hover {
    background: linear-gradient(135deg, #B8860B, #9A7209) !important;
    transform: translateY(-5px) scale(1.05) !important;
    box-shadow: 0 8px 20px rgba(212, 175, 55, 0.5) !important;
}

.shopcarInfo:active {
    transform: translateY(-3px) scale(1.02) !important;
}

.shopcarInfo .iconfont {
    font-size: 26px !important;
    color: white !important;
    line-height: 1 !important;
}

/* 购物车数量徽章 */
.shopcarInfo .shopCartNum {
    position: absolute !important;
    top: -5px !important;
    right: -5px !important;
    min-width: 20px !important;
    height: 20px !important;
    background: #E32C2B !important;
    color: white !important;
    border-radius: 10px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    padding: 0 6px !important;
    border: 2px solid white !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2) !important;
}

/* 隐藏数量为0的徽章 */
.shopcarInfo .shopCartNum:empty {
    display: none !important;
}

/* 脉冲动画 - 当有新商品加入时 */
@keyframes cartPulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.15);
    }
    100% {
        transform: scale(1);
    }
}

.shopcarInfo.pulse {
    animation: cartPulse 0.5s ease-in-out;
}

/* ========== 响应式设计 ========== */
@media (max-width: 768px) {
    .shopcarInfo {
        bottom: 100px !important;
        right: 15px !important;
        width: 50px !important;
        height: 50px !important;
    }
    
    .shopcarInfo .iconfont {
        font-size: 24px !important;
    }
    
    .shopcarInfo .shopCartNum {
        top: -3px !important;
        right: -3px !important;
        min-width: 18px !important;
        height: 18px !important;
        font-size: 11px !important;
    }
}

@media (max-width: 480px) {
    .shopcarInfo {
        bottom: 80px !important;
        right: 12px !important;
        width: 48px !important;
        height: 48px !important;
    }
    
    .shopcarInfo .iconfont {
        font-size: 22px !important;
    }
}

/* ========== 确保在所有页面都显示 ========== */
body .shopcarInfo {
    display: flex !important;
}
