/**
 * GalinShop design tokens
 * ---------------------------
 * Single source of truth for color, type, space, radius, shadow,
 * z-index, containers, breakpoints and motion.
 *
 * Values are the colors and sizes already used by the storefront.
 * Existing names (--primary, --font-site, --dds-mode-ui-*) stay as
 * aliases so older stylesheets keep working.
 *
 * Breakpoint custom properties are documentation for JS and for
 * utilities.css. Standard CSS cannot read them inside @media.
 * sm 576 / md 768 / lg 992 / xl 1200 / xxl 1400 — same as Bootstrap.
 */

:root {
    /* ---- Font (YekanBakh, loaded in global.css) ---- */
    --font-family-base: 'YekanBakh', sans-serif;
    --font-site: var(--font-family-base);

    /* ---- Brand / primary (existing GalinShop ramp) ---- */
    --color-primary-50: #fef5f7;
    --color-primary-100: #fdf0f2;
    --color-primary-200: #fbcfd5;
    --color-primary-300: #f696a2;
    --color-primary-400: #f47988;
    --color-primary-500: #ef4056;
    --color-primary-600: #cb3649;
    --color-primary-700: #a72d3c;
    --color-primary-800: #83232f;
    --color-primary-900: #601a22;

    --color-brand-strong: #d9364d;
    --color-brand-deep: #c12d43;
    --color-brand-soft: #fff2f5;
    --color-brand-soft-alt: #fff6f7;
    --color-brand-border: #f4cbd2;
    --color-brand-border-muted: #f7e3e7;

    /* ---- Secondary (navy used in titles, #3f4064 anchored at 700) ---- */
    --color-secondary-50: #f4f4f8;
    --color-secondary-100: #e8e8f0;
    --color-secondary-200: #d0d0df;
    --color-secondary-300: #a9a9c2;
    --color-secondary-400: #7c7c9e;
    --color-secondary-500: #5c5c82;
    --color-secondary-600: #4b4c72;
    --color-secondary-700: #3f4064;
    --color-secondary-800: #2c2d48;
    --color-secondary-900: #1c1d30;

    /* ---- Neutral (storefront ink, borders, surfaces) ---- */
    --color-white: #ffffff;
    --color-black: #000000;
    --color-neutral-50: #fafafa;
    --color-neutral-100: #f0f0f1;
    --color-neutral-200: #e0e0e2;
    --color-neutral-300: #c0c2c5;
    --color-neutral-400: #a1a3a8;
    --color-neutral-500: #81858b;
    --color-neutral-600: #5c5c5c;
    --color-neutral-650: #666666;
    --color-neutral-700: #424750;
    --color-neutral-800: #262626;
    --color-neutral-850: #1a1a1a;
    --color-neutral-900: #0c0c0c;

    --color-text-strong: #101010;
    --color-gray-iron: #525252;
    --color-gray-muted: #d4d4d4;
    --color-footer-border: var(--color-gray-iron);
    --color-footer-text: var(--color-gray-muted);

    /* ---- Success (badge green, hint, admin positive) ---- */
    --color-success-50: #eaf7ed;
    --color-success-100: #d3f0db;
    --color-success-200: #a8e0b8;
    --color-success-300: #6cc98e;
    --color-success-400: #34c07a;
    --color-success-500: #19b16a;
    --color-success-600: #059669;
    --color-success-700: #17823b;
    --color-success-800: #0f5c2a;
    --color-success-900: #0a3d1c;

    /* ---- Warning ---- */
    --color-warning-50: #fff8e6;
    --color-warning-100: #ffefc2;
    --color-warning-200: #ffe08a;
    --color-warning-300: #ffd04d;
    --color-warning-400: #ffc61f;
    --color-warning-500: #f9bc00;
    --color-warning-600: #d9a400;
    --color-warning-700: #b38600;
    --color-warning-800: #806000;
    --color-warning-900: #4d3a00;

    /* ---- Danger (toast red, discount badge, admin negative) ---- */
    --color-danger-50: #fdecea;
    --color-danger-100: #fad4d6;
    --color-danger-200: #f4a8ae;
    --color-danger-300: #ee7b84;
    --color-danger-400: #e25562;
    --color-danger-500: #dc3545;
    --color-danger-600: #d32f2f;
    --color-danger-700: #c82333;
    --color-danger-800: #b02a37;
    --color-danger-900: #7f1d1d;

    /* ---- Info ---- */
    --color-info-50: #e7f6fa;
    --color-info-100: #c8ebf3;
    --color-info-200: #96d7e6;
    --color-info-300: #5ec0d6;
    --color-info-400: #2aa8c4;
    --color-info-500: #009ab8;
    --color-info-600: #008eb2;
    --color-info-700: #006f8c;
    --color-info-800: #005066;
    --color-info-900: #003544;

    /* ---- Semantic ---- */
    --color-text-primary: var(--color-neutral-900);
    --color-text-secondary: var(--color-neutral-700);
    --color-text-muted: var(--color-neutral-500);
    --color-text-disabled: var(--color-neutral-400);
    --color-background-primary: var(--color-white);
    --color-background-secondary: var(--color-neutral-50);
    --color-border-default: var(--color-neutral-200);
    --color-border-subtle: var(--color-neutral-100);

    /* Backward-compatible aliases used across existing CSS */
    --primary: var(--color-primary-500);
    --primary-color: var(--color-primary-500);
    --color-brand: var(--color-primary-500);
    --ring: var(--color-primary-500);
    --primary-50: var(--color-primary-50);
    --primary-100: var(--color-primary-100);
    --primary-200: var(--color-primary-200);
    --primary-300: var(--color-primary-300);
    --primary-400: var(--color-primary-400);
    --primary-500: var(--color-primary-500);
    --primary-600: var(--color-primary-600);
    --primary-700: var(--color-primary-700);
    --primary-800: var(--color-primary-800);
    --primary-900: var(--color-primary-900);
    --bc-brand-primary: var(--color-primary-500);
    --bc-brand-primary-strong: var(--color-brand-strong);
    --bc-brand-primary-deep: var(--color-brand-deep);
    --bc-brand-soft: var(--color-brand-soft);
    --bc-brand-soft-alt: var(--color-brand-soft-alt);
    --bc-brand-border: var(--color-brand-border);
    --bc-brand-border-muted: var(--color-brand-border-muted);

    /* Digikala-style DDS names already referenced in cart / checkout / shipping */
    --dds-mode-ui-surface-2: var(--color-background-primary);
    --dds-mode-ui-content-1: var(--color-text-primary);
    --dds-mode-ui-content-2: var(--color-neutral-600);
    /* #e0e0e0 is the color cart/checkout already paint via this fallback. */
    --dds-mode-ui-border-complete-200: #e0e0e0;
    --dds-mode-ui-hint-success-bg: var(--color-success-50);
    --dds-mode-ui-hint-success-text: var(--color-success-700);

    /*
     * Typography suffix: text-h4-180 means heading-4 size with line-height 1.80.
     * The number is line-height × 100. Weight is separate (font-medium, font-bold)
     * or the -strong preset (weight 600).
     */
    --text-h1-size: 2rem;
    --text-h2-size: 1.75rem;
    --text-h3-size: 1.5rem;
    --text-h4-size: 1.25rem;
    --text-h5-size: 1.125rem;
    --text-h6-size: 1rem;
    --text-body1-size: 0.875rem;
    --text-body2-size: 0.8125rem;
    --text-caption-size: 0.75rem;
    --text-label-size: 0.6875rem;
    --text-heading-weight: 700;
    --text-body-weight: 400;
    --text-strong-weight: 600;

    /* ---- Typography (legacy aliases) ---- */
    --font-display-1-size: 2rem;
    --font-display-1-weight: 700;
    --font-display-1-line: 1.4;
    --font-display-1-spacing: 0;

    --font-display-2-size: 1.75rem;
    --font-display-2-weight: 700;
    --font-display-2-line: 1.4;
    --font-display-2-spacing: 0;

    --font-heading-1-size: 1.5rem;
    --font-heading-1-weight: 700;
    --font-heading-1-line: 1.5;
    --font-heading-1-spacing: 0;

    --font-heading-2-size: 1.25rem;
    --font-heading-2-weight: 700;
    --font-heading-2-line: 1.5;
    --font-heading-2-spacing: 0;

    --font-heading-3-size: 1.125rem;
    --font-heading-3-weight: 600;
    --font-heading-3-line: 1.6;
    --font-heading-3-spacing: 0;

    --font-heading-4-size: 1rem;
    --font-heading-4-weight: 600;
    --font-heading-4-line: 1.7;
    --font-heading-4-spacing: 0;

    --font-body-1-size: 0.875rem;
    --font-body-1-weight: 400;
    --font-body-1-line: 1.8;
    --font-body-1-spacing: 0;

    --font-body-1-strong-size: 0.875rem;
    --font-body-1-strong-weight: 600;
    --font-body-1-strong-line: 1.8;
    --font-body-1-strong-spacing: 0;

    --font-body-2-size: 0.8125rem;
    --font-body-2-weight: 400;
    --font-body-2-line: 1.85;
    --font-body-2-spacing: 0;

    --font-body-2-strong-size: 0.8125rem;
    --font-body-2-strong-weight: 600;
    --font-body-2-strong-line: 1.85;
    --font-body-2-strong-spacing: 0;

    --font-caption-size: 0.75rem;
    --font-caption-weight: 400;
    --font-caption-line: 1.7;
    --font-caption-spacing: 0;

    --font-caption-strong-size: 0.75rem;
    --font-caption-strong-weight: 600;
    --font-caption-strong-line: 1.7;
    --font-caption-strong-spacing: 0;

    --font-label-size: 0.6875rem;
    --font-label-weight: 500;
    --font-label-line: 1.6;
    --font-label-spacing: 0;

    --font-label-strong-size: 0.6875rem;
    --font-label-strong-weight: 700;
    --font-label-strong-line: 1.6;
    --font-label-strong-spacing: 0;

    /* ---- Spacing (4px base). Not the Bootstrap 0–5 scale. ---- */
    --space-0: 0;
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-8: 32px;
    --space-10: 40px;
    --space-12: 48px;
    --space-16: 64px;

    /* ---- Radius ---- */
    --radius-none: 0;
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-pill: 20px;
    --radius-full: 9999px;

    /* ---- Border width ---- */
    --border-width-0: 0;
    --border-width-1: 1px;
    --border-width-2: 2px;
    --border-width-4: 4px;

    /* ---- Shadow (site is mostly flat; tokens are for new UI) ---- */
    --shadow-none: none;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);

    /* ---- Z-index (aligned with current header, Bootstrap modal, chat) ---- */
    --z-base: 1;
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-header: 1000;
    --z-modal-backdrop: 1050;
    --z-modal: 1055;
    --z-chat: 1060;
    --z-toast: 1080;
    --z-tooltip: 1090;

    /* ---- Containers (current global.css widths at lg / xl) ---- */
    --container-sm: 540px;
    --container-md: 720px;
    --container-lg: 960px;
    --container-xl: 1140px;
    --container-xxl: 1320px;

    /* ---- Breakpoints (reference only) ---- */
    --breakpoint-sm: 576px;
    --breakpoint-md: 768px;
    --breakpoint-lg: 992px;
    --breakpoint-xl: 1200px;
    --breakpoint-xxl: 1400px;

    /* ---- Motion ---- */
    --duration-fast: 150ms;
    --duration-base: 200ms;
    --duration-slow: 300ms;
    --ease-standard: ease;

    /* ---- Opacity ---- */
    --opacity-0: 0;
    --opacity-25: 0.25;
    --opacity-50: 0.5;
    --opacity-75: 0.75;
    --opacity-100: 1;
}
