/* ========================================
   Toast Notifications & Enhancements
   نظام الإشعارات والتحسينات
   ======================================== */

/* Toast Container */
.toast-container-smart {
    position: fixed;
    top: 80px;
    left: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 400px;
}

/* Toast Styles */
.toast-smart {
    display: flex;
    align-items: center;
    gap: 12px;
    background: white;
    padding: 15px 20px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    transform: translateX(-120%);
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border-right: 4px solid;
    min-width: 300px;
}

.toast-smart.show {
    transform: translateX(0);
}

/* Toast Types */
.toast-success {
    border-right-color: #5D4037;
}

.toast-success .toast-icon {
    color: #5D4037;
}

.toast-error {
    border-right-color: #e74c3c;
}

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

.toast-warning {
    border-right-color: #f39c12;
}

.toast-warning .toast-icon {
    color: #f39c12;
}

.toast-info {
    border-right-color: #3498db;
}

.toast-info .toast-icon {
    color: #3498db;
}

/* Toast Elements */
.toast-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.toast-message {
    flex: 1;
    color: #2c3e50;
    font-size: 14px;
    font-weight: 500;
}

.toast-close {
    background: transparent;
    border: none;
    color: #95a5a6;
    font-size: 18px;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.toast-close:hover {
    background: #ecf0f1;
    color: #7f8c8d;
}

/* ========================================
   Live Search Results
   نتائج البحث الفوري
   ======================================== */

.search-form-enhanced {
    position: relative;
}

.search-results-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    margin-top: 10px;
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    text-decoration: none;
    color: #2c3e50;
    transition: background 0.2s;
    border-bottom: 1px solid #f0f0f0;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: #f8f9fa;
}

.search-result-item img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.result-info {
    flex: 1;
}

.result-name {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.result-price {
    font-size: 13px;
    color: #5D4037;
    font-weight: 700;
}

.search-loading,
.no-results {
    padding: 20px;
    text-align: center;
    color: #7f8c8d;
}

.search-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.no-results i {
    font-size: 40px;
    color: #bdc3c7;
    margin-bottom: 10px;
}

/* ========================================
   Cart Animations
   تأثيرات السلة
   ======================================== */

.btn-cart.pulse-animation {
    animation: cartPulse 0.6s ease;
}

@keyframes cartPulse {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.15); }
    50% { transform: scale(0.95); }
    75% { transform: scale(1.05); }
}

.cart-badge.bounce {
    animation: badgeBounce 0.6s ease;
}

@keyframes badgeBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.3); }
}

/* ========================================
   Loading States
   حالات التحميل
   ======================================== */

.loading-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 8px;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 2px;
}

/* ========================================
   Enhanced Buttons
   أزرار محسّنة
   ======================================== */

.btn-add-cart-hybrid:disabled,
.btn-add-to-cart:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ========================================
   Wishlist Heart Animation
   تأثير القلب
   ======================================== */

.wishlist-btn {
    position: relative;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 20px;
    color: #e0e0e0;
    transition: all 0.3s ease;
}

.wishlist-btn:hover {
    color: #e74c3c;
    transform: scale(1.1);
}

.wishlist-btn.active {
    color: #e74c3c;
    animation: heartBeat 0.6s ease;
}

@keyframes heartBeat {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.3); }
    50% { transform: scale(0.9); }
    75% { transform: scale(1.1); }
}

/* ========================================
   Responsive Toast
   ======================================== */

@media (max-width: 768px) {
    .toast-container-smart {
        right: 10px;
        left: 10px;
        top: 60px;
        max-width: none;
    }
    
    .toast-smart {
        min-width: auto;
    }
    
    .search-results-dropdown {
        max-height: 300px;
    }
}

/* ========================================
   Smooth Scroll
   ======================================== */

html {
    scroll-behavior: smooth;
}

/* ========================================
   Focus States
   ======================================== */

button:focus,
a:focus,
input:focus {
    outline: 2px solid #5D4037;
    outline-offset: 2px;
}





