/* تحسينات التصميم الجديدة */
.mira-search-section {
   background: linear-gradient(135deg, #669eea 0%, #764ca2 100%);
    padding: 80px 0;
    min-height: auto;
}

.mira-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.mira-search-wrapper {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}
/* إصلاح ألوان كروت البحث */
.mira-tab-item {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 20px;
    text-align: left;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.mira-tab-item:hover {
    border-color: #c7d2fe;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
}

.mira-tab-item.active {
    border-color: #4f46e5;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: white;
}

/* إصلاح ألوان النص في الحالة العادية */
.mira-tab-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 4px;
    color: #1e293b; /* لون داكن للنص */
}

.mira-tab-desc {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 8px;
    color: #64748b; /* لون رمادي للنص */
}

.mira-stat {
    font-size: 0.8rem;
    opacity: 0.9;
    color: #475569; /* لون داكن للإحصائيات */
}

/* إصلاح ألوان النص في الحالة النشطة */
.mira-tab-item.active .mira-tab-title,
.mira-tab-item.active .mira-tab-desc,
.mira-tab-item.active .mira-stat {
    color: white; /* نص أبيض في الحالة النشطة */
}

/* إصلاح ألوان الأيقونات */
.mira-tab-icon {
    font-size: 2rem;
    margin-bottom: 12px;
    color: #4f46e5; /* لون أزرق للأيقونات في الحالة العادية */
}

.mira-tab-item.active .mira-tab-icon {
    color: white; /* أيقونات بيضاء في الحالة النشطة */
}

/* إصلاح خلفية الشارة (Badge) */
.mira-tab-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #10b981;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* إصلاح ألوان عناصر التحكم */
.mira-search-input {
    flex: 1;
    padding: 16px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
    color: #1e293b; /* لون نص داكن */
}

.mira-search-input::placeholder {
    color: #94a3b8; /* لون فاتح للنص التوضيحي */
}

.mira-filter-label {
    color: #64748b; /* لون رمادي للتسميات */
    font-size: 0.9rem;
}

/* إصلاح ألوان نتائج البحث */
.mira-results-count {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1e293b; /* لون داكن */
}

.mira-sort-select {
    padding: 8px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: white;
    color: #374151; /* لون نص داكن */
}

/* إصلاح ألوان بطاقات المنتج */
.mira-product-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #f1f5f9;
    transition: all 0.3s ease;
    display: flex;
    gap: 20px;
}

.mira-product-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1e293b; /* لون داكن */
    margin-bottom: 4px;
    line-height: 1.4;
}

.mira-barcode-info {
    background: #f8fafc;
    padding: 8px 12px;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: #475569; /* لون رمادي داكن */
}

.mira-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: #64748b; /* لون رمادي */
}

/* إصلاح ألوان حالات التحميل والخطأ */
.mira-loading-text {
    color: #64748b; /* لون رمادي */
    font-size: 1.1rem;
}

.mira-no-results {
    text-align: center;
    padding: 60px 20px;
    color: #64748b; /* لون رمادي */
}

.mira-no-results i {
    font-size: 3rem;
    margin-bottom: 16px;
    color: #cbd5e1; /* لون فاتح */
}

/* إصلاح ألوان الماسح الضوئي */
.mira-scanner-header h3 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1e293b; /* لون داكن */
    margin-bottom: 10px;
}

.mira-scanner-header p {
    color: #64748b; /* لون رمادي */
    font-size: 1.1rem;
    margin-bottom: 30px;
}

.mira-scanner-hint {
    color: #64748b; /* لون رمادي */
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.mira-scanner-supported h4 {
    color: #475569; /* لون رمادي داكن */
    margin-bottom: 15px;
    font-size: 1rem;
}

.mira-barcode-type {
    background: #f1f5f9;
    color: #475569; /* لون رمادي داكن */
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* إصلاح ألوان رسائل الخطأ */
.mira-error-message {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626; /* لون أحمر للخطأ */
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    display: none;
}

/* إصلاح ألوان أزرار الإجراءات */
.mira-action-btn {
    padding: 8px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: white;
    color: #475569; /* لون رمادي داكن */
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.mira-action-btn:hover {
    background: #4f46e5;
    color: white;
    border-color: #4f46e5;
}

/* إصلاح ألوان الـ Badges في النتائج */
.mira-badge.verified {
    background: #d1fae5;
    color: #065f46; /* لون أخضر داكن */
}

.mira-badge.prestigious {
    background: #fef3c7;
    color: #92400e; /* لون بني داكن */
}

.mira-badge.status-active {
    background: #d1fae5;
    color: #065f46; /* لون أخضر داكن */
}

.mira-badge.status-pending {
    background: #fef3c7;
    color: #92400e; /* لون بني داكن */
}
.mira-search-header {
    text-align: center;
    margin-bottom: 40px;
}

.mira-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}


/* تأثيرات الآلة الكاتبة */
.mira-title2 {
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.typewriter-text {
    display: inline-block;
    overflow: hidden;
    white-space: nowrap;
    border-right: 3px solid;
    animation: blinkCursor 0.7s infinite;
}

/* لغة LTR (الإنجليزية، الفرنسية، etc) */
[dir="ltr"] .typewriter-text {
    border-right-color: #4CAF50;
    animation: typingLTR 2s steps(30, end), blinkCursor 0.7s infinite;
}

/* لغة RTL (العربية) */
[dir="rtl"] .typewriter-text {
    border-right: none;
    border-left: 3px solid #4CAF50;
    animation: typingRTL 2s steps(30, end), blinkCursor 0.7s infinite;
}

/* أنيميشن الكتابة لـ LTR */
@keyframes typingLTR {
    from { width: 0; }
    to { width: 100%; }
}

/* أنيميشن الكتابة لـ RTL */
@keyframes typingRTL {
    from { 
        width: 0; 
        margin-right: auto;
        margin-left: 0;
    }
    to { 
        width: 100%; 
        margin-right: 0;
        margin-left: auto;
    }
}

/* أنيميشن وميض المؤشر */
@keyframes blinkCursor {
    0%, 50% { border-color: transparent; }
    51%, 100% { border-color: inherit; }
}

/* تأثير التلاشي للنص القديم */
.fade-out {
    animation: fadeOut 0.5s ease-out forwards;
}

@keyframes fadeOut {
    from { 
        opacity: 1;
        transform: translateY(0);
    }
    to { 
        opacity: 0;
        transform: translateY(-20px);
    }
}

/* تأثير الظهور للنص الجديد */
.fade-in {
    animation: fadeIn 0.5s ease-out 0.3s forwards;
    opacity: 0;
    transform: translateY(20px);
}

@keyframes fadeIn {
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

.mira-subtitle {
    font-size: 1.1rem;
    color: #64748b;
    max-width: 600px;
    margin: 0 auto;
}

/* تصميم التبويبات المحسن */
.mira-search-tabs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}





.mira-tab-stats {
    display: flex;
    align-items: center;
    gap: 8px;
}


/* تحسينات عناصر التحكم */
.mira-search-controls {
    margin-bottom: 32px;
}

.mira-input-group {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.mira-search-input {
    flex: 1;
    padding: 16px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.mira-search-input:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.mira-search-btn {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: white;
    border: none;
    padding: 16px 24px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mira-search-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.3);
}

.mira-filter-options {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.mira-filter-item {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.mira-filter-label {
    color: #64748b;
    font-size: 0.9rem;
}

/* تصميم النتائج المحسن */
.mira-results-container {
    display: none;
}

.mira-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid #f1f5f9;
}

.mira-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 24px;
}

.mira-product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.mira-product-image {
    width: 120px;
    height: 120px;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mira-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mira-product-image .mira-image-placeholder {
    font-size: 2rem;
    color: #cbd5e1;
}

.mira-product-content {
    flex: 1;
}

.mira-product-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}



.mira-product-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}


.mira-meta-item i {
    width: 16px;
    color: #94a3b8;
}

.mira-status-badges {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.mira-badge {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.mira-product-actions {
    display: flex;
    gap: 8px;
}

/* حالات التحميل والخطأ */
.mira-search-loading {
    text-align: center;
    padding: 60px 20px;
    display: none;
}

.mira-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e2e8f0;
    border-left: 4px solid #4f46e5;
    border-radius: 50%;
    animation: mira-spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes mira-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}





/* تصميم قسم المسح الضوئي */
.mira-scanner-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 60px 0;
    margin: 40px 0;
}

.mira-scanner-wrapper {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}



.mira-scanner-controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.mira-scanner-btn, .mira-scanner-stop-btn {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: white;
    border: none;
    padding: 15px 25px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3);
}

.mira-scanner-btn:hover, .mira-scanner-stop-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.4);
}

.mira-scanner-stop-btn {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.mira-scanner-icon {
    font-size: 1.2rem;
}

/* تصميم نافذة المعاينة */
.mira-scanner-preview {
    position: relative;
    max-width: 500px;
    margin: 0 auto 30px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

#mira-scanner-container {
    width: 100%;
    height: 300px;
    background: #000;
}

.mira-scanner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

.mira-scanner-frame {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70%;
    height: 150px;
    border: 3px solid #4f46e5;
    border-radius: 10px;
    background: rgba(79, 70, 229, 0.1);
}

.mira-scanner-line {
    position: absolute;
    top: 50%;
    left: 15%;
    width: 70%;
    height: 2px;
    background: #4f46e5;
    animation: miraScanLine 2s infinite ease-in-out;
}

@keyframes miraScanLine {
    0%, 100% {
        transform: translateY(-75px);
    }
    50% {
        transform: translateY(75px);
    }
}

/* تصميم نتيجة المسح */
.mira-scanner-result {
    background: #d1fae5;
    border: 2px solid #10b981;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    animation: miraResultAppear 0.5s ease;
}

@keyframes miraResultAppear {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.mira-scanner-success {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 1.1rem;
    color: #065f46;
    margin-bottom: 15px;
}

.mira-scanner-success i {
    font-size: 1.5rem;
}

.mira-scanner-search-btn {
    background: #10b981;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 auto;
}

.mira-scanner-search-btn:hover {
    background: #059669;
    transform: translateY(-1px);
}



.mira-scanner-supported h4 {
    color: #475569;
    margin-bottom: 15px;
    font-size: 1rem;
}

.mira-barcode-types {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}
/* تحسينات إضافية للماسح الضوئي */
.mira-scanner-error {
    margin: 15px 0;
    animation: miraErrorAppear 0.3s ease;
}

@keyframes miraErrorAppear {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mira-permission-help {
    background: #fff3cd !important;
    border: 1px solid #ffeaa7 !important;
    color: #856404 !important;
}

.mira-permission-help h4 {
    color: #856404 !important;
    font-size: 1rem !important;
    margin-bottom: 10px !important;
}

.mira-permission-help ul {
    margin: 0 !important;
    padding-left: 20px !important;
}

.mira-permission-help li {
    margin-bottom: 5px !important;
    font-size: 0.9rem !important;
}

/* إضافة مؤشر تحميل للماسح */
.mira-scanner-loading {
    display: none;
    text-align: center;
    padding: 20px;
}

.mira-scanner-loading .mira-spinner {
    margin: 0 auto 10px;
}