/*
 * Ghazaly Store design tokens — SINGLE SOURCE OF TRUTH (spec §9.5, docs/DESIGN_SYSTEM.md).
 * Every color, size, radius, shadow, motion and z-index used by the theme and the admin
 * app comes from here. Components must reference var(--gz-*) only; never raw values.
 * Colors: brand palette from the owner's logo kit (2026-11-30), light default. Typography: approved (T-018).
 */

:root {
	color-scheme: light;

	/* Color — light (default). Brand palette 2026-11-30: Charcoal #0A0C0F, Near Black #050607,
	   Signature Gold #D6A23A, Light Gold #F7D47B, Deep Gold #94651F, Soft White #F5F5F2, Ink #17191D.
	   Contrast (WCAG): ink on ground 16.1:1 · ink-2 on ground 6.9:1 · primary on white 5.8:1, on ground 5.3:1
	   · on-buy on buy 8.5:1 · focus ring on white 5.1:1. Signature Gold is a FILL, never text on light. */
	--gz-ground: #f5f5f2; /* soft white */
	--gz-surface: #ffffff;
	--gz-surface-muted: #f3f1ec;
	--gz-ink: #17191d;
	--gz-ink-2: #50555c;
	--gz-line: #e7e4dc;
	--gz-primary: #8a5d1a; /* deep gold — links and text accents */
	--gz-primary-hover: #6b4712;
	--gz-primary-soft: #faf3e3;
	--gz-on-primary: #ffffff;
	--gz-accent: #d6a23a;      /* signature gold — fills and decoration only on light grounds */
	--gz-accent-text: #8a5d1a;
	--gz-accent-soft: #fbf4e4;
	--gz-success: #7a5314; /* positive = deep gold (brand has no green) */
	--gz-success-soft: #f8f0dd;
	--gz-danger: #b3261e;
	--gz-danger-soft: #fbe4e2;
	--gz-focus: #94651f;
	--gz-inverse-ground: #17191d;
	--gz-inverse-ink: #f5f5f2;
	--gz-inverse-ink-2: #b8b5ad;

	/* Dark bands (footer, table heads) and the gold buy button. */
	--gz-deep: #121417;
	--gz-deep-2: #1d2025;
	--gz-on-deep: #ffffff;
	--gz-on-deep-2: #c4c0b6;
	--gz-buy: #d6a23a;
	--gz-buy-hover: #e3b453;
	--gz-on-buy: #0a0c0f; /* 8.5:1 on --gz-buy */
	--gz-star: #d6a23a;
	--gz-white: #ffffff; /* product photo stage — white in both themes */
	--gz-buy-glow: rgb(214 162 58 / 0.28);

	/* Typography (T-018) */
	--gz-font-display: "Cairo", "IBM Plex Sans Arabic", system-ui, sans-serif;
	--gz-font-body-ar: "Cairo", system-ui, sans-serif; /* owner: Cairo everywhere (T-094) */
	--gz-font-body-en: "Cairo", system-ui, sans-serif;
	--gz-text-xs: 0.8125rem;   /* 13 */
	--gz-text-sm: 0.9375rem;   /* 15 */
	--gz-text-md: 1.0625rem;   /* 17 */
	--gz-text-lg: 1.125rem;    /* 18 */
	--gz-text-xl: 1.625rem;    /* 26 */
	--gz-text-2xl: 2rem;       /* 32 */
	--gz-text-display: clamp(2.125rem, 1.4rem + 3vw, 3.25rem); /* 34 → 52 */
	--gz-leading-ar: 1.85;
	--gz-leading-en: 1.65;
	--gz-leading-heading: 1.3;
	--gz-weight-regular: 400;
	--gz-weight-semibold: 600;
	--gz-weight-bold: 700;

	/* Space (4 px scale) */
	--gz-space-1: 0.25rem;
	--gz-space-2: 0.5rem;
	--gz-space-3: 0.75rem;
	--gz-space-4: 1rem;
	--gz-space-5: 1.5rem;
	--gz-space-6: 2rem;
	--gz-space-7: 2.5rem;
	--gz-space-8: 4rem;
	--gz-gutter: clamp(1rem, 0.6rem + 1.8vw, 1.5rem);
	--gz-container: 75rem; /* 1200 */

	/* Shape, elevation, sizing */
	--gz-radius-sm: 0.625rem;
	--gz-radius-md: 0.875rem;
	--gz-radius-lg: 1.25rem;
	--gz-radius-pill: 999px;
	--gz-border: 1px solid var(--gz-line);
	--gz-shadow-1: 0 1px 2px rgb(23 25 29 / 0.04), 0 6px 24px rgb(23 25 29 / 0.06);
	--gz-shadow-2: 0 2px 6px rgb(23 25 29 / 0.06), 0 16px 40px rgb(23 25 29 / 0.10);
	--gz-touch: 2.75rem; /* 44 px minimum target */
	--gz-control-h: 2.75rem;
	--gz-control-h-lg: 3.25rem;
	--gz-focus-ring: 3px solid var(--gz-focus);

	/* Motion */
	--gz-ease: cubic-bezier(0.2, 0, 0, 1);
	--gz-dur-fast: 120ms;
	--gz-dur: 200ms;

	/* Layers */
	--gz-z-header: 50;
	--gz-z-overlay: 100;
	--gz-z-toast: 200;
}

/* Dark — set on <html> by the head script only when the visitor picks it with the toggle; light is the default (owner 2026-11-30). */
:root[data-theme="dark"] {
	color-scheme: dark;
	--gz-ground: #0a0c0f;
	--gz-surface: #15171b;
	--gz-surface-muted: #1c1f24;
	--gz-ink: #f5f5f2;
	--gz-ink-2: #b4b1a9;
	--gz-line: #2a2d33;
	--gz-primary: #e6b95a;
	--gz-primary-hover: #f7d47b;
	--gz-primary-soft: #2a2417;
	--gz-on-primary: #0a0c0f;
	--gz-accent: #d6a23a;
	--gz-accent-text: #e6b95a;
	--gz-accent-soft: #2a2417;
	--gz-success: #e6b95a;
	--gz-success-soft: #2a2417;
	--gz-danger: #f08a82;
	--gz-danger-soft: #331a18;
	--gz-focus: #f7d47b;
	--gz-inverse-ground: #1c1f24;
	--gz-deep: #050607;
	--gz-deep-2: #121417;
	--gz-shadow-1: 0 1px 2px rgb(0 0 0 / 0.4);
	--gz-shadow-2: 0 2px 6px rgb(0 0 0 / 0.4), 0 16px 40px rgb(0 0 0 / 0.35);
}

@media (prefers-reduced-motion: reduce) {
	:root {
		--gz-dur-fast: 0ms;
		--gz-dur: 0ms;
	}
}
