/* ═══════════════════════════════════════════════════════════
   ASTRO — سجل طلبات العميل (My Orders)
   ═══════════════════════════════════════════════════════════
   بنفس لغة تصميم مركز الضمان (كروت داكنة بحدود بنفسجية خفيفة)
   عشان الصفحتين يبانوا من نفس النظام.
   الملف بييجي بعد warranty.css في index.html.
═══════════════════════════════════════════════════════════ */

/* ── ترويسة الصفحة ── */
.ord-head{display:flex;align-items:center;gap:16px;padding:4px 0 26px}
.ord-head-icon{font-size:2.2rem;line-height:1}
.ord-head-kicker{font-family:'Orbitron',sans-serif;font-size:0.62rem;letter-spacing:3px;color:var(--pl);opacity:0.7;margin-bottom:5px}
.ord-head-title{font-family:'Orbitron',sans-serif;font-size:1.35rem;font-weight:900;color:#fff;margin:0;letter-spacing:1px}

/* ── قائمة عمليات الشراء ── */
.ord-list{display:flex;flex-direction:column;gap:18px}

.ord-card{
  background:rgba(18,12,34,0.72);
  border:1px solid rgba(138,77,255,0.2);
  border-radius:12px;
  overflow:hidden;
}

.ord-card-head{
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  padding:16px 20px;
  border-bottom:1px solid rgba(138,77,255,0.14);
  background:rgba(138,77,255,0.05);
}
.ord-invoice{font-family:'Orbitron',sans-serif;font-size:0.82rem;color:#fff;letter-spacing:1px;direction:ltr;unicode-bidi:embed}
.ord-date{font-size:0.76rem;color:rgba(242,242,247,0.5);margin-top:4px}

/* ── سطر المنتج ── */
.ord-items{display:flex;flex-direction:column}
.ord-item{
  display:flex;align-items:flex-start;gap:14px;
  padding:14px 20px;
  border-bottom:1px solid rgba(255,255,255,0.05);
}
.ord-item:last-child{border-bottom:0}

.ord-item-thumb{
  width:56px;height:56px;flex:0 0 auto;border-radius:8px;overflow:hidden;
  background:rgba(138,77,255,0.08);
  display:flex;align-items:center;justify-content:center;font-size:1.5rem;
}
.ord-item-thumb img{width:100%;height:100%;object-fit:cover;display:block}

.ord-item-main{flex:1;min-width:0}
.ord-item-name{font-size:0.9rem;color:#fff;font-weight:600;line-height:1.45;word-break:break-word}
/* السطر ده فيه عربي وأرقام مع بعض ("39,999 جنيه × 2 · خصم 10%").
   فرض direction:ltr عليه كان بيقلب ترتيب الكلمات العربية — فبنسيبه
   يرث اتجاه الصفحة، والأرقام بتتعرض صح لوحدها. */
.ord-item-meta{font-size:0.78rem;color:rgba(242,242,247,0.55);margin-top:5px}
.ord-disc{color:#6bffb8}
.ord-reason{font-size:0.76rem;color:#ff8f8f;margin-top:6px;line-height:1.5}

.ord-item-side{display:flex;flex-direction:column;align-items:flex-end;gap:7px;flex:0 0 auto}
.ord-item-total{font-family:'Orbitron',sans-serif;font-size:0.86rem;color:var(--pl);font-weight:700;white-space:nowrap}

/* ── شارات الحالة ── */
.ord-status{
  display:inline-block;padding:3px 11px;border-radius:20px;
  font-size:0.7rem;font-weight:600;white-space:nowrap;
  border:1px solid transparent;
}
.ord-status-pending{background:rgba(255,211,92,0.12);border-color:rgba(255,211,92,0.3);color:#ffd35c}
.ord-status-confirmed{background:rgba(107,255,184,0.1);border-color:rgba(107,255,184,0.28);color:#6bffb8}
.ord-status-done{background:rgba(138,77,255,0.14);border-color:rgba(138,77,255,0.32);color:#C084FC}
.ord-status-cancelled{background:rgba(255,107,107,0.12);border-color:rgba(255,107,107,0.3);color:#ff8f8f}

/* ── إجمالي عملية الشراء ── */
.ord-card-foot{
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  padding:14px 20px;
  border-top:1px solid rgba(138,77,255,0.14);
  background:rgba(138,77,255,0.04);
}
.ord-total-label{font-size:0.82rem;color:rgba(242,242,247,0.65)}
.ord-total-value{font-family:'Orbitron',sans-serif;font-size:1rem;color:#fff;font-weight:700}

.ord-warranty-btn{margin:0 20px 16px;width:calc(100% - 40px);justify-content:center}

/* ── الحالات الفاضية / التحميل / الخطأ ── */
.ord-empty{text-align:center;padding:56px 20px}
.ord-empty-icon{font-size:2.4rem;margin-bottom:12px}
.ord-empty-title{color:rgba(242,242,247,0.78);margin:0 0 8px;font-size:0.98rem}
.ord-empty-body{color:rgba(242,242,247,0.42);font-size:0.84rem;margin:0 0 18px;line-height:1.7}

/* ── موبايل ── */
@media (max-width: 620px){
  .ord-head{gap:12px;padding-bottom:20px}
  .ord-head-title{font-size:1.1rem}
  .ord-card-head{padding:14px 15px}
  .ord-item{padding:13px 15px;gap:11px}
  .ord-item-thumb{width:48px;height:48px}
  .ord-card-foot{padding:13px 15px}
  .ord-warranty-btn{margin:0 15px 14px;width:calc(100% - 30px)}
  /* السعر والحالة تحت بعض بدل ما يزقّوا اسم المنتج */
  .ord-item{flex-wrap:wrap}
  .ord-item-side{flex-direction:row;align-items:center;justify-content:space-between;width:100%;margin-top:4px}
}

@media print{ #ordersPage{display:none !important} }
