.toast-cart {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(135deg, #198754, #0f5132);
    color: #fff;
    padding: 15px 22px;
    border-radius: 12px;
    font-weight: bold;
    opacity: 0;
    transform: translateY(20px);
    transition: 0.3s;
    z-index: 9999;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.toast-cart.show {
    opacity: 1;
    transform: translateY(0);
}
/* استایل‌های سبد خرید */
.btn-add-to-cart {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-add-to-cart.added-to-cart {
    background-color: #10b981 !important;
    color: white !important;
    animation: pulse 0.5s ease;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(0.95); }
    100% { transform: scale(1); }
}

/* بج سبد خرید */
.cart-count-badge {
    transition: all 0.3s ease;
    min-width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.cart-count-badge:empty {
    display: none !important;
}

/* انیمیشن برای بج */
@keyframes bounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.cart-count-badge.updating {
    animation: bounce 0.3s ease;
}

/* حالت hover برای لینک سبد */
.cart-trigger:hover {
    background-color: #f8f9fa !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1) !important;
}

/* استایل برای دکمه‌های غیرفعال */
.btn-add-to-cart:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* اسپینر */
.fa-spinner {
    margin-right: 8px;
}
/* استایل بج شمارش سبد */
.cart-count-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    border-radius: 50%;
    min-width: 22px;
    height: 22px;
    font-size: 12px;
    font-weight: bold;
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    box-shadow: 0 4px 6px rgba(239, 68, 68, 0.3);
    border: 2px solid white;
    animation: heartbeat 2s infinite;
    z-index: 10;
}

/* انیمیشن ضربان قلب */
@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.1); }
    50% { transform: scale(1); }
    75% { transform: scale(1.1); }
}

/* حالت خالی */
.cart-count-badge:empty,
.cart-count-badge[data-count="0"] {
    display: none !important;
}

/* موقعیت نسبی برای والد */
.cart-toolbar {
    position: relative !important;
}

/* نمایش در موبایل */
@media (max-width: 768px) {
    .cart-count-badge {
        min-width: 20px;
        height: 20px;
        font-size: 11px;
        top: -6px;
        right: -6px;
    }
}
.cart-count-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ef4444;
    color: white;
    border-radius: 50%;
    min-width: 22px;
    height: 22px;
    font-size: 12px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
}

.cart-toolbar {
    position: relative;
}
/* فقط استایل بج - بدون تغییر در دکمه‌ها */
.cart-count-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ef4444;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 11px;
    font-weight: bold;
    display: flex !important;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

#desktopCartCount {
    top: -8px;
    right: -8px;
    background: #ef4444;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 11px;
    font-weight: bold;
    display: flex !important;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* موبایل */
@media (max-width: 768px) {
    .cart-count-badge {
        width: 18px;
        height: 18px;
        font-size: 10px;
        top: -6px;
        right: -6px;
    }
    
    #desktopCartCount {
        display: none !important;
    }
}

/* دسکتاپ */
@media (min-width: 769px) {
    .cart-count-badge {
        display: none !important;
    }
    
    #desktopCartCount {
        display: none !important;
    }
}

/* انیمیشن ساده برای تغییر تعداد */
@keyframes pop {
    0% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.3); }
    100% { transform: translate(-50%, -50%) scale(1); }
}

.cart-updated {
    animation: pop 0.3s ease;
}