/* ========================================= */
        /* تنسيقات أساسية آمنة */
        /* ========================================= */
        html, body {
            width: 100% !important;
            max-width: 100vw !important;
            overflow-x: hidden !important;
            margin: 0;
            padding: 0;
            position: relative;
        }

        *, *::before, *::after {
            box-sizing: border-box;
            -webkit-box-sizing: border-box;
        }

        img, video, iframe, svg {
            max-width: 100% !important;
            height: auto !important;
        }

        .sabron-header-wrapper {
            font-family: 'Cairo', sans-serif;
            direction: inherit;
            width: 100%;
            position: relative;
            z-index: 60;
        }

        .sabron-header-wrapper a {
            text-decoration: none;
        }

        .header-spacer {
            height: 82px;
        }

        /* ========================================= */
        /* الهيدر الاحترافي */
        /* ========================================= */
        .sabron-navbar {
            width: 100%;
            max-width: 100vw;
            background: rgba(255, 255, 255, 0.97);
            backdrop-filter: blur(16px);
            -webkit-backdrop-filter: blur(16px);
            border-bottom: 1px solid rgba(148, 163, 184, 0.24);
            box-shadow: 0 10px 30px rgba(2, 6, 23, 0.07);
        }

        .sabron-navbar::before {
            content: '';
            position: absolute;
            inset: 0;
            background:
                radial-gradient(circle at 10% 0%, rgba(124, 58, 237, 0.08), transparent 22%),
                radial-gradient(circle at 90% 0%, rgba(59, 130, 246, 0.06), transparent 22%);
            pointer-events: none;
        }

        .sabron-nav-inner {
            position: relative;
            z-index: 2;
            min-height: 82px;
            gap: 16px;
        }

        /* اللوجو والهوية */
        .brand-link {
            display: flex;
            align-items: center;
            gap: 11px;
            flex-shrink: 0;
            margin-inline-start: 0;
            margin-inline-end: 4px;
        }

        .brand-logo-box {
            width: 64px;
            height: 64px;
            border-radius: 18px;
            background: #ffffff !important;
            padding: 0 !important;
            display: flex;
            align-items: center;
            justify-content: center;
            color: #0B1320;
            box-shadow:
                0 12px 30px rgba(11, 19, 32, 0.16),
                0 0 0 4px rgba(212, 175, 55, 0.08);
            overflow: hidden;
            transition: transform 0.3s ease, box-shadow 0.3s ease;
            border: 1px solid rgba(212, 175, 55, 0.42);
        }

        .brand-link:hover .brand-logo-box {
            transform: translateY(-2px) scale(1.03);
            box-shadow:
                0 18px 36px rgba(11, 19, 32, 0.20),
                0 0 0 5px rgba(212, 175, 55, 0.10);
        }

        .brand-logo-box img {
            width: 54px !important;
            height: 54px !important;
            min-width: 54px !important;
            min-height: 54px !important;
            max-width: 54px !important;
            max-height: 54px !important;
            object-fit: contain !important;
            object-position: center !important;
            transform: none !important;
            transform-origin: center center !important;
            padding: 0 !important;
            margin: 0 !important;
            display: block !important;
        }

        .brand-text {
            min-width: 0;
        }

        .brand-title {
            display: block;
            font-size: 1.45rem;
            font-weight: 900;
            color: #0f172a;
            line-height: 1;
            letter-spacing: -0.4px;
            margin-bottom: 2px;
        }

        .brand-subtitle {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            font-size: 0.62rem;
            color: #7c3aed;
            font-weight: 800;
            letter-spacing: 0.14em;
            text-transform: uppercase;
            white-space: nowrap;
        }

        .brand-subtitle::before {
            content: '';
            width: 8px;
            height: 8px;
            border-radius: 999px;
            background: linear-gradient(135deg, #8b5cf6, #3b82f6);
            box-shadow: 0 0 10px rgba(124, 58, 237, 0.35);
        }

        /* روابط الديسكتوب */
        .desktop-nav-shell {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 3px;
            width: 100%;
            max-width: 1120px;
            background: #ffffff;
            border: 1px solid rgba(203, 213, 225, 0.95);
            border-radius: 999px;
            padding: 6px 8px;
            box-shadow:
                inset 0 1px 0 rgba(255,255,255,0.9),
                0 8px 24px rgba(15, 23, 42, 0.06);
        }

        .nav-center {
            flex: 1 1 auto;
            min-width: 0;
            justify-content: center;
        }

        .nav-link-active {
            padding: 11px 16px;
            border-radius: 999px;
            font-size: 0.93rem;
            font-weight: 800;
            color: #5b21b6;
            background: linear-gradient(180deg, #ffffff, #f8fafc);
            border: 1px solid rgba(226, 232, 240, 0.95);
            box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
            transition: all 0.25s ease;
            white-space: nowrap;
        }

        .nav-link-normal {
            padding: 11px 16px;
            border-radius: 999px;
            font-size: 0.93rem;
            font-weight: 700;
            color: #1e293b;
            transition: all 0.25s ease;
            white-space: nowrap;
        }

        .nav-link-normal:hover {
            color: #4c1d95;
            background: rgba(241, 245, 249, 1);
        }

        /* الأدوات اليمينية */
        .header-tools {
            display: flex;
            align-items: center;
            gap: 8px;
            flex-shrink: 0;
        }

        .cart-btn {
            position: relative;
            width: 40px;
            height: 40px;
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: #334155;
            background: #ffffff;
            border: 1px solid rgba(203, 213, 225, 0.95);
            transition: all 0.25s ease;
            box-shadow: inset 0 1px 0 rgba(255,255,255,0.75);
        }

        .cart-btn:hover {
            color: #7c3aed;
            background: #fff;
            transform: translateY(-1px);
            box-shadow: 0 10px 20px rgba(15, 23, 42, 0.07);
        }

        .cart-dot {
            position: absolute;
            top: 8px;
            right: 8px;
            width: 10px;
            height: 10px;
            background: #ef4444;
            border-radius: 999px;
            border: 2px solid #fff;
            box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.10);
        }

        .header-divider {
            height: 28px;
            width: 1px;
            background: linear-gradient(180deg, transparent, rgba(148, 163, 184, 0.5), transparent);
        }

        .user-menu-btn {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 5px 8px 5px 12px;
            border-radius: 999px;
            border: 1px solid rgba(226, 232, 240, 0.95);
            background: linear-gradient(180deg, #ffffff, #f8fafc);
            transition: all 0.25s ease;
            cursor: pointer;
            box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
        }

        .user-menu-btn:hover {
            border-color: rgba(124, 58, 237, 0.28);
            box-shadow: 0 12px 24px rgba(124, 58, 237, 0.08);
        }

        .user-menu-btn .avatar-pill {
            width: 34px;
            height: 34px;
            border-radius: 999px;
            background: linear-gradient(135deg, #ede9fe, #ddd6fe);
            color: #6d28d9;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: inset 0 1px 0 rgba(255,255,255,0.7);
            flex-shrink: 0;
        }

        .user-dropdown-panel {
            position: absolute;
            top: calc(100% + 12px);
            left: 0;
            width: 260px;
            background: rgba(255,255,255,0.98);
            border: 1px solid rgba(226, 232, 240, 0.95);
            border-radius: 20px;
            box-shadow: 0 24px 50px rgba(2, 6, 23, 0.14);
            overflow: hidden;
            z-index: 80;
            transform-origin: top left;
            transition: all 0.2s ease-in-out;
            backdrop-filter: blur(14px);
        }

        #user-dropdown-menu.hidden {
            display: none;
            opacity: 0;
            transform: scale(0.96);
        }

        #user-dropdown-menu:not(.hidden) {
            display: block;
            opacity: 1;
            transform: scale(1);
        }

        .dropdown-top {
            padding: 16px;
            background: linear-gradient(135deg, rgba(124,58,237,0.08), rgba(59,130,246,0.04));
            border-bottom: 1px solid rgba(241, 245, 249, 1);
        }

        .dropdown-top p {
            margin: 0;
        }

        .dropdown-item {
            display: flex;
            align-items: center;
            padding: 13px 16px;
            font-size: 0.98rem;
            font-weight: 700;
            color: #334155;
            transition: all 0.2s ease;
        }

        .dropdown-item i {
            margin-left: 12px;
            width: 18px;
            text-align: center;
            color: #94a3b8;
            transition: color 0.2s ease;
        }

        .dropdown-item:hover {
            background: rgba(124, 58, 237, 0.06);
            color: #6d28d9;
        }

        .dropdown-item:hover i {
            color: #7c3aed;
        }

        .dropdown-item.logout {
            color: #dc2626;
        }

        .dropdown-item.logout i {
            color: #f87171;
        }

        .dropdown-item.logout:hover {
            background: rgba(239, 68, 68, 0.06);
            color: #b91c1c;
        }

        .auth-links {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .login-link {
            font-size: 0.92rem;
            font-weight: 800;
            color: #1e293b;
            padding: 0 2px;
            transition: color 0.2s ease;
            white-space: nowrap;
        }

        .login-link:hover {
            color: #4c1d95;
        }

        .mobile-menu-btn {
            width: 40px;
            height: 40px;
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: #0f172a;
            background: rgba(248, 250, 252, 0.95);
            border: 1px solid rgba(226, 232, 240, 0.95);
            transition: all 0.25s ease;
            box-shadow: inset 0 1px 0 rgba(255,255,255,0.75);
        }

        .mobile-menu-btn:hover {
            background: #fff;
            box-shadow: 0 10px 20px rgba(15, 23, 42, 0.07);
        }

        /* قائمة الموبايل */
        #mobile-menu {
            transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
            max-height: 0;
            overflow: hidden;
            opacity: 0;
            background: rgba(255,255,255,0.98);
            position: absolute;
            top: 88px;
            left: 0;
            width: 100%;
            z-index: 70;
            box-shadow: 0 24px 50px rgba(2, 6, 23, 0.12);
            border-top: 1px solid rgba(241, 245, 249, 1);
            backdrop-filter: blur(12px);
        }

        #mobile-menu.open {
            max-height: 900px;
            opacity: 1;
            padding-bottom: 18px;
        }

        .mobile-menu-inner {
            padding: 16px;
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

        .mobile-link {
            display: block;
            padding: 14px 16px;
            border-radius: 16px;
            font-size: 1.05rem;
            font-weight: 800;
            color: #334155;
            background: rgba(248, 250, 252, 0.8);
            border: 1px solid rgba(241, 245, 249, 1);
            transition: all 0.2s ease;
        }

        .mobile-link i {
            margin-inline-end: 10px;
            color: #94a3b8;
        }

        .mobile-link:hover {
            color: #6d28d9;
            background: rgba(124,58,237,0.06);
        }

        .mobile-link:hover i {
            color: #7c3aed;
        }

        .mobile-link.active {
            color: #6d28d9;
            background: rgba(124,58,237,0.08);
            border-color: rgba(196, 181, 253, 0.45);
        }

        .mobile-auth-grid {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 10px;
            padding-top: 8px;
        }

        .mobile-login-btn {
            text-align: center;
            padding: 13px 12px;
            border-radius: 14px;
            border: 1.5px solid rgba(226, 232, 240, 1);
            color: #475569;
            background: #fff;
            font-weight: 800;
            font-size: 1rem;
            transition: all 0.2s ease;
        }

        .mobile-login-btn:hover {
            color: #6d28d9;
            border-color: rgba(124,58,237,0.35);
        }

        @media (max-width: 1440px) {
            .sabron-nav-inner {
                gap: 12px;
            }

            .brand-title {
                font-size: 1.32rem;
            }

            .brand-subtitle {
                font-size: 0.56rem;
                letter-spacing: 0.12em;
            }

            .nav-link-active,
            .nav-link-normal {
                padding: 10px 13px;
                font-size: 0.88rem;
            }

            .lang-switcher-btn {
                padding: 8px 11px;
                font-size: 0.78rem;
            }

            .login-link {
                font-size: 0.84rem;
            }
        }

        @media (max-width: 1260px) {
            .brand-subtitle {
                display: none;
            }

            .desktop-nav-shell {
                padding: 5px 6px;
            }

            .nav-link-active,
            .nav-link-normal {
                padding: 9px 10px;
                font-size: 0.8rem;
            }

            .auth-links {
                gap: 6px;
            }

            .lang-switcher-btn {
                padding: 7px 10px;
                font-size: 0.75rem;
            }

            .login-link {
                font-size: 0.78rem;
            }
        }

        @media (max-width: 1024px) {
            .header-spacer {
                height: 82px;
            }

            #mobile-menu {
                top: 82px;
            }
        }

        @media (max-width: 768px) {
            .container {
                padding-left: 20px !important;
                padding-right: 20px !important;
                width: 100% !important;
                max-width: 100% !important;
                overflow: hidden;
            }

            .brand-title {
                font-size: 1.25rem;
            }

            .brand-subtitle {
                font-size: 0.64rem;
                letter-spacing: 0.14em;
            }

            .brand-logo-box {
                width: 52px;
                height: 52px;
                border-radius: 15px;
            }
        }

        @media (max-width: 480px) {
            .header-spacer {
                height: 78px;
            }

            .sabron-nav-inner {
                min-height: 78px;
            }

            #mobile-menu {
                top: 78px;
            }

            .brand-title {
                font-size: 1.25rem;
            }

            .brand-subtitle {
                display: none;
            }
        }

        /* ========================================= */
        /* زر تبديل اللغة */
        /* ========================================= */
        .lang-switcher-btn {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 8px 12px;
            border-radius: 999px;
            font-size: 0.82rem;
            font-weight: 800;
            color: #7c3aed;
            border: 1.5px solid rgba(167, 139, 250, 0.7);
            background: rgba(245, 243, 255, 0.95);
            transition: all 0.22s ease;
            text-decoration: none;
            white-space: nowrap;
            letter-spacing: 0.04em;
        }
        .lang-switcher-btn:hover {
            background: rgba(124, 58, 237, 0.14);
            border-color: rgba(124, 58, 237, 0.55);
            color: #5b21b6;
            transform: translateY(-1px);
        }
    
html[lang="en"] .sabron-header-wrapper{font-family:'Inter',Arial,sans-serif;}

/* Final production logo sizing — overrides earlier compatibility layers. */
@media (min-width: 769px){
  .sabron-header-wrapper .brand-logo-box{
    width:64px!important;height:64px!important;min-width:64px!important;border-radius:18px!important;
    padding:4px!important;background:#fff!important;
  }
  .sabron-header-wrapper .brand-logo-box img{
    width:100%!important;height:100%!important;min-width:0!important;min-height:0!important;
    max-width:100%!important;max-height:100%!important;object-fit:contain!important;
    object-position:center!important;transform:none!important;padding:0!important;margin:0!important;
  }
}
@media (max-width:768px){
  .sabron-header-wrapper .brand-logo-box{width:52px!important;height:52px!important;min-width:52px!important;padding:3px!important;}
  .sabron-header-wrapper .brand-logo-box img{width:100%!important;height:100%!important;object-fit:contain!important;transform:none!important;}
}
