/* أساسيات التمرير الأفقي */
.scrolling-wrapper {
  overflow-x: auto;
  display: flex;
  flex-wrap: nowrap;
}
.scrolling-wrapper::-webkit-scrollbar {
  display: none;
}

/* إخفاء شريط التمرير */
.scrollbar-hide::-webkit-scrollbar {
  display: none;
}
.scrollbar-hide {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* عداد السلة */
.cart-count {
  position: absolute;
  top: -5px;
  right: -5px;
  background-color: red;
  color: white;
  font-size: 12px;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

/* حقل الكمية */
.qty-input {
  width: 50px;
  text-align: center;
}

/* زر الحذف */
.delete-btn {
  background-color: #dc2626;
  color: white;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.8rem;
  cursor: pointer;
}

/* تأثير نشط على صورة التصنيف */
.category-btn img {
  transition: border-color 0.3s ease;
}
.category-btn.active img {
  border-color: #22c55e;
}

/* نوافذ التوست المنبثقة */
#toast {
  position: fixed;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  backdrop-filter: blur(10px);
  opacity: 0;
  pointer-events: none;
  z-index: 9999;
  transition: opacity 0.4s ease, transform 0.4s ease;
}
#toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

/* قائمة العناصر في السلة */
#itemsList {
  max-height: 160px;
  overflow-y: auto;
}
#itemsList li {
  font-size: 12px;
  padding: 4px 0;
}
#itemsList img {
  width: 30px;
  height: 30px;
}

/* مؤشر التمرير في السلة */
#scroll-indicator {
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10;
}

/* أنماط الموبايل للسلايدر */
.mobile-header-slider {
  position: relative;
}
.mobile-header-slider iframe {
  position: relative;
  z-index: 20;
  pointer-events: auto !important;
  touch-action: manipulation !important;
  -webkit-overflow-scrolling: touch;
  -webkit-transform: translate3d(0, 0, 0);
}

/* منع التفاف div داخل زر التصنيف */
#categoryButtons > div {
  flex-wrap: nowrap !important;
}
.category-item {
  flex-shrink: 0 !important;
}

/* عرض التصنيفات حسب الحجم */
@media (max-width: 639px) {
  .category-item {
    width: 33.33% !important;
  }
}
@media (min-width: 640px) and (max-width: 1023px) {
  .category-item {
    width: 20% !important;
  }
}
@media (min-width: 1024px) {
  .category-item {
    width: 14.28% !important;
  }
}
/* تنسيقات ناف بار حديث بدائرة حمراء ✅ */
.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #666;
  transition: all 0.3s ease;
}
.icon-wrapper {
  width: 42px;
  height: 42px;
  background-color: transparent;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}
.nav-label {
  font-size: 11px;
  margin-top: 4px;
  color: #666;
  transition: color 0.3s ease;
}
.nav-item.active .icon-wrapper {
  background-color: #dc2626;
  color: white;
  box-shadow: 0 0 0 4px white, 0 0 0 6px #dc2626;
  transform: translateY(-10px);
}
.nav-item.active .nav-label {
  color: #dc2626;
}
.nav-item i {
  font-size: 18px;
}

.order-card {
  width: calc(100% - 30px); /* حتى ما يطلع خارج الحاوية */
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 10px;
  padding: 15px;
  box-sizing: border-box;
  font-family: sans-serif;
  direction: rtl;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  margin: 0 15px 20px 15px; /* يمين ويسار وأيضًا فراغ بين البطاقات */
}

.order-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-name {
  margin: 0;
  font-size: 18px;
  font-weight: bold;
}

.order-address {
  display: inline-flex;
  align-items: center;
  margin: 5px 0 0;
  font-size: 14px;
  color: #555;
  gap: 6px;
}

.location-icon {
  width: 18px;
  height: 18px;
  vertical-align: middle;
  flex-shrink: 0;
}


.order-status {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: bold;
  color: #fff;
}

.status-تم-الطلب { background-color: #6B7280; }
.status-يتم-التحضير { background-color: #F59E0B; }
.status-الطلب-مع-المندوب { background-color: #3B82F6; }
.status-تم-جاهز-للاستلام { background-color: #3B82F6; }
.status-تم-الاستلام { background-color: #10B981; }

.order-items ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.order-items li {
  font-size: 14px;
  margin-bottom: 4px;
}

.more-items {
  font-size: 13px;
  color: #2563EB;
  margin-top: 5px;
}

.order-total {
  font-size: 15px;
  font-weight: bold;
  color: #059669;
  text-align: left;
}

.order-actions {
  display: flex;
  flex-direction: row;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.order-actions button {
  flex: 1;
  padding: 8px;
  font-size: 14px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

.track-btn { background-color: #dc2626; color: white; }
.repeat-btn { background-color: #266FDC; color: white; }
.rate-btn { background-color: #FFBF00; color: white; }

.rated {
  background-color: #F3F4F6;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 14px;
  color: #333;
}

.order-card p,
.order-card li,
.order-card .order-total,
.order-card .more-items {
  line-height: 1.8;
}

.order-details-box {
  background: #fff;
  padding: 5px;
  border-radius: 8px;
  box-shadow: 0 0 10px #ccc;
  margin-bottom: 20px;
}

.total-box {
  background-color: #d4f8d4;
  color: #006400;
  padding: 10px;
  margin-top: 15px;
  border-radius: 6px;
  font-size: 18px;
}

.rating-popup {
  position: fixed;
  top: 15%;
  left: 50%;
  transform: translate(-50%, 0);
  background: #fff;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 0 25px rgba(0,0,0,0.2);
  z-index: 9999;
  width: 90%;
  max-width: 420px;
  font-family: "Segoe UI", sans-serif;
}

.rating-content {
  position: relative;
  text-align: center;
}

.rating-content h3 {
  margin-top: 0;
  margin-bottom: 20px;
  font-size: 22px;
  color: #333;
}

.rating-content label {
  display: block;
  margin: 10px 0 5px;
  font-weight: bold;
  text-align: right;
  color: #444;
}

.rating-content select,
.rating-content textarea {
  width: 100%;
  padding: 10px;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-size: 14px;
  margin-bottom: 15px;
}

.rating-content textarea {
  resize: vertical;
  min-height: 80px;
}

.submit-btn {
  background-color: #28a745;
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 6px;
  font-size: 16px;
  cursor: pointer;
  width: 100%;
  transition: background-color 0.3s ease;
}

.submit-btn:hover {
  background-color: #218838;
}

.close-popup {
  position: absolute;
  top: -10px;
  right: -10px;
  background: #eee;
  color: #333;
  font-size: 18px;
  padding: 5px 10px;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 5px rgba(0,0,0,0.2);
}

.rating-message {
  margin: 10px 0 15px;
  font-size: 15px;
  font-weight: 500;
}

/* الشريط العلوي */
.order-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #f3f4f6;
  padding: 12px 20px;
  border-bottom: 1px solid #ddd;
  font-weight: bold;
}

/* زر الرجوع */
.order-header button {
  background: none;
  border: none;
  color: #2563eb;
  font-size: 16px;
  cursor: pointer;
}
.order-header button:hover {
  text-decoration: underline;
}

/* مخطط الحالة */
.status-grid {
  display: flex;
  flex-direction: row-reverse;
  justify-content: center;
  align-items: center;
  gap: 12px;
  padding: 20px;
  overflow-x: auto;
}
.status-step {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.status-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
}
.status-active {
  background-color: #22c55e;
  color: white;
}
.status-inactive {
  background-color: #e5e7eb;
  color: #6b7280;
}
.status-label {
  margin-top: 6px;
  font-size: 13px;
}

/* الخط بين الخطوات */
.status-line {
  min-width: 15px;
  height: 2px;
  background-color: #d1d5db;
}

/* البطاقات */
.card {
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  margin-top: 20px;
  overflow: hidden;
}
.mcard-header {
  background-color: #f3f4f6;
  text-align: center;
  padding: 10px;
  font-weight: bold;
}
.card-row {
  padding: 10px 16px;
}
.card-row:nth-child(even) {
  background-color: #f9fafb;
}
.card-row:nth-child(odd) {
  background-color: #e5e7eb;
}

/* المنتجات */
.product-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 16px;
}
.product-row:nth-child(even) {
  background-color: #f9fafb;
}
.product-row:nth-child(odd) {
  background-color: #e5e7eb;
}

/* بطاقة المجموع */
.total-card {
  background-color: #d1fae5;
  border-radius: 8px;
  margin-top: 20px;
}
.total-card .card-header {
  background-color: #bbf7d0;
  color: #065f46;
}
.total-card .card-row {
  text-align: center;
  font-weight: bold;
  font-size: 18px;
  color: #065f46;
}

.card {
  border-radius: 8px;
  margin: 15px 20px; /* فراغ من الأعلى والأسفل + من الجوانب */
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  overflow: hidden;
  font-family: 'Arial', sans-serif;
}


.card-header {
  padding: 10px 15px;
  font-weight: bold;
  color: #fff;
}

.card-body {
  padding: 15px;
  background-color: #f2f2f2;
  color: #333;
}

.card-order .card-header {
  background-color: #444;
}

.card-admin .card-header {
  background: linear-gradient(90deg, #d4af37, #f5e28c); /* ذهبي متدرج */
  color: #333;
  font-weight: bold;
  font-size: 16px;
}

.card-admin .card-body {
  background-color: #f2f2f2; /* رمادي فاتح */
  color: #444;
  font-size: 15px;
  line-height: 1.6;
}

.card-unread .card-header {
  background-color: #8b0000; /* أحمر قاتم */
  color: #fff;
}

.card-unread .card-body {
  background-color: #ffe5e5; /* أحمر فاتح */
  color: #333;
}

@keyframes shake {
  0% { transform: rotate(0deg); }
  25% { transform: rotate(10deg); }
  50% { transform: rotate(-10deg); }
  75% { transform: rotate(10deg); }
  100% { transform: rotate(0deg); }
}

.shake {
  animation: shake 0.5s ease-in-out infinite;
}


  #notifCount {
    transition: none !important; /* إلغاء fade */
  }

.hidden {
  display: none !important;
}

.phone-popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.popup-content {
  background: white;
  padding: 20px 30px;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
  max-width: 300px;
}

.popup-title {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 10px;
}

.popup-number {
  font-size: 20px;
  margin-bottom: 15px;
  color: #333;
}

.popup-confirm {
  background-color: #22c55e;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
}

.popup-confirm:hover {
  background-color: #16a34a;
}

.product-card {
  touch-action: manipulation;
}
