:root {
      --bg: #FFFFFF;
      --canvas: #F8FAFC;
      --card-bg: #FFFFFF;
      --border: #E2E8F0;
      --primary: #D9232E;
      --primary-hover: #B91C1C;
      --brand-red: #D9232E;
      --brand-navy: #0F172A;
      --text: #0F172A;
      --text-muted: #64748B;
      --green: #10B981;
      --orange: #F59E0B;
      --red: #D9232E;
      --shadow: 0 4px 20px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.02);
      --card-radius: 16px;
    }

    html.dark, [data-theme="dark"] {
      --bg: #070A12;
      --canvas: #090E1A;
      --card-bg: #0E1526;
      --border: #1E293B;
      --primary: #D9232E;
      --primary-hover: #B91C1C;
      --brand-red: #D9232E;
      --brand-navy: #0F172A;
      --text: #F8FAFC;
      --text-muted: #94A3B8;
      --green: #10B981;
      --orange: #F59E0B;
      --red: #EF4444;
      --shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
    }

/* ========================================================
       SINGLE UNIFIED FONT FAMILIES
       - Arabic (RTL): 'Cairo', system-ui, sans-serif
       - French (LTR): 'Plus Jakarta Sans', system-ui, sans-serif
       ======================================================== */
    html[lang="ar"],
    html[dir="rtl"],
    [dir="rtl"],
    [dir="rtl"] body,
    [dir="rtl"] button,
    [dir="rtl"] input,
    [dir="rtl"] select,
    [dir="rtl"] textarea,
    [dir="rtl"] h1,
    [dir="rtl"] h2,
    [dir="rtl"] h3,
    [dir="rtl"] h4,
    [dir="rtl"] h5,
    [dir="rtl"] h6,
    [dir="rtl"] span,
    [dir="rtl"] p,
    [dir="rtl"] a {
      font-family: 'Cairo', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    }

    html[lang="fr"],
    html[dir="ltr"],
    [dir="ltr"],
    [dir="ltr"] body,
    [dir="ltr"] button,
    [dir="ltr"] input,
    [dir="ltr"] select,
    [dir="ltr"] textarea,
    [dir="ltr"] h1,
    [dir="ltr"] h2,
    [dir="ltr"] h3,
    [dir="ltr"] h4,
    [dir="ltr"] h5,
    [dir="ltr"] h6,
    [dir="ltr"] span,
    [dir="ltr"] p,
    [dir="ltr"] a {
      font-family: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    }

    /* Base fallback */
    body, button, input, select, textarea {
      font-family: 'Cairo', 'Plus Jakarta Sans', system-ui, sans-serif;
    }

    /* ========================================================
       MINUSCULE & NO HEAVY/THICK FONT (منع الكتابة الغليظة)
       ======================================================== */
    * {
      box-sizing: border-box;
      text-transform: none !important; /* Disables all /majuscule forcing */
      -webkit-tap-highlight-color: transparent;
    }

    /* Sleek, refined, light font weights */
    body, p, span, div, a, li, input, select, textarea {
      font-weight: 400;
    }

    h1, h2, h3, h4, h5, h6, strong, b,
    .font-bold, .font-semibold, .font-medium, .font-medium {
      font-weight: 500 !important; /* Elegant medium weight instead of thick heavy bold */
    }

    .font-normal {
      font-weight: 400 !important;
    }

    .font-medium {
      font-weight: 500 !important;
    }

    /* ========================================================
       STANDARDIZED ICONS: White Background + Translucent Light Gray Stroke
       (خلفية بيضاء وكتابة ورسمة بالرمادي الشفاف)
       ======================================================== */
    .app-icon-badge {
      display: inline-flex !important;
      align-items: center !important;
      justify-content: center !important;
      background-color: #FFFFFF !important;
      border: 1px solid rgba(226, 232, 240, 0.95) !important;
      border-radius: 8px !important;
      box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03) !important;
      color: #8E8E93 !important;
      flex-shrink: 0 !important;
      transition: all 0.2s ease !important;
    }

    .app-icon-badge svg,
    .icon-box svg,
    .cat-icon-badge svg {
      stroke: #8E8E93 !important;
      color: #8E8E93 !important;
      fill: none !important;
      stroke-opacity: 0.85 !important;
      background: transparent !important;
    }

    html.dark .app-icon-badge {
      background-color: #FFFFFF !important;
      border-color: rgba(255, 255, 255, 0.25) !important;
      color: #71717A !important;
    }
    html.dark .app-icon-badge svg {
      stroke: #71717A !important;
      color: #71717A !important;
    }
    
    html, body {
      overflow-x: hidden;
      max-width: 100vw;
      width: 100%;
      position: relative;
    }

    body {
      background: var(--canvas);
      color: var(--text);
      min-height: 100vh;
      transition: background 0.2s, color 0.2s;
    }

    
    .price-bdi, .bdi-isolated {
      direction: ltr !important;
      unicode-bidi: isolate !important;
      display: inline-block !important;
      font-variant-numeric: tabular-nums;
      white-space: nowrap;
    }

    /* Custom Scrollbar for desktop vertical scrolling */
    ::-webkit-scrollbar { width: 6px; height: 6px; }
    ::-webkit-scrollbar-track { background: var(--canvas); }
    ::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
    ::-webkit-scrollbar-thumb:hover { background: var(--primary); }

    /* Universal scrollbar remover for carousels, chips, and horizontal sliders */
    .scrollbar-none,
    .no-scrollbar,
    .custom-scroll,
    [class*="scrollbar-none"],
    #headerCategoryPills,
    #visualStoryTrack,
    #newArrivalsTrack,
    #usedLaptopsTrack,
    #recentlyViewedTrack,
    #searchChipsTrack,
    #builderStepper {
      -ms-overflow-style: none !important;
      scrollbar-width: none !important;
    }

    .scrollbar-none::-webkit-scrollbar,
    .no-scrollbar::-webkit-scrollbar,
    .custom-scroll::-webkit-scrollbar,
    [class*="scrollbar-none"]::-webkit-scrollbar,
    #headerCategoryPills::-webkit-scrollbar,
    #visualStoryTrack::-webkit-scrollbar,
    #newArrivalsTrack::-webkit-scrollbar,
    #usedLaptopsTrack::-webkit-scrollbar,
    #recentlyViewedTrack::-webkit-scrollbar,
    #searchChipsTrack::-webkit-scrollbar,
    #builderStepper::-webkit-scrollbar {
      display: none !important;
      width: 0 !important;
      height: 0 !important;
      background: transparent !important;
    }

    .p-card {
      background: var(--card-bg);
      border: 1px solid var(--border);
      border-radius: var(--card-radius);
      transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    }
    .p-card:hover {
      transform: translateY(-3px);
      box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
      border-color: var(--primary);
    }

    .express-badge {
      background: rgba(52, 199, 89, 0.12);
      color: var(--green);
      border: 1px solid rgba(52, 199, 89, 0.25);
    }
    [data-theme="dark"] .express-badge {
      background: rgba(16, 185, 129, 0.15);
      color: #10B981;
      border-color: rgba(16, 185, 129, 0.3);
    }

    .drawer-overlay {
      background: rgba(0, 0, 0, 0.6);
      backdrop-filter: blur(4px);
    }
  
    /* Noon Style Category Typographic Nav Links */
    .noon-nav-link {
      position: relative;
      display: inline-flex;
      align-items: center;
      padding: 6px 10px;
      font-size: 12px;
      font-weight: 700;
      color: #1E293B;
      white-space: nowrap;
      cursor: pointer;
      flex-shrink: 0;
      transition: color 0.15s ease-in-out;
      text-decoration: none;
    }
    @media (min-width: 768px) {
      .noon-nav-link {
        padding: 6px 12px;
        font-size: 13px;
      }
    }
    .dark .noon-nav-link {
      color: #E2E8F0;
    }
    .noon-nav-link:hover {
      color: #D9232E;
    }
    .noon-nav-link.active {
      color: #D9232E;
      font-weight: 800;
    }
    .noon-nav-link::after {
      content: '';
      position: absolute;
      bottom: -2px;
      left: 10px;
      right: 10px;
      height: 2.5px;
      background-color: #D9232E;
      transform: scaleX(0);
      transform-origin: center;
      transition: transform 0.2s ease-in-out;
      border-radius: 2px;
    }
    .noon-nav-link:hover::after,
    .noon-nav-link.active::after {
      transform: scaleX(1);
    }
  
  /* Proforma Invoice Print Stylesheet */
  @media print {
    body > *:not(#proformaPrintWrapper) {
      display: none !important;
    }
    #proformaPrintWrapper {
      display: block !important;
      position: absolute !important;
      left: 0 !important;
      top: 0 !important;
      width: 100% !important;
      background: #ffffff !important;
      color: #000000 !important;
      margin: 0 !important;
      padding: 0 !important;
      box-shadow: none !important;
    }
    .no-print {
      display: none !important;
    }
    @page {
      size: A4 portrait;
      margin: 10mm 12mm;
    }
  }

/* ======================================================== */
/* SKELETON LOADING PLACEHOLDER CARDS (شاشات التحميل الوهمية) */
/* ======================================================== */
.skeleton-card {
  position: relative;
  overflow: hidden;
  min-height: 300px;
  background: #ffffff;
  border: 1px solid #E2E8F0;
  border-radius: 1rem;
  transition: all 0.2s ease;
}

html.dark .skeleton-card,
[data-theme="dark"] .skeleton-card {
  background: #121927;
  border-color: #1E293B;
}

@keyframes skeletonShimmerAnim {
  0% { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}

.skeleton-shimmer {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.75) 50%, transparent 100%);
  animation: skeletonShimmerAnim 1.6s ease-in-out infinite;
  pointer-events: none;
  z-index: 2;
}

html.dark .skeleton-shimmer,
[data-theme="dark"] .skeleton-shimmer {
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.07) 50%, transparent 100%);
}
