/* ════════════════════════════════════════════════════════════════
   RAWAJ POS v3 — Smart Professional POS
   تصميم نقطة البيع الذكي الاحترافي
   ════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700;800;900&display=swap');

:root {
  /* الألوان الأساسية */
  --pos-bg:       #f0f2f7;
  --pos-left-bg:  #f7f8fc;
  --pos-right-bg: #ffffff;
  --pos-gold:     #C9A84C;
  --pos-gold2:    #A8842A;
  --pos-green:    #10b981;
  --pos-red:      #ef4444;
  --pos-orange:   #f59e0b;
  --pos-blue:     #3b82f6;
  --pos-purple:   #8b5cf6;
  /* النصوص */
  --txt-dark:     #0f172a;
  --txt-mid:      #475569;
  --txt-soft:     #94a3b8;
  /* الحدود */
  --border:       #e2e8f0;
  --border-dark:  rgba(255,255,255,.08);
  /* الظلال */
  --shadow-sm:    0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.05);
  --shadow-md:    0 4px 14px rgba(0,0,0,.1);
  --shadow-lg:    0 10px 30px rgba(0,0,0,.15);
}

/* ── POS Container ─────────────────────────────────────────── */
.pos-container {
  display: grid;
  grid-template-columns: 1fr 480px;
  height: calc(100vh - 62px);
  overflow: hidden;
  background: var(--pos-bg);
  font-family: 'Cairo', Arial, sans-serif;
  direction: rtl;
}

/* ════════════════════════════════════════════════════════
   PANEL GAUCHE — منطقة المنتجات (فاتحة)
   ════════════════════════════════════════════════════════ */
.pos-left {
  display: flex;
  flex-direction: column;
  background: var(--pos-left-bg);
  overflow: hidden;
}

/* ── شريط الأدوات العلوي ────────────────────────────── */
.pos-search-bar {
  padding: 12px 14px;
  background: #fff;
  border-bottom: 2px solid var(--border);
  display: flex;
  gap: 10px;
  align-items: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,.04);
}

/* حقل الباركود */
.barcode-zone { flex: 0 0 auto; width: 48%; }
.barcode-input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f8fafc;
  border: 2px solid var(--border);
  border-radius: 14px;
  padding: 0 14px;
  height: 50px;
  transition: all .2s;
  position: relative;
}
.barcode-input-wrap:focus-within {
  border-color: var(--pos-gold);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(201,168,76,.12);
}
.barcode-input-wrap.scanning {
  border-color: var(--pos-blue);
  box-shadow: 0 0 0 4px rgba(59,130,246,.12);
  animation: scanPulse .5s ease infinite alternate;
}
@keyframes scanPulse { to { box-shadow: 0 0 0 6px rgba(59,130,246,.2); } }

.barcode-icon-big {
  font-size: 20px;
  color: var(--pos-gold);
  flex-shrink: 0;
}
.barcode-input-wrap input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--txt-dark);
  font-family: 'Cairo', Arial, sans-serif;
  font-size: 13.5px;
  font-weight: 700;
  direction: rtl;
}
.barcode-input-wrap input::placeholder { color: var(--txt-soft); font-size: 12px; }

.barcode-status {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 700;
  color: var(--txt-soft);
  white-space: nowrap;
}
.barcode-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--pos-green);
  flex-shrink: 0;
  box-shadow: 0 0 0 3px rgba(16,185,129,.2);
  animation: dotLive 2s ease infinite;
}
@keyframes dotLive { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.5;transform:scale(.8)} }

/* حقل البحث بالاسم */
.name-search-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f8fafc;
  border: 2px solid var(--border);
  border-radius: 14px;
  padding: 0 14px;
  height: 50px;
  transition: all .2s;
}
.name-search-wrap:focus-within {
  border-color: #94a3b8;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(148,163,184,.12);
}
.name-search-wrap > i { color: var(--txt-soft); font-size: 14px; flex-shrink: 0; }
.name-search-wrap input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--txt-dark);
  font-family: 'Cairo', Arial, sans-serif;
  font-size: 13.5px;
  font-weight: 700;
  direction: rtl;
}
.name-search-wrap input::placeholder { color: var(--txt-soft); font-size: 12px; }
.pos-filter-btn {
  background: transparent;
  border: none;
  color: var(--txt-soft);
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  font-size: 13px;
  transition: all .15s;
}
.pos-filter-btn:hover { color: var(--pos-gold); background: rgba(201,168,76,.1); }

/* ── فلاتر الفئات ─────────────────────────────────── */
.pos-cats {
  display: flex;
  gap: 7px;
  padding: 10px 14px;
  overflow-x: auto;
  flex-shrink: 0;
  scrollbar-width: none;
  background: #fff;
  border-bottom: 2px solid var(--border);
  align-items: center;
}
.pos-cats::-webkit-scrollbar { display: none; }

.pos-cat-pill {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 12px;
  border: 2px solid #e8edf3;
  background: #f4f6fa;
  color: #4a5568;
  font-family: 'Cairo', Arial, sans-serif;
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
  transition: all .18s cubic-bezier(.4,0,.2,1);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}
.pos-cat-pill::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,.5), transparent);
  pointer-events: none;
}
.pos-cat-pill:hover {
  border-color: var(--pos-gold);
  color: var(--pos-gold2);
  background: #fffbf0;
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(201,168,76,.15);
}
.pos-cat-pill.active {
  background: linear-gradient(135deg, #C9A84C, #A8842A);
  border-color: #C9A84C;
  color: #fff;
  box-shadow: 0 4px 14px rgba(201,168,76,.35);
  transform: translateY(-1px);
}
.pos-cat-pill.active::after { display: none; }

/* ── شبكة المنتجات ────────────────────────────────── */
.pos-products {
  flex: 1;
  overflow-y: auto;
  padding: 10px 10px 20px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(135px, 1fr));
  gap: 8px;
  align-content: start;
  scrollbar-width: thin;
  scrollbar-color: #d1d5db transparent;
}
.pos-products::-webkit-scrollbar { width: 5px; }
.pos-products::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 4px; }

/* ── بطاقة المنتج ─────────────────────────────────── */
.product-card {
  position: relative;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  transition: transform .18s, box-shadow .18s, border-color .18s;
  display: flex;
  flex-direction: column;
  user-select: none;
  box-shadow: var(--shadow-sm);
}
.product-card:hover:not(.disabled) {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0,0,0,.12);
  border-color: var(--pos-gold);
}
.product-card:active:not(.disabled) { transform: scale(.97); }
.product-card.disabled {
  opacity: .5;
  cursor: not-allowed;
}
.product-card.disabled::after {
  content: 'نفذ';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,.6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 900;
  color: var(--pos-red);
  backdrop-filter: blur(1px);
}

/* شريط لوني علوي */
.product-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  z-index: 1;
}
.product-card:nth-child(6n+1)::before { background: linear-gradient(90deg,#C9A84C,#f59e0b); }
.product-card:nth-child(6n+2)::before { background: linear-gradient(90deg,#3b82f6,#06b6d4); }
.product-card:nth-child(6n+3)::before { background: linear-gradient(90deg,#10b981,#34d399); }
.product-card:nth-child(6n+4)::before { background: linear-gradient(90deg,#8b5cf6,#a78bfa); }
.product-card:nth-child(6n+5)::before { background: linear-gradient(90deg,#ef4444,#f97316); }
.product-card:nth-child(6n+6)::before { background: linear-gradient(90deg,#0ea5e9,#6366f1); }

/* منطقة الصورة */
.pc-image {
  width: 100%;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #f8fafc, #f1f5f9);
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
}
.pc-image img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}
.product-card:hover .pc-image img { transform: scale(1.08); }
.pc-image i {
  font-size: 44px;
  color: #d1d5db;
  transition: transform .3s;
}
.product-card:hover .pc-image i { transform: scale(1.1); color: #94a3b8; }

/* badge وحدة */
.pc-unit-badge {
  position: absolute;
  bottom: 7px; right: 7px;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(4px);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 20px;
  letter-spacing: .3px;
}

/* جسم البطاقة */
.pc-body {
  padding: 8px 9px 7px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}
.pc-name {
  font-size: 12px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  direction: rtl;
  min-height: 50px;
}
.pc-barcode {
  font-size: 9.5px;
  color: var(--txt-soft);
  direction: ltr;
  text-align: right;
  font-weight: 600;
  letter-spacing: .3px;
}
.pc-price-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 3px;
}
.pc-price {
  font-size: 16px;
  font-weight: 900;
  color: #1a5c36;
  direction: ltr;
}
.pc-piece-price {
  font-size: 10px;
  color: var(--txt-soft);
  font-weight: 700;
}
.pc-stock-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}
.pc-stock {
  font-size: 10.5px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px;
  border-radius: 6px;
}
.pc-stock.in-stock     { color: #15803d; background: #dcfce7; border: 1px solid #bbf7d0; }
.pc-stock.medium-stock { color: #92400e; background: #fef3c7; border: 1px solid #fde68a; }
.pc-stock.low-stock    { color: #991b1b; background: #fee2e2; border: 1px solid #fecaca; animation: stockWarn 1.5s ease infinite; }
.pc-stock.out-of-stock { color: #6b7280; background: #f1f5f9; border: 1px solid #e2e8f0; }
@keyframes stockWarn { 0%,100%{opacity:1} 50%{opacity:.55} }

.pc-piece-btn {
  background: rgba(59,130,246,.08);
  border: 1px solid rgba(59,130,246,.2);
  color: var(--pos-blue);
  font-size: 9px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 3px;
  transition: all .15s;
}
.pc-piece-btn:hover { background: rgba(59,130,246,.18); }

/* empty + loading */
.empty-state {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 70px 20px;
  color: var(--txt-soft);
  gap: 10px;
  text-align: center;
}
.empty-state i { font-size: 52px; opacity: .25; }
.empty-state p { font-size: 14px; font-weight: 800; margin: 0; color: var(--txt-mid); }
.empty-state small { font-size: 12px; }
.pos-loading {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 70px;
  gap: 12px;
  color: var(--txt-soft);
  font-size: 13px;
  font-weight: 700;
}
.pos-loading i { color: var(--pos-gold); font-size: 22px; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ════════════════════════════════════════════════════════
   PANEL DROIT — منطقة السلة (داكنة)
   ════════════════════════════════════════════════════════ */
.pos-right {
  background: var(--pos-right-bg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}
/* تأثير ضوء خفي في الخلفية */


/* ── رأس السلة ────────────────────────────────────── */
.cart-header {
  position: relative;
  z-index: 1;
  height: 86px;
  padding: 0 14px;
  border-bottom: 2px solid #e8edf5;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 7px;
}
.cart-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0;
  direction: rtl;
}
.cart-title {
  display: flex;
  align-items: center;
  gap: 9px;
}
.cart-title i {
  width: 34px; height: 34px;
  background: rgba(201,168,76,.15);
  border: 1px solid rgba(201,168,76,.25);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--pos-gold);
  font-size: 14px;
}
.cart-title span {
  font-size: 14px;
  font-weight: 800;
  color: #0f172a;
}
.cart-count-badge {
  background: var(--pos-gold);
  color: #0f172a;
  font-size: 11px;
  font-weight: 900;
  min-width: 26px;
  height: 26px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  box-shadow: 0 3px 10px rgba(201,168,76,.35);
}
.cart-count-badge.bump { animation: bump .25s cubic-bezier(.36,.07,.19,.97); }
@keyframes bump { 30%{transform:scale(1.5)} 70%{transform:scale(.9)} 100%{transform:scale(1)} }

/* صندوق الإجمالي */
.cart-total-box {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  border: none;
  border-radius: 12px;
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  direction: rtl;
  position: relative;
  overflow: hidden;
}
.cart-total-box::before {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201,168,76,.3), transparent);
}
.cart-total-label {
  font-size: 11px;
  font-weight: 700;
  color: rgba(255,255,255,.6);
}
.cart-total-amount {
  font-size: 20px;
  font-weight: 900;
  color: var(--pos-gold);
  direction: ltr;
  letter-spacing: .5px;
  text-shadow: 0 0 16px rgba(201,168,76,.5);
}

/* ── قائمة عناصر السلة ───────────────────────────── */
.cart-items {
  flex: 1;
  overflow: hidden;
  padding: 0;
  display: grid;
  grid-template-rows: repeat(6, 1fr);
  position: relative;
  z-index: 1;
  border-bottom: 2px solid #e8edf5;
}

/* سلة فارغة */
.empty-cart {
  grid-column: 1;
  grid-row: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 20px;
  color: #94a3b8;
  text-align: center;
}
.empty-cart i { font-size: 52px; opacity: .25; }
.empty-cart p { font-size: 13px; font-weight: 700; margin: 0; color: #475569; }
.empty-cart small { font-size: 11px; color: #94a3b8; line-height: 1.5; }

/* ════════════════════════════════════════════════════
   بطاقة عنصر السلة — تصميم صف واحد مضغوط
   ════════════════════════════════════════════════════ */
.cart-item {
  background: #fff;
  border: none;
  border-bottom: 1.5px solid #edf0f7;
  border-radius: 0;
  overflow: hidden;
  transition: background .13s;
  animation: ciAppear .18s ease;
  direction: rtl;
  display: flex;
  align-items: center;
  gap: 0;
  width: 100%;
  min-height: 0;
}
@keyframes ciAppear {
  from { opacity:0; transform:translateX(4px); }
  to   { opacity:1; transform:translateX(0); }
}
.cart-item:hover { background: #f8f9fd; }
.cart-item:first-child { border-top: 1.5px solid #edf0f7; }
.cart-item.empty-slot {
  background: #fbfcff;
  border-bottom: 1px dashed #e8edf5;
  pointer-events: none;
}

/* شريط اللون الجانبي */
.ci-accent-bar {
  width: 4px;
  align-self: stretch;
  flex-shrink: 0;
}

/* الصورة المصغّرة */
.ci-thumb {
  width: 38px; height: 38px;
  border-radius: 9px;
  overflow: hidden;
  flex-shrink: 0;
  background: #f1f4fb;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid #e8edf5;
  margin: 0 9px 0 7px;
}
.ci-thumb img { width:100%; height:100%; object-fit:cover; }
.ci-thumb .ci-emoji { font-size: 20px; line-height: 1; }
.ci-thumb i { font-size: 15px; color: #94a3b8; }

/* معلومات المنتج */
.ci-info {
  flex: 1;
  min-width: 0;
  padding: 4px 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}

/* اسم المنتج — داكن واضح تماماً */
.ci-name {
  font-size: 12.5px;
  font-weight: 900;
  color: #0f172a;
  white-space: normal;
  overflow: visible;
  direction: rtl;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* الصف الثاني: السعر + المخزون */
.ci-meta {
  font-size: 10px;
  color: #64748b;
  font-weight: 700;
  margin-top: 3px;
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}
.ci-meta-sep { color: #cbd5e1; font-size: 8px; }

/* شارة الضريبة */
.tax-badge {
  display: inline-flex;
  align-items: center;
  font-size: 8.5px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 4px;
  vertical-align: middle;
}
.tax-badge.exempt { background: #d1fae5; color: #065f46; }

/* مجموعة تحكم الكمية */
.ci-qty-group {
  display: flex;
  align-items: center;
  background: #f1f5f9;
  border: 1.5px solid #dde3ee;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  margin: 0 8px;
}
.ci-qty-btn {
  width: 28px; height: 32px;
  background: transparent;
  border: none;
  color: #475569;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .12s;
  flex-shrink: 0;
  font-family: 'Cairo', Arial, sans-serif;
}
.ci-qty-btn:hover { background: #e2e8f0; color: #0f172a; }
.ci-qty-btn.minus:hover { background: #fee2e2; color: #dc2626; }
.ci-qty-btn.plus:hover  { background: #d1fae5; color: #059669; }

.ci-qty-display {
  min-width: 34px;
  text-align: center;
  border-right: 1.5px solid #dde3ee;
  border-left:  1.5px solid #dde3ee;
  cursor: pointer;
  padding: 0 4px;
  transition: background .12s;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
}
.ci-qty-display:hover { background: #fef9ec; }
.ci-qty-num {
  font-size: 15px;
  font-weight: 900;
  color: #0f172a;
  line-height: 1;
}

/* السعر الإجمالي */
.ci-prices {
  text-align: left;
  flex-shrink: 0;
  padding: 0 8px 0 0;
  min-width: 64px;
}
.ci-unit-price {
  font-size: 9.5px;
  color: #94a3b8;
  font-weight: 700;
  direction: ltr;
  display: block;
  text-align: right;
}
.ci-line-total {
  font-size: 15px;
  font-weight: 900;
  direction: ltr;
  display: block;
  text-align: right;
  line-height: 1.2;
}

/* زر الحذف */
.ci-del {
  width: 26px; height: 26px;
  background: #fee2e2;
  border: 1.5px solid #fecaca;
  border-radius: 7px;
  color: #dc2626;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  flex-shrink: 0;
  margin-left: 8px;
  transition: all .12s;
}
.ci-del:hover {
  background: #dc2626;
  border-color: #dc2626;
  color: #fff;
  transform: scale(1.08);
}

/* إخفاء الصفوف القديمة */
.ci-row1, .ci-row2 { display: none !important; }

/* ── ملخص الحساب ─────────────────────────────────── */
.cart-summary {
  background: #f4f7fd;
  border-top: 2px solid #e2e8f0;
  height: 82px;
  padding: 8px 14px 6px;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  overflow: hidden;
}
/* الصف العلوي: فرعي + خصم + ضريبة في سطر واحد */
.summary-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  margin-bottom: 6px;
  direction: rtl;
}
.summary-mini-item {
  flex: 1;
  text-align: center;
  padding: 5px 4px;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
}
.summary-mini-label {
  font-size: 9.5px;
  font-weight: 700;
  color: #64748b;
  display: block;
  margin-bottom: 2px;
}
.summary-mini-val {
  font-size: 12.5px;
  font-weight: 900;
  color: #0f172a;
  direction: ltr;
  display: block;
}
.summary-mini-val.red { color: #f87171; }

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  direction: rtl;
  font-size: 11.5px;
  font-weight: 700;
}
.summary-row span:first-child { color: #475569; font-weight: 700; }
.summary-row span:last-child  { color: #0f172a; direction: ltr; font-weight: 900; }
.summary-row.discount-row span { color: #f87171 !important; }
.summary-row.total {
  border-top: 1px solid rgba(255,255,255,.08);
  padding-top: 7px;
  margin-top: 4px;
}
.summary-row.total span:first-child { font-size: 13px; color: #1e293b; font-weight: 800; }
.summary-row.total span:last-child  { font-size: 22px; font-weight: 900; color: var(--pos-gold2); }

/* ── أزرار الإجراءات ──────────────────────────────── */
.cart-actions {
  height: 64px;
  padding: 0 12px;
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
  align-items: center;
  background: #ffffff;
  border-top: 2px solid #e2e8f0;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.btn-checkout {
  background: linear-gradient(135deg, #C9A84C 0%, #A8842A 100%);
  border: none;
  border-radius: 12px;
  color: #0a0e1a;
  font-family: 'Cairo', Arial, sans-serif;
  font-size: 14px;
  font-weight: 900;
  padding: 0;
  height: 44px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  transition: all .2s;
  box-shadow: 0 5px 20px rgba(201,168,76,.35);
  letter-spacing: .3px;
}
.btn-checkout:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(201,168,76,.45);
  background: linear-gradient(135deg, #d4b05a, #C9A84C);
}
.btn-checkout:active:not(:disabled) { transform: scale(.98); }
.btn-checkout:disabled {
  opacity: .3;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.btn-hold {
  background: #fef9ec;
  border: 1.5px solid #fde68a;
  color: #92400e;
  border-radius: 14px;
  font-family: 'Cairo', Arial, sans-serif;
  font-size: 13px;
  font-weight: 800;
  padding: 0 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all .18s;
  height: 52px;
}
.btn-hold:hover { background: rgba(251,191,36,.2); border-color: #fbbf24; }

.btn-clear {
  background: #fee2e2;
  border: 1.5px solid #fecaca;
  color: #dc2626;
  border-radius: 14px;
  font-family: 'Cairo', Arial, sans-serif;
  font-size: 13px;
  font-weight: 800;
  padding: 0 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all .18s;
  height: 52px;
}
.btn-clear:hover { background: rgba(239,68,68,.22); border-color: #ef4444; color: #fff; }

/* ── ci-top compatibility alias ────────────────────── */
.ci-top { display: none; }
.ci-controls { display: none; }

/* ════════════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .pos-container {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr 430px;
    height: auto;
    min-height: 100vh;
  }
  .pos-right { height: 430px; }
  .pos-products { grid-template-columns: repeat(auto-fill, minmax(120px,1fr)); }
}

/* ── شريط إحصاء المنتجات ─────────────────────────── */
.pos-stats-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 16px;
  background: #f0f4fa;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.pos-stats-txt {
  font-size: 11px;
  font-weight: 700;
  color: var(--txt-soft);
}
.pos-stats-txt strong { color: var(--pos-gold2); font-weight: 900; }

/* ── تحسين وضوح بطاقة المنتج ────────────────────── */
.pc-price {
  font-size: 18px !important;
  font-weight: 900 !important;
  color: #1a6b3c !important;
}
.pc-name {
  font-size: 12px !important;
  font-weight: 800 !important;
  color: #0f172a !important;
  -webkit-line-clamp: 3 !important;
}
.pc-stock.in-stock { /* already defined above */ }
.pc-stock.low-stock { /* already defined above */ }
.pc-stock.medium-stock { /* already defined above */ }

/* إضافة أيقونة + عند hover للتوضيح */
.product-card:not(.disabled)::after {
  content: '+';
  position: absolute;
  bottom: 8px; left: 8px;
  width: 22px; height: 22px;
  background: var(--pos-gold);
  color: #fff;
  font-size: 16px;
  font-weight: 900;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(.5);
  transition: all .2s;
  z-index: 2;
  line-height: 22px;
  text-align: center;
}
.product-card:hover:not(.disabled)::after {
  opacity: 1;
  transform: scale(1);
}

/* Badge فئة على البطاقة */
.pc-cat-badge {
  position: absolute;
  top: 7px; left: 7px;
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(4px);
  color: #374151;
  font-size: 9px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 6px;
  box-shadow: 0 1px 4px rgba(0,0,0,.1);
  max-width: 70px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  direction: rtl;
}

/* ════════════════════════════════════════════════════
   السلة — 6 صفوف ثابتة
   ════════════════════════════════════════════════════ */

/* الخلايا الفارغة — حدود خفية */
.cart-item.empty-slot {
  background: transparent !important;
  border-bottom: 1px dashed rgba(255,255,255,.04) !important;
  pointer-events: none;
  opacity: 0 !important;
}

/* كل صف في الشبكة: يأخذ 1/6 بالضبط */
.cart-items > .cart-item {
  /* flex داخل كل خلية شبكة */
  min-height: 0;
}

/* خط الكاشير في الهيدر */
#cartCashierLine {
  display: flex;
  align-items: center;
  gap: 4px;
}
#cartCashierLine::before {
  content: '\f2bd'; /* fa-user-circle */
  font-family: 'Font Awesome 5 Free';
  font-weight: 900;
  font-size: 9px;
  opacity: .5;
}

/* تأثير hover على بطاقة المنتج أكثر وضوحًا */
.cart-item:not(.empty-slot):hover {
  background: rgba(255,255,255,.05) !important;
}
.cart-item:not(.empty-slot):hover .ci-del {
  color: #f87171;
  border-color: rgba(239,68,68,.35);
  background: rgba(239,68,68,.1);
}

/* summary total font */
.summary-row.total span:last-child {
  font-size: 20px !important;
}

/* ════════════════════════════════════════════════════════
   صفحة المنتجات — كارد Grid
   ════════════════════════════════════════════════════════ */
.prod-card-item {
  background: #fff;
  border: 2px solid #e8edf5;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  transition: transform .18s, border-color .18s, box-shadow .18s;
  font-family: 'Cairo', Arial, sans-serif;
  direction: rtl;
  box-shadow: 0 1px 4px rgba(0,0,0,.05);
}
.prod-card-item:hover {
  border-color: #C9A84C;
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,.1);
}
