/* ====================================================
   Icon Separation Styles - تنسيق فصل الأيقونات
   ====================================================
   هذا الملف يحتوي على تنسيقات خاصة بفصل الأيقونات عن النصوص
   مع الحفاظ على التصميم والوظائف الأصلية
   ==================================================== */

/* Tajawal Bold Font for Text Only - خط تجوال بولد للنصوص فقط */
.nav-text,
.btn-text,
.cart-text,
.badge-text,
.cart-dropdown-text,
.view-all-text,
.cart-button-text,
.checkout-button-text,
.shopping-button-text {
    font-family: 'Tajawal', sans-serif;
    font-weight: 700;
}

/* Navigation Text - نصوص التنقل */
.nav-text {
    display: inline-block;
    vertical-align: middle;
    font-family: 'Tajawal', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    line-height: 1.4;
}

/* Button Text - نصوص الأزرار */
.btn-text {
    display: inline-block;
    vertical-align: middle;
    font-family: 'Tajawal', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    line-height: 1.4;
}

/* Cart Text - نصوص السلة */
.cart-text {
    display: inline-block;
    vertical-align: middle;
    font-family: 'Tajawal', sans-serif;
    font-weight: 700;
}

/* Badge Text - نصوص الشارات */
.badge-text {
    display: inline-block;
    vertical-align: middle;
    font-family: 'Tajawal', sans-serif;
    font-weight: 700;
}

/* Cart Dropdown Text - نصوص قائمة السلة */
.cart-dropdown-text,
.view-all-text,
.cart-button-text,
.checkout-button-text,
.shopping-button-text {
    display: inline-block;
    vertical-align: middle;
    font-family: 'Tajawal', sans-serif;
    font-weight: 700;
}

/* Navigation Icons - أيقونات التنقل */
.nav-icon-container {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    transition: transform 0.2s ease;
}

.nav-icon-container i {
    font-size: 1.1rem;
    color: inherit;
}

/* Navbar Link Styling - تنسيق روابط شريط التنقل */
.navbar-nav .nav-link {
    font-size: 1rem !important;
    line-height: 1.5 !important;
    padding-top: 0.75rem !important;
    padding-bottom: 0.75rem !important;
    min-height: 48px;
    display: flex;
    align-items: center;
}

.nav-text {
    display: inline-block;
    vertical-align: middle;
}

/* Button Icons - أيقونات الأزرار */
.btn-icon-container {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 16px;
}

.btn-icon-container i {
    font-size: 0.9rem;
    color: inherit;
}

.btn-text {
    display: inline-block;
    vertical-align: middle;
}

/* Cart Icons - أيقونات السلة */
.cart-icon-container {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
}

.cart-icon-container i {
    font-size: 1rem;
    color: inherit;
}

.cart-text {
    display: inline-block;
    vertical-align: middle;
}

/* Dropdown Icons - أيقونات القوائم المنسدلة */
.dropdown-icon-container {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 16px;
}

.dropdown-icon-container i {
    font-size: 0.9rem;
    color: inherit;
}

.dropdown-text {
    display: inline-block;
    vertical-align: middle;
    font-family: 'Tajawal', sans-serif;
    font-weight: 700;
}

/* Search Icons - أيقونات البحث */
.search-icon-container {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 16px;
}

.search-icon-container i {
    font-size: 0.9rem;
    color: inherit;
}

/* Social Media Icons - أيقونات وسائل التواصل */
.social-icon-container {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    min-height: 30px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.social-icon-container i {
    font-size: 1.1rem;
    color: inherit;
}

.social-icon-container:hover {
    transform: scale(1.1);
    background-color: rgba(255, 255, 255, 0.1);
}

/* Language Icons - أيقونات اللغة */
.language-icon-container {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
}

.language-icon-container i {
    font-size: 1rem;
    color: inherit;
}

/* Payment Icons - أيقونات طرق الدفع */
.payment-icon-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    min-height: 40px;
    margin: 0 2px;
    /* Removed background and effects */
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.payment-icon-wrapper i {
    color: inherit;
    font-size: 2rem;
    user-select: none;
    -webkit-user-select: none;
    pointer-events: none;
}

.payment-icon-wrapper img {
    max-height: 32px;
    width: auto;
    object-fit: contain;
    /* Prevent image download/save */
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -webkit-touch-callout: none;
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
}

/* Footer Logo Styling - تنسيق شعار التذييل */
.footer-logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 1rem;
}

.footer-logo {
    transition: all 0.3s ease;
    max-width: 300px;
    max-height: 100px;
    height: auto;
    width: auto;
}

.footer-logo:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

/* Footer Language Switcher - مبدل اللغة في التذييل */
.footer-languages-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 1rem;
}

.footer-languages {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.footer-languages select {
    background-color: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-family: 'Tajawal', sans-serif;
    font-weight: 600;
}

.footer-languages select option {
    background-color: #333;
    color: white;
}

/* Logo Styling - تنسيق الشعارات */
.logo-link, .footer-logo-link {
    display: inline-block;
    transition: all 0.3s ease;
    text-decoration: none;
}

.logo-link:hover, .footer-logo-link:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

.logo-main, .logo-mobile, .footer-logo {
    transition: all 0.3s ease;
    max-width: 100%;
    height: auto;
    display: block;
    visibility: visible;
}

/* Ensure main header logo is visible */
.logo-main {
    max-height: 80px !important;
    width: auto !important;
    object-fit: contain !important;
    display: block !important;
    margin: 0 auto !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Mobile logo styling */
.logo-mobile {
    max-height: 30px;
    width: auto;
}

/* Admin logo specific styling */
.brand-image {
    max-width: 33px;
    height: auto;
}

/* Badge Icons - أيقونات الشارات */
.badge-icon-container {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 16px;
}

.badge-icon-container i {
    font-size: 0.9rem;
    color: inherit;
}

.badge-text {
    display: inline-block;
    vertical-align: middle;
}

/* Cart Dropdown Icons - أيقونات قائمة السلة المنسدلة */
.cart-dropdown-icon-container,
.external-link-icon-container,
.no-image-icon-container,
.remove-icon-container,
.cart-button-icon-container,
.checkout-button-icon-container,
.empty-cart-icon-container,
.shopping-button-icon-container {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.cart-dropdown-icon-container i,
.external-link-icon-container i,
.no-image-icon-container i,
.remove-icon-container i,
.cart-button-icon-container i,
.checkout-button-icon-container i,
.empty-cart-icon-container i,
.shopping-button-icon-container i {
    color: inherit;
}

.cart-dropdown-text,
.view-all-text,
.cart-button-text,
.checkout-button-text,
.shopping-button-text {
    display: inline-block;
    vertical-align: middle;
}

/* Navbar Layout Optimization - تحسين تخطيط شريط التنقل */
.navbar-nav.flex-wrap {
    max-width: 100%;
}

.navbar-nav.flex-lg-nowrap {
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* Internet Explorer 10+ */
}

.navbar-nav.flex-lg-nowrap::-webkit-scrollbar {
    display: none; /* WebKit */
}

.navbar-nav .nav-item {
    flex-shrink: 0;
}

.navbar-nav .nav-link {
    white-space: nowrap;
    min-width: fit-content;
}

/* Products Button Positioning - موضع زر المنتجات */
.products-search-container {
    flex-shrink: 0;
    min-width: fit-content;
}

.products-btn {
    white-space: nowrap;
    min-width: fit-content;
    flex-shrink: 0;
}

/* Search Box Responsive - صندوق البحث المتجاوب */
.search-box {
    min-width: 200px;
    max-width: 300px;
}

@media (max-width: 991px) {
    .search-box {
        min-width: 150px;
        max-width: 250px;
    }
}

/* Cart Section - قسم السلة */
.cart-dropdown {
    flex-shrink: 0;
}

/* Layout Order Control - تحكم في ترتيب التخطيط */
@media (min-width: 992px) {
    .navbar-collapse {
        flex-grow: 1;
        max-width: 100%;
    }
}

/* Responsive Navigation - التنقل المتجاوب */
@media (max-width: 991px) {
    .navbar-nav {
        flex-direction: column;
        width: 100%;
    }
    
    .navbar-nav .nav-link {
        white-space: normal;
        padding: 0.75rem 1rem;
    }
    
    .products-search-container {
        width: 100%;
        margin-top: 1rem;
    }
}

/* Navbar Spacing Fine-tuning - ضبط دقيق لمسافات شريط التنقل */
@media (min-width: 1200px) {
    .navbar-nav .nav-link {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
        font-size: 1.05rem !important;
        line-height: 1.5 !important;
    }
    
    .nav-text {
        font-size: 1.05rem;
    }
}

@media (max-width: 1199px) and (min-width: 992px) {
    .navbar-nav .nav-link {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
        font-size: 0.95rem !important;
        line-height: 1.4 !important;
    }
    
    .nav-text {
        font-size: 0.95rem;
    }
}

/* Prevent Menu Overlap - منع تداخل القائمة */
.navbar-collapse {
    min-height: auto;
}

.navbar-nav {
    max-width: 100%;
    overflow: visible;
}

/* Ensure proper button alignment - ضمان محاذاة الأزرار بشكل صحيح */
.products-search-container .d-flex {
    gap: 0.5rem;
}

/* Container width management - إدارة عرض الحاوية */
@media (min-width: 992px) {
    .navbar .container {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }
    
    .navbar-collapse {
        flex-grow: 1;
        max-width: 100%;
    }
}

/* Text truncation for long menu items - اقتطاع النص للعناصر الطويلة */
.nav-text {
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
    font-size: 1rem;
    line-height: 1.4;
}

@media (min-width: 1200px) {
    .nav-text {
        max-width: 160px;
        font-size: 1.05rem;
    }
}

@media (max-width: 991px) {
    .nav-text {
        max-width: none;
        white-space: normal;
        font-size: 1.1rem;
        line-height: 1.5;
    }
    
    .navbar-nav .nav-link {
        font-size: 1.1rem !important;
        padding-top: 1rem !important;
        padding-bottom: 1rem !important;
        min-height: 52px;
    }
}

/* Tajawal Bold Font Application - تطبيق خط تجوال بولد */
h1, h2, h3, h4, h5, h6,
.navbar-brand,
.nav-link,
.btn,
.card-title,
.card-text,
.badge,
.alert,
.form-label,
.form-control,
.dropdown-item,
.breadcrumb-item,
.pagination,
.list-group-item,
.table,
.modal-title,
.modal-body,
.footer h5,
.footer p,
.footer a,
.text-content,
.product-name,
.product-price,
.category-name,
.news-title,
.news-content,
.page-title,
.section-title {
    font-family: 'Tajawal', sans-serif !important;
    font-weight: 700 !important;
}

/* General Text Elements - العناصر النصية العامة */
p, span, div, a, label, input, textarea, select, option {
    font-family: 'Tajawal', sans-serif;
    font-weight: 700;
}

/* Exclude Icons from Font Changes - استثناء الأيقونات من تغيير الخط */
i, .fa, .fas, .far, .fab, .fal, .fad, .fa-solid, .fa-regular, .fa-brands, .fa-light, .fa-duotone {
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Pro", "Font Awesome 6 Brands" !important;
    font-weight: 900 !important;
}

/* Bootstrap Components with Tajawal Bold - مكونات بوتستراب بخط تجوال بولد */
.navbar-nav .nav-link,
.btn,
.form-control,
.input-group-text,
.dropdown-menu .dropdown-item,
.card .card-header,
.card .card-body,
.card .card-footer,
.alert {
    font-family: 'Tajawal', sans-serif !important;
    font-weight: 700 !important;
}

/* Arabic Text Emphasis - تأكيد النصوص العربية */
[dir="rtl"] * {
    font-family: 'Tajawal', sans-serif;
    font-weight: 700;
}

/* Specific Weight Adjustments - تعديلات أوزان خاصة */
.fw-bold, .font-weight-bold {
    font-weight: 800 !important;
}

.fw-bolder, .font-weight-bolder {
    font-weight: 900 !important;
}

/* Hover Effects - تأثيرات التمرير */
.nav-link:hover .nav-icon-container {
    transform: scale(1.1);
}

.btn:hover .btn-icon-container {
    transform: scale(1.1);
}

.cart-btn:hover .cart-icon-container {
    transform: scale(1.1);
}

/* Animation Support - دعم الحركات */
.nav-icon-container,
.btn-icon-container,
.cart-icon-container,
.search-icon-container,
.language-icon-container,
.badge-icon-container {
    transition: transform 0.2s ease, color 0.2s ease;
}

/* Icon Spacing - مسافات الأيقونات */
.nav-icon-container + .nav-text,
.btn-icon-container + .btn-text,
.cart-icon-container + .cart-text,
.badge-icon-container + .badge-text {
    margin-left: 0.5rem;
}

/* RTL Support - دعم العربية */
[dir="rtl"] .nav-icon-container + .nav-text,
[dir="rtl"] .btn-icon-container + .btn-text,
[dir="rtl"] .cart-icon-container + .cart-text,
[dir="rtl"] .badge-icon-container + .badge-text {
    margin-left: 0;
    margin-right: 0.5rem;
}

/* Accessibility - إمكانية الوصول */
.nav-icon-container:focus,
.btn-icon-container:focus,
.cart-icon-container:focus,
.social-icon-container:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

/* Navbar Spacing Adjustments - تعديل المسافات في شريط التنقل */
.navbar-nav .nav-link {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
}

@media (min-width: 992px) {
    .navbar-nav .nav-link {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }
}

/* Footer Icon Font Fixes - إصلاحات خطوط أيقونات التذييل */
.social-icon-container i,
.payment-icon-wrapper i,
.language-icon-container i {
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Brands" !important;
}

.social-icon-container .fab,
.payment-icon-wrapper .fab {
    font-family: "Font Awesome 6 Brands" !important;
    font-weight: 400 !important;
}

.social-icon-container .fas,
.language-icon-container .fas {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
}

/* Ensure Font Awesome loads properly for footer */
.footer-middle i,
.footer-main i,
.social-links i {
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Brands" !important;
}

.footer-middle .fab,
.footer-main .fab,
.social-links .fab {
    font-family: "Font Awesome 6 Brands" !important;
    font-weight: 400 !important;
}

.footer-middle .fas,
.footer-main .fas,
.social-links .fas {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
}

/* Print Styles - أنماط الطباعة */
@media print {
    .nav-icon-container,
    .btn-icon-container,
    .cart-icon-container,
    .search-icon-container,
    .social-icon-container,
    .language-icon-container,
    .payment-icon-wrapper {
        display: none;
    }
}
