/* ═══════════════════════════════════════════════════════════
   AIKitHub Design System — Core Variables & Base Styles
   ═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@100;200;300;400;500;600;700;800;900&display=swap');

/* ── Color Tokens ── */
:root {
  --primary:        #2563EB;
  --primary-hover:  #1D4ED8;
  --primary-light:  #3B82F6;
  --primary-50:     #EFF6FF;
  --primary-100:    #DBEAFE;
  --primary-200:    #BFDBFE;

  --accent:         #06B6D4;
  --accent-hover:   #0891B2;
  --accent-50:      #ECFEFF;
  --accent-100:     #CFFAFE;

  --text-900:       #0F172A;
  --text-700:       #334155;
  --text-500:       #64748B;
  --text-400:       #94A3B8;
  --text-300:       #CBD5E1;

  --bg:             #FFFFFF;
  --surface:        #F8FAFC;
  --surface-2:      #F1F5F9;
  --border:         #E2E8F0;
  --border-light:   #F1F5F9;

  --success:        #10B981;
  --success-bg:     #ECFDF5;
  --warning:        #F59E0B;
  --warning-bg:     #FFFBEB;
  --danger:         #EF4444;
  --danger-bg:      #FEF2F2;
  --purple:         #7C3AED;
  --purple-bg:      #F5F3FF;

  --dark:           #0F172A;
  --dark-2:         #1E293B;
  --dark-3:         #334155;

  /* ── Typography ── */
  --font:           'Vazirmatn', 'Segoe UI', Tahoma, sans-serif;
  --font-mono:      'Courier New', monospace;

  /* ── Spacing ── */
  --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;
  --space-20:  80px;
  --space-24:  96px;
  --space-32:  128px;

  /* ── Border Radius ── */
  --r-sm:   6px;
  --r-md:   10px;
  --r-lg:   14px;
  --r-xl:   18px;
  --r-2xl:  24px;
  --r-3xl:  32px;
  --r-full: 9999px;

  /* ── Shadows ── */
  --shadow-xs: 0 1px 3px rgba(0,0,0,0.07), 0 1px 2px rgba(0,0,0,0.05);
  --shadow-sm: 0 4px 8px rgba(0,0,0,0.06), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-md: 0 8px 20px rgba(37,99,235,0.10), 0 4px 8px rgba(0,0,0,0.05);
  --shadow-lg: 0 16px 40px rgba(37,99,235,0.12), 0 8px 16px rgba(0,0,0,0.06);
  --shadow-xl: 0 28px 56px rgba(37,99,235,0.16), 0 14px 28px rgba(0,0,0,0.08);
  --shadow-2xl:0 40px 80px rgba(37,99,235,0.20);

  /* ── Transitions ── */
  --t-fast:   all 0.15s cubic-bezier(.4,0,.2,1);
  --t-normal: all 0.25s cubic-bezier(.4,0,.2,1);
  --t-slow:   all 0.4s  cubic-bezier(.4,0,.2,1);

  /* ── Z-index ── */
  --z-dropdown: 100;
  --z-sticky:   200;
  --z-modal:    300;
  --z-toast:    400;
  --z-tooltip:  500;

  /* ── Container ── */
  --container:    1280px;
  --container-sm: 960px;
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-900);
  background: var(--bg);
  direction: rtl;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; display: block; }
a  { text-decoration: none; color: inherit; }
ul, ol { list-style: none; }
button { font-family: var(--font); cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: var(--font); }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--surface); }
::-webkit-scrollbar-thumb { background: var(--primary-200); border-radius: var(--r-full); }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* ── Container ── */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space-6);
}
.container-sm {
  max-width: var(--container-sm);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

/* ── Typography ── */
h1 { font-size: clamp(32px,5vw,60px); font-weight: 800; line-height: 1.25; }
h2 { font-size: clamp(26px,3.5vw,44px); font-weight: 800; line-height: 1.3; }
h3 { font-size: clamp(20px,2.5vw,28px); font-weight: 700; line-height: 1.4; }
h4 { font-size: clamp(16px,2vw,20px); font-weight: 700; line-height: 1.5; }
h5 { font-size: 16px; font-weight: 600; line-height: 1.5; }
h6 { font-size: 14px; font-weight: 600; line-height: 1.5; }
p  { line-height: 1.8; }

/* ── Gradient Text ── */
.gradient-text {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font);
  font-weight: 600;
  border-radius: var(--r-lg);
  transition: var(--t-normal);
  cursor: pointer;
  white-space: nowrap;
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0);
  transition: var(--t-fast);
}
.btn:hover::after { background: rgba(255,255,255,0.08); }
.btn:active { transform: scale(0.98); }

.btn-xs  { font-size: 12px; padding: 6px 14px; border-radius: var(--r-md); }
.btn-sm  { font-size: 13px; padding: 9px 20px; border-radius: var(--r-md); }
.btn-md  { font-size: 15px; padding: 12px 28px; }
.btn-lg  { font-size: 16px; padding: 15px 36px; border-radius: var(--r-xl); }
.btn-xl  { font-size: 18px; padding: 18px 44px; border-radius: var(--r-xl); }

.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 14px rgba(37,99,235,0.35);
}
.btn-primary:hover {
  background: var(--primary-hover);
  box-shadow: 0 6px 20px rgba(37,99,235,0.45);
  transform: translateY(-2px);
}

.btn-accent {
  background: var(--accent);
  color: white;
  box-shadow: 0 4px 14px rgba(6,182,212,0.35);
}
.btn-accent:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  border-color: var(--primary);
  color: var(--primary);
}
.btn-outline:hover {
  background: var(--primary-50);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--primary);
}
.btn-ghost:hover { background: var(--primary-50); }

.btn-dark {
  background: var(--dark);
  color: white;
  box-shadow: 0 4px 14px rgba(0,0,0,0.25);
}
.btn-dark:hover {
  background: var(--dark-2);
  transform: translateY(-2px);
}

.btn-gradient {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  box-shadow: 0 4px 14px rgba(37,99,235,0.35);
}
.btn-gradient:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(37,99,235,0.45);
}

.btn-white {
  background: white;
  color: var(--primary);
  box-shadow: var(--shadow-md);
}
.btn-white:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* ── Badges ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: var(--r-full);
}
.badge-primary { background: var(--primary-50); color: var(--primary); border: 1px solid var(--primary-200); }
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-danger  { background: var(--danger-bg); color: var(--danger); }
.badge-purple  { background: var(--purple-bg); color: var(--purple); }
.badge-accent  { background: var(--accent-50); color: var(--accent); }

/* ── Cards ── */
.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-2xl);
  overflow: hidden;
  transition: var(--t-normal);
}
.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
  border-color: rgba(37,99,235,0.2);
}

/* ── Inputs ── */
.input {
  width: 100%;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--r-lg);
  padding: 12px 16px;
  font-family: var(--font);
  font-size: 15px;
  color: var(--text-900);
  outline: none;
  transition: var(--t-fast);
  direction: rtl;
}
.input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
}
.input::placeholder { color: var(--text-400); }

.input-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.input-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-700);
}
.input-error {
  font-size: 12px;
  color: var(--danger);
}

/* ── Section Header ── */
.section-header { text-align: center; margin-bottom: var(--space-16); }
.section-tag {
  display: inline-block;
  background: var(--primary-50);
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
  padding: 6px 18px;
  border-radius: var(--r-full);
  border: 1px solid var(--primary-200);
  margin-bottom: var(--space-4);
  letter-spacing: 0.5px;
}
.section-title { color: var(--text-900); margin-bottom: var(--space-4); }
.section-subtitle {
  font-size: 17px;
  color: var(--text-500);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.9;
}

/* ── Animations ── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInRight {
  from { opacity: 0; transform: translateX(-28px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes fadeInLeft {
  from { opacity: 0; transform: translateX(28px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes float {
  0%,100% { transform: translateY(0px); }
  50%      { transform: translateY(-14px); }
}
@keyframes pulse-dot {
  0%,100% { opacity: 1; transform: scale(1); }
  50%      { opacity: .5; transform: scale(1.4); }
}
@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
@keyframes shimmer {
  0%   { background-position: -1000px 0; }
  100% { background-position: 1000px 0; }
}
@keyframes countUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes gradientFlow {
  0%,100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}

.animate-float    { animation: float 4s ease-in-out infinite; }
.animate-fade-up  { animation: fadeInUp .6s ease-out forwards; }
.animate-spin     { animation: spin 1s linear infinite; }

/* ── Skeleton Loader ── */
.skeleton {
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--border-light) 50%, var(--surface-2) 75%);
  background-size: 1000px 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--r-md);
}

/* ── Divider ── */
.divider { width: 100%; height: 1px; background: var(--border); }
.divider-v { width: 1px; height: 100%; background: var(--border); }

/* ── Utility ── */
.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-left   { text-align: left; }
.flex        { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.grid        { display: grid; }
.hidden      { display: none !important; }
.sr-only     { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* ── Stars ── */
.stars { color: #F59E0B; letter-spacing: 2px; font-size: 14px; }

/* ── Coming Soon Badge ── */
.status-coming {
  background: linear-gradient(135deg, #F5F3FF, #EFF6FF);
  color: #7C3AED;
  border: 1px solid #DDD6FE;
}

/* ── Product Card — Coming Soon overlay ── */
.product-card.is-coming-soon {
  --cs-color: #7C3AED;
}
.product-card.is-coming-soon .product-thumb-wrap::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(124,58,237,.12), rgba(6,182,212,.08));
  pointer-events: none;
}
.cs-overlay {
  position: absolute; inset: 0;
  background: rgba(15,23,42,.55);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 8px; backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.cs-icon   { font-size: 36px; }
.cs-text   { font-size: 15px; font-weight: 800; color: white; letter-spacing: .5px; }
.cs-date   { font-size: 12px; color: rgba(255,255,255,.7); }
.cs-bar    { width: 60%; height: 3px; background: rgba(255,255,255,.25); border-radius: 99px; overflow: hidden; }
.cs-bar-fill { height: 100%; background: linear-gradient(90deg,#7C3AED,#06B6D4); border-radius: 99px; animation: csProgress 2s ease-in-out infinite alternate; }
@keyframes csProgress { from { width: 20%; } to { width: 80%; } }

/* ── Notify button ── */
.btn-notify {
  background: linear-gradient(135deg, #7C3AED, #2563EB);
  color: white;
  border: none;
  box-shadow: 0 4px 14px rgba(124,58,237,.35);
}
.btn-notify:hover {
  opacity: .9; transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(124,58,237,.4);
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  :root { --container: 100%; }
}
@media (max-width: 768px) {
  body { font-size: 15px; }
  .container { padding: 0 var(--space-4); }
  h1 { font-size: clamp(28px, 7vw, 40px); }
  h2 { font-size: clamp(22px, 5vw, 32px); }
}
@media (max-width: 480px) {
  .container { padding: 0 var(--space-4); }
}
