/* ============================================================
   قهرمانی — توکن‌های صندوق و صفحه‌های مدیریت صندوق
   فقط زیر کلاس .pos-scope فعال‌اند تا با ظاهر بقیه‌ی سایت تداخل نکنند.
   همه‌ی رنگ‌ها OKLCH. هیچ رنگ هاردکدی در صفحات مجاز نیست.
   ============================================================ */

.pos-scope {
  /* ---------- برند: آبی قهرمانی (هیو ۲۶۲ — هم‌خانواده‌ی #0E52E0) ---------- */
  --brand-50:  oklch(0.971 0.014 262);
  --brand-100: oklch(0.938 0.030 262);
  --brand-200: oklch(0.883 0.056 262);
  --brand-300: oklch(0.808 0.090 262);
  --brand-400: oklch(0.712 0.125 262);
  --brand-500: oklch(0.600 0.190 262);
  --brand-600: oklch(0.505 0.215 262); /* رنگ کنش / دکمه‌ی اصلی */
  --brand-700: oklch(0.440 0.190 262);
  --brand-800: oklch(0.360 0.150 262);
  --brand-900: oklch(0.285 0.092 262);
  --brand-950: oklch(0.215 0.078 262); /* تیره‌ترین پله */

  /* ---------- لهجه: زرد قهرمانی ---------- */
  --accent:            oklch(0.870 0.170 95);
  --accent-hover:      oklch(0.830 0.170 95);
  --accent-subtle:     oklch(0.965 0.050 95);
  --accent-foreground: oklch(0.250 0.040 84);

  /* ---------- خنثی‌ها: خاکستری با ته‌رنگ سرد ملایم ---------- */
  --neutral-0:   oklch(1 0 0);
  --neutral-25:  oklch(0.988 0.003 262);
  --neutral-50:  oklch(0.975 0.005 262);
  --neutral-100: oklch(0.955 0.006 262);
  --neutral-200: oklch(0.915 0.008 262);
  --neutral-300: oklch(0.860 0.010 262);
  --neutral-400: oklch(0.720 0.012 262);
  --neutral-500: oklch(0.600 0.012 262);
  --neutral-600: oklch(0.500 0.012 262);
  --neutral-700: oklch(0.405 0.011 262);
  --neutral-800: oklch(0.315 0.010 262);
  --neutral-900: oklch(0.245 0.009 262);
  --neutral-950: oklch(0.180 0.008 262);

  /* ---------- سطوح ---------- */
  --canvas:          oklch(0.980 0.006 262); /* هم‌ارز #F8F9FC */
  --surface:         oklch(1 0 0);
  --surface-raised:  oklch(1 0 0);
  --surface-sunken:  oklch(0.962 0.006 262);
  --muted:           oklch(0.940 0.007 262);

  /* ---------- متن ---------- */
  --foreground:          oklch(0.245 0.020 262);
  --muted-foreground:    oklch(0.500 0.015 262);
  --subtle-foreground:   oklch(0.625 0.013 262);
  --on-brand:            oklch(0.995 0.002 262);

  /* ---------- کنش ---------- */
  --primary:            var(--brand-600);
  --primary-hover:      var(--brand-700);
  --primary-active:     var(--brand-800);
  --primary-foreground: oklch(0.995 0.002 262);
  --primary-subtle:     oklch(0.948 0.026 262);
  --primary-subtle-foreground: var(--brand-800);

  /* ---------- وضعیت ---------- */
  --success:          oklch(0.560 0.118 158);
  --success-subtle:   oklch(0.955 0.032 158);
  --success-text:     oklch(0.420 0.100 158);
  --warning:          oklch(0.755 0.135 76);
  --warning-subtle:   oklch(0.962 0.040 76);
  --warning-text:     oklch(0.455 0.096 63);
  --danger:           oklch(0.545 0.190 22);
  --danger-strong:    oklch(0.440 0.185 20);
  --danger-subtle:    oklch(0.955 0.030 22);
  --danger-text:      oklch(0.470 0.180 22);
  --info:             oklch(0.640 0.120 232);
  --info-subtle:      oklch(0.958 0.030 232);
  --info-text:        oklch(0.450 0.100 232);
  --on-status:        oklch(0.995 0.002 262);

  /* ---------- خط و فرم ---------- */
  --border:        oklch(0.906 0.008 262);
  --border-strong: oklch(0.835 0.011 262);
  --hairline:      oklch(0.245 0.020 262 / 0.12); /* خط مو ۰.۵ پیکسلی */
  --ring:          var(--brand-600);
  --input:         oklch(1 0 0);
  --input-fill:    oklch(0.245 0.020 262 / 0.06);
  --overlay-scrim: oklch(0.180 0.008 262 / 0.45);

  /* ---------- تایپوگرافی ---------- */
  --pc-font-sans: "Vazirmatn", "Vazirmatn UI", system-ui, sans-serif;
  --pc-font-display: "Vazirmatn", system-ui, sans-serif;

  --pc-text-2xs: 0.6875rem; /* ۱۱px — ریزبرچسب */
  --pc-text-xs:  0.8125rem; /* ۱۳px — برچسب */
  --pc-text-sm:  0.875rem;  /* ۱۴px — متن فرعی */
  --pc-text-base:0.9375rem; /* ۱۵px — بدنه */
  --pc-text-lg:  1.125rem;  /* ۱۸px — تیتر کارت */
  --pc-text-xl:  1.375rem;  /* ۲۲px — تیتر بخش */
  --pc-text-2xl: 1.875rem;  /* ۳۰px — تیتر صفحه */
  --pc-text-3xl: 2.5rem;    /* ۴۰px — تیتر بنر */

  --leading-body: 1.85;
  --leading-heading: 1.35;
  --tracking-heading: -0.02em;
  --tracking-label: -0.01em;

  --weight-body: 400;
  --weight-medium: 500;
  --weight-label: 650;
  --weight-heading: 700;
  --weight-price: 800;

  /* ---------- شعاع (عیناً از مرجع) ---------- */
  --pc-radius-xs:  0.5rem;
  --pc-radius-sm:  0.8rem;   /* دکمه‌ی معمولی */
  --pc-radius-md:  0.95rem;  /* کارت محصول، CTA بزرگ */
  --pc-radius-lg:  1.1rem;   /* کارت ساده */
  --pc-radius-xl:  1.15rem;  /* کانتینر اسکرولی */
  --pc-radius-2xl: 1.35rem;  /* bottom-sheet */
  --pc-radius-3xl: 1.4rem;   /* مودال */
  --pc-radius-full: 999px;

  /* نشان کج — امضای کارت محصول */
  --pc-radius-curve-bottom: 0 1.15rem 0 0.95rem;
  --pc-radius-curve-top: 1rem 0 1.15rem 0;

  /* ---------- سایه ---------- */
  --pc-shadow-xs: 0 1px 2px oklch(0 0 0 / 0.05);
  --pc-shadow-sm: 0 2px 8px oklch(0 0 0 / 0.05);
  --pc-shadow-md: 0 8px 20px oklch(0 0 0 / 0.06);   /* کارت */
  --pc-shadow-lg: 0 12px 36px oklch(0 0 0 / 0.12);  /* شناور */
  --pc-shadow-overlay: 0 18px 48px oklch(0 0 0 / 0.28); /* مودال */
  --pc-shadow-glow: 0 10px 22px color-mix(in oklch, var(--brand-600) 28%, transparent);
  --pc-shadow-glow-danger: 0 10px 22px color-mix(in oklch, var(--danger) 28%, transparent);

  /* ---------- حرکت ---------- */
  --pc-ease-default: cubic-bezier(0.22, 1, 0.36, 1);
  --pc-ease-sheet:   cubic-bezier(0.32, 0.72, 0, 1);
  --pc-ease-spring:  cubic-bezier(0.22, 1.2, 0.36, 1);
  --pc-dur-micro: 150ms;
  --pc-dur-normal: 250ms;
  --pc-dur-sheet: 380ms;
  --pc-dur-drawer: 560ms;

  /* ---------- چیدمان ---------- */
  --layout-content-max: 90rem;
  --layout-gutter: 0.75rem;
  --header-h: 3.75rem;
  --tabbar-h: 4rem;
}

/* ============================================================
   حالت تیره
   ============================================================ */
.dark .pos-scope,
.pos-scope.dark {
  --canvas:          oklch(0.190 0.028 262);
  --surface:         oklch(0.232 0.030 262);
  --surface-raised:  oklch(0.268 0.032 262);
  --surface-sunken:  oklch(0.168 0.026 262);
  --muted:           oklch(0.290 0.028 262);

  --foreground:        oklch(0.968 0.008 262);
  --muted-foreground:  oklch(0.780 0.014 262);
  --subtle-foreground: oklch(0.672 0.016 262);

  /* برند یک تا دو پله روشن‌تر */
  --primary:            oklch(0.660 0.150 262);
  --primary-hover:      oklch(0.712 0.140 262);
  --primary-active:     oklch(0.760 0.125 262);
  --primary-foreground: oklch(0.160 0.030 262);
  --primary-subtle:     oklch(0.318 0.062 262);
  --primary-subtle-foreground: oklch(0.900 0.045 262);

  --accent:            oklch(0.835 0.100 84);
  --accent-hover:      oklch(0.870 0.092 84);
  --accent-subtle:     oklch(0.330 0.050 84);
  --accent-foreground: oklch(0.210 0.038 84);

  --success:        oklch(0.665 0.125 158);
  --success-subtle: oklch(0.312 0.058 158);
  --success-text:   oklch(0.840 0.088 158);
  --warning:        oklch(0.800 0.130 76);
  --warning-subtle: oklch(0.330 0.055 76);
  --warning-text:   oklch(0.880 0.085 80);
  --danger:         oklch(0.628 0.185 22);
  --danger-strong:  oklch(0.520 0.180 20);
  --danger-subtle:  oklch(0.330 0.075 22);
  --danger-text:    oklch(0.845 0.098 22);
  --info:           oklch(0.700 0.115 232);
  --info-subtle:    oklch(0.320 0.055 232);
  --info-text:      oklch(0.855 0.072 232);
  --on-status:      oklch(0.160 0.020 262);

  --border:        oklch(0.340 0.026 262);
  --border-strong: oklch(0.432 0.030 262);
  --hairline:      oklch(1 0 0 / 0.14);
  --ring:          oklch(0.712 0.140 262);
  --input:         oklch(0.250 0.030 262);
  --input-fill:    oklch(1 0 0 / 0.07);
  --overlay-scrim: oklch(0.120 0.020 262 / 0.62);

  --pc-shadow-md: 0 8px 20px oklch(0 0 0 / 0.38);
  --pc-shadow-lg: 0 12px 36px oklch(0 0 0 / 0.5);
  --pc-shadow-overlay: 0 18px 48px oklch(0 0 0 / 0.62);
  --pc-shadow-glow: 0 10px 22px color-mix(in oklch, var(--primary) 32%, transparent);
}

/* ============================================================
   حالت پرکنتراست POS (نور زیاد مغازه)
   ============================================================ */
.pos-contrast {
  --canvas: oklch(1 0 0);
  --surface: oklch(1 0 0);
  --surface-sunken: oklch(0.945 0 0);
  --foreground: oklch(0.145 0.010 262);
  --muted-foreground: oklch(0.330 0.012 262);
  --subtle-foreground: oklch(0.395 0.012 262);
  --border: oklch(0.640 0.014 262);
  --border-strong: oklch(0.430 0.016 262);
  --hairline: oklch(0.145 0.010 262 / 0.45);
  --primary: oklch(0.400 0.170 262);
}
