/* =====================================================
   طاسة — ملف التصميم الرئيسي
   الاتجاه: RTL | الخط: Tajawal
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;500;700;800;900&display=swap');

/* =====================================================
   المتغيرات العامة
   ===================================================== */
:root {
  --bg-deep:     #0f0a04;
  --bg-card:     #1c1408;
  --bg-surface:  #261c0d;
  --bg-hover:    #2f2210;

  --accent:      #f59e0b;
  --accent-dark: #d97706;
  --accent-hot:  #ea580c;
  --accent-glow: rgba(245, 158, 11, 0.15);

  --text-primary:   #fef3c7;
  --text-secondary: #a8956a;
  --text-muted:     #6b5a3e;

  --border:       rgba(245, 158, 11, 0.15);
  --border-hover: rgba(245, 158, 11, 0.35);

  --success: #16a34a;
  --danger:  #dc2626;
  --info:    #0284c7;
  --warning: #d97706;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-xl: 30px;

  --shadow-sm: 0 2px 12px rgba(0,0,0,0.35);
  --shadow-md: 0 4px 24px rgba(0,0,0,0.5);

  --topbar-h: 70px;
  --max-w:    480px;
}

/* =====================================================
   إعادة الضبط
   ===================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Tajawal', 'Segoe UI', Tahoma, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  direction: rtl;
  background-color: var(--bg-deep);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

/* توهج خلفي ديناميكي */
body::before {
  content: '';
  position: fixed;
  top: -150px; right: -100px;
  width: 450px; height: 450px;
  background: radial-gradient(circle, rgba(245,158,11,0.08) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
button { cursor: pointer; font-family: inherit; }
input, textarea, select { font-family: inherit; }
ul, ol { list-style: none; }

/* =====================================================
   حاوية المحتوى
   ===================================================== */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* نسخة الموبايل المركزية */
.app-wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
}

/* =====================================================
   الهيدر / الشريط العلوي
   ===================================================== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 500;
  height: var(--topbar-h);
  background: rgba(15, 10, 4, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
}

.topbar-logo img {
  height: 52px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(245,120,0,0.25));
}

.topbar-logo .logo-text {
  font-size: 26px;
  font-weight: 900;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

.topbar-logo .logo-slogan {
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 400;
  margin-top: 2px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  position: relative;
  color: var(--text-secondary);
}

.icon-btn:hover { border-color: var(--accent); color: var(--accent); }
.icon-btn:active { transform: scale(0.92); }

.icon-btn svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* شارة السلة */
.cart-badge {
  position: absolute;
  top: -4px;
  left: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 9px;
  background: var(--accent-hot);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  display: none;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-deep);
}

.cart-badge.show { display: flex; }

/* =====================================================
   قسم البطل (Hero)
   ===================================================== */
.hero {
  padding: 28px 20px 20px;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(245,158,11,0.1);
  border: 1px solid rgba(245,158,11,0.25);
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 13px;
  border-radius: 20px;
  margin-bottom: 16px;
}

.hero-tag .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 1.6s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.4; transform: scale(0.6); }
}

.hero h1 {
  font-size: 30px;
  font-weight: 900;
  line-height: 1.25;
  margin-bottom: 10px;
}

.hero h1 .highlight {
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 20px;
}

/* =====================================================
   شريط البحث
   ===================================================== */
.search-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0 14px;
  transition: border-color 0.2s;
  margin-bottom: 26px;
}

.search-wrap:focus-within {
  border-color: var(--accent);
}

.search-wrap svg {
  width: 18px;
  height: 18px;
  stroke: var(--text-muted);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.search-wrap input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 14px;
  padding: 14px 0;
  direction: rtl;
}

.search-wrap input::placeholder { color: var(--text-muted); }

/* =====================================================
   البانر الترويجي
   ===================================================== */
.featured-banner {
  margin: 0 20px 26px;
  background: linear-gradient(135deg, #261c0d 0%, #3d2610 60%, #1f1409 100%);
  border: 1px solid rgba(245,158,11,0.22);
  border-radius: var(--radius-lg);
  padding: 20px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.25s, transform 0.2s;
}

.featured-banner:hover  { border-color: var(--accent); }
.featured-banner:active { transform: scale(0.98); }

.featured-banner::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 80% 50%, rgba(245,158,11,0.07), transparent 65%);
}

.featured-inner {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.featured-tag {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: var(--accent);
  margin-bottom: 8px;
}

.featured-title { font-size: 20px; font-weight: 800; margin-bottom: 4px; }
.featured-sub   { font-size: 13px; color: var(--text-secondary); }

.featured-price {
  font-size: 28px;
  font-weight: 900;
  color: var(--accent);
  text-align: left;
}

.featured-price small {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-secondary);
}

.featured-note {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 3px;
  text-align: left;
}

.featured-emoji {
  font-size: 60px;
  position: absolute;
  left: -4px;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.55;
  line-height: 1;
}

/* =====================================================
   رأس القسم
   ===================================================== */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px 14px;
}

.section-title { font-size: 17px; font-weight: 700; }

.see-all {
  font-size: 13px;
  color: var(--accent);
  font-weight: 500;
  cursor: pointer;
  transition: color 0.2s;
}

.see-all:hover { color: var(--accent-dark); }

/* =====================================================
   الأصناف (Categories)
   ===================================================== */
.categories-row {
  display: flex;
  gap: 10px;
  padding: 0 20px 24px;
  overflow-x: auto;
  scrollbar-width: none;
}

.categories-row::-webkit-scrollbar { display: none; }

.cat-pill {
  flex-shrink: 0;
  padding: 8px 18px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-secondary);
}

.cat-pill:hover  { border-color: var(--accent); color: var(--accent); }
.cat-pill:active { transform: scale(0.94); }

.cat-pill.active {
  background: var(--accent);
  color: #1a0d02;
  border-color: var(--accent);
  font-weight: 700;
}

/* =====================================================
   شبكة المنتجات
   ===================================================== */
.products-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding: 0 20px 130px;
}

/* =====================================================
   بطاقة المنتج
   ===================================================== */
.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform 0.2s, border-color 0.2s;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.product-card:hover  { border-color: var(--border-hover); }
.product-card:active { transform: scale(0.96); }

/* صورة المنتج */
.product-img {
  height: 125px;
  background: var(--bg-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.product-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.product-card:hover .product-img img { transform: scale(1.05); }

.product-img .emoji-placeholder {
  font-size: 52px;
  line-height: 1;
}

.product-img::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 40px;
  background: linear-gradient(transparent, var(--bg-card));
  pointer-events: none;
}

/* شارات المنتج */
.badge {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 9px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 8px;
  backdrop-filter: blur(6px);
  letter-spacing: 0.3px;
  z-index: 1;
}

.badge-hot   { background: rgba(220,38,38,0.88);   color: #fff; }
.badge-spicy { background: rgba(234,88,12,0.88);   color: #fff; }
.badge-new   { background: rgba(22,163,74,0.88);   color: #fff; }
.badge-sale  { background: rgba(124,58,237,0.88);  color: #fff; }

/* معلومات المنتج */
.product-info {
  padding: 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-name {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 4px;
  line-height: 1.3;
}

.product-desc {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.5;
  flex: 1;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-weight {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.product-price {
  font-size: 16px;
  font-weight: 800;
  color: var(--accent);
}

.product-price small {
  font-size: 11px;
  font-weight: 400;
  color: var(--text-muted);
}

/* زر الإضافة */
.add-btn {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--accent);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  flex-shrink: 0;
}

.add-btn svg {
  width: 16px;
  height: 16px;
  stroke: #1a0d02;
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
}

.add-btn:hover  { background: var(--accent-dark); }
.add-btn:active { transform: scale(0.86); }
.add-btn.added  { background: var(--success); }
.add-btn.added svg { stroke: #fff; }

/* =====================================================
   شريط التنقل السفلي
   ===================================================== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--max-w);
  background: rgba(15, 10, 4, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 8px 0 22px;
  z-index: 400;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  padding: 6px 16px;
  border-radius: 14px;
  transition: all 0.2s;
  color: var(--text-muted);
  text-decoration: none;
}

.nav-item:active { transform: scale(0.9); }

.nav-item.active {
  background: var(--accent-glow);
  color: var(--accent);
}

.nav-item svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-item span {
  font-size: 10px;
  font-weight: 600;
}

/* =====================================================
   طبقة الخلفية (Overlay)
   ===================================================== */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  z-index: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  backdrop-filter: blur(4px);
}

.overlay.show {
  opacity: 1;
  pointer-events: all;
}

/* =====================================================
   شيت السلة
   ===================================================== */
.cart-sheet {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) translateY(100%);
  width: 100%;
  max-width: var(--max-w);
  background: var(--bg-card);
  border-top-left-radius: 28px;
  border-top-right-radius: 28px;
  border-top: 1px solid var(--border);
  z-index: 700;
  transition: transform 0.35s cubic-bezier(0.34, 1.3, 0.64, 1);
  max-height: 82vh;
  overflow-y: auto;
  padding-bottom: 30px;
}

.cart-sheet.open {
  transform: translateX(-50%) translateY(0);
}

.sheet-handle {
  width: 40px;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin: 12px auto 0;
}

.sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
}

.sheet-title { font-size: 17px; font-weight: 800; }

.close-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.close-btn:hover { color: var(--danger); border-color: var(--danger); }

/* عنصر في السلة */
.cart-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
}

.cart-item:last-child { border-bottom: none; }

.ci-img {
  width: 54px;
  height: 54px;
  border-radius: 10px;
  background: var(--bg-surface);
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
}

.ci-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ci-info { flex: 1; min-width: 0; }
.ci-name  { font-size: 14px; font-weight: 700; margin-bottom: 3px; }
.ci-price { font-size: 13px; color: var(--accent); font-weight: 700; }

/* التحكم في الكمية */
.qty-control {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 4px;
  flex-shrink: 0;
}

.qty-btn {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--bg-card);
  border: none;
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  line-height: 1;
}

.qty-btn:hover  { background: var(--accent); color: #1a0d02; }
.qty-btn:active { transform: scale(0.86); }
.qty-num        { font-size: 14px; font-weight: 800; min-width: 20px; text-align: center; }

/* تذييل السلة */
.cart-footer {
  padding: 16px 20px 0;
  border-top: 1px solid var(--border);
}

.total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.total-label { font-size: 14px; color: var(--text-secondary); }
.total-val   { font-size: 14px; font-weight: 700; }
.total-divider { border: none; border-top: 1px solid var(--border); margin: 10px 0; }
.grand-label { font-size: 16px; font-weight: 800; color: var(--text-primary); }
.grand-val   { font-size: 20px; font-weight: 900; color: var(--accent); }

/* السلة فارغة */
.cart-empty {
  text-align: center;
  padding: 50px 20px;
  color: var(--text-muted);
}

.cart-empty .empty-icon { font-size: 56px; opacity: 0.4; margin-bottom: 14px; }
.cart-empty p           { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.cart-empty small       { font-size: 13px; }

/* =====================================================
   الأزرار
   ===================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
  white-space: nowrap;
}

.btn:active { transform: scale(0.97); }
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.btn-primary {
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  color: #1a0d02;
}

.btn-primary:hover { filter: brightness(1.08); }

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

.btn-success  { background: var(--success); color: #fff; }
.btn-danger   { background: var(--danger);  color: #fff; }
.btn-block    { width: 100%; }
.btn-sm       { padding: 10px 18px; font-size: 13px; }

/* =====================================================
   النماذج (Forms)
   ===================================================== */
.form-group { margin-bottom: 18px; }

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 7px;
}

.form-control {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
  direction: rtl;
  transition: border-color 0.2s;
  outline: none;
}

.form-control:focus  { border-color: var(--accent); }
.form-control::placeholder { color: var(--text-muted); }

textarea.form-control {
  resize: vertical;
  min-height: 100px;
}

select.form-control {
  appearance: none;
  cursor: pointer;
}

/* =====================================================
   التنبيهات (Alerts)
   ===================================================== */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 16px;
  border-right: 4px solid;
}

.alert-success { background: rgba(22,163,74,0.12);  border-color: var(--success); color: #4ade80; }
.alert-danger  { background: rgba(220,38,38,0.12);  border-color: var(--danger);  color: #f87171; }
.alert-warning { background: rgba(217,119,6,0.12);  border-color: var(--warning); color: #fbbf24; }
.alert-info    { background: rgba(2,132,199,0.12);  border-color: var(--info);    color: #38bdf8; }

/* =====================================================
   Toast (رسائل مؤقتة)
   ===================================================== */
.toast-container {
  position: fixed;
  top: calc(var(--topbar-h) + 10px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 900;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  width: calc(var(--max-w) - 40px);
  max-width: 420px;
}

.toast {
  background: #1a2e1a;
  border: 1px solid var(--success);
  color: #4ade80;
  font-size: 13px;
  font-weight: 700;
  padding: 11px 18px;
  border-radius: 30px;
  text-align: center;
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.28s ease;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast.error {
  background: #2e1a1a;
  border-color: var(--danger);
  color: #f87171;
}

/* =====================================================
   صفحة فارغة
   ===================================================== */
.empty-state {
  text-align: center;
  padding: 60px 30px;
}

.empty-state .empty-icon { font-size: 64px; opacity: 0.35; margin-bottom: 16px; }
.empty-state h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.empty-state p  { font-size: 14px; color: var(--text-secondary); margin-bottom: 20px; }

/* =====================================================
   تذييل الصفحة
   ===================================================== */
.site-footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 30px 20px 130px;
  text-align: center;
}

.footer-logo { font-size: 22px; font-weight: 900; margin-bottom: 6px; }
.footer-slogan { font-size: 12px; color: var(--text-secondary); margin-bottom: 16px; }

.footer-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.footer-links a {
  font-size: 13px;
  color: var(--text-secondary);
  transition: color 0.2s;
}

.footer-links a:hover { color: var(--accent); }

.footer-social {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-bottom: 20px;
}

.footer-social a {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  color: var(--text-secondary);
}

.footer-social a:hover { border-color: var(--accent); color: var(--accent); }
.footer-social svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.footer-copy { font-size: 12px; color: var(--text-muted); }

/* =====================================================
   محدد التحميل (Spinner)
   ===================================================== */
.spinner {
  width: 24px;
  height: 24px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 0 auto;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* =====================================================
   الترقيم (Pagination)
   ===================================================== */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 20px;
}

.page-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.page-btn.active  { background: var(--accent); color: #1a0d02; border-color: var(--accent); }
.page-btn:hover   { border-color: var(--accent); color: var(--accent); }
.page-btn.disabled { opacity: 0.4; cursor: not-allowed; }

/* =====================================================
   الاستجابة للشاشات الكبيرة
   ===================================================== */
@media (min-width: 520px) {
  .app-wrap {
    box-shadow: 0 0 60px rgba(0,0,0,0.6);
  }

  body::after {
    content: '';
    position: fixed;
    inset: 0;
    background: repeating-linear-gradient(
      45deg,
      rgba(245,158,11,0.015) 0px,
      rgba(245,158,11,0.015) 1px,
      transparent 1px,
      transparent 60px
    );
    pointer-events: none;
    z-index: -1;
  }
}

@media (min-width: 768px) {
  .products-grid { grid-template-columns: 1fr 1fr 1fr; }
}

/* =====================================================
   إخفاء شريط التمرير بشكل نظيف
   ===================================================== */
.hide-scrollbar { scrollbar-width: none; }
.hide-scrollbar::-webkit-scrollbar { display: none; }

/* =====================================================
   حالة عدم الإتاحة
   ===================================================== */
.product-card.unavailable { opacity: 0.55; }
.product-card.unavailable .add-btn { background: var(--text-muted); pointer-events: none; }

.unavailable-badge {
  position: absolute;
  inset: 0;
  background: rgba(15,10,4,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  z-index: 2;
}