/* Matgary design tokens — shared by Storefront & Dashboard (edit once, copy to both) */
:root {
  --color-primary: #0f4c5c;
  --color-primary-hover: #0a333e;
  --color-primary-soft: #e0eef2;
  --color-accent: #e36414;
  --color-accent-hover: #c4520f;
  --color-bg: #f8f9fa;
  --color-surface: #ffffff;
  --color-text: #1a202c;
  --color-muted: #718096;
  --color-border: #edf2f7;
  --color-danger: #e53e3e;
  --color-warning: #dd6b20;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --shadow-card: 0 1px 3px rgba(26, 32, 44, 0.08), 0 4px 14px rgba(26, 32, 44, 0.06);
  --shadow-lift: 0 12px 32px rgba(15, 76, 92, 0.14);
  --shadow-pop: 0 20px 50px rgba(15, 76, 92, 0.18);
  --font-ar: 'Cairo', system-ui, -apple-system, sans-serif;
  --font-en: 'Inter', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html[lang="ar"] body,
html[dir="rtl"] body,
body[dir="rtl"],
body[lang="ar"],
html[lang="ar"],
html[dir="rtl"] { font-family: var(--font-ar); }
html[lang="en"] body { font-family: var(--font-en); }
body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; }
img { max-width: 100%; display: block; }
/* Global: navigation links & buttons are never underlined (any state) */
a, button, .btn, .nav-btn, .back-btn, .hero-cta { text-decoration: none !important; }
a:hover, a:focus, a:active, a:focus-visible,
button:hover, button:focus, button:active, button:focus-visible,
.btn:hover, .btn:focus, .btn:active, .btn:focus-visible,
.nav-btn:hover, .nav-btn:focus, .nav-btn:active, .nav-btn:focus-visible,
.back-btn:hover, .back-btn:focus, .back-btn:active, .back-btn:focus-visible,
.hero-cta:hover, .hero-cta:focus, .hero-cta:active, .hero-cta:focus-visible { text-decoration: none !important; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--color-primary); color: #fff; border: 0; border-radius: var(--radius-md);
  padding-inline: 20px; padding-block: 12px; cursor: pointer; font-weight: 700; letter-spacing: 0.01em;
  transition: background 0.18s ease, transform 0.12s ease, box-shadow 0.18s ease;
  box-shadow: 0 2px 8px rgba(15, 76, 92, 0.22);
}
.btn:hover { background: var(--color-primary-hover); box-shadow: 0 4px 14px rgba(15, 76, 92, 0.3); }
.btn:active { transform: translateY(1px) scale(0.99); }
.btn-accent { background: var(--color-accent); box-shadow: 0 2px 8px rgba(227, 100, 20, 0.3); }
.btn-accent:hover { background: var(--color-accent-hover); }
/* Explicit Petrol Blue button variant (classic .btn is petrol by default; this is the named alias). */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--color-primary); color: #fff; border: 0; border-radius: var(--radius-md);
  padding-inline: 20px; padding-block: 12px; cursor: pointer; font-weight: 700; letter-spacing: 0.01em;
  transition: background 0.18s ease, transform 0.12s ease, box-shadow 0.18s ease;
  box-shadow: 0 2px 8px rgba(15, 76, 92, 0.22);
}
.btn-primary:hover { background: var(--color-primary-hover); box-shadow: 0 4px 14px rgba(15, 76, 92, 0.3); }
.btn-primary:active { transform: translateY(1px) scale(0.99); }
.btn-lg { padding-inline: 26px; padding-block: 13px; border-radius: var(--radius-md); }
.btn-ghost { background: var(--color-surface); color: var(--color-text); border: 1px solid var(--color-border); box-shadow: none; }
.btn-ghost:hover { border-color: var(--color-primary); color: var(--color-primary-hover); background: #fff; box-shadow: var(--shadow-card); }
.card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); }
.field { display: grid; gap: 6px; margin-block-end: 12px; }
.field label { font-weight: 700; font-size: 0.9rem; }
.field input, .field select, .field textarea {
  border: 1px solid var(--color-border); border-radius: var(--radius-md);
  padding-inline: 12px; padding-block: 10px; background: #fff; width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--color-primary-soft); border-color: var(--color-primary); }
.badge { display: inline-flex; align-items: center; border-radius: 999px; padding-inline: 10px; padding-block: 3px; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.03em; background: var(--color-primary-soft); color: var(--color-primary-hover); }
/* Matgary icon system — slate-gray inline SVGs (stroke #718096, 1.8, fill none) */
.icon { width: 19px; height: 19px; flex: none; color: #718096; stroke: currentColor; stroke-width: 1.8; fill: none; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.icon-sm { width: 16px; height: 16px; }
.icon-lg { width: 22px; height: 22px; }
.btn .icon, .pill .icon { color: inherit; }
.stat-icon { width: 20px; height: 20px; color: #718096; stroke: currentColor; stroke-width: 1.8; fill: none; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.pill { display: inline-flex; align-items: center; gap: 7px; }
.pill .icon { width: 18px; height: 18px; }
.cod .icon, .receipt .icon { width: 22px; height: 22px; }
.qty button { display: inline-grid; place-items: center; }
.qty button .icon { width: 14px; height: 14px; }
.cart-btn .icon { width: 20px; height: 20px; }
.logo-icon { width: 22px; height: 22px; color: var(--color-accent); stroke: currentColor; stroke-width: 1.8; fill: none; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.header-search .search-icon { position: absolute; inset-inline-start: 13px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: #718096; stroke: currentColor; stroke-width: 1.8; fill: none; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.spin { animation: matgary-spin 0.9s linear infinite; }
@keyframes matgary-spin { to { transform: rotate(360deg); } }
/* Petrol Blue design system — legacy-green purge: active category pill, language switcher, product action buttons.
   Hard fallbacks (#0f4c5c / #0a333e) guarantee no emerald-green can ever reappear via token overrides. */
.pill.active,
.lang-switch button.active {
  background: var(--color-primary, #0f4c5c);
  color: #fff;
  border-color: var(--color-primary, #0f4c5c);
}
.pill.active:hover { background: var(--color-primary-hover, #0a333e); border-color: var(--color-primary-hover, #0a333e); color: #fff; }
