/* Performance & Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* 5. Page Entrance Fade-in (~250ms) */
@keyframes pageFadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}
body { 
  background-color: #030307; 
  background-image: 
    radial-gradient(circle at 10% 10%, rgba(126, 34, 206, 0.15) 0%, transparent 40%),
    radial-gradient(circle at 90% 90%, rgba(37, 99, 235, 0.15) 0%, transparent 40%);
  background-attachment: fixed;
  color: #ffffff; 
  font-family: system-ui, -apple-system, sans-serif;
  animation: pageFadeIn 250ms ease-out;
}

/* شريط التمرير المخصص */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #030307; }
::-webkit-scrollbar-thumb { background: rgba(139, 92, 246, 0.4); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(168, 85, 247, 0.7); }

/* كارت زجاجي خفيف جداً على المعالج */
.glass-card {
  background: #0a0a16;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  will-change: transform, box-shadow;
}

/* 1. Product Cards Hover Effects (Desktop only with 200ms transition & glow) */
.product-card-item {
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
}
@media (hover: hover) {
  .product-card-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(168, 85, 247, 0.25), 0 0 15px rgba(56, 189, 248, 0.15);
    border-color: rgba(168, 85, 247, 0.4);
  }
}

/* 2. Buttons Hover & Active Press Effects */
button, a.btn-interactive {
  transition: all 200ms ease;
}
button:hover, a.btn-interactive:hover {
  filter: brightness(1.1);
}
button:active, a.btn-interactive:active {
  transform: scale(0.98);
}

/* 4. Favorite Buttons Tiny Scale Animation */
@keyframes favPop {
  0% { transform: scale(1); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); }
}
.fav-animate {
  animation: favPop 200ms ease;
}

/* 3. Category Filters Smooth Color Transitions */
.cat-btn, .sub-cat-btn {
  transition: all 200ms ease !important;
}

/* أنيميشن اللوجو النيون الاحترافي */
@keyframes textShimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
@keyframes logoGlow {
  0%, 100% { filter: drop-shadow(0 0 12px rgba(192, 132, 252, 0.6)) drop-shadow(0 0 20px rgba(56, 189, 248, 0.4)); }
  50% { filter: drop-shadow(0 0 18px rgba(251, 191, 36, 0.7)) drop-shadow(0 0 25px rgba(168, 85, 247, 0.7)); }
}
.logo-luxury {
  background: linear-gradient(110deg, #ffffff 0%, #f3e8ff 20%, #c084fc 40%, #38bdf8 60%, #e0f2fe 80%, #ffffff 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: textShimmer 3.5s linear infinite, logoGlow 3s ease-in-out infinite;
  font-weight: 900;
}

.logo-badge {
  background: rgba(15, 10, 30, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 20px rgba(147, 51, 234, 0.2);
}

/* أنيميشن وسام سعر الصرف النيون */
@keyframes borderRainbow {
  0% { border-color: rgba(56, 189, 248, 0.6); box-shadow: 0 0 12px rgba(56, 189, 248, 0.2); }
  50% { border-color: rgba(251, 191, 36, 0.7); box-shadow: 0 0 16px rgba(251, 191, 36, 0.3); }
  100% { border-color: rgba(168, 85, 247, 0.6); box-shadow: 0 0 12px rgba(168, 85, 247, 0.2); }
}
.exchange-badge {
  background: linear-gradient(135deg, rgba(15, 10, 30, 0.95), rgba(5, 5, 15, 0.95));
  border: 1px solid rgba(56, 189, 248, 0.5);
  animation: borderRainbow 4s infinite ease-in-out;
}

.text-shimmer {
  background: linear-gradient(90deg, #38bdf8 0%, #fbbf24 35%, #c084fc 70%, #38bdf8 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: textShimmer 4s linear infinite;
}

.glass-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.glass-pill:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(168, 85, 247, 0.4);
}

/* تأثير اللمعة السريع والناعم عند تحريك الماوس */
.shine-card {
  position: relative;
  overflow: hidden;
}
.shine-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left 0.4s ease;
  pointer-events: none;
  z-index: 10;
}
.shine-card:hover::before {
  left: 100%;
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 8px rgba(139, 92, 246, 0.3); }
  50% { box-shadow: 0 0 16px rgba(56, 189, 248, 0.5); }
}
.animate-glow {
  animation: pulseGlow 2.5s infinite;
}

.cat-active {
  background: linear-gradient(90deg, #7e22ce 0%, #2563eb 100%) !important;
  border-color: rgba(192, 132, 252, 0.6) !important;
  color: #ffffff !important;
  box-shadow: 0 0 12px rgba(147, 51, 234, 0.4) !important;
  font-weight: 700 !important;
}

.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* ===== حركات إضافية ===== */
/* دخول الكروت بالتتابع */
@keyframes cardIn {
  from { opacity: 0; transform: translateY(22px) scale(0.97); }
  to   { opacity: 1; transform: none; }
}
.card-enter { animation: cardIn 520ms cubic-bezier(.2,.8,.2,1) backwards; }

/* فتح نافذة الطلب */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalIn {
  from { opacity: 0; transform: translateY(24px) scale(0.96); }
  to   { opacity: 1; transform: none; }
}
#order-modal.flex { animation: fadeIn 200ms ease-out; }
#order-modal.flex > div { animation: modalIn 280ms cubic-bezier(.2,.8,.2,1); }

/* الإشعار وصندوق الدفع */
@keyframes toastIn {
  from { opacity: 0; transform: translateY(-14px) scale(0.96); }
  to   { opacity: 1; transform: none; }
}
#toast:not(.hidden) > div { animation: toastIn 280ms cubic-bezier(.2,.8,.2,1); }
#payment-info:not(.hidden) { animation: fadeIn 250ms ease-out; }

/* الصاعقة العائمة بالشعار */
@keyframes floaty {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-5px) rotate(-6deg); }
}
.float-bolt { display: inline-block; animation: floaty 3s ease-in-out infinite; }



/* ===== Liquid Glass ===== */
/* بقع سائلة ملوّنة ورا الزجاج (حركة transform فقط حتى تضل خفيفة) */
.liquid-bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.liquid-bg i { position: absolute; width: 46vmax; height: 46vmax; will-change: transform; }
.liquid-bg i:nth-child(1) {
  top: -14vmax; right: -12vmax; border-radius: 42% 58% 63% 37% / 41% 44% 56% 59%;
  background: radial-gradient(closest-side, rgba(168,85,247,.5), rgba(126,34,206,0));
  animation: blobA 24s ease-in-out infinite alternate;
}
.liquid-bg i:nth-child(2) {
  bottom: -16vmax; left: -14vmax; border-radius: 58% 42% 37% 63% / 55% 61% 39% 45%;
  background: radial-gradient(closest-side, rgba(56,189,248,.42), rgba(37,99,235,0));
  animation: blobB 28s ease-in-out infinite alternate;
}
.liquid-bg i:nth-child(3) {
  top: 38%; left: 42%; width: 30vmax; height: 30vmax; border-radius: 50% 50% 38% 62% / 52% 40% 60% 48%;
  background: radial-gradient(closest-side, rgba(244,114,182,.28), rgba(244,114,182,0));
  animation: blobC 20s ease-in-out infinite alternate;
}
@keyframes blobA { to { transform: translate(-9vmax, 11vmax) rotate(45deg) scale(1.15); } }
@keyframes blobB { to { transform: translate(10vmax, -9vmax) rotate(-40deg) scale(1.12); } }
@keyframes blobC { to { transform: translate(-12vmax, -8vmax) rotate(60deg) scale(1.25); } }

/* الزجاج: شفاف + حواف مضيئة + انعكاس داخلي */
.glass-card {
  background-color: rgba(16, 12, 38, 0.58) !important;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    inset 0 0 0 1px rgba(255, 255, 255, 0.04),
    inset 0 -18px 30px -18px rgba(168, 85, 247, 0.22),
    0 12px 32px rgba(0, 0, 0, 0.45);
}
/* الضبابية بس ع الأجهزة القوية (ماوس) حتى ما يثقل ع الموبايلات الضعيفة */
@media (hover: hover) {
  .glass-card, .glass-pill {
    -webkit-backdrop-filter: blur(14px) saturate(160%);
    backdrop-filter: blur(14px) saturate(160%);
  }
}
#order-modal .glass-card, #toast .glass-card {
  background-color: rgba(12, 9, 30, 0.80) !important;
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
}
.glass-pill {
  background: rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), inset 0 -8px 14px -8px rgba(168, 85, 247, 0.22);
}

/* لمعة سائلة بتتبع المؤشر ع الكروت */
.product-card-item {
  background-image: radial-gradient(260px circle at var(--mx, 50%) var(--my, 0%), rgba(255, 255, 255, 0.13), transparent 62%);
}

/* تموّج مثل قطرة ماء عند الضغط */
.ripple {
  position: absolute; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(255,255,255,.5), rgba(255,255,255,0) 70%);
  transform: scale(0); animation: rippleOut 600ms ease-out forwards;
}
@keyframes rippleOut { 0% { opacity: 1; transform: scale(0); } 100% { opacity: 0; transform: scale(1); } }


/* ===== تخفيف الحمل: بدون ضبابية ع الكروت والأزرار الكتيرة ===== */
.product-card-item, .glass-pill {
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}
.product-card-item { background-color: rgba(18, 14, 42, 0.66) !important; }
@media (hover: hover) {
  .glass-card { -webkit-backdrop-filter: blur(8px) saturate(140%); backdrop-filter: blur(8px) saturate(140%); }
}

/* أزرار الفئات ما بتتقلّص أبداً */
.cat-btn, .sub-cat-btn { flex-shrink: 0; }
