/* الأساسيات */
body {
  font-family: 'Tajawal', sans-serif;
  background-color: #f9fafb;
  color: #333;
  direction: rtl;
}

/* ===== التحميل والرسائل ===== */
.loading-spinner {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.status-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
}

/* ===== بطاقات الطلبات ===== */
.order-card {
  transition: all 0.3s ease;
  border: 1px solid #e2e8f0;
  overflow: hidden;
}

.order-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

.order-item {
  transition: background-color 0.2s ease;
  padding: 0.5rem 0;
}

.order-item:hover {
  background-color: #f8fafc;
}

/* ===== الأزرار ===== */
.whatsapp-btn {
  transition: all 0.3s ease;
}

.whatsapp-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.cancel-btn {
  transition: all 0.3s ease;
}

.cancel-btn:hover {
  background-color: #dc2626 !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* ===== الرسائل العائمة ===== */
.toast {
  position: fixed;
  bottom: 1rem;
  left: 1rem;
  padding: 0.75rem 1.5rem;
  border-radius: 0.375rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  z-index: 50;
  animation: slideIn 0.3s ease-out;
}

.toast.success {
  background-color: #10b981;
  color: white;
}

.toast.error {
  background-color: #ef4444;
  color: white;
}

.toast.info {
  background-color: #3b82f6;
  color: white;
}

@keyframes slideIn {
  from { transform: translateX(-100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ===== الأخطاء ===== */
.global-error {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background-color: #ef4444;
  color: white;
  padding: 1rem;
  text-align: center;
  z-index: 1000;
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from { transform: translateY(-100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ===== الشبكة ===== */
#network-notification {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  padding: 0.75rem 1.5rem;
  border-radius: 0.375rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  z-index: 50;
  animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== التكيف مع الأجهزة المحمولة ===== */
@media (max-width: 768px) {
  .order-card {
    margin-bottom: 1rem;
  }
  
  .whatsapp-btn, .cancel-btn {
    width: 100%;
    justify-content: center;
    margin-bottom: 0.5rem;
  }
}

/* ===== الهيدر والفوتر ===== */
header {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

#mobile-menu {
  transition: all 0.3s ease;
}

footer {
  background-color: #f8fafc;
}

footer a {
  transition: color 0.2s ease;
}

.cart-counter {
  transition: all 0.2s ease;
}

/* ===== زر العودة للصفحة الرئيسية - موبايل فقط ===== */
.floating-home-btn {
  display: none;
  position: fixed;
  bottom: 20px;
  left: 20px;
  width: 50px;
  height: 50px;
  background-color: #2563eb;
  color: white;
  border-radius: 50%;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  animation: pulse 2s infinite;
  transition: all 0.3s ease;
}

.floating-home-btn:hover {
  background-color: #1d4ed8;
  transform: scale(1.1);
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

@media (max-width: 768px) {
  .floating-home-btn {
    display: flex;
  }
}

/* ===== تأثيرات عامة ===== */
.hover-effect {
  transition: all 0.3s ease;
}

.hover-effect:hover {
  transform: translateY(-2px);
}

/* ===== التجاوب ===== */
@media (max-width: 640px) {
  .mobile-stack {
    flex-direction: column;
  }
}

/* ===== تخصيصات إضافية ===== */
.text-shadow {
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
}

.transition-all {
  transition: all 0.3s ease;
}

.btn-primary {
  background-color: #2563eb;
  color: white;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background-color: #1d4ed8;
  transform: translateY(-2px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* ===== تنسيقات خاصة ببرنامج الإحالة ===== */
.referral-card {
  background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
  border: 1px solid #ddd6fe;
}

.earnings-card {
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  border: 1px solid #a7f3d0;
}

.withdraw-card {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border: 1px solid #bfdbfe;
}

.copy-btn {
  transition: all 0.3s ease;
}

.copy-btn:hover {
  transform: translateY(-2px);
}

.copy-btn.copied {
  background-color: #10b981 !important;
}

/* ===== توهج لطلبات الجملة ===== */
.wholesale-glow {
  animation: wholesaleGlow 2s infinite alternate;
}

@keyframes wholesaleGlow {
  from { box-shadow: 0 0 5px rgba(220, 38, 38, 0.5); }
  to { box-shadow: 0 0 20px rgba(220, 38, 38, 0.8); }
}

/* ===== توهج لبرنامج اربح معنا ===== */
.earn-glow {
  animation: earnGlow 2s infinite alternate;
}

@keyframes earnGlow {
  from { box-shadow: 0 0 5px rgba(168, 85, 247, 0.5); }
  to { box-shadow: 0 0 20px rgba(168, 85, 247, 0.8); }
}

/* ===== تنسيقات خاصة بصفحة المنتجات ===== */
.product-card {
  transition: all 0.3s ease;
  border: 1px solid #e2e8f0;
  overflow: hidden;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.05);
}

.price-level {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: bold;
}

.wholesale1-badge {
  background-color: #3b82f6;
  color: white;
}

.wholesale2-badge {
  background-color: #10b981;
  color: white;
}

.access-denied {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
}

.discount-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: #ef4444;
  color: white;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: bold;
}

.wholesale-banner {
  background: linear-gradient(135deg, #fecaca 0%, #fee2e2 100%);
  border: 1px solid #fca5a5;
}




