/* نظام المساعد الذكي - مجموعة الوكالة التجارية (Lean Single-Line CSS) */
:root { --aw-chat-primary: #e10606; --aw-chat-primary-dark: #9e0404; --aw-chat-primary-gradient: linear-gradient(135deg, #7f1319 0%, #b81723 50%, #e10606 100%); --aw-chat-bg-dark: #0f1626; --aw-chat-bg-surface: #141c2e; --aw-chat-border: rgba(255, 255, 255, 0.12); --aw-chat-text: #f1f5f9; --aw-chat-text-muted: #94a3b8; --aw-chat-font: "Cairo", system-ui, -apple-system, sans-serif; }

/* 1. الحاوية العائمة ووحدة الروبوت (الموقع العائم الرئيسي موحد ومركزي في components.css) */
.aw-bot-wrapper { font-family: var(--aw-chat-font); }
.aw-bot-wrapper > * { pointer-events: auto; }
.aw-bot-unit { position: relative; display: inline-flex; align-items: flex-end; gap: 8px; direction: rtl; pointer-events: none; }
.aw-bot-unit > * { pointer-events: auto; }
.aw-bot-btn { position: relative; width: 78px; height: 98px; background: transparent; border: none; padding: 0; cursor: pointer; display: flex; align-items: center; justify-content: center; outline: none; transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.3s ease; will-change: transform; }
.aw-bot-btn:hover { transform: scale(1.1) translateY(-4px); }
.aw-bot-btn:active { transform: scale(0.96) translateY(0); }
.aw-bot-avatar { position: relative; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.35)) drop-shadow(0 2px 6px rgba(225, 6, 19, 0.28)); animation: none !important; transform: none !important; transform-origin: center bottom; pointer-events: none; transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1); }
.aw-bot-glow { position: absolute; left: 50%; bottom: 8px; width: 54px; height: 18px; background: radial-gradient(ellipse at center, rgba(225, 6, 19, 0.45) 0%, rgba(225, 6, 19, 0) 75%); transform: translateX(-50%); border-radius: 50%; filter: blur(4px); pointer-events: none; animation: none !important; opacity: 0.7; }
.aw-bot-status-dot { position: absolute; top: 4px; left: 6px; width: 13px; height: 13px; border-radius: 50%; background: #10b981; border: 2px solid #ffffff; box-shadow: 0 0 10px rgba(160, 185, 129, 0.85); pointer-events: none; }
.aw-bot-status-dot::after { content: ""; position: absolute; inset: -3px; border-radius: 50%; background: rgba(16, 185, 129, 0.5); animation: awDotPing 2s cubic-bezier(0, 0, 0.2, 1) infinite; }
body.aw-chat-open .aw-bot-wrapper { opacity: 0; pointer-events: none; transition: opacity 0.2s ease; }

/* 2. نمط الدراجة النارية بالصفحة التعريفية (variant="moto") */
.aw-bot-wrapper[data-variant="moto"] { z-index: 920; }
.aw-bot-wrapper[data-variant="moto"] .aw-bot-btn { width: 96px; height: 118px; filter: drop-shadow(0 14px 14px rgba(0, 0, 0, 0.35)); animation: none !important; transform: none !important; }
.aw-bot-wrapper[data-variant="moto"] .moto-unit { animation: none !important; translate: none !important; }
.aw-bot-wrapper[data-variant="moto"].open .moto-unit, .aw-bot-wrapper[data-variant="moto"].still .moto-unit { animation: none !important; translate: none !important; }
.aw-bot-wrapper[data-variant="moto"] .aw-bot-avatar { width: 100%; height: 100%; object-fit: contain; transform-origin: 50% 90%; animation: none !important; transform: none !important; filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.45)); }
.aw-bot-wrapper[data-variant="moto"] .aw-bot-glow { position: absolute; left: 50%; bottom: 6px; width: 70px; height: 18px; margin-left: -35px; border-radius: 50%; background: radial-gradient(ellipse, rgba(209, 32, 46, 0.45), transparent 70%); animation: none !important; }
.aw-bot-wrapper[data-variant="moto"] .aw-bot-status-dot { top: 8px; right: 10px; width: 15px; height: 15px; border-radius: 50%; background: #2ecc71; border: 2px solid #fff; animation: awDotP 2s infinite !important; }

/* كينماتكس حركة الدراجة النارية وتمايلها */
@keyframes awBotRide { 0% { translate: calc(100vw - 100% - 30px) 0; } 26%, 100% { translate: 0 0; } }
@keyframes awBotWave { 0%, 60%, 100% { transform: rotate(0); } 66% { transform: rotate(-5deg); } 72% { transform: rotate(4deg); } 78% { transform: rotate(-4deg); } 84% { transform: rotate(2deg); } }
@keyframes awBotBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes awBotSh { 0%, 100% { transform: scale(1); opacity: 0.8; } 50% { transform: scale(0.78); opacity: 0.5; } }
@keyframes awDotP { 0% { box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.6); } 50% { box-shadow: 0 0 0 6px rgba(46, 204, 113, 0); } 100% { box-shadow: 0 0 0 0 rgba(46, 204, 113, 0); } }
@keyframes awBotFloating { 0%, 100% { transform: translateY(0px) rotate(0deg); } 50% { transform: translateY(-8px) rotate(-1.5deg); } }
@keyframes awGlowPulse { 0%, 100% { opacity: 0.45; transform: translateX(-50%) scale(0.9); } 50% { opacity: 0.9; transform: translateX(-50%) scale(1.15); } }
@keyframes awDotPing { 0% { transform: scale(0.9); opacity: 0.9; } 75%, 100% { transform: scale(2.2); opacity: 0; } }

/* دخان وعوادم الدراجة النارية الفضي الأصلي */
.dust { position: fixed; z-index: 89; width: 30px; height: 30px; margin: -15px 0 0 -15px; border-radius: 50%; background: radial-gradient(circle, rgba(238, 241, 245, 0.95) 0%, rgba(196, 202, 212, 0.65) 45%, rgba(196, 202, 212, 0) 72%); filter: blur(1.5px); box-shadow: 0 0 10px rgba(160, 168, 180, 0.3); pointer-events: none; animation: awDustAnim 1.8s ease-out forwards; }
@keyframes awDustAnim { 0% { opacity: 0.95; transform: translate(0, 0) scale(0.5); } 60% { opacity: 0.6; } 100% { opacity: 0; transform: translate(var(--dx, 40px), var(--dy, -26px)) scale(3.6); } }

/* 3. الفقاعة التنبيهية المنبثقة الملازمة للروبوت كإيضاح تفاعلي (Interactive Tooltip Hint) */
.aw-bot-pop { position: relative; margin-bottom: 26px; background: #ffffff; color: #0f172a; border-radius: 16px; padding: 10px 36px 10px 16px; width: max-content; max-width: min(290px, calc(100vw - 120px)); box-shadow: 0 14px 34px rgba(0, 0, 0, 0.22), 0 3px 10px rgba(0, 0, 0, 0.06); border: 1px solid rgba(226, 232, 240, 0.95); line-height: 1.5; cursor: pointer; transform-origin: bottom left; user-select: none; transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease; z-index: 2; pointer-events: auto; }
.aw-bot-pop.show { opacity: 1; transform: scale(1) translateY(0); }
.aw-bot-pop:not(.show) { opacity: 0; transform: scale(0.92) translateY(6px); pointer-events: none; }
.aw-bot-pop:hover { transform: translateY(-2px); box-shadow: 0 20px 42px rgba(0, 0, 0, 0.3); }
.aw-bot-pop::after { content: ""; position: absolute; left: -7px; bottom: 18px; width: 14px; height: 14px; background: #ffffff; transform: rotate(45deg); border-radius: 2px; border-left: 1px solid rgba(226, 232, 240, 0.9); border-bottom: 1px solid rgba(226, 232, 240, 0.9); }
.aw-bot-unit.pop-left, .aw-bot-wrapper[data-pop-side="left"] .aw-bot-unit { flex-direction: row-reverse; }
.aw-bot-unit.pop-left .aw-bot-pop::after, .aw-bot-wrapper[data-pop-side="left"] .aw-bot-pop::after { left: auto; right: -7px; border-left: none; border-bottom: none; border-right: 1px solid rgba(226, 232, 240, 0.9); border-top: 1px solid rgba(226, 232, 240, 0.9); }
.aw-bot-pop[hidden] { display: none !important; }
.aw-bot-pop .aw-bulb { position: absolute; top: 11px; right: 10px; font-size: 18px; }
.aw-bot-pop b { display: block; font-size: 13.5px; font-weight: 700; color: #0f172a; padding-right: 4px; }
.aw-bot-pop small { display: block; font-size: 11.5px; color: #64748b; margin-top: 2px; direction: ltr; text-align: left; font-weight: 500; }

/* استجابة الفقاعة على الشاشات الضيقة */
@media (max-width: 480px) {
  .aw-bot-unit { flex-direction: column-reverse; align-items: flex-start; gap: 4px; }
  .aw-bot-pop { margin-bottom: 6px; max-width: calc(100vw - 32px); }
  .aw-bot-pop::after { left: 24px; bottom: -7px; border-left: none; border-top: none; border-right: 1px solid rgba(226, 232, 240, 0.9); border-bottom: 1px solid rgba(226, 232, 240, 0.9); }
}

/* 4. نافذة المحادثة المتقدمة (Chat Drawer Modal) */
.aw-chat-window { position: fixed; left: 20px; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); z-index: 9999; width: 580px; max-width: min(660px, calc(100vw - 24px)); height: min(780px, calc(100vh - 32px - env(safe-area-inset-bottom, 0px))); background: var(--aw-chat-bg-dark); color: var(--aw-chat-text); border: 1.5px solid rgba(255, 255, 255, 0.14); border-radius: 22px; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.08); transform-origin: left bottom; transform: scale(0.92) translateY(24px); opacity: 0; visibility: hidden; pointer-events: none; font-family: var(--aw-chat-font); direction: rtl; transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease, visibility 0s 0.35s; }
.aw-chat-window.open { transform: none; opacity: 1; visibility: visible; pointer-events: auto; transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease, visibility 0s; }

/* 5. ترويسة المحادثة الرسمية الموحدة */
.aw-chat-h { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 6px 8px; background: linear-gradient(135deg, #781016 0%, #b31622 52%, #cf0606 100%); color: #ffffff; box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3); flex-shrink: 0; border-bottom: 1px solid rgba(255, 255, 255, 0.12); }
.aw-chat-h-avatar-box { position: relative; width: 42px; height: 42px; border-radius: 50%; background: rgba(0, 0, 0, 0.25); border: 1.5px solid rgba(255, 255, 255, 0.35); display: flex; align-items: center; justify-content: center; flex-shrink: 0; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25); }
.aw-chat-h-avatar { width: 34px; height: 40px; object-fit: contain; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4)); animation: none !important; }
.aw-chat-h-dot { position: absolute; bottom: -1px; right: -1px; width: 11px; height: 11px; border-radius: 50%; background: #10b981; border: 2px solid #781016; box-shadow: 0 0 6px #10b981; }
.aw-chat-h-info { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; margin-inline: 4px; }
.aw-chat-h-info b { display: flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 800; color: #ffffff; line-height: 1.2; }
.aw-chat-wa-tag { font-size: 10px; font-weight: 800; background: rgba(255, 255, 255, 0.22); border: 1px solid rgba(255, 255, 255, 0.4); padding: 1px 5px; border-radius: 4px; letter-spacing: 0.5px; }
.aw-chat-h-info small { display: flex; align-items: center; gap: 5px; font-size: 11.5px; color: rgba(255, 255, 255, 0.88); margin-top: 2px; font-weight: 500; }
.aw-chat-h-info small i { width: 6.5px; height: 6.5px; border-radius: 50%; background: #2ecc71; box-shadow: 0 0 6px #2ecc71; animation: awDotPulse 2s infinite; flex-shrink: 0; }
@keyframes awDotPulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.5; transform: scale(1.2); } }

/* المعادل الصوتي أثناء التحدث */
.aw-chat-eq { display: none; align-items: flex-end; gap: 2.5px; height: 14px; margin-inline: 4px; flex-shrink: 0; }
.aw-chat-window.talking .aw-chat-eq { display: flex; }
.aw-chat-eq i { width: 3px; height: 100%; background: #ffffff; border-radius: 2px; animation: awEqBar 0.8s ease-in-out infinite alternate; }
.aw-chat-eq i:nth-child(1) { animation-delay: 0.1s; height: 40%; }
.aw-chat-eq i:nth-child(2) { animation-delay: 0.3s; height: 80%; }
.aw-chat-eq i:nth-child(3) { animation-delay: 0.2s; height: 100%; }
.aw-chat-eq i:nth-child(4) { animation-delay: 0.4s; height: 60%; }
@keyframes awEqBar { 0% { transform: scaleY(0.3); } 100% { transform: scaleY(1); } }

/* أزرار رأس المحادثة: الصوت والإغلاق */
.aw-chat-h-btn { width: 32px; height: 32px; border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, 0.4); background: rgba(255, 255, 255, 0.12); color: #ffffff; cursor: pointer; display: grid; place-items: center; padding: 0; flex-shrink: 0; margin: 0; transition: all 0.2s ease; }
.aw-chat-h-btn:hover { background: rgba(255, 255, 255, 0.25); border-color: #ffffff; transform: scale(1.06); }
.aw-chat-h-btn svg { width: 16px; height: 16px; fill: currentColor; }
.aw-voice-toggle-btn { width: auto !important; min-width: 32px; height: 32px !important; padding: 0 6px !important; border-radius: 9px !important; display: inline-flex !important; align-items: center !important; gap: 6px !important; background: rgba(255, 255, 255, 0.16) !important; border: 1.5px solid rgba(255, 255, 255, 0.45) !important; cursor: pointer; transition: all 0.2s ease; user-select: none; }
.aw-voice-toggle-btn:hover { background: rgba(255, 255, 255, 0.28) !important; border-color: #ffffff !important; transform: translateY(-1px); }
.aw-voice-toggle-btn .aw-icon-spk { width: 24px; height: 24px; fill: currentColor; flex-shrink: 0; }
.aw-voice-label-badge { font-size: 11px; font-weight: 700; color: #ffffff; white-space: nowrap; letter-spacing: 0.2px; }
.aw-voice-toggle-btn.mute { background: rgba(0, 0, 0, 0.28) !important; border-color: rgba(255, 255, 255, 0.22) !important; opacity: 0.85; }
.aw-voice-toggle-btn.mute .aw-sound-wave { display: none; }
.aw-voice-toggle-btn:not(.mute) .aw-sound-x { display: none; }
.aw-voice-toggle-btn.mute .aw-voice-label-badge { color: #cbd5e1; }
.aw-chat-window.talking .aw-voice-toggle-btn:not(.mute) { background: rgba(209, 6, 19, 0.4) !important; border-color: #ff4d4d !important; box-shadow: 0 0 8px rgba(209, 6, 19, 0.6); }
@media (max-width: 480px) {
  .aw-voice-label-badge { display: none; }
  .aw-voice-toggle-btn { width: 32px !important; min-width: 32px !important; padding: 0 !important; justify-content: center !important; }
}
.aw-chat-reset-btn { background: rgba(255, 255, 255, 0.08) !important; }
.aw-chat-reset-btn:hover { background: rgba(245, 158, 11, 0.25) !important; border-color: #f59e0b !important; color: #f59e0b !important; transform: rotate(-90deg) scale(1.08); }
.aw-chat-popup-btn { background: rgba(255, 255, 255, 0.1) !important; }
.aw-chat-popup-btn:hover { background: rgba(56, 189, 248, 0.25) !important; border-color: #38bdf8 !important; color: #38bdf8 !important; transform: scale(1.08); }
.aw-chat-close-btn { background: rgba(0, 0, 0, 0.2) !important; }
.aw-chat-close-btn:hover { background: rgba(209, 6, 19, 0.9) !important; border-color: #d10606 !important; transform: scale(1.08); }

/* 6. منطقة عرض الرسائل التفاعلية (Messages Area) */
.aw-chat-m { flex: 1; min-height: 0; overflow-y: auto; padding: 10px 8px; display: flex; flex-direction: column; gap: 14px; scroll-behavior: smooth;     background: linear-gradient(180deg, #1c1e24 0%, #16181d 40%, #121316 100%); }
.aw-chat-m::-webkit-scrollbar { width: 5px; }
.aw-chat-m::-webkit-scrollbar-track { background: transparent; }
.aw-chat-m::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.16); border-radius: 4px; }
.aw-chat-m::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.32); }

/* فقاعات الرسائل الرسمية */
.aw-msg { max-width: 96%; padding: 8px 10px; border-radius: 14px; line-height: 1.7; font-size: 13.5px; animation: awMsgIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) both; white-space: pre-line; word-break: break-word; font-family: var(--aw-chat-font); letter-spacing: 0.1px; }
@keyframes awMsgIn { from { opacity: 0; transform: translateY(12px) scale(0.96); } to { opacity: 1; transform: translateY(0) scale(1); } }
.aw-msg.bt { align-self: flex-start; background: linear-gradient( 92deg, #24272f 0%, #191b22 50%, #111216 100%) !important; color: #f8fafc; border-radius: 18px 4px 18px 18px; border: 1px solid rgba(255, 255, 255, 0.08);box-shadow: 0 -4px 14px rgba(0, 0, 0, 0.45) !important; }
.aw-msg.me { align-self: flex-end; background: linear-gradient(135deg, #d31826 0%, #a00d18 100%); color: #ffffff; border-radius: 4px 18px 18px 18px; box-shadow: 0 4px 16px rgba(211, 24, 38, 0.35); font-weight: 500; }
.aw-msg a { color: #ffd37a; text-decoration: underline; text-underline-offset: 3px; font-weight: 600; }
.aw-chat-list, .aw-chat-num-list { margin: 8px 0; padding-right: 22px; padding-left: 0; display: flex; flex-direction: column; gap: 4px; white-space: normal; }
.aw-chat-list li { list-style-type: disc; line-height: 1.6; }
.aw-chat-num-list li { list-style-type: decimal; line-height: 1.6; }
.aw-chat-divider { border: none; border-top: 1px solid rgba(255, 255, 255, 0.12); margin: 8px 0; }
.aw-badge-gold { background: rgba(245, 158, 11, 0.18); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.35); padding: 1px 7px; border-radius: 6px; font-weight: 800; display: inline-block; white-space: nowrap; }
.aw-badge-green { background: rgba(16, 185, 129, 0.18); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.35); padding: 1px 7px; border-radius: 6px; font-weight: 800; display: inline-block; white-space: nowrap; }
.aw-badge-red { background: rgba(239, 68, 68, 0.18); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.35); padding: 1px 7px; border-radius: 6px; font-weight: 800; display: inline-block; white-space: nowrap; }
.aw-badge-blue { background: rgba(56, 189, 248, 0.18); color: #38bdf8; border: 1px solid rgba(56, 189, 248, 0.35); padding: 1px 7px; border-radius: 6px; font-weight: 800; display: inline-block; white-space: nowrap; }
.aw-badge-gray { background: rgba(148, 163, 184, 0.18); color: #cbd5e1; border: 1px solid rgba(148, 163, 184, 0.3); padding: 1px 7px; border-radius: 6px; font-weight: 700; display: inline-block; white-space: nowrap; }
.aw-msg .macts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.aw-msg .macts button, .aw-msg .macts a { border: 1px solid rgba(255, 255, 255, 0.22); background: rgba(255, 255, 255, 0.08); color: #ffffff; border-radius: 8px; padding: 3px 6px; font-family: var(--aw-chat-font); font-size: 12px; font-weight: 700; cursor: pointer; text-decoration: none; transition: all 0.2s ease; display: inline-flex; align-items: center; gap: 6px; }
.aw-msg .macts button:hover, .aw-msg .macts a:hover { background: var(--aw-chat-primary); border-color: var(--aw-chat-primary); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(225, 6, 19, 0.4); }

/* تنسيق الجداول والبيانات المالية في الدردشة */
.aw-table-wrap { width: 100%; overflow-x: auto; margin: 10px 0; border-radius: 10px; border: 1px solid rgba(255, 255, 255, 0.12); box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3); background: #0c1220; white-space: normal; }
.aw-chat-table { width: 100%; border-collapse: collapse; font-size: 11.5px; text-align: right; font-family: var(--aw-chat-font); white-space: normal; }
.aw-chat-table th { background: linear-gradient(135deg, rgba(209, 6, 19, 0.35) 0%, rgba(120, 16, 22, 0.45) 100%); color: #ffffff; padding: 7px 10px; font-weight: 800; border-bottom: 1px solid rgba(255, 255, 255, 0.15); white-space: nowrap; }
.aw-chat-table td { padding: 7px 10px; border-bottom: 1px solid rgba(255, 255, 255, 0.06); color: #cbd5e1; }
.aw-chat-table tr:last-child td { border-bottom: none; }
.aw-chat-table tr:nth-child(even) td { background: rgba(255, 255, 255, 0.02); }
.aw-chat-table tr:hover td { background: rgba(255, 255, 255, 0.05); }
.aw-chat-table b { color: #f8fafc; font-weight: 800; }
.aw-chat-reset-btn svg { transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1); }
.aw-chat-reset-btn:hover svg { transform: rotate(-180deg); color: #38bdf8; }

/* كروت المنتجات والأصناف التفاعلية في الدردشة (عرض عريض وشبكة أصناف متعددة) */
.aw-chat-cards-grid { display: grid; grid-template-columns: 1fr; gap: 10px; margin-top: 12px; width: 100%; box-sizing: border-box; }
.aw-chat-cards-grid.aw-grid-multi, .aw-chat-cards-grid:has(> .aw-chat-card:nth-child(2)) { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 10px; }
.aw-chat-card { width: 100%; min-width: 0; background: linear-gradient(180deg, #131c2e 0%, #0c1322 100%); border: 1px solid rgba(255,255,255,0.14); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; box-shadow: 0 4px 18px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.08); transition: transform 0.2s cubic-bezier(0.4,0,0.2,1), border-color 0.2s ease, box-shadow 0.2s ease; box-sizing: border-box; }
.aw-chat-card:hover { transform: translateY(-2px); border-color: rgba(225,6,19,0.6); box-shadow: 0 6px 22px rgba(225,6,19,0.25); }
.aw-card-img { width: 100%; height: 145px; min-height: 125px; max-height: 165px; background: radial-gradient(circle at center, rgba(255,255,255,0.08) 0%, rgba(5,8,14,0.65) 100%); display: flex; align-items: center; justify-content: center; overflow: hidden; padding: 8px; box-sizing: border-box; border-bottom: 1px solid rgba(255,255,255,0.08); position: relative; }
.aw-grid-single .aw-card-img { height: 210px; min-height: 180px; max-height: 250px; }
.aw-card-img img { max-width: 95%; max-height: 100%; width: auto; height: auto; object-fit: contain; filter: drop-shadow(0 4px 10px rgba(0,0,0,0.6)); transition: transform 0.3s cubic-bezier(0.4,0,0.2,1); }
.aw-chat-card:hover .aw-card-img img { transform: scale(1.05); }
.aw-card-info { padding: 10px; display: flex; flex-direction: column; gap: 6px; box-sizing: border-box; flex: 1; justify-content: space-between; }
.aw-card-info b { font-size: 12px; font-weight: 800; color: #ffffff; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; line-clamp: 2;-webkit-line-clamp: 2; -webkit-box-orient: vertical; min-height: 2.7em; word-break: break-word; }
.aw-grid-single .aw-card-info b { font-size: 13.5px; line-clamp: unset;-webkit-line-clamp: unset; min-height: 0; }
.aw-card-sub { display: flex; align-items: center; justify-content: space-between; gap: 4px; font-size: 10.5px; }
.aw-card-brand { background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.12); padding: 1px 6px; border-radius: 5px; font-weight: 700; color: #e2e8f0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 55%; }
.aw-card-stock { font-weight: 700; padding: 1px 6px; border-radius: 5px; font-size: 10px; background: rgba(16,185,129,0.12); color: #10b981; border: 1px solid rgba(16,185,129,0.25); white-space: nowrap; }
.aw-card-stock.out-of-stock { background: rgba(239,68,68,0.12); color: #f87171; border: 1px solid rgba(239,68,68,0.25); }
.aw-card-price { font-size: 13.5px; font-weight: 800; color: #f59e0b; letter-spacing: 0.2px; }
.aw-card-btn { height: 34px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.2); background: linear-gradient(135deg, #b81723 0%, #e10606 100%); color: #ffffff; font-size: 11.5px; font-weight: 800; cursor: pointer; transition: all 0.2s ease; margin-top: 2px; display: flex; align-items: center; justify-content: center; gap: 5px; box-shadow: 0 3px 10px rgba(225,6,19,0.35); white-space: nowrap; }
.aw-card-btn:hover { transform: translateY(-1px); filter: brightness(1.1); box-shadow: 0 4px 14px rgba(225,6,19,0.5); }
.aw-card-btn:active { transform: translateY(1px); }
.aw-act-link, .aw-act-btn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 14px; border: 1px solid rgba(255,255,255,0.2); background: rgba(255,255,255,0.08); color: #fff; font-size: 11.5px; font-weight: 700; text-decoration: none; cursor: pointer; transition: all 0.2s; }
.aw-act-link:hover, .aw-act-btn:hover { background: var(--aw-chat-primary); border-color: var(--aw-chat-primary); color: #fff; transform: translateY(-1px); }
.aw-act-query { background: linear-gradient(135deg, rgba(225,6,19,0.2) 0%, rgba(255,255,255,0.08) 100%) !important; border-color: rgba(255,100,100,0.4) !important; color: #ffffff !important; }
.aw-act-query:hover { background: linear-gradient(135deg, #d31826 0%, #a00d18 100%) !important; border-color: #ff4d4d !important; transform: translateY(-1px) scale(1.02); box-shadow: 0 4px 14px rgba(225,6,19,0.45); }
.aw-act-popup { background: linear-gradient(135deg, rgba(2,132,199,0.2) 0%, rgba(14,165,233,0.12) 100%) !important; border-color: rgba(56,189,248,0.45) !important; color: #38bdf8 !important; }
.aw-act-popup:hover { background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%) !important; border-color: #38bdf8 !important; color: #ffffff !important; transform: translateY(-1px) scale(1.02); box-shadow: 0 4px 14px rgba(2,132,199,0.45); }
.aw-query-icon { font-size: 13px; filter: drop-shadow(0 0 4px rgba(255,200,0,0.6)); }

/* مؤشر كتابة وتحميل الروبوت الداخلي المدمج */
.aw-msg.typing { display: inline-flex; align-items: center; gap: 6px; padding: 10px 16px; background: rgba(19, 28, 46, 0.9); border-radius: 18px 4px 18px 18px; border: 1px solid rgba(255, 255, 255, 0.12); width: fit-content; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25); }
.aw-msg.typing i { width: 7.5px; height: 7.5px; border-radius: 50%; background: #38bdf8; animation: awTypingDot 1.2s infinite ease-in-out; }
.aw-msg.typing i:nth-child(1) { background: #e30613; }
.aw-msg.typing i:nth-child(2) { animation-delay: 0.2s; background: #f59e0b; }
.aw-msg.typing i:nth-child(3) { animation-delay: 0.4s; background: #10b981; }
@keyframes awTypingDot { 0%, 100% { transform: translateY(0); opacity: 0.4; } 50% { transform: translateY(-6px); opacity: 1; } }

/* 7. شريط الأسئلة السريعة (Quick Suggestions Bar) */
.aw-chat-qw { position: relative; display: flex; align-items: center; background: #0b0f18; border-top: 1px solid rgba(255, 255, 255, 0.06); padding: 2px 0; }
.aw-chat-qw .qa { width: 24px; height: 100%; background: rgba(11, 15, 24, 0.95); color: #94a3b8; border: none; cursor: pointer; display: grid; place-items: center; font-size: 22px; font-weight: bold; z-index: 2; transition: color 0.2s; }
.aw-chat-qw .qa:hover { color: #ffffff; }
.aw-chat-qw .qa.off { opacity: 0.2; pointer-events: none; }
.aw-chat-q { flex: 1; display: flex; gap: 8px; overflow-x: auto; padding: 8px 10px; scrollbar-width: none; }
.aw-chat-q::-webkit-scrollbar { display: none; }
.aw-chat-q button { flex: none; border: 1px solid rgba(255, 255, 255, 0.12); background: rgba(255, 255, 255, 0.04); color: #cbd5e1; border-radius: 8px; padding: 3px 6px; font-family: var(--aw-chat-font); font-size: 12px; font-weight: 600; cursor: pointer; white-space: nowrap; transition: all 0.2s ease; }
.aw-chat-q button:hover { background: var(--aw-chat-primary); border-color: var(--aw-chat-primary); color: #ffffff; transform: translateY(-1px); }

/* 8. نموذج إدخال وإرسال الرسائل والتسجيل الصوتي */
.aw-chat-f { display: flex; align-items: center; gap: 10px; padding: 10px 14px calc(12px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid rgba(255, 255, 255, 0.08); background: #070a10; flex-shrink: 0; }
.aw-chat-mic { width: 32px; height: 32px; border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, 0.16); background: #131b2b; color: #94a3b8; cursor: pointer; display: grid; place-items: center; flex: none; transition: all 0.2s ease; }
.aw-chat-mic:hover { color: #ffffff; border-color: rgba(255, 255, 255, 0.35); }
.aw-chat-mic.rec { background: #ef4444; border-color: #ef4444; color: #ffffff; animation: awMicPulse 1.2s infinite; }
@keyframes awMicPulse { 0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.6); } 70% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); } 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); } }
.aw-chat-mic svg { width: 18px; height: 18px; fill: currentColor; }
.aw-chat-f input { flex: 1; min-width: 0; height: 36px; border-radius: 14px; border: 1.5px solid rgba(255, 255, 255, 0.14); background: #131b2b; color: #ffffff; padding: 0 16px; font-family: var(--aw-chat-font); font-size: 13.5px; outline: none; transition: border-color 0.2s, box-shadow 0.2s; }
.aw-chat-f input:focus { border-color: var(--aw-chat-primary); box-shadow: 0 0 0 3px rgba(225, 6, 19, 0.2); }
.aw-chat-f input::placeholder { color: #64748b; font-size: 13px; }
.aw-chat-submit { width: 32px; height: 32px; border-radius: 50%; border: 0; background: linear-gradient(135deg, #d31826 0%, #a00d18 100%); cursor: pointer; display: grid; place-items: center; flex: none; box-shadow: 0 4px 14px rgba(211, 24, 38, 0.4); transition: transform 0.2s ease, box-shadow 0.2s ease; }
.aw-chat-submit:hover { transform: scale(1.06); box-shadow: 0 6px 18px rgba(211, 24, 38, 0.55); }
.aw-chat-submit svg { width: 18px; height: 18px; fill: #ffffff; transform: scaleX(-1); }

/* 9. التجاوب مع شاشات الجوال والأجهزة اللوحية */
@media (max-width: 768px) {
  .aw-bot-wrapper { bottom: var(--aw-bot-floating-bottom, calc(var(--aw-floating-bottom, 14px) - 10px)) !important; }
  .aw-bot-btn { width: 42px; height: 62px; }
  .aw-chat-window { position: fixed !important; inset: 0 !important; top: 0 !important; left: 0 !important; right: 0 !important; bottom: 0 !important; width: 100vw !important; max-width: 100vw !important; min-width: 100vw !important; height: 100vh !important; height: 100dvh !important; max-height: 100vh !important; max-height: 100dvh !important; border-radius: 0 !important; border: none !important; margin: 0 !important; z-index: 99999 !important; box-shadow: none !important; transform: translateY(100%) !important; transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s !important; }
  .aw-chat-window.open { transform: none !important; opacity: 1 !important; visibility: visible !important; }
  .aw-chat-h { padding: calc(12px + env(safe-area-inset-top, 0px)) 16px 12px !important; }
  .aw-chat-f { padding: 10px 14px calc(14px + env(safe-area-inset-bottom, 0px)) !important; }
  .aw-chat-qw .qa { display: none !important; }
  .aw-chat-q { padding: 6px 14px !important; }
  body.aw-chat-open { overflow: hidden !important; touch-action: none !important; }
  .aw-chat-cards-grid.aw-grid-multi, .aw-chat-cards-grid:has(> .aw-chat-card:nth-child(2)) { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 8px; }
  .aw-card-img { height: 125px; min-height: 105px; padding: 6px; }
  .aw-card-info { padding: 8px; gap: 4px; }
  .aw-card-info b { font-size: 11px; min-height: 2.6em; }
  .aw-card-price { font-size: 12.5px; }
  .aw-card-btn { height: 32px; font-size: 10.5px; }
}
@media print { .aw-bot-wrapper, .aw-chat-window { display: none !important; } }
