/* Bquick247 — the theme inherited verbatim from Mr Zahi / parkinzi.com (NeumorphicTheme tokens, glass, background),
   then the ready-made designs the client chooses from, then the shared components. */
    /* ============================================
       Cross-browser reset + font enforcement
       ============================================ */
    *, *::before, *::after {
      box-sizing: border-box;
      -webkit-font-smoothing: antialiased;
      -moz-osx-font-smoothing: grayscale;
    }
    html {
      -webkit-text-size-adjust: 100%;
      -moz-text-size-adjust: 100%;
      text-size-adjust: 100%;
    }
    button, input, select, textarea, optgroup {
      font-family: inherit;
      font-size: inherit;
      line-height: inherit;
      color: inherit;
      margin: 0;
    }
    button, [type="button"], [type="reset"], [type="submit"] {
      -webkit-appearance: button;
      appearance: button;
    }
    img, svg, video, canvas {
      display: block;
      max-width: 100%;
    }
    a { color: inherit; }
    /* NeumorphicTheme (design «ocean») - افتراضي داكن */
    :root {
      /* Primary Colors - ثيم داكن افتراضي */
      --primary: rgb(0, 160, 210);
      --primary-light: rgb(40, 180, 220);
      --primary-dark: rgb(0, 140, 190);
      --secondary: rgb(0, 160, 210);
      --accent: rgb(50, 160, 210);
      --text-primary: rgb(255, 255, 255);
      --text-secondary: rgba(255, 255, 255, 0.7);
      --text-tertiary: rgba(255, 255, 255, 0.55);
      --text-dim: rgba(255, 255, 255, 0.4);
      --bg-top: rgb(31, 46, 56);
      --bg-mid: rgb(26, 41, 51);
      --bg-bottom: rgb(20, 36, 46);
      --glass: rgba(255, 255, 255, 0.08);
      --glass-border: rgba(255, 255, 255, 0.15);
      --glass-strong: rgba(255, 255, 255, 0.12);
      --shadow-light: rgba(255, 255, 255, 0.05);
      --shadow-dark: rgba(5, 10, 15, 0.3);
      --success: rgb(52, 199, 89);
      --warning: rgb(255, 159, 10);
      --error: rgb(255, 59, 48);
      --hero-bg: rgb(31, 46, 56);
      --hero-glow: rgba(0, 160, 210, 0.04);
      --primary-shadow: rgba(0, 160, 210, 0.35);
      --primary-glow: rgba(0, 160, 210, 0.2);
      --white: #ffffff;
    }

    [data-theme="light"] {
      --primary: rgb(0, 130, 190);
      --primary-light: rgb(35, 155, 210);
      --primary-dark: rgb(0, 105, 165);
      --secondary: rgb(0, 130, 190);
      --accent: rgb(50, 150, 200);
      --text-primary: rgb(22, 28, 40);
      --text-secondary: rgb(70, 80, 95);
      --text-tertiary: rgb(100, 112, 128);
      --text-dim: rgb(125, 135, 150);
      --bg-top: rgb(240, 244, 250);
      --bg-mid: rgb(232, 238, 248);
      --bg-bottom: rgb(224, 232, 244);
      --glass: rgba(255, 255, 255, 0.9);
      --glass-border: rgba(0, 100, 160, 0.1);
      --glass-strong: rgba(255, 255, 255, 0.97);
      --shadow-light: rgba(0, 80, 140, 0.06);
      --shadow-dark: rgba(0, 50, 100, 0.1);
      --hero-bg: rgb(240, 246, 252);
      --hero-glow: rgba(0, 130, 190, 0.08);
      --primary-shadow: rgba(0, 130, 190, 0.25);
      --primary-glow: rgba(0, 130, 190, 0.12);
    }

    [data-theme="dark"] {
      /* نفس ألوان :root - للتأكيد */
      --primary: rgb(0, 160, 210);          /* أزرق سماوي أغمق */
      --primary-light: rgb(40, 180, 220);  /* أزرق فاتح */
      --primary-dark: rgb(0, 140, 190);    /* أزرق داكن */
      
      /* Secondary Colors */
      --secondary: rgb(0, 160, 210);
      --accent: rgb(50, 160, 210);
      
      /* Text Colors - مطابق NeumorphicTheme.Colors.text* (dark) */
      --text-primary: rgb(255, 255, 255);
      --text-secondary: rgba(255, 255, 255, 0.7);
      --text-tertiary: rgba(255, 255, 255, 0.55);
      --text-dim: rgba(255, 255, 255, 0.4);
      
      /* Background Colors - مطابق NeumorphicTheme.Colors.background* (dark) */
      --bg-top: rgb(31, 46, 56);            /* Color(0.12, 0.18, 0.22) */
      --bg-mid: rgb(26, 41, 51);            /* Color(0.10, 0.16, 0.20) */
      --bg-bottom: rgb(20, 36, 46);         /* Color(0.08, 0.14, 0.18) */
      
      /* Glass Effects - مطابق NeumorphicTheme.Colors.glass (dark) */
      --glass: rgba(255, 255, 255, 0.08);
      --glass-border: rgba(255, 255, 255, 0.15);
      --glass-strong: rgba(255, 255, 255, 0.12);
      
      /* Shadows */
      --shadow-light: rgba(255, 255, 255, 0.05);
      --shadow-dark: rgba(5, 10, 15, 0.3);
      
      /* Status Colors */
      --success: rgb(52, 199, 89);
      --warning: rgb(255, 159, 10);
      --error: rgb(255, 59, 48);
      
      /* Hero Colors */
      --hero-bg: rgb(31, 46, 56);
      --hero-glow: rgba(0, 160, 210, 0.04);
      --primary-shadow: rgba(0, 160, 210, 0.35);
      --primary-glow: rgba(0, 160, 210, 0.2);
    }

    * { margin: 0; padding: 0; box-sizing: border-box; }
    .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

    /* Performance optimizations */
    * {
      -webkit-tap-highlight-color: transparent;
      -webkit-touch-callout: none;
    }
    
    img {
      -webkit-user-drag: none;
      -webkit-user-select: none;
      -moz-user-select: none;
      user-select: none;
    }
    
    /* GPU acceleration for smooth animations */
    .hero-logo,
    .feature-card,
    .platform-stat-card,
    .btn,
    .menu-btn {
      will-change: transform;
      transform: translateZ(0);
      backface-visibility: hidden;
    }

    /* ============================================
       Typography - من NeumorphicTheme.Typography
       ============================================ */
    body {
      font-family: 'IBM Plex Sans Arabic', sans-serif;
      color: var(--text-primary);
      line-height: 1.6;
      overflow-x: hidden;
      transition: color 0.3s;
      position: relative;
      min-height: 100vh;
      margin: 0;
      padding: 0;
    }
    
    /* NeumorphicBackground - مثل التطبيق بالضبط */
    body::before {
      content: '';
      position: fixed;
      inset: 0;
      background: linear-gradient(
        135deg,
        var(--bg-top) 0%,
        var(--bg-bottom) 100%
      );
      z-index: 0;
    }
    
    /* Angular Gradient Overlay - مثل التطبيق */
    body::after {
      content: '';
      position: fixed;
      inset: 0;
      background: conic-gradient(
        from 0deg at 50% 50%,
        var(--primary) 0%,
        transparent 10%,
        var(--primary) 20%,
        transparent 30%,
        transparent 100%
      );
      opacity: 0.4;
      filter: blur(120px);
      mix-blend-mode: plus-lighter;
      z-index: 1;
      pointer-events: none;
      animation: rotateGlow 20s linear infinite;
    }
    
    [data-theme="dark"] body::after {
      opacity: 0.18;
    }
    
    @keyframes rotateGlow {
      0% { transform: rotate(0deg); }
      100% { transform: rotate(360deg); }
    }

/* ═══════════ Shared components (parkinzi.com's glass cards, buttons and grids) ═══════════ */
main, .page { position: relative; z-index: 2; }
.page { max-width: 1200px; margin: 0 auto; padding: 1.5rem 1rem 3rem; }
.page-title { font-size: clamp(1.6rem, 4vw, 2.3rem); font-weight: 700; margin: 0.5rem 0 1.25rem;
  background: linear-gradient(135deg, var(--primary-light), var(--primary)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.section-title { font-size: clamp(1.3rem, 3vw, 1.8rem); font-weight: 700; margin: 2rem 0 1rem; color: var(--text-primary); }
.muted { color: var(--text-secondary); }

.glass-card { background: var(--glass); border: 1px solid var(--glass-border); border-radius: 24px; padding: 20px;
  -webkit-backdrop-filter: blur(30px) saturate(180%); backdrop-filter: blur(30px) saturate(180%);
  box-shadow: 0 8px 32px var(--shadow-dark), 0 0 0 1px var(--glass-border), inset 0 0 0 1px var(--shadow-light);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.75rem 1.4rem; border-radius: 20px;
  border: 1px solid transparent; font-weight: 600; font-size: 1rem; cursor: pointer; text-decoration: none; transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1); }
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: var(--on-primary, var(--white)); box-shadow: 0 6px 20px var(--primary-shadow); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 28px var(--primary-shadow); }
.btn-secondary { background: var(--glass-strong); color: var(--text-primary); border-color: var(--glass-border); }
.btn-secondary:hover { border-color: var(--primary); }
.btn-danger { background: var(--error); color: var(--white); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

.field { display: flex; flex-direction: column; gap: 0.35rem; margin-bottom: 0.9rem; }
.field label { font-size: 0.9rem; color: var(--text-secondary); font-weight: 500; }
.input, .field input, .field select, .field textarea { width: 100%; padding: 0.7rem 0.9rem; border-radius: 14px; border: 1px solid var(--glass-border);
  background: var(--glass-strong); color: var(--text-primary); outline: none; transition: border-color 0.3s; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-glow); }
select option { color: rgb(22, 28, 40); }

.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1.1rem; }
.product-card, .partner-card { display: flex; flex-direction: column; overflow: hidden; padding: 0; text-decoration: none; color: inherit; }
.product-card:hover, .partner-card:hover { transform: translateY(-4px); border-color: var(--primary); }
.card-image { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--glass-strong); }
.card-image--placeholder { display: flex; align-items: center; justify-content: center; font-size: 2.4rem; color: var(--text-dim); }
.card-body { padding: 0.9rem 1rem 1rem; display: flex; flex-direction: column; gap: 0.35rem; flex: 1; }
.card-title { font-weight: 700; font-size: 1.05rem; line-height: 1.4; }
.card-meta { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; font-size: 0.9rem; color: var(--text-secondary); margin-top: auto; }

.like-btn { display: inline-flex; align-items: center; gap: 0.35rem; border: 1px solid var(--glass-border); background: var(--glass-strong); color: var(--text-secondary);
  border-radius: 999px; padding: 0.35rem 0.8rem; cursor: pointer; font-weight: 600; transition: all 0.3s; }
.like-btn.is-liked { color: var(--error); border-color: var(--error); }
.like-btn:hover { border-color: var(--primary); }

.stars { display: inline-flex; gap: 1px; }
.star { color: var(--text-dim); }
.star.is-on { color: var(--warning); }

.price { font-weight: 700; color: var(--primary); white-space: nowrap; }
/* the official riyal symbol (SAMA's shape), drawn in the text colour */
.riyal { display: inline-block; width: 0.95em; height: 0.95em; vertical-align: -0.1em; background-color: currentColor;
  -webkit-mask: url(/rial-symbol.png) center / contain no-repeat; mask: url(/rial-symbol.png) center / contain no-repeat; }

.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip { padding: 0.45rem 0.95rem; border-radius: 999px; border: 1px solid var(--glass-border); background: var(--glass); color: var(--text-primary); cursor: pointer; font-weight: 500; text-decoration: none; }
.chip.is-active { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: var(--on-primary, var(--white)); border-color: transparent; }

.tabs { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; }

.empty-state { text-align: center; padding: 2.5rem 1rem; color: var(--text-secondary); }
.notice { padding: 0.9rem 1.1rem; border-radius: 16px; border: 1px solid var(--glass-border); background: var(--glass); color: var(--text-secondary); margin: 1rem 0; }

.site-nav { position: relative; z-index: 3; display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; padding: 0.75rem 1rem 0; }
.site-nav a { padding: 0.45rem 1rem; border-radius: 999px; text-decoration: none; color: var(--text-secondary); font-weight: 600; border: 1px solid transparent; }
.site-nav a.is-current, .site-nav a:hover { color: var(--primary); border-color: var(--glass-border); background: var(--glass); }

.brand-wordmark { font-weight: 800; letter-spacing: 0.02em; background: linear-gradient(135deg, var(--primary-light), var(--primary));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

.toast { position: fixed; bottom: 1.5rem; left: 50%; transform: translate(-50%, 20px); opacity: 0; z-index: 1000; padding: 0.8rem 1.3rem; border-radius: 16px;
  background: var(--glass-strong); color: var(--text-primary); border: 1px solid var(--glass-border); box-shadow: 0 8px 32px var(--shadow-dark); transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  -webkit-backdrop-filter: blur(30px); backdrop-filter: blur(30px); }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.toast--error { border-color: var(--error); }

.dialog-overlay { position: fixed; inset: 0; z-index: 999; display: flex; align-items: center; justify-content: center; padding: 1rem; background: rgba(0, 0, 0, 0.45); }
.dialog-card { max-width: 420px; width: 100%; }
.dialog-card h3 { margin-bottom: 0.5rem; }
.dialog-actions { display: flex; gap: 0.6rem; justify-content: flex-end; margin-top: 1.2rem; }
.danger-zone { margin-top: 2rem; padding-top: 1.2rem; border-top: 1px solid var(--glass-border); }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
@media (max-width: 480px) { .cards-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.7rem; } .card-body { padding: 0.7rem; } .card-title { font-size: 0.95rem; } }

/* the admin's design menu in the header */
#designMenuBtn.is-previewing .icon-circle { box-shadow: 0 0 0 2px var(--warning); }
#designDropdown .design-action { font-weight: 700; color: var(--primary); border-top: 1px solid var(--glass-border); }
#designDropdown { max-height: min(70vh, 34rem); overflow-y: auto; min-width: 15rem; }
#designDropdown .design-dropdown-title { padding: 0.5rem 0.9rem 0.3rem; font-size: 0.78rem; font-weight: 700; color: var(--text-secondary); }
/* each design's three colours, from its own tokens (the swatch carries data-design) */
.design-swatch { display: inline-flex; gap: 2px; padding: 2px; border-radius: 6px; background: var(--bg-mid); border: 1px solid var(--glass-border); }
.design-swatch i { width: 0.55rem; height: 0.85rem; border-radius: 2px; background: var(--primary); }
.design-swatch i:nth-child(2) { background: var(--gold); }
.design-swatch i:nth-child(3) { background: var(--bg-top); }
#designDropdown .design-dropdown-family { padding: 0.55rem 0.9rem 0.25rem; font-size: 0.72rem; font-weight: 800; color: var(--primary-light); border-top: 1px solid var(--glass-border); }
