/* أنماط مخصصة لمحاكي تاجر البي سي */
@layer base {
  * {
    -webkit-tap-highlight-color: transparent;
  }
}

/* شريط التمرير الأنيق للمتجر */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #0b0e14;
}
::-webkit-scrollbar-thumb {
  background: #1f2937;
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #0284c7;
}

/* بطاقات الكروت والتوهج التقني */
.sub-hub-card {
  position: relative;
  overflow: hidden;
}
.sub-hub-card.active {
  border-color: #06b6d4 !important;
  box-shadow: 0 10px 25px -5px rgba(6, 182, 212, 0.2);
}

/* أماكن تركيب القطع التفاعلية داخل الكيس */
.assembly-slot {
  position: relative;
  transition: all 0.2s ease-in-out;
}
.assembly-slot.drag-over {
  border-color: #10b981 !important;
  background-color: rgba(16, 185, 129, 0.1) !important;
  transform: scale(1.02);
}
.assembly-slot.filled {
  border-style: solid !important;
  border-color: rgba(6, 182, 212, 0.6) !important;
  background: #0e1420 !important;
}

/* بطاقات القطع القابلة للسحب */
.draggable-part-card {
  cursor: grab;
  touch-action: pan-y;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.draggable-part-card:active {
  cursor: grabbing;
  transform: scale(0.97);
}

/* شاشات الرفوف وتوهج أجهزة البي سي */
.pc-shelf-card {
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
}
.pc-shelf-card:hover {
  transform: translateY(-4px);
}

/* حركة دوران مراوح البي سي الواقعية */
@keyframes fanSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
.animate-fan-spin {
  animation: fanSpin 0.35s linear infinite;
}
.animate-fan-spin-fast {
  animation: fanSpin 0.15s linear infinite;
}

/* ختم الفحص المعتمد للجهاز Certified PC */
.certified-stamp {
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.35);
  border: 1.5px dashed #10b981;
}

/* توهج كروت إنجازات التاجر */
.trophy-unlocked-card {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12) 0%, rgba(16, 20, 29, 0.95) 100%);
  border-color: rgba(245, 158, 11, 0.5) !important;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.15);
}

/* نبض مؤشرات الـ Benchmark في المعمل */
@keyframes barFillPulse {
  0% { filter: brightness(1); }
  50% { filter: brightness(1.25); }
  100% { filter: brightness(1); }
}
.benchmark-progress-bar {
  animation: barFillPulse 1.5s infinite;
}

/* إضاءة RGB خافتة لحواف أجهزة البي سي */
@keyframes rgbGlow {
  0% { box-shadow: 0 0 15px rgba(6, 182, 212, 0.3); }
  50% { box-shadow: 0 0 20px rgba(168, 85, 247, 0.3); }
  100% { box-shadow: 0 0 15px rgba(6, 182, 212, 0.3); }
}
.rgb-case-active {
  animation: rgbGlow 4s infinite alternate;
}

/* وميض الزبائن عند الشراء */
@keyframes customerBuy {
  0% { transform: scale(0.9); opacity: 0; }
  50% { transform: scale(1.05); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}
.customer-alert-pop {
  animation: customerBuy 0.3s ease-out forwards;
}

/* ================== خريطة المدينة والتنقل الواقعي ================== */
.city-map-container {
  background: radial-gradient(circle at 50% 50%, #151c29 0%, #0a0d14 100%);
  position: relative;
  overflow: hidden;
  border-radius: 1.25rem;
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.8), 0 0 30px rgba(6, 182, 212, 0.15);
}

/* شبكة الشوارع الإسفلتية المضيئة */
.city-road-grid {
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 32px 32px;
}

/* علامة الموقع النشط ونبض الرادار GPS */
.map-beacon-pulse {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 9999px;
  background-color: #06b6d4;
  box-shadow: 0 0 15px #06b6d4;
  transform: translate(-50%, -50%);
}
.map-beacon-pulse::before {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 9999px;
  border: 2px solid #06b6d4;
  opacity: 0.8;
  animation: radarWave 2s infinite ease-out;
}
@keyframes radarWave {
  0% { transform: scale(0.6); opacity: 1; }
  100% { transform: scale(2.6); opacity: 0; }
}

/* السهم/المركبة المتحركة على الخريطة */
#mapTravelIndicator {
  position: absolute;
  width: 44px;
  height: 44px;
  transform: translate(-50%, -50%);
  transition: left 1.3s cubic-bezier(0.45, 0, 0.15, 1), top 1.3s cubic-bezier(0.45, 0, 0.15, 1), transform 0.4s ease;
  pointer-events: none;
  z-index: 30;
}

.map-card-node {
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.map-card-node:hover {
  transform: translateY(-4px) scale(1.02);
}
.map-card-node.current-location {
  border-color: #06b6d4 !important;
  box-shadow: 0 0 25px rgba(6, 182, 212, 0.35);
}