/* --- icu.css --- */

body {
    font-family:  "Amiri", serif !important;
    margin: 0 !important;
    padding: 0 !important;
    background-color: #e0ecff !important;
    direction: rtl !important;
    /* هذا مهم جداً لتحديد الاتجاه الافتراضي للموقع RTL */
    overflow-x: hidden !important;
}

.amiri-regular {
  font-family: "Amiri", serif;
  font-weight: 400;
  font-style: normal;
}

.amiri-bold {
  font-family: "Amiri", serif;
  font-weight: 700;
  font-style: normal;
}

.amiri-regular-italic {
  font-family: "Amiri", serif;
  font-weight: 400;
  font-style: italic;
}

.amiri-bold-italic {
  font-family: "Amiri", serif;
  font-weight: 700;
  font-style: italic;
}

body.no-scroll {
    overflow: hidden !important;
}

.main-header {
    background-color: #E0ECFF !important;
    color: white !important;
    padding: 5px 0 !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 2590 !important;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3) !important;
}


.header-content {
    display: flex !important;
    justify-content: space-between !important;
    /* يدفع العناصر إلى أقصى اليمين واليسار */
    align-items: center !important;
    max-width: 1200px !important;
    margin: 0 auto !important;
    position: relative !important;
    /* لتمكين التموضع المطلق إذا لزم الأمر */
    padding: 0 20px !important;
    /* لإضافة مسافة داخلية من الجوانب */
}


/* تعديلات على زر القائمة الجانبية (الثلاثة خطوط) */

.menu-toggle {
    background: transparent !important;
    color: #0b3d91 !important;
    /* لون أيقونة الثلاثة خطوط */
    font-size: 28px !important;
    border: none !important;
    cursor: pointer !important;
    z-index: 2592 !important;
    display: block !important;
    /* للتأكد من ظهوره في وضع الموبايل/التابلت */
    padding: 5px !important;
    transition: transform 0.3s ease !important;
    position: sticky !important;
    /* مهم: لجعله يتبع تدفق Flexbox */
    order: 1 !important;
    /* في RTL، هذا يضعه في أقصى اليمين (الموضع الأول) */
    right: auto !important;
    top: auto !important;
    transform: none !important;
}

.menu-toggle:hover {
    color: #1a50a7 !important;
}

.logo {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 55px !important;
    order: 2 !important;
    /* الشعار في المنتصف */
}

.logo img {
    height: 70px !important;
}
/* Styles for slider arrows on all screen sizes */
.slider-arrow {
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    background-color: rgba(11, 61, 145, 0.8) !important;
    color: white !important;
    border: none !important;
    border-radius: 50% !important;
    width: 40px !important;
    height: 40px !important;
    font-size: 20px !important;
    cursor: pointer !important;
    /* This is the fix: set display to flex permanently */
    display: flex !important; 
    align-items: center !important;
    justify-content: center !important;
    z-index: 2501 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
    transition: background-color 0.3s ease, transform 0.3s ease, opacity 0.3s ease, visibility 0.3s ease !important;
    /* Hide by default, will be shown by media queries */
    opacity: 0 !important;
    visibility: hidden !important;
}

/* Show arrows on mobile and tablet screens (up to 899px) */
@media (max-width: 899px) {
    .device-slider-container .slider-arrow {
        opacity: 1 !important;
        visibility: visible !important;
    }
}

/* Show arrows on desktop screens (900px and up) */
@media (min-width: 900px) {
    .device-slider-container .slider-arrow {
        opacity: 1 !important;
        visibility: visible !important;
    }
}

/* Positioning for left and right arrows (applies to all screens) */
.left-arrow {
    left: 10px !important;
    right: auto !important;
}

.right-arrow {
    right: 10px !important;
    left: auto !important;
}

/* تعديلات على أيقونة سلة المشتريات لتموضع العلامة الحمراء */

.cart-icon-container {
    /* مهم: ليكون العنصر الأب الذي يحدد موقع العلامة الحمراء */
    cursor: pointer !important;
    font-size: 20px !important;
    color: #0B3D91 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    order: 3 !important;
    /* في RTL، هذا يضعه في أقصى اليسار (الموضع الثالث) */
    /* إزالة أي خاصيات position: absolute !important; top !important; left !important; right !important; قديمة كانت في هذا السلك */
}


/* العلامة الحمراء (عدد المنتجات) - تم جعلها دائرية وأصغر والنص في المنتصف */

.cart-item-count {
    position: absolute !important;
    top: 10px !important;
    /* يرتفع للأعلى أكثر */
    left: 10px !important;
    /* في RTL، يظهر على يسار الأيقونة */
    background-color: #e74c3c !important;
    color: white !important;
    font-size: 11px !important;
    border-radius: 50% !important;
    /* لتكون دائرية */
    padding: 5px 7px !important;
    /* تصغير الـ padding ليكون متساوياً */
    min-width: 18px !important;
    /* نفس قيمة min-height */
    min-height: 18px !important;
    /* نفس قيمة min-width */
    display: flex !important;
    /* لضمان التوسيط الرأسي والأفقي للنص */
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
    /* لضمان أن ارتفاع السطر لا يضيف مسافة */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2) !important;
    box-sizing: border-box !important;
    /* لضمان أن الـ padding لا يزيد الحجم عن min-width/height */
}


/* قاعدة للتحكم في مكان الـ cart-item-count في LTR */

body[dir="ltr"] .cart-item-count,
html[dir="ltr"] .cart-item-count {
    left: auto !important;
    /* إلغاء left */
    right: -6px !important;
    /* وضعه على اليمين في LTR */
}


/* إخفاء القائمة الرئيسية على الديسكتوب في الوضع الافتراضي للموبايل/التابلت */

.main-nav.desktop-nav {
    display: none !important;
}


/* القائمة الجانبية (Side Menu) نفسها */

.side-menu {
    position: fixed !important;
    top: 0 !important;
    /* تعديل اتجاه الفتح: تفتح من اليسار في RTL */
    right: -260px;
    /* مخفية في البداية على اليسار */
    left: auto !important;
    /* التأكد من أن right ليست مفعلة */
    width: 200px !important;
    height: 100vh !important;
    background-color: #0b3d91 !important;
    color: white !important;
    display: flex !important;
    flex-direction: column !important;
    padding-top: 80px !important;
    transition: right 0.3s ease-in-out !important;
    /* تغيير transition ليعمل مع left */
    z-index: 2591 !important;
    list-style-type: none !important;
    box-shadow: 5px 0 15px rgba(0, 0, 0, 0.5) !important;
    /* عكس الظل ليتناسب مع الفتح من اليسار */
}

.side-menu.open {
    right: 0 !important;
    /* عند الفتح، تتحرك إلى 0 من اليسار */
}

.side-menu ul {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.side-menu li {
    margin: 0 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2) !important;
}

.side-menu li:last-child {
    border-bottom: none !important;
}

.side-menu a {
    color: white !important;
    text-decoration: none !important;
    font-weight: bold !important;
    font-size: 18px !important;
    display: block !important;
    padding: 15px 20px !important;
    transition: background-color 0.3s ease !important;
}

.side-menu a:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
}

.side-menu .has-sub .submenu {
    list-style-type: none !important;
    padding-right: 15px !important;
    /* يبقى padding-right ليتناسب مع RTL */
    background-color: rgba(0, 16, 163, 0.7) !important;
    max-height: 0 !important;
    transition: max-height 0.4s ease-in-out !important;
}

.side-menu .has-sub.active .submenu {
    max-height: 300px !important;
    overflow-y: scroll;
}

.side-menu .submenu li {
    border-bottom: 1px dashed rgba(255, 255, 255, 0.1) !important;
}

.side-menu .submenu li:last-child {
    border-bottom: none !important;
}

.side-menu .submenu a {
    padding: 10px 20px !important;
    font-size: 16px !important;
}

.side-menu .submenu a:hover {
    background-color: rgba(255, 255, 255, 0.15) !important;
}

.overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background-color: rgba(0, 0, 0, 0.6) !important;
    z-index: 2580 !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transition: opacity 0.5s ease-in-out, visibility 0.5s ease-in-out !important;
}

    /* الكود لضبط شريط التمرير بالكامل */
.side-menu .has-sub.active .submenu::-webkit-scrollbar {
    width: 8px; /* عرض شريط التمرير */
}

/* الكود لضبط الخلفية (Track) */
.side-menu .has-sub.active .submenu::-webkit-scrollbar-track {
    background: #f1f1f1; /* لون الخلفية */
    border-radius: 10px;
}

/* الكود لضبط اليد (Thumb) */
.side-menu .has-sub.active .submenu::-webkit-scrollbar-thumb {
    background: #888; /* لون اليد (التي تتحرك) */
    border-radius: 10px;
}

/* الكود لضبط اليد عند وضع مؤشر الفأرة عليها */
.side-menu .has-sub.active .submenu::-webkit-scrollbar-thumb:hover {
    background: #555; /* لون اليد عند التمرير عليها */
}

.overlay.open {
    opacity: 1 !important;
    visibility: visible !important;
}

.section-header {
    padding: 15px 20px !important;
    text-align: center !important;
    box-shadow: inset 0 -2px 6px rgba(0, 0, 0, 0.15) !important;
    margin: 0 !important;
    background-color: #f7faff !important;
    color: #0b3d91 !important;
    font-size: 20px !important;
}

.section-header h1 {
    margin: 0 !important;
    font-size: 1.8em !important;
}

.device-section {
    padding: 25px 20px 40px 20px !important;
    background: #fff !important;
    margin-bottom: 30px !important;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1) !important;
    border-radius: 12px !important;
    margin: 2% auto 5% auto !important;
    max-width: 1200px !important;
}

.device-section h3 {
    font-size: 24px !important;
    margin-bottom: 25px !important;
    color: #0b3d91 !important;
    text-align: center !important;
    position: relative !important;
    padding-bottom: 10px !important;
}

.device-section h3 span {
    font-size: 0.7em !important;
    color: #666 !important;
}

.device-section h3::after {
    content: '' !important;
    position: absolute !important;
    bottom: 0 !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 60px !important;
    height: 3px !important;
    background-color: #009688 !important;
    border-radius: 2px !important;
}

/* Media Query for Phones (عرض أقل من 768 بكسل) */
@media (max-width: 767px) {
    /* تغيير حجم بطاقة المنتج على الهواتف */
    .product-card {
        /* تحديد عرض ثابت لبطاقة المنتج، مما يسمح بعرض أكثر من منتج في شاشة واحدة */
        width: 150px !important; 
        /* تقليل ارتفاع البطاقة لتصبح أقصر وأكثر إحكامًا */
        height: 150px !important;
        /* تقليل الهامش بين البطاقات */
        margin: 5px !important;
    }

    /* تقليل حجم صورة المنتج داخل البطاقة */
    .device-image-slider {
        height: 80px !important;
    }

    /* تقليل حجم خط اسم المنتج ليتناسب مع المساحة الجديدة */
    .product-card h3 {
        font-size: 14px !important; 
    }
    
    /* تقليل حجم خط السعر الحالي والقديم */
    .current-price, .old-price {
        font-size: 0.9em !important; 
    }
}

.slider-arrow {
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    background-color: rgba(11, 61, 145, 0.8) !important;
    color: white !important;
    border: none !important;
    border-radius: 50% !important;
    width: 40px !important;
    height: 40px !important;
    font-size: 20px !important;
    cursor: pointer !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 2501 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
    transition: background-color 0.3s ease, transform 0.3s ease !important;
}

.slider-arrow:hover {
    background-color: #0b3d91 !important;
    transform: translateY(-50%) scale(1.1) !important;
}





.product-card .price {
    font-size: 1.1em !important;
    font-weight: 700 !important;
    color: #282828da !important;
    margin-top: 5px !important;
    padding-top: 5px !important;
    border-top: 1px solid #eee !important;
    display: block !important;
    text-align: center !important;
    padding-bottom: 10px !important;
    background-color: #f8f8f8 !important;
    border-radius: 0 0 12px 12px !important;
    margin-left: -1px !important;
    margin-right: -1px !important;
    margin-bottom: -1px !important;
}




.brand-section{
    padding: 25px 20px 40px 20px;
    background: #fff;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    margin: 2% auto 5% auto;
    max-width: 1200px;

}
.brand-section h3 {
    font-size: 24px;
    margin-bottom: 25px;
    color: #0b3d91;
    text-align: center;
    position: relative;
    padding-bottom: 10px;
}

.brand-section h3 span {
    font-size: 0.7em;
    color: #666;
}

.brand-section h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50%;
    height: 3px;
    background-color: #009688;
    border-radius: 2px;
}

.device-slider-container {
    position: relative;
    padding: 0;
    overflow: hidden;
    padding: 10px 20px !important;
}


.device-slider {
    display: flex;
    gap: 25px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 15px;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.device-slider::-webkit-scrollbar {
    display: none;
}



.modal-body .price {
    font-size: 1.5em !important;
    font-weight: 800 !important;
    color: var(--accent-green) !important;
    margin-top: 20px !important;
    text-align: center !important;
}

.product-card:hover {
    transform: translateY(-8px) !important;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2) !important;
}

.device-image-slider {
    width: 100% !important;
    height: 180px !important; 
    overflow: hidden !important;
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background-color: #fff !important;
    padding: 5px !important;
}

.device-image-slider img {
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: scale-down !important;
    display: block !important;
    margin: auto !important;
}



.product-card {
    flex: 0 0 auto;
    background-color: white;
    border-radius: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    padding: 15px;
    text-align: center;
    transition: transform 0.3s ease;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    height: 100% !important;
    margin: 10px;
    z-index:2500;
}
.product-card .content {
    padding: 10px 15px !important;
    text-align: center !important;
    display: flex !important;
    flex-direction: column !important;
    flex-grow: 1 !important;
    justify-content: flex-start !important;
}

.product-card h4 {
    margin: 0 !important;
    font-size: 12px !important;
    color: #0b3d91 !important;
    line-height: 1.4 !important;
    flex-grow: 1 !important;
    /* ستبقى flex-grow: 1 !important; ولكن مع تحديد ارتفاع أقصى */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding-bottom: 5px !important;
    /* ** التعديلات الجديدة هنا لتثبيت ارتفاع العنوان ** */
    height: 2.8em !important;
    /* تحدد ارتفاع ثابت يكفي لسطرين (1.4em * 2) */
    overflow: hidden !important;
    /* إخفاء أي نص يتجاوز الارتفاع */
    text-overflow: ellipsis !important;
    /* إضافة "..." للنص المخفي */
    display: -webkit-box !important;
    /* لتمكين webkit-line-clamp */
    -webkit-line-clamp: 2 !important;
    /* تحديد أقصى عدد أسطر (سطرين) */
    -webkit-box-orient: vertical !important;
    /* اتجاه الصندوق رأسي */
    white-space: normal !important;
    /* السماح بتجاوز الكلمة للسطر التالي */
}

.modal {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(0, 0, 0, 0.7) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 2601 !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transition: opacity 0.3s ease, visibility 0.3s ease !important;
}

.modal.hidden {
    opacity: 0 !important;
    visibility: hidden !important;
    display: none !important;
}

.modal:not(.hidden) {
    opacity: 1 !important;
    visibility: visible !important;
    display: flex !important;
}

.modal-content {
    width: 80% !important;
    height: 80%;
    max-width: 500px !important;
    background: #fff !important;
    border-radius: 12px !important;
    padding: 10px !important;
    position: relative !important;
    max-height: 90vh !important;
    overflow-y: auto !important;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4) !important;
    transform: translateY(20px) !important;
    transition: transform 0.3s ease !important;
}

.modal:not(.hidden) .modal-content {
    transform: translateY(0) !important;
}

.close-modal {
    position: absolute !important;
    top: 15px !important;
    left: 15px !important;
    font-size: 32px !important;
    color: #555 !important;
    cursor: pointer !important;
    transition: color 0.2s ease !important;
}

.close-modal:hover {
    color: #0b3d91 !important;
}


/* Styles for Modal Image Gallery */

.modal-image-gallery {
    margin-bottom: 20px !important;
    text-align: center !important;
}

.gallery-main-image {
    width: 100% !important;
    height: 280px !important;
    overflow: hidden !important;
    margin-bottom: 15px !important;
    border-radius: 8px !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background-color: #f0f0f0 !important;
}

.gallery-main-image img {
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
    border-radius: 8px !important;
}

.gallery-thumbnails {
    display: flex !important;
    justify-content: center !important;
    gap: 10px !important;
    flex-wrap: wrap !important;
    padding: 0 10px !important;
}

.gallery-thumbnails .thumbnail {
    width: 70px !important;
    height: 70px !important;
    object-fit: cover !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    border: 2px solid transparent !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1) !important;
}

.gallery-thumbnails .thumbnail:hover {
    border-color: #a7ccf2 !important;
    transform: scale(1.05) !important;
}

.gallery-thumbnails .thumbnail.active {
    border-color: #0b3d91 !important;
    box-shadow: 0 0 0 3px #0b3d91, 0 2px 8px rgba(0, 0, 0, 0.2) !important;
    transform: scale(1.02) !important;
}

.modal-body h2 {
    margin: 0 auto 15px auto !important;
    color: #0b3d91 !important;
    font-size: 20px !important;
    text-align: center !important;
}

.modal-body h2 span {
    font-size: 0.7em !important;
    color: #777 !important;
}

.modal-body p {
    font-size: 16px !important;
    color: #444 !important;
    margin-bottom: 15px !important;
    line-height: 1.6 !important;
}

.modal-body .price {
    font-size: 18px !important;
    font-weight: bold !important;
    color: #009688 !important;
    text-align: center !important;
    background-color: #e0f2f1 !important;
    padding: 10px 20px !important;
    border-radius: 25px !important;
    display: table;
    margin: 15px auto 0 auto !important;
}

footer {
    text-align: center !important;
    padding: 20px !important;
    background-color: #0b3d91 !important;
    color: white !important;
    margin-top: 50px !important;
    box-shadow: inset 0 5px 15px rgba(0, 0, 0, 0.2) !important;
}

::-webkit-scrollbar {
    width: 8px !important;
    height: 8px !important;
}

::-webkit-scrollbar-track {
    background: #f1f1f1 !important;
    border-radius: 10px !important;
}

::-webkit-scrollbar-thumb {
    background: #888 !important;
    border-radius: 10px !important;
}

::-webkit-scrollbar-thumb:hover {
    background: #555 !important;
}


/* Media Query for Tablets */

@media (min-width: 768px) {
    .device-section {
        max-width: 1000px !important;
        padding: 30px 25px 45px 25px !important;
    }
    
    .device-image-slider {
    }
    .gallery-main-image {
        height: 350px !important;
    }
    .gallery-thumbnails .thumbnail {
        width: 80px !important;
        height: 80px !important;
    }
}

.section{
    background-color: #0a002e !important;
}
/* Media Query for Desktop */

@media (min-width: 900px) {
    .menu-toggle {
        display: none !important;
        /* إخفاء زر القائمة في وضع الديسكتوب */
    }
    .side-menu {
        display: none !important;
        /* إخفاء القائمة الجانبية في وضع الديسكتوب */
    }
    .header-content {
        justify-content: space-between !important;
        /* الحفاظ على توزيع العناصر على الأطراف */
    }
    .logo {
        order: 2 !important;
        /* الشعار في المنتصف */
        margin: auto !important;
        text-align: center !important;
    }
    /* ترتيب عناصر نافبار الديسكتوب */
    .main-nav.desktop-nav {
        display: block !important;
        /* إظهار نافبار الديسكتوب */
        order: 1 !important;
        /* في RTL، القائمة الرئيسية على أقصى اليمين */
        position: absolute !important;
        width: auto !important;
        height: auto !important;
        background-color: transparent !important;
        padding: 0 !important;
        margin: 0 !important;
        box-shadow: none !important;
        z-index: 2591 !important;
        
    }
    .cart-item-count{
        position: absolute;
        top: -6px;
        left: -6px;
    }
    .main-nav.desktop-nav ul {
        display: flex !important;
        list-style-type: none !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    .main-nav.desktop-nav li {
        margin: 0 15px !important;
        position: relative !important;
    }
    .main-nav.desktop-nav a {
        color: rgb(18, 5, 131) !important;
        text-decoration: none !important;
        font-weight: bold !important;
        font-size: 17px !important;
        padding: 5px 0 !important;
        position: relative !important;
        transition: color 0.3s ease !important;
    }
    .main-nav.desktop-nav a:hover {
        color: #0a002e !important;
    }
    .main-nav.desktop-nav a::after {
        content: '' !important;
        position: absolute !important;
        width: 0 !important;
        height: 2px !important;
        bottom: -3px !important;
        right: 0 !important;
        background-color: #a7ccf2 !important;
        transition: width 0.3s ease-out !important;
    }
    .main-nav.desktop-nav a:hover::after {
        width: 100% !important;
        left: 0 !important;
    }
    .main-nav.desktop-nav .has-sub {
        padding-bottom: 5px !important;
    }
    .main-nav.desktop-nav .submenu {
        position: absolute !important;
        top: 100% !important;
        right: 0 !important;
        background-color: #0b3d91 !important;
        min-width: 180px !important;
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4) !important;
        border-radius: 8px !important;
        padding: 10px 0 !important;
        list-style-type: none !important;
        opacity: 0 !important;
        visibility: hidden !important;
        transform: translateY(10px) !important;
        transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease !important;
        max-width: 800px !important;
        overflow-x: scroll !important;
    }
    .main-nav.desktop-nav .has-sub:hover .submenu {
        opacity: 1 !important;
        visibility: visible !important;
        transform: translateY(0) !important;
    }
    .main-nav.desktop-nav .submenu li {
        margin: 0 !important;
        border-bottom: none !important;
    }
    .main-nav.desktop-nav .submenu a {
        padding: 10px 20px !important;
        font-size: 15px !important;
        white-space: nowrap !important;
        color: white !important;
    }
    .main-nav.desktop-nav .submenu a:hover {
        background-color: rgba(255, 255, 255, 0.1) !important;
        color: #a7ccf2 !important;
    }
    .main-nav.desktop-nav .submenu a::after {
        display: none !important;
    }
    /* ترتيب أيقونة السلة في وضع الديسكتوب */
    .cart-icon-container {
    }
    .device-slider-container {
        padding: 0 20px !important;
    }
    /* تعديل اتجاه أسهم السلايدر ليتناسب مع RTL */
    .left-arrow {
        /* هذا هو السهم الذي يظهر على اليسار بصرياً في RTL */
        left: 0 !important;
        right: auto !important;
    }
    .left-arrow i {
        transform: scaleX(1) !important;
        /* اتجاه السهم الطبيعي (يشير لليسار) */
    }
    .right-arrow {
        /* هذا هو السهم الذي يظهر على اليمين بصرياً في RTL */
        right: 0 !important;
        left: auto !important;
    }
    .product-card {
        flex: 0 0 auto !important;
        height: 280px !important;
    }
    .device-image-slider {
    }
    .gallery-main-image {
        height: 200px !important;
    }
    .gallery-thumbnails .thumbnail {
        width: 90px !important;
        height: 90px !important;
    }
}


/* Media Query for VERY LARGE SCREENS */

@media (min-width: 1025px) {
    .header-content {
        max-width: 1400px !important;
    }
    .main-nav.desktop-nav li {
        margin: 0 25px !important;
    }
    .logo img {
        height: 70px !important;
    }
    .device-section {
        max-width: 1300px !important;
        padding: 35px 30px 50px 30px !important;
    }
    .device-section h3 {
        font-size: 30px !important;
        margin-bottom: 35px !important;
    }
    .product-card {
        flex: 0 0 auto!important;
        height: 80px !important;
    }
    .device-image-slider {
    }
    .modal-content {
        max-width: 500px !important;
        padding: 40px !important;
    }
    .modal-body h2 {
        font-size: 24px !important;
    }
    .modal-body p {
        font-size: 18px !important;
    }
    .modal-body .price {
        font-size: 20px !important;
    }
}


/* ملف icu.css - إضافة ستايلات جديدة لناف بار الأجهزة */

.device-nav-links {
    background-color: #f7faff !important;
    padding: 10px 0 !important;
    margin-bottom: 25px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
    border-bottom: 1px solid #e0ecff !important;
    position: sticky !important;
    top: 85px !important;
    z-index: 2502 !important;
    overflow-x: auto !important;
    white-space: nowrap !important;
    -ms-overflow-style: none !important;
    scrollbar-width: none !important;
}

.device-nav-links::-webkit-scrollbar {
    display: none !important;
}

.nav-links-container {
    justify-content: center !important;
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 10px 15px !important;
}

.nav-link-item {
    display: inline-block !important;
    padding: 0px 15px !important;
    margin: 0 5px !important;
    color: #000000 !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    font-size: 20px !important;
    border-radius: 20px !important;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease !important;
    white-space: nowrap !important;
}

.nav-link-item:hover {
    background-color: #0b3d91 !important;
    color: white !important;
    transform: translateY(-2px) !important;
}


/* Smooth scroll for the entire page */

html {
    scroll-behavior: smooth !important;
}


/* Media Queries for responsiveness */

@media (max-width: 767px) {
    .device-nav-links {
        top: 75px !important;
        justify-content: flex-start !important;
    }
    .nav-link-item {
        font-size: 14px !important;
        padding: 2px 4px !important;
        margin: 0 4px !important;
    }
}

@media (min-width: 900px) {
    .device-nav-links {
        top: 85px !important;
    }
}


/* ملف icu.css - إضافة ستايلات زر العودة للأعلى */

.back-to-top {
    position: fixed !important;
    bottom: 20px !important;
    left: 20px !important;
    /* ليكون على اليسار في الوضع الافتراضي LTR */
    background-color: #0b3d91 !important;
    color: white !important;
    border: none !important;
    border-radius: 50% !important;
    width: 45px !important;
    height: 45px !important;
    font-size: 20px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateY(20px) !important;
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease !important;
    z-index: 2502 !important;
}


/* في حالة الـ RTL (إذا كان `direction: rtl !important;` مطبقًا على `body` أو `html`) */

body[dir="rtl"] .back-to-top,
html[dir="rtl"] .back-to-top {
    left: auto !important;
    /* إلغاء خاصية left */
    right: 20px !important;
    /* وضعه على اليمين بدلاً من اليسار في RTL */
}

.back-to-top.show {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
}

.back-to-top:hover {
    background-color: #0d46b3 !important;
    transform: translateY(-5px) !important;
}

html {
    scroll-behavior: smooth !important;
}


/* ملف icu.css - ستايلات سلة المشتريات ورسائل التنبيه */


/* ستايل زر "أضف للسلة" */

.add-to-cart-btn {
    background-color: #28a745 !important;
    color: white !important;
    border: none !important;
    padding: 10px 15px !important;
    border-radius: 5px !important;
    cursor: pointer !important;
    font-size: 16px !important;
    margin-top: 10px !important;
    transition: background-color 0.3s ease-in-out, transform 0.2s ease-in-out !important;
    width: 50% !important;
    box-sizing: border-box !important;
    margin: auto !important;
}

.add-to-cart-btn:hover {
    background-color: #218838 !important;
    transform: translateY(-2px) !important;
}

.add-to-cart-btn:active {
    transform: translateY(0) !important;
}


/* سلة المشتريات الجانبية - تم تصغير عرضها */

.side-cart {
    position: fixed !important;
    top: 0 !important;
    left: -260px !important;
    /* مخفية في البداية على اليسار - تم تصغيرها */
    right: auto !important;
    width: 250px !important;
    /* تم تصغير العرض */
    height: 100% !important;
    background-color: #f8f8f8 !important;
    box-shadow: 5px 0 15px rgba(0, 0, 0, 0.2) !important;
    z-index: 2800 !important;
    transition: left 0.3s ease-in-out !important;
    flex-direction: column !important;
    padding: 20px !important;
    box-sizing: border-box !important;
    overflow-y: auto !important;
}


/* في حالة فتح السلة، تتحرك إلى 0 من اليسار */

.side-cart.open {
    left: 0 !important;
}


/* التعامل مع LTR: في LTR تفتح من اليمين */

body[dir="ltr"] .side-cart,
html[dir="ltr"] .side-cart {
    left: auto !important;
    /* إلغاء left */
    right: -280px !important;
    /* مخفية في البداية على اليمين - تم تصغيرها */
    transition: right 0.3s ease-out !important;
    /* انتقال لل right */
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.2) !important;
    /* ظل لليسار */
}

body[dir="ltr"] .side-cart.open,
html[dir="ltr"] .side-cart.open {
    right: 0 !important;
    /* عند الفتح في LTR، تتحرك إلى 0 من اليمين */
}

.cart-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 20px !important;
    padding-bottom: 10px !important;
    border-bottom: 1px solid #000 !important;
}

.cart-header h2 {
    margin: 0 !important;
    color: #0b3d91 !important;
    font-size: 24px !important;
}

.close-cart-btn {
    background: none !important;
    border: none !important;
    font-size: 30px !important;
    color: #555 !important;
    cursor: pointer !important;
    padding: 5px !important;
    line-height: 1 !important;
    transition: color 0.2s ease !important;
    z-index: 99999;
}

.close-cart-btn:hover {
    color: #e74c3c !important;
}

.cart-items-container {
        /* في RTL، أيقونة السلة على أقصى اليسار */
        left: 20px !important;
        transform: none !important;
}

.empty-cart-message {
    text-align: center !important;
    color: #777 !important;
    margin-top: 50px !important;
    font-size: 18px !important;
}


/* ****** التعديلات الجديدة هنا ****** */

.cart-item {
    display: flex !important;
    flex-wrap: wrap !important;
    /* للسماح للعناصر بالنزول لسطر جديد */
    align-items: flex-start !important;
    /* تبدأ العناصر من الأعلى */
    gap: 10px !important;
    padding: 10px 0 20px 0 !important;
    border-bottom: 1px solid #ccc !important;
    /* خط فاصل خفيف تحت كل منتج */
    margin-bottom: 10px !important;
    position: relative !important;
    /* لتحديد موضع الأزرار داخلها */
}

.cart-item:last-child {
    border-bottom: none !important;
    /* إزالة الخط الفاصل من آخر عنصر */
    margin-bottom: 0 !important;
}

.cart-item img {
    width: 60px !important;
    height: 60px !important;
    object-fit: cover !important;
    border-radius: 5px !important;
    border: 1px solid #ddd !important;
    flex-shrink: 0 !important;
    /* منع الصورة من الانكماش */
}

.cart-item-details {
    flex-grow: 1 !important;
    min-width: 100px !important;
    /* لضمان ألا ينكمش النص أكثر من اللازم */
    text-align: right !important;
    /* محاذاة النص لليمين في RTL */
}

.cart-item-details h4 {
    margin: 0 0 5px 0 !important;
    font-size: 16px !important;
    color: #333 !important;
}

.cart-item-details p {
    margin: 0 !important;
    font-size: 14px !important;
    color: #666 !important;
}


/* حاوية أزرار تعديل الكمية */

.cart-item-controls {
    display: flex !important;
    justify-content: center !important;
    /* توسيط الأزرار تحت المنتج */
    align-items: center !important;
    width: 100% !important;
    /* تأخذ عرض العنصر الأب كاملاً */
    margin-top: 10px !important;
    /* مسافة من فوق النص */
    padding-top: 8px !important;
    /* مسافة داخلية من الأعلى */
    border-top: 1px dotted #e0e0e0 !important;
    /* خط فاصل خفيف فوق الأزرار */
    flex-wrap: wrap !important;
    /* تسمح للعناصر بالنزول لسطر جديد إذا ضاقت المساحة */
    gap: 8px !important;
    /* مسافة بين الأزرار */
}

.cart-item-actions {
    display: flex !important;
    align-items: center !important;
    gap: 5px !important;
}

.cart-item-actions button {
    background-color: #0b3d91 !important;
    color: white !important;
    border: none !important;
    width: 28px !important;
    /* حجم أكبر قليلاً */
    height: 28px !important;
    /* حجم أكبر قليلاً */
    border-radius: 3px !important;
    cursor: pointer !important;
    font-size: 18px !important;
    /* حجم أيقونة أكبر قليلاً */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: background-color 0.2s ease !important;
}

.cart-item-actions button:hover {
    background-color: #0d46b3 !important;
}

.cart-item-actions span {
    font-size: 16px !important;
    font-weight: bold !important;
    color: #333 !important;
    min-width: 25px !important;
    /* مساحة أكبر للرقم */
    text-align: center !important;
}


/* زر حذف المنتج - تم تصغيره */

.remove-item-btn {
    background-color: #dc3545 !important !important;
    padding: 5px 10px !important !important;
    /* تصغير الـ padding */
    border-radius: 5px !important;
    font-size: 15px !important;
    width: auto !important;
    /* يجعل العرض تلقائي بناءً على المحتوى */
    flex-grow: 0 !important;
    /* يمنع الزر من النمو لملء المساحة */
    margin-right: 0 !important;
    /* إزالة أي margin-right سابق */
}

.remove-item-btn:hover {
    background-color: #c82333 !important !important;
}


/* ****** نهاية التعديلات الجديدة ****** */

.cart-summary {
    text-align: center !important;
    padding: 15px 0 !important;
    border-top: 1px solid #eee !important;
    margin-top: 15px !important;
    font-size: 18px !important;
    font-weight: bold !important;
    color: #0b3d91 !important;
}

.cart-actions {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
}

.cart-actions button {
    padding: 12px 20px !important;
    border: none !important;
    border-radius: 5px !important;
    font-size: 17px !important;
    cursor: pointer !important;
    transition: background-color 0.3s ease !important;
}

.btn-clear-cart {
    background-color: #6c757d !important;
    color: white !important;
}

.btn-clear-cart:hover {
    background-color: #5a6268 !important;
}

.btn-checkout {
    background-color: #0b3d91 !important;
    color: white !important;
}

.btn-checkout:hover {
    background-color: #0d46b3 !important;
}


/* رسائل التنبيه (Toast Messages) */

.toast-container {
    position: fixed !important;
    bottom: 20px !important;
    /* التغييرات الرئيسية هنا لجعله في المنتصف أفقيًا */
    left: 50% !important;
    /* ضع الحافة اليسرى للحاوية في منتصف الشاشة */
    transform: translateX(-50%) !important;
    /* حرك الحاوية لليسار بنصف عرضها الخاص لتوسيطها */
    right: auto !important;
    /* تأكد من إلغاء أي right قديم */
    /* ----------------------------------------------- */
    z-index: 2500 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    align-items: center !important;
    /* لتوسيط التوستات الفردية داخل الحاوية */
}

body[dir="ltr"] .toast-container,
html[dir="ltr"] .toast-container {
    right: auto !important;
    /* إلغاء right */
    left: 20px !important;
    /* في LTR، تظهر التوست على اليسار */
}

.toast {
    background-color: rgba(0, 0, 0, 0.8) !important;
    color: white !important;
    padding: 12px 20px !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2) !important;
    opacity: 0 !important;
    transform: translateY(20px) !important;
    transition: opacity 0.3s ease-out, transform 0.3s ease-out !important;
    min-width: 250px !important;
    text-align: center !important;
}

.toast.show {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

.toast.success {
    background-color: rgba(40, 167, 69, 0.9) !important;
}

.toast.danger {
    background-color: #cd2b22 !important;
}

.toast.warning {
    background-color: rgba(255, 193, 7, 0.9) !important;
    color: #333 !important;
}


/* تعديل عرض أزرار السلايدر في Device Card */

.device-slider-container .slider-arrow {
    background-color: rgba(11, 61, 145, 0.8) !important;
    color: white !important;
    border-radius: 50% !important;
    width: 40px !important;
    height: 40px !important;
    font-size: 20px !important;
}

.device-slider-container .slider-arrow:hover {
    background-color: rgba(13, 70, 179, 0.9) !important;
}


/* لضمان ظهور زر أضف للسلة بشكل جيد */

.product-card .content {
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    flex-grow: 1 !important;
    padding: 10px !important;
    text-align: center !important;
}

.product-card .content h4,
.product-card .content p {
    margin-bottom: 5px !important;
}

.product-card {
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    height: 100% !important;
}


/* قواعد CSS لضبط الترتيب بناءً على اتجاه الصفحة (LTR/RTL) */


/* هذه القواعد تضمن التبديل الصحيح لمواقع الأيقونات والقائمة في الهيدر */


/* للاجهزة المحمولة والتابلت (أقل من 900px) */

@media (max-width: 899px) {
    /* الوضع الافتراضي RTL (direction: rtl !important;) */
    .menu-toggle {
        order: 1 !important;
        /* زر القائمة على اليمين في RTL */
    }
    .cart-icon-container {
        order: 3 !important;
        /* أيقونة السلة على اليسار في RTL */
    }
    /* في حالة LTR (إذا تم تغيير direction: ltr !important; على body أو html) */
    body[dir="ltr"] .menu-toggle,
    html[dir="ltr"] .menu-toggle {
        order: 3 !important;
        /* زر القائمة على اليمين في LTR */
    }
    body[dir="ltr"] .cart-icon-container,
    html[dir="ltr"] .cart-icon-container {
        order: 1 !important;
        /* أيقونة السلة على اليسار في LTR */
    }
    /* Media Queries for cart on smaller screens */
    .side-cart {
        width: 100% !important;
        /* السلة تأخذ عرض الشاشة بالكامل */
        left: -100% !important;
        /* تخفيها بالكامل */
    }
    .side-cart.open {
        left: 0 !important;
    }
    /* For LTR */
    body[dir="ltr"] .side-cart {
        right: -100% !important;
        left: auto !important;
    }
    body[dir="ltr"] .side-cart.open {
        right: 0 !important;
    }
    .cart-item-controls {
        justify-content: space-around !important;
        /* توزيع الأزرار بالتساوي */
    }
    .cart-item-actions {
        flex-grow: 1 !important;
        /* للسماح لها بأخذ مساحة أكبر */
        justify-content: center !important;
    }
    /* هنا لا نحتاج لـ flex-grow: 1 !important; لزر الحذف في الموبايل لكي لا يأخذ العرض كله */
    .remove-item-btn {
        margin-right: 0 !important;
        /* إزالة المسافة الإضافية */
        /* لا نضع flex-grow: 1 هنا */
    }
}


/* لأجهزة سطح المكتب (أكبر من 900px) */

@media (min-width: 900px) {
    /* الوضع الافتراضي RTL (direction: rtl !important;) */
    .main-nav.desktop-nav {
        order: 1 !important;
        /* القائمة على اليمين في RTL */
    }
    .cart-icon-container {
    }
    /* في حالة LTR (إذا تم تغيير direction: ltr !important; على body أو html) */
    body[dir="ltr"] .main-nav.desktop-nav,
    html[dir="ltr"] .main-nav.desktop-nav {
        order: 3 !important;
        /* القائمة على اليمين في LTR */
    }
    body[dir="ltr"] .cart-icon-container,
    html[dir="ltr"] .cart-icon-container {
        order: 1 !important;
        /* أيقونة السلة على اليسار في LTR */
    }
    /* تعديل اتجاه أسهم السلايدر ليتناسب مع LTR أيضاً */
    body[dir="ltr"] .slider-arrow.left-arrow {
        left: 0 !important;
        right: auto !important;
    }
    body[dir="ltr"] .slider-arrow.right-arrow {
        right: 0 !important;
        left: auto !important;
    }
    body[dir="ltr"] .slider-arrow.left-arrow i {
        transform: scaleX(1) !important;
    }
    body[dir="ltr"] .slider-arrow.right-arrow i {
        transform: scaleX(1) !important;
    }
}

/* --- icu.css --- */
body {
    font-family: 'Cairo', sans-serif;
    direction: rtl;
    background-color: #e0ecff;
}

/* القسم الرئيسي */
.section-header {
    text-align: center;
    padding: 40px 10px 20px;
    background-color: #f0f7ff;
    border-bottom: 2px solid #d1e0f0;
}

.section-header h1 {
    font-size: 2.2em;
    color: #004080;
    margin-bottom: 10px;
}

.section-header p {
    color: #555;
    font-size: 1.1em;
    margin-top: 10px;
}

/* روابط الماركات أعلى المنتجات */
.device-nav-links {
    background-color: #d8e9ff;
    padding: 10px 0;
    margin-bottom: 20px;
    border-bottom: 1px solid #b0cde5;
}

.nav-links-container {
    justify-content: center;
    gap: 10px;
    padding: 0 20px;
    overflow: auto;
    scrollbar-width: thin;
    scrollbar-color: #0000cc #ADD8E6;
}

.nav-link-item {
    background-color: #007bff5d;
    color: white;
    padding: 0px 16px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.nav-link-item:hover {
    background-color: #0056b3;
}

/* كل ماركة - العنوان والسلايدر */
.brand-section {
    margin-bottom: 50px;
    padding: 0 15px;
}
.brand-section h2{
    color: #003366;
    font-size: 1.6em;
    text-align: center;
    margin: 10px auto;
    padding: 20px;
    border-bottom:4px solid #3ac9d3;
}

.brand-section h3 {
    color: #003366;
    font-size: 1.6em;
    margin-bottom: 20px;
    padding-bottom: 5px;
}

/* سلايدر المنتجات */
.device-slider-container {
    position: relative;
    display: flex;
    align-items: center;
    overflow: auto;
    scrollbar-width: thin;
    scrollbar-color: #0000cc #ADD8E6;
}

.device-slider {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 10px 0;
    scrollbar-width: thin; /* لمتصفحات Firefox */
    scrollbar-color: #0000cc #ADD8E6; /* لمتصفحات Firefox (مقابض، مسار) */
}

/* لمتصفحات WebKit (Chrome, Safari, Edge) */
.device-slider::-webkit-scrollbar {
    height: 10px; /* لتحديد ارتفاع شريط التمرير الأفقي */
}

.device-slider::-webkit-scrollbar-track {
    background: rgba(139, 69, 19, 0.4); /* خلفية بنية شفافة */
    border-radius: 10px;
}

.device-slider::-webkit-scrollbar-thumb {
    background-color: #0000FF; /* لون أزرق للمقبض */
    border-radius: 10px;
    border: 2px solid rgba(255, 255, 255, 0.2); /* إضافة حدود للمقبض لمظهر أفضل */
}

/* عند تمرير الماوس فوق المقبض */
.device-slider::-webkit-scrollbar-thumb:hover {
    background-color: #0000CC; /* لون أزرق أغمق عند التمرير */
}

.device-slider::-webkit-scrollbar {
    display: none;
}

/* أسهم التنقل */
.slider-arrow {
    background-color: rgba(0, 123, 255, 0.8);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.2em;
    width: 36px;
    height: 36px;
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2501;
    transition: background-color 0.3s ease;
}

.left-arrow {
    left: 0;
}

.right-arrow {
    right: 0;
}

.slider-arrow:hover {
    background-color: #0056b3;
}

/* كروت المنتجات */
.product-card {
    flex: 0 0 auto;
    width: 250px;
    background-color: white;
    border-radius: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 15px;
    text-align: center;
    transition: transform 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
}

/* صورة المنتج */


/* اسم المنتج */
.product-card h3 {
    font-size: 1.1em;
    margin: 10px 0 5px;
    color: #004080;
}

/* وصف المنتج */
.product-card p {
    font-size: 0.95em;
    color: #666;
    margin-bottom: 10px;
    min-height: 50px;
}

/* السعر */
.product-card .price {
    display: block;
    color: #007bff;
    font-weight: bold;
    margin-bottom: 10px;
    font-size: 1.1em;
}

/* زر الإضافة للسلة */
.add-to-cart-btn {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 10px 12px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.95em;
    transition: background-color 0.3s ease;
}

.add-to-cart-btn:hover {
    background-color: #218838;
}

@media (max-width: 600px) {

    .section-header h1 {
        font-size: 1.8em;
    }
}


/* Floating Contact Button Container */
/* floating-contact-btn container */
/* لا تضع width أو height هنا، فقط position و z-index */
.floating-contact-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    /* أو left: 20px; لـ RTL */
    z-index: 2779;
}


/* Main Button Style */
.floating-contact-btn .main-btn {
    background-color: #000;
    color: white;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    cursor: pointer;
    border: none;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: transform 2s ease, background-color 2s ease;
    position: relative; /* **مهم جداً: لتحديد موضع الـ ::after بالنسبة له** */
    z-index: 2779; /* **مهم جداً: ليكون أعلى من كل شيء آخر** */
    /* لا نحتاج overflow: hidden; هنا */
}

.floating-contact-btn .main-btn:hover {
    background-color: #000641;
}

/* الأيقونة داخل الزر الرئيسي - تأكد من أنها في المقدمة */
.floating-contact-btn .main-btn i {
    position: relative;
    z-index: 2779; /* تأكد أن الأيقونة أعلى من العنصر الزائف الذي سيكون له z-index: 1 */
}


/* Contact Options Container - هذا الجزء كما أرسلته لي تماماً */
.floating-contact-btn .contact-options {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    visibility: hidden;
    opacity: 0;
    transition: visibility 0.3s ease-out, opacity 0.3s ease-out;
    z-index: 2779; /* يجب أن يكون أقل من الزر الرئيسي بقليل ليظهر تحته */
}


/* When the container is 'open' */
.floating-contact-btn.open .contact-options {
    visibility: visible;
    opacity: 1;
}


/* Individual Option Buttons - هذا الجزء كما أرسلته لي تماماً */
.floating-contact-btn .option-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 20px;
    color: white;
    text-decoration: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    background-color: #eee;
    opacity: 0;
    transform: scale(0.8);
    transition: transform 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55), opacity 0.3s ease-out, background-color 0.3s ease;
    position: absolute;
    left: 50%;
    transform: translateX(-50%) scale(0.8);
    z-index: 2779;
}


/* Specific Colors for Option Buttons */
.floating-contact-btn .option-btn.whatsapp {
    background-color: #25D366;
}

.floating-contact-btn .option-btn.facebook {
    background-color: #1877F2;
}

.floating-contact-btn .option-btn.email {
    background-color: #D44638;
}

.floating-contact-btn .option-btn.phone {
    background-color: #6c757d;
}


/* When the container is 'open' - حرك كل أيقونة لمكانها النهائي وافعل الحركة المستمرة */
.floating-contact-btn.open .option-btn {
    opacity: 1;
    transform: translateX(-50%) scale(1);
    animation-duration: 2s;
    animation-timing-function: ease-in-out;
    animation-iteration-count: infinite;
    animation-direction: alternate;
}


/* Apply staggered delays for each icon's initial appearance and final position */
.floating-contact-btn.open .option-btn:nth-child(1) {
    bottom: calc(45px + 15px);
    transition-delay: 0.05s;
    animation-name: floatAnimation1;
    animation-delay: 0.05s;
}

.floating-contact-btn.open .option-btn:nth-child(2) {
    bottom: calc(45px + 15px + 55px);
    transition-delay: 0.1s;
    animation-name: floatAnimation2;
    animation-delay: 0.1s;
}

.floating-contact-btn.open .option-btn:nth-child(3) {
    bottom: calc(45px + 15px + 55px * 2);
    transition-delay: 0.15s;
    animation-name: floatAnimation3;
    animation-delay: 0.15s;
}

.floating-contact-btn.open .option-btn:nth-child(4) {
    bottom: calc(45px + 15px + 55px * 3);
    transition-delay: 0.2s;
    animation-name: floatAnimation4;
    animation-delay: 0.2s;
}


/* Rotate the main button icon when open */
.floating-contact-btn.open .main-btn i {
    transform: rotate(180deg);
}


/* For RTL Layout */
html[dir="rtl"] .floating-contact-btn {
    right: auto;
    left: 20px;
}

html[dir="rtl"] .floating-contact-btn .option-btn {
    left: 50%;
    transform: translateX(-50%) scale(0.8);
}

html[dir="rtl"] .floating-contact-btn.open .option-btn {
    transform: translateX(-50%) scale(1);
}


/* ------------------------------------------------------------------- */


/* KEYFRAMES FOR THE CONTINUOUS FLOATING ANIMATION - هذا الجزء كما أرسلته لي تماماً */


/* ------------------------------------------------------------------- */

@keyframes floatAnimation1 {
    0% {
        transform: translateX(-50%) translateY(0px) scale(1);
    }
    50% {
        transform: translateX(-50%) translateY(-5px) scale(1);
    }
    100% {
        transform: translateX(-50%) translateY(0px) scale(1);
    }
}

@keyframes floatAnimation2 {
    0% {
        transform: translateX(-50%) translateY(0px) scale(1);
    }
    50% {
        transform: translateX(-50%) translateY(-7px) scale(1);
    }
    100% {
        transform: translateX(-50%) translateY(0px) scale(1);
    }
}

@keyframes floatAnimation3 {
    0% {
        transform: translateX(-50%) translateY(0px) scale(1);
    }
    50% {
        transform: translateX(-50%) translateY(-4px) scale(1);
    }
    100% {
        transform: translateX(-50%) translateY(0px) scale(1);
    }
}

@keyframes floatAnimation4 {
    0% {
        transform: translateX(-50%) translateY(0px) scale(1);
    }
    50% {
        transform: translateX(-50%) translateY(-6px) scale(1);
    }
    100% {
        transform: translateX(-50%) translateY(0px) scale(1);
    }
}


/* ------------------------------------------------------------------- */
/* أكواد إضافة النص "تواصل معنا" كـ مستطيل يظهر من ناحية اليمين */
/* ------------------------------------------------------------------- */

.floating-contact-btn .main-btn::after { /* تطبيق العنصر الزائف على الزر الرئيسي نفسه */
    content: "تواصل معنا"; /* المحتوى النصي */
    position: absolute; /* ليتموضع بحرية داخل الـ main-btn (الذي هو position: relative) */
    
    top: 50%; /* يتمركز عمودياً مع الزر */
    transform: translateY(-50%); /* لضبط المحاذاة العمودية تماماً */
    
    left: 100%; /* يبدأ من أقصى يمين الزر الرئيسي */
    margin-left: 15px; /* مسافة 15 بكسل بين الزر والنص */
    
    width: 120px; /* عرض المستطيل النصي */
    height: 30px; /* ارتفاع المستطيل النصي */
    background-color: #000; /* نفس لون الزر الرئيسي */
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.8em; /* حجم الخط أصغر قليلاً ليتناسب مع الارتفاع */
    white-space: nowrap; /* يمنع النص من النزول لسطر جديد */
    border-radius: 8px; /* أطراف مستطيلة دائرية قليلاً */
    box-shadow: 0 2px 5px rgba(0,0,0,0.2); /* ظل بسيط للمستطيل */
    opacity: 0; /* يكون مخفياً في البداية */
    
    z-index: 2778; /* يجب أن يكون أقل من z-index للأيقونة الداخلية (2) */

    /* الأنييميشن */
    animation: slideTextFromRight 6s infinite ease-in-out; /* 6 ثواني مدة الدورة الكاملة */
}

/* Keyframes لحركة النص المنزلق من ناحية اليمين (لغات LTR) */
@keyframes slideTextFromRight {
    0% {
        transform: translateY(-50%) translateX(0); /* يبدأ من موقعه الأولي (left: 100%, margin-left: 15px) ويكون مخفياً */
        opacity: 0;
    }
    10% {
        transform: translateY(-50%) translateX(-120px); /* ينزلق لليسار بمقدار عرضه ليظهر كاملاً بجانب الزر */
        opacity: 1;
    }
    80% {
        transform: translateY(-50%) translateX(-120px); /* يظل مرئيًا في مكانه */
        opacity: 1;
    }
    100% {
        transform: translateY(-50%) translateX(0); /* يعود لينزلق ويختفي لليمين */
        opacity: 0;
    }
}

/* تعديلات خاصة بـ RTL (من اليمين لليسار) */
html[dir="rtl"] .floating-contact-btn .main-btn::after {
    left: auto; /* إلغاء قيمة left الافتراضية */
    right: 100%; /* يبدأ من أقصى يسار الزر الرئيسي */
    margin-left: auto; /* إلغاء margin-left */
    margin-right: 15px; /* مسافة 15 بكسل بين الزر والنص */
    
    /* الأنييميشن لـ RTL */
    animation: slideTextFromLeftRTL 6s infinite ease-in-out;
}

/* Keyframes لحركة النص المنزلق من ناحية اليسار (لغات RTL) */
@keyframes slideTextFromLeftRTL {
    0% {
        transform: translateY(-50%) translateX(110px) rotateY(90deg); /* يبدأ من موقعه الأولي (right: 100%, margin-right: 15px) ويكون مخفياً */
        opacity: 0;
    }
    10% {
        transform: translateY(-50%) translateX(160px) rotateY(0deg); /* ينزلق لليمين بمقدار عرضه ليظهر كاملاً بجانب الزر */
        opacity: 1;
    }
    60% {
        transform: translateY(-50%) translateX(160px) rotateY(0deg); /* يظل مرئيًا في مكانه */
        opacity: 1;
    }
    70% {
        transform: translateY(-50%) translateX(110px) rotateY(90deg); /* يعود لينزلق ويختفي لليسار */
        opacity: 0;
    }
    100% {
        transform: translateY(-50%) translateX(110px) rotateY(90deg); /* يعود لينزلق ويختفي لليسار */
        opacity: 0;
    }
}



/* Modal Styles */
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 2601; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgba(0,0,0,0.7); /* Black w/ opacity */
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
}

.modal.visible {
    display: flex; /* Display as flex when visible */
}

.modal-content {
    background-color: #fefefe;
    margin: auto;
    padding: 25px;
    border-radius: 8px;
    width: 90%;
    max-width: 900px; /* Adjust max-width as needed */
    position: relative;
    display: flex;
    flex-wrap: wrap; /* Allow content to wrap */
    gap: 20px; /* Spacing between image and details */
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.close-modal {
    color: #aaa;
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001; /* Ensure it's above other content */
}

.close-modal:hover,
.close-modal:focus {
    color: #333;
    text-decoration: none;
    cursor: pointer;
}

.modal-body {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 20px !important;
    width: 100% !important;
    flex-direction: column !important;
    align-content: center !important;
    justify-content: center !important;
    align-items: center !important;
}

.modal-image-gallery {
    flex: 1; /* Takes available space */
    min-width: 300px; /* Minimum width for the image section */
    text-align: center;
}

.main-modal-image {
    width: 100%;
    max-height: 400px; /* Limit main image height */
    object-fit: contain;
    border-radius: 5px;
    margin-bottom: 10px;
}

.thumbnail-container {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.thumbnail-image {
    width: 80px; /* Size of thumbnails */
    height: 80px;
    object-fit: cover;
    border: 2px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.thumbnail-image:hover {
    border-color: #007bff;
}

.modal-product-details {
    flex: 1; /* Takes available space */
    min-width: 300px; /* Minimum width for details section */
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
}

.modal-product-details h2 {
    margin-top: 0;
    font-size: 1.8em;
    color: #333;
    margin-bottom: 10px;
}

.product-modal-description {
    font-size: 1.1em;
    color: #555;
    line-height: 1.6;
    margin-bottom: 20px;
    text-align: right; /* للعربية */
}

.modal-price-container {
    display: flex;
    align-items: baseline;
    margin-bottom: 20px;
}

/* Updated for old price */
.old-price {
    text-decoration: line-through;
    color: #999;
    font-size: 1.2em; /* Bigger than card, slightly smaller than new price */
    margin-right: 10px; /* Spacing for Arabic LTR display */
}

.current-price {
    font-size: 1.6em; /* Current price is prominent */
    color: #007bff; /* Highlight current price */
    font-weight: bold;
}

.modal-product-details .add-to-cart-btn {
    background-color: #28a745;
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.1em;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.3s ease;
}

.modal-product-details .add-to-cart-btn:hover {
    background-color: #218838;
}

/* Media queries for responsiveness */
@media (max-width: 768px) {
    .modal-content {
        flex-direction: column;
        width: 95%;
        padding: 15px;
    }
    .modal-image-gallery, .modal-product-details {
        min-width: unset; /* Remove min-width on smaller screens */
        width: 100%;
    }
    .main-modal-image {
        max-height: 300px;
    }
    .modal-product-details h2 {
        font-size: 1.5em;
    }
    .product-modal-description {
        font-size: 1em;
    }
    .old-price {
        font-size: 1em;
    }
    .current-price {
        font-size: 1.4em;
    }
}



/* ملف: style.css أو أي ملف CSS تستخدمه */

/* Modal Styling */
.device-modal {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.7);
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.device-modal.visible {
    display: flex; /* Show when visible */
    opacity: 1;
}

.device-modal.hidden {
    display: none; /* Hide when hidden class is added */
}

.modal-content {
    background-color: #fefefe;
    margin: auto;
    padding: 20px;
    border-radius: 8px;
    width: 90%;
    max-width: 900px; /* Adjust as needed */
    position: relative;
    display: flex;
    flex-direction: column; /* Stack content vertically */
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    animation: slideIn 0.3s forwards; /* Simple animation */
}

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

.close-modal {
    color: #aaa;
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-modal:hover,
.close-modal:focus {
    color: #333;
    text-decoration: none;
}

.modal-body {
    display: flex;
    flex-direction: column; /* Stack images, then details */
    gap: 20px;
    padding-top: 20px; /* Space for close button */
}

@media (min-width: 768px) {
    .modal-body {
        flex-direction: row; /* Side-by-side on larger screens */
        align-items: flex-start;
    }
}

/* Image Gallery in Modal */
.modal-image-gallery {
    flex: 1; /* Take available space */
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    position: relative;
    width: 100%; /* For slider buttons */
}

.gallery-main-image {
    width: 100%;
    max-width: 400px; /* Max width for main image */
    height: auto;
    text-align: center;
    position: relative; /* To position arrows */
}

.gallery-main-image img {
    width: 100%;
    height: auto;
    max-height: 450px; /* Limit height */
    object-fit: contain; /* Ensure image fits */
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.gallery-thumbnails-wrapper {
    width: 100%;
    overflow-x: auto; /* Allow horizontal scroll for thumbnails */
    padding: 5px 0;
}

.gallery-thumbnails {
    display: flex;
    gap: 10px;
    justify-content: center; /* Center thumbnails */
    padding: 5px;
}

.thumbnail-image {
    width: 70px; /* Fixed width for thumbnails */
    height: 70px; /* Fixed height */
    object-fit: cover;
    border: 2px solid transparent;
    border-radius: 5px;
    cursor: pointer;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.thumbnail-image:hover {
    border-color: #007bff; /* Example hover color */
    transform: scale(1.05);
}

.thumbnail-image.active {
    border-color: #28a745; /* Active thumbnail border color */
    box-shadow: 0 0 0 2px #28a745;
}

/* Slider Navigation Buttons for Modal Gallery */
.slider-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 10px;
    cursor: pointer;
    font-size: 20px;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.3s ease;
    z-index: 10;
}

.slider-nav-btn:hover {
    background-color: rgba(0, 0, 0, 0.7);
}

.prev-slide {
    left: 10px;
}

.next-slide {
    right: 10px;
}

/* Product Details in Modal */
.modal-product-details {
    flex: 1; /* Take available space */
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 10px;
    direction: rtl; /* If RTL is default */
    text-align: right; /* If RTL is default */
}
html[dir="ltr"] .modal-product-details {
    direction: ltr;
    text-align: left;
}


.modal-product-details h2 {
    font-size: 2em;
    margin-bottom: 10px;
    color: #333;
}

.product-modal-description {
    font-size: 1.1em;
    color: #555;
    line-height: 1.6;
    margin-bottom: 15px;
}

.modal-price-container {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap; /* Allow prices to wrap on small screens */
}

.modal-price-container .current-price {
    font-size: 1.8em;
    font-weight: bold;
    color: #28a745; /* Success color for current price */
}

.modal-price-container .old-price {
    font-size: 1.2em;
    color: #888;
    text-decoration: line-through;
}

.add-to-cart-btn {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.1em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: background-color 0.3s ease;
    width: fit-content; /* Adjust button width to content */
}

.add-to-cart-btn:hover {
    background-color: #0056b3;
}

.no-scroll {
    overflow: hidden;
}







/* تنسيق نموذج بيانات العميل في السلة الجانبية */
.checkout-details {
    padding: 15px;
    border-top: 1px solid #eee;
    margin-top: 15px;
    background-color: #f9f9f9;
    border-radius: 5px;
    display: none; /* مخفي افتراضياً */
}

.checkout-details h3 {
    text-align: center;
    color: #333;
    margin-bottom: 15px;
    font-size: 1.2em;
}

.checkout-details input[type="text"],
.checkout-details input[type="tel"],
.checkout-details input[type="email"],
.checkout-details textarea {
    width: calc(100% - 20px); /* مع مراعاة البادينج */
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9em;
    box-sizing: border-box; /* لضمان أن العرض يشمل البادينج والحدود */
}

.checkout-details textarea {
    resize: vertical; /* السماح بتغيير حجم مربع النص رأسياً */
    min-height: 60px;
}

.checkout-details button {
    display: block;
    width: 100%;
    padding: 12px;
    background-color: #28a745; /* لون أخضر جميل */
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1em;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-top: 10px;
}

.checkout-details button:hover {
    background-color: #218838;
}

/* تنسيق أزرار السلة في الأسفل */
.cart-actions {
    display: flex;
    justify-content: space-between;
    padding: 15px;
    border-top: 1px solid #eee;
    background-color: #fff;
}

.cart-actions .btn-checkout {
    flex-grow: 1;
    margin-left: 10px; /* مسافة بين الأزرار */
    background-color: #007bff;
}

.cart-actions .btn-checkout:hover {
    background-color: #0056b3;
}

.cart-actions .btn-clear-cart {
    background-color: #dc3545;
}

.cart-actions .btn-clear-cart:hover {
    background-color: #c82333;
}

/* تنسيق لرسائل التوست */
.toast-container {
    position: fixed;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background-color: #333;
    color: white;
    padding: 10px 15px;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    opacity: 0;
    animation: fadeInOut 3s forwards;
}

.toast.success {
    background-color: #28a745;
}

.toast.error {
    background-color: #dc3545;
}

.toast.info {
    background-color: #17a2b8;
}

@keyframes fadeInOut {
    0% { opacity: 0; transform: translateY(-20px); }
    10% { opacity: 1; transform: translateY(0); }
    90% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-20px); }
}













