#swc-floating-chat {
    position: fixed !important;
    bottom: 25px !important;
    left: 25px !important;
    z-index: 9999999 !important;
    font-family: 'Tahoma', 'Iran Sans', sans-serif !important;
    direction: rtl !important;
}

#swc-chat-toggle {
    position: relative !important;
    width: 65px !important;
    height: 65px !important;
    border-radius: 50% !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    border: none !important;
    cursor: pointer !important;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    padding: 0 !important;
    outline: none !important;
}

#swc-chat-toggle:hover { transform: scale(1.1) !important; box-shadow: 0 12px 35px rgba(102, 126, 234, 0.6) !important; }
#swc-chat-toggle:active { transform: scale(0.95) !important; }
#swc-chat-toggle svg { width: 28px !important; height: 28px !important; }

#swc-chat-toggle::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important; left: 0 !important;
    width: 100% !important; height: 100% !important;
    border-radius: 50% !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    animation: swc-pulse 2s ease-out infinite !important;
    z-index: -1 !important;
}

@keyframes swc-pulse {
    0% { transform: scale(1); opacity: 0.7; }
    100% { transform: scale(1.5); opacity: 0; }
}

.swc-badge {
    position: absolute !important;
    top: -5px !important; right: -5px !important;
    background: #ef4444 !important;
    color: white !important;
    width: 22px !important; height: 22px !important;
    border-radius: 50% !important;
    font-size: 12px !important;
    font-weight: bold !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: 2px solid white !important;
    animation: swc-bounce 1s ease-in-out !important;
}

@keyframes swc-bounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

#swc-chat-window {
    position: absolute !important;
    bottom: 85px !important;
    left: 0 !important;
    width: 400px !important;
    height: 600px !important;
    max-width: calc(100vw - 40px) !important;
    max-height: calc(100vh - 120px) !important;
    background: white !important;
    border-radius: 20px !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3) !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    border: 1px solid #e5e7eb !important;
    animation: swc-slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

@keyframes swc-slideUp {
    from { opacity: 0; transform: translateY(20px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.swc-hidden { display: none !important; }

#swc-chat-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    padding: 20px !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
}

.swc-header-content { display: flex !important; align-items: center !important; gap: 12px !important; }

.swc-avatar {
    width: 45px !important; height: 45px !important;
    background: rgba(255, 255, 255, 0.2) !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 24px !important;
}

.swc-header-info { display: flex !important; flex-direction: column !important; }
.swc-header-title { font-weight: bold !important; font-size: 16px !important; }
.swc-header-status { font-size: 12px !important; opacity: 0.9 !important; margin-top: 2px !important; }

#swc-close-chat {
    background: rgba(255, 255, 255, 0.2) !important;
    border: none !important;
    color: white !important;
    width: 35px !important; height: 35px !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.3s !important;
}

#swc-close-chat:hover { background: rgba(255, 255, 255, 0.3) !important; transform: rotate(90deg) !important; }

#swc-chat-messages {
    flex: 1 !important;
    padding: 20px !important;
    overflow-y: auto !important;
    background: #f9fafb !important;
}

#swc-chat-messages::-webkit-scrollbar { width: 6px !important; }
#swc-chat-messages::-webkit-scrollbar-track { background: #f1f1f1 !important; }
#swc-chat-messages::-webkit-scrollbar-thumb { background: #888 !important; border-radius: 3px !important; }

.swc-msg {
    display: flex !important;
    gap: 10px !important;
    margin-bottom: 16px !important;
    animation: swc-fadeIn 0.3s ease-out !important;
}

@keyframes swc-fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.swc-msg-avatar {
    width: 36px !important; height: 36px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 18px !important;
    flex-shrink: 0 !important;
}

.swc-msg-bot .swc-msg-avatar { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important; }
.swc-msg-user .swc-msg-avatar { background: #10b981 !important; }

.swc-msg-content {
    max-width: 85% !important;
    padding: 12px 16px !important;
    border-radius: 16px !important;
    line-height: 1.7 !important;
    font-size: 14px !important;
    word-wrap: break-word !important;
}

.swc-msg-user { flex-direction: row-reverse !important; }

.swc-msg-user .swc-msg-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    border-bottom-right-radius: 4px !important;
}

.swc-msg-bot .swc-msg-content {
    background: white !important;
    color: #374151 !important;
    border-bottom-left-radius: 4px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
    max-width: 100% !important;
}

.swc-msg-content strong { color: #667eea !important; font-weight: bold !important; }
.swc-msg-user .swc-msg-content strong { color: white !important; }

/* ================================
   🎨 کارت‌های محصول (جدید)
   ================================ */

.swc-products-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
    margin-top: 12px !important;
    padding-top: 12px !important;
    border-top: 1px dashed #e5e7eb !important;
}

.swc-product-card {
    display: flex !important;
    flex-direction: column !important;
    background: #f9fafb !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    text-decoration: none !important;
    color: inherit !important;
    transition: all 0.3s !important;
    cursor: pointer !important;
}

.swc-product-card:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 6px 15px rgba(102, 126, 234, 0.2) !important;
    border-color: #667eea !important;
}

.swc-product-img {
    width: 100% !important;
    height: 100px !important;
    object-fit: cover !important;
    background: white !important;
}

.swc-no-img {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 40px !important;
    background: #f3f4f6 !important;
}

.swc-product-info {
    padding: 10px !important;
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
}

.swc-product-name {
    font-size: 12px !important;
    font-weight: 600 !important;
    color: #374151 !important;
    line-height: 1.3 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    min-height: 32px !important;
}

.swc-product-price {
    font-size: 13px !important;
    font-weight: bold !important;
    color: #667eea !important;
    margin-top: auto !important;
}

.swc-product-stock {
    font-size: 11px !important;
    font-weight: 500 !important;
}

.swc-product-stock.in-stock { color: #10b981 !important; }
.swc-product-stock.out-stock { color: #ef4444 !important; }

/* ================================ */

.swc-suggestions {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    margin-top: 12px !important;
    padding-top: 12px !important;
    border-top: 1px solid #e5e7eb !important;
}

.swc-suggestion-btn {
    background: #f3f4f6 !important;
    border: 1px solid #d1d5db !important;
    color: #374151 !important;
    padding: 8px 14px !important;
    border-radius: 20px !important;
    font-size: 12px !important;
    cursor: pointer !important;
    transition: all 0.3s !important;
    font-family: inherit !important;
}

.swc-suggestion-btn:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    border-color: transparent !important;
    transform: translateY(-2px) !important;
}

#swc-chat-input-area {
    display: flex !important;
    padding: 16px !important;
    border-top: 1px solid #e5e7eb !important;
    background: white !important;
    gap: 10px !important;
    align-items: center !important;
}

#swc-chat-input {
    flex: 1 !important;
    padding: 12px 16px !important;
    border: 2px solid #e5e7eb !important;
    border-radius: 24px !important;
    font-size: 14px !important;
    outline: none !important;
    transition: all 0.3s !important;
    font-family: inherit !important;
}

#swc-chat-input:focus {
    border-color: #667eea !important;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1) !important;
}

#swc-send-btn {
    width: 45px !important; height: 45px !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    border: none !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.3s !important;
    flex-shrink: 0 !important;
}

#swc-send-btn:hover { transform: scale(1.1) !important; box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4) !important; }
#swc-send-btn svg { width: 20px !important; height: 20px !important; }

@media (max-width: 480px) {
    #swc-floating-chat { bottom: 15px !important; left: 15px !important; }
    #swc-chat-toggle { width: 60px !important; height: 60px !important; }
    #swc-chat-window { width: calc(100vw - 30px) !important; height: calc(100vh - 100px) !important; bottom: 80px !important; }
    #swc-chat-header { padding: 15px !important; }
    .swc-avatar { width: 40px !important; height: 40px !important; }
    .swc-products-grid { grid-template-columns: 1fr !important; }
}

.swc-typing {
    display: flex !important;
    gap: 4px !important;
    padding: 8px 0 !important;
}

.swc-typing-dot {
    width: 8px !important; height: 8px !important;
    background: #9ca3af !important;
    border-radius: 50% !important;
    animation: swc-typing 1.4s infinite !important;
}

.swc-typing-dot:nth-child(2) { animation-delay: 0.2s !important; }
.swc-typing-dot:nth-child(3) { animation-delay: 0.4s !important; }

@keyframes swc-typing {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-10px); }
}