/* =========================================================
   الألوان — كل ألوان الموقع هنا فقط. غيّر القيمة هنا فتتغيّر في كل مكان.
   ========================================================= */
:root {
  /* ألوان الشعار */
  --pink: #D82888;      /* الأزرار والعناوين الرئيسية */
  --yellow: #F0D848;    /* التبويب المحدد والشارات (خلفية فقط، ليس لون نص على الأبيض) */
  --blue: #6FB3E8;      /* الحدود والتفاصيل الخفيفة */
  --purple: #8E3FA0;    /* الأسعار */
  --text: #2B2B2B;      /* النص العادي */
  --bg: #FFFFFF;        /* خلفية الصفحة */

  /* ألوان مساعدة */
  --on-color: #FFFFFF;  /* النص فوق الوردي والأخضر والبنفسجي */
  --text-muted: #5A5A5A;/* نص ثانوي أخف قليلًا */
  --green: #25A244;     /* زر واتساب والشريط العائم */
  --shadow: rgba(0, 0, 0, 0.08);
  --overlay: rgba(0, 0, 0, 0.4); /* التعتيم خلف السلة */

  /* الخط: لتغييره بدّل الاسم هنا وفي رابط الخط داخل index.html و menu.html */
  --font: 'Tajawal', Tahoma, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
body { margin: 0; font-family: var(--font); background: var(--bg); color: var(--text); text-align: center; }

/* خلفية بتوهج ألوان ناعم وكبير (مثل الموقع المرجعي): وردي يمين، أصفر دافئ يسار تحت، أزرق خفيف خلف العنوان */
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(ellipse 55% 60% at 100% 22%, rgba(216, 40, 136, 0.32), rgba(216, 40, 136, 0.12) 45%, transparent 75%),
    radial-gradient(ellipse 50% 45% at 0% 78%, rgba(240, 216, 72, 0.32), rgba(255, 196, 120, 0.12) 50%, transparent 78%),
    radial-gradient(ellipse 40% 35% at 50% 40%, rgba(111, 179, 232, 0.16), transparent 70%),
    linear-gradient(180deg, #FFFFFF 0%, #FFFBF7 100%); }

/* الشريط العلوي: أبيض عائم عريض، الشعار في الوسط وروابط على الجانبين (تظهر في الشاشات العريضة) */
.topbar { position: sticky; top: 10px; z-index: 10; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; max-width: 1100px; margin: 10px auto 0; width: calc(100% - 28px); padding: 8px 14px; background: rgba(255, 255, 255, 0.92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-radius: 6px; box-shadow: 0 8px 30px rgba(0, 0, 0, 0.07); }
.logo-img { display: block; height: 46px; width: auto; margin: 0 auto; grid-column: 2; }
.nav-links { display: flex; gap: 14px; }
.nav-links a { color: var(--text); text-decoration: none; font-weight: 800; font-size: 13px; white-space: nowrap; }
.nav-links a:hover { color: var(--pink); }
.nav-start { grid-column: 1; justify-self: start; }
.nav-end { grid-column: 3; justify-self: end; }
@media (min-width: 760px) { .nav-links { gap: 30px; } .nav-links a { font-size: 15px; letter-spacing: 0.5px; } .logo-img { height: 56px; } }

/* مشهد البداية: شارة صغيرة وعنوان ضخم بلونين وأزرار بيضاوية */
.hero { position: relative; padding: 48px 20px 8px; }
.hero::before { content: ""; position: absolute; z-index: -1; left: 50%; top: 90px; width: min(560px, 90vw); height: 260px; transform: translateX(-50%); background: radial-gradient(ellipse at center, rgba(240, 216, 72, 0.22), rgba(111, 179, 232, 0.10) 45%, transparent 72%); filter: blur(20px); pointer-events: none; }
.pill-badge { display: inline-block; padding: 7px 18px; border-radius: 999px; background: rgba(216, 40, 136, 0.08); border: 1px solid rgba(216, 40, 136, 0.22); color: var(--pink); font-size: 13px; font-weight: 800; letter-spacing: 1px; }
.hero h1 { margin: 22px 0 14px; font-size: clamp(52px, 15vw, 96px); line-height: 1.05; font-weight: 800; letter-spacing: -1px; }
.hero h1 .ink { display: block; color: #1A1A1A; }
.hero h1 .accent { display: block; color: var(--pink); }
.hero p { margin: 0 auto; max-width: 440px; color: var(--text-muted); font-size: 18px; line-height: 1.75; }
.hero .tagline { margin: 0 auto 10px; max-width: none; color: var(--text); font-size: clamp(24px, 7vw, 34px); font-weight: 800; line-height: 1.3; }
.cta-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 28px; }
.btn-pill { display: inline-block; padding: 15px 32px; border-radius: 999px; text-decoration: none; font-weight: 800; font-size: 16px; letter-spacing: 0.3px; transition: transform .15s ease, box-shadow .15s ease; }
.btn-pill:active { transform: scale(0.97); }
.btn-primary { background: var(--pink); color: var(--on-color); box-shadow: 0 10px 26px rgba(216, 40, 136, 0.35); }
.btn-ghost { background: rgba(255, 255, 255, 0.8); color: var(--text); border: 1px solid rgba(0, 0, 0, 0.10); }
/* «مرّر للاستكشاف» مع سهم يتحرك */
.scroll-hint { display: block; margin: 30px auto 0; color: var(--text-muted); font-size: 12px; font-weight: 700; letter-spacing: 2px; text-decoration: none; }
.scroll-hint svg { display: block; margin: 6px auto 0; width: 22px; height: 22px; color: var(--pink); animation: bob 1.6s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) { .scroll-hint svg { animation: none; } }
/* مكان صورة أو فيديو المنتج: استبدله لاحقًا بـ <video> أو <img> */
.hero-media { margin: 30px auto 0; max-width: 520px; min-height: 240px; border-radius: 28px; background: linear-gradient(135deg, rgba(216, 40, 136, 0.12), rgba(240, 216, 72, 0.25)); border: 1px solid rgba(216, 40, 136, 0.15); display: flex; align-items: center; justify-content: center; color: var(--text-muted); font-size: 16px; overflow: hidden; }
.hero-media video, .hero-media img { width: 100%; height: 100%; object-fit: cover; display: block; }

main { padding: 12px 16px 20px; }
h2 { color: var(--pink); font-weight: 800; font-size: 26px; }

/* بطاقة الفرع (زر) */
.branch-card { display: block; background: var(--pink); border-radius: 999px; padding: 18px; color: var(--on-color); font-size: 20px; font-weight: 700; text-decoration: none; margin: 0 auto 12px; max-width: 520px; box-shadow: 0 8px 20px rgba(216, 40, 136, 0.28); }
.branch-card:active { background: var(--purple); }

/* الأقسام */
.categories { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 22px; }
.cat { background: var(--bg); border: 1px solid rgba(111, 179, 232, 0.6); border-radius: 18px; box-shadow: 0 4px 14px var(--shadow); padding: 12px 14px; font-size: 14px; min-width: 96px; }

footer { background: var(--purple); color: var(--on-color); padding: 20px 16px; font-size: 14px; }
footer a { color: var(--on-color); }

/* صفحة المنيو */
.back { display: inline-block; background: var(--pink); color: var(--on-color); padding: 8px 18px; border-radius: 999px; text-decoration: none; font-weight: 700; }

/* رأس صفحة المنيو: شريط أبيض عائم: رجوع + الشعار في الوسط + اسم الفرع */
.menu-header { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; row-gap: 4px; margin: 10px 14px 0; padding: 10px 14px; background: var(--bg); border-radius: 20px; box-shadow: 0 6px 24px var(--shadow); }
.menu-header .back { grid-column: 1; grid-row: 1; justify-self: start; padding: 6px 14px; font-size: 14px; }
.menu-header .logo-chip { grid-column: 2; grid-row: 1; }
.menu-header h1 { grid-column: 1 / -1; grid-row: 2; justify-self: center; margin: 0; font-size: 17px; font-weight: 800; color: var(--pink); }

/* شريط التبويبات الثابت أعلى الصفحة */
.menu-controls { position: sticky; top: 0; z-index: 10; margin-top: 8px; padding: 10px 14px 4px; background: rgba(255, 255, 255, 0.9); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); box-shadow: 0 4px 12px var(--shadow); }
.search { display: block; width: 100%; max-width: 560px; margin: 0 auto 10px; padding: 12px 18px; border: 1px solid rgba(0, 0, 0, 0.14); border-radius: 999px; background: var(--bg); color: var(--text); font: inherit; font-size: 16px; text-align: start; }
.search:focus { outline: 3px solid var(--blue); outline-offset: 1px; border-color: var(--blue); }
.tabs { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 10px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs .tab { flex: 0 0 auto; white-space: nowrap; }

/* قائمة الأصناف */
.menu-list { max-width: 900px; margin: 0 auto; text-align: start; }
.group-title { color: var(--text); margin: 18px 0 10px; padding-bottom: 6px; border-bottom: 2px solid var(--blue); }
.item-grid { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 640px) { .item-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px) { .item-grid { grid-template-columns: repeat(4, 1fr); } }
.item-name { margin: 0; font-weight: 800; font-size: 17px; line-height: 1.3; }
.item-bottom { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: auto; padding-top: 10px; }
.coming-soon { color: var(--text-muted); text-align: center; padding: 48px 16px; }
.coming-soon a { color: var(--pink); }

/* أزرار اختيار الحجم: العادي بحدود زرقاء، والمختار أصفر بنص داكن */
.sizes { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.size-btn { background: var(--bg); color: var(--text); border: 1px solid var(--blue); border-radius: 999px; padding: 4px 12px; font: inherit; font-size: 14px; cursor: pointer; }
.size-btn.selected { background: var(--yellow); border-color: var(--yellow); font-weight: bold; }

/* مسافة أسفل الصفحة حتى لا يغطي الشريط العائم آخر صنف */
body.has-cart .menu-list { padding-bottom: 90px; }
body.sheet-open { overflow: hidden; }

/* السلة المنزلقة من الأسفل */
.overlay { position: fixed; inset: 0; z-index: 30; background: var(--overlay); }
.cart-sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; max-height: 80vh; overflow-y: auto; max-width: 600px; margin: 0 auto; padding: 16px; background: var(--bg); border-top: 3px solid var(--pink); border-radius: 18px 18px 0 0; text-align: start; transform: translateY(100%); visibility: hidden; transition: transform 0.25s ease, visibility 0s linear 0.25s; }
.cart-sheet.open { transform: none; visibility: visible; transition: transform 0.25s ease; }
.cart-head { display: flex; align-items: center; justify-content: space-between; }
.cart-head h2 { margin: 0; }
.close-btn { background: var(--bg); color: var(--text); border: 1px solid var(--blue); border-radius: 50%; width: 36px; height: 36px; font-size: 16px; cursor: pointer; }
.cart-line { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--blue); }
.cart-line-info { display: flex; flex-direction: column; gap: 4px; }
.cart-empty { color: var(--text-muted); text-align: center; padding: 24px 0; }
.cart-total { font-weight: bold; font-size: 18px; margin: 14px 0 0; }
.cart-sheet .whatsapp-btn { display: block; text-align: center; margin-top: 14px; }

/* أزرار + و − */
.qty { display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0; }
.qty-btn { width: 34px; height: 34px; border: none; border-radius: 50%; background: var(--pink); color: var(--on-color); font: inherit; font-size: 20px; line-height: 1; cursor: pointer; }
.qty-num { min-width: 20px; text-align: center; font-weight: bold; }

/* =========================================================
   عناصر جاهزة للاستعمال لاحقًا (المنيو والسلة)
   ========================================================= */

/* الأزرار العامة */
.btn { background: var(--pink); color: var(--on-color); border: none; border-radius: 10px; padding: 10px 18px; font: inherit; cursor: pointer; }

/* التبويبات: العادي بحدود زرقاء، والمحدد بخلفية صفراء ونص داكن */
.tab { background: var(--bg); color: var(--text); border: 1px solid rgba(0, 0, 0, 0.12); border-radius: 999px; padding: 8px 16px; font: inherit; cursor: pointer; }
.tab.active { background: var(--yellow); color: var(--text); border-color: var(--yellow); font-weight: bold; }

/* شارات التمييز مثل «الأكثر طلبًا» */
.badge { display: inline-block; background: var(--yellow); color: var(--text); border-radius: 8px; padding: 2px 8px; font-size: 12px; font-weight: bold; }

/* بطاقة الصنف والسعر */
.item { display: flex; flex-direction: column; overflow: hidden; background: var(--bg); border: 1px solid rgba(111, 179, 232, 0.55); border-radius: 20px; box-shadow: 0 4px 14px var(--shadow); }
.item-media { position: relative; aspect-ratio: 1 / 1; background: linear-gradient(135deg, rgba(216, 40, 136, 0.14), rgba(240, 216, 72, 0.30)); display: flex; align-items: center; justify-content: center; }
.item-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.item-media .ph { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
.item-media .ph img { width: 55%; height: auto; object-fit: contain; opacity: .9; mix-blend-mode: multiply; }
.item-media .badge { position: absolute; top: 8px; inset-inline-start: 8px; }
.item-body { display: flex; flex-direction: column; flex: 1; padding: 10px 12px 12px; text-align: start; }
.add-btn { padding: 8px 14px; border-radius: 999px; font-weight: 700; font-size: 14px; white-space: nowrap; }
.price { color: var(--purple); font-weight: 800; font-size: 15px; }

/* زر واتساب والشريط العائم: أخضر */
.whatsapp-btn { background: var(--green); color: var(--on-color); border: none; border-radius: 10px; padding: 12px 20px; font: inherit; font-weight: bold; cursor: pointer; text-decoration: none; display: inline-block; }
.floating-bar { position: fixed; bottom: 0; left: 0; right: 0; z-index: 20; width: 100%; border: none; background: var(--green); color: var(--on-color); padding: 16px; font: inherit; font-size: 17px; font-weight: bold; cursor: pointer; box-shadow: 0 -2px 10px var(--shadow); }

/* شعار رأس صفحة المنيو */
.logo-chip { flex-shrink: 0; line-height: 0; }
.logo-chip img { height: 44px; width: auto; display: block; }

/* ========== طلب الاستلام من المحل ========== */
.order-mode { border: 0; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; }
.order-mode legend { font-weight: 800; margin-bottom: 8px; padding: 0; }
.mode-opt { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid rgba(0, 0, 0, 0.14); border-radius: 14px; cursor: pointer; }
.mode-opt:has(input:checked) { border-color: var(--pink); background: rgba(216, 40, 136, 0.07); font-weight: 700; }
.mode-opt input { accent-color: var(--pink); width: 18px; height: 18px; }
#checkout .whatsapp-btn { margin-top: 14px; }
.form-hint { margin: 14px 0 6px; color: var(--text-muted); font-size: 14px; line-height: 1.6; }
.field { display: block; margin-top: 10px; font-weight: 700; font-size: 14px; }
.field input { display: block; width: 100%; margin-top: 6px; padding: 12px 14px; border: 1px solid rgba(0, 0, 0, 0.18); border-radius: 12px; font: inherit; font-size: 16px; font-weight: 400; background: var(--bg); color: var(--text); }
.field input:focus { outline: 3px solid var(--blue); outline-offset: 1px; }
.form-error { color: #B3261E; font-weight: 700; margin: 10px 0 0; }
.pickup-btn { display: block; width: 100%; text-align: center; background: var(--pink); }
.pickup-btn:disabled { opacity: 0.6; cursor: default; }

/* شاشة «تم استلام طلبك» تحل محل محتوى السلة */
#order-done { display: none; text-align: center; padding: 10px 0 6px; }
.cart-sheet.done-mode #order-done { display: block; }
.cart-sheet.done-mode #cart-lines, .cart-sheet.done-mode #cart-total-wrap, .cart-sheet.done-mode #checkout { display: none; }
.done-label { margin: 6px 0 0; color: var(--text-muted); }
.done-number { margin: 4px 0; font-size: 56px; font-weight: 800; color: var(--pink); line-height: 1.1; }
.done-status { margin: 0 0 8px; font-size: 20px; font-weight: 800; }
.done-status[data-status="ready"] { color: var(--green); }
.done-car { margin: 0 0 16px; color: var(--text-muted); }

/* شريط متابعة الطلب أعلى المنيو */
.track-chip { display: block; width: calc(100% - 28px); margin: 8px 14px 0; padding: 10px 16px; border: 0; border-radius: 999px; background: var(--yellow); color: var(--text); font: inherit; font-weight: 800; cursor: pointer; box-shadow: 0 4px 14px var(--shadow); }
.track-chip[data-status="ready"] { background: var(--green); color: var(--on-color); }

/* ========== شاشة العمال (orders.html) ========== */
.staff-page { max-width: 900px; margin: 0 auto; padding: 14px; text-align: start; }
.staff-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.staff-bar h1 { margin: 0; font-size: 22px; }
.staff-bar select, .staff-pin input { padding: 10px 14px; border: 1px solid rgba(0, 0, 0, 0.18); border-radius: 999px; font: inherit; background: var(--bg); }
.staff-tabs { display: flex; gap: 8px; margin-bottom: 12px; }
.staff-note { color: var(--text-muted); text-align: center; padding: 30px 10px; }
.order-card { background: var(--bg); border: 2px solid rgba(111, 179, 232, 0.55); border-radius: 20px; padding: 14px; margin-bottom: 12px; box-shadow: 0 4px 14px var(--shadow); }
.order-card[data-status="new"] { border-color: var(--pink); }
.order-card[data-status="ready"] { border-color: var(--green); }
.order-card.fresh { animation: flash 1.2s ease-in-out 3; }
@keyframes flash { 50% { background: rgba(240, 216, 72, 0.45); } }
.order-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.order-num { font-size: 34px; font-weight: 800; color: var(--pink); }
.order-state { padding: 4px 12px; border-radius: 999px; background: var(--yellow); font-weight: 800; font-size: 14px; }
.order-car { font-size: 22px; font-weight: 800; margin: 6px 0; }
.order-meta { color: var(--text-muted); font-size: 14px; }
.order-items { margin: 10px 0; padding: 0; list-style: none; }
.order-items li { padding: 4px 0; border-bottom: 1px dashed rgba(0, 0, 0, 0.12); }
.order-total { font-weight: 800; margin-bottom: 10px; }
.order-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.order-actions .btn { flex: 1 1 120px; padding: 12px; border-radius: 999px; font-weight: 800; }
.order-actions .btn.ready { background: var(--green); }
.order-actions .btn.done { background: var(--text); }

/* ===== اختيار طريقة الاستلام ===== */
.mode-pick { max-width: 520px; margin: 0 auto; padding: 60px 16px 40px; }
.mode-pick h2 { text-align: center; font-size: 26px; margin: 0 0 18px; }
.mode-card { display: flex; align-items: center; gap: 14px; width: 100%; margin-bottom: 12px; padding: 18px 16px; border: 1px solid rgba(0, 0, 0, 0.08); border-radius: 20px; background: #fff; color: var(--text); font: inherit; text-align: right; cursor: pointer; box-shadow: 0 6px 18px var(--shadow); }
.mode-card:active { border-color: var(--pink); background: rgba(216, 40, 136, 0.06); }
.mode-ico { flex: none; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; }
.mode-ico svg { width: 30px; height: 30px; }
.ico-pink { background: rgba(216, 40, 136, 0.12); color: var(--pink); }
.ico-yellow { background: rgba(240, 216, 72, 0.35); color: var(--pink); }
.mode-txt { flex: 1; display: grid; gap: 2px; }
.mode-txt b { font-size: 18px; font-weight: 800; }
.mode-txt small { color: var(--text-muted); font-size: 13px; }
.mode-arrow { font-size: 26px; color: var(--pink); }
.mode-chip { display: block; margin: 8px auto 0; padding: 6px 14px; border: 0; border-radius: 999px; background: rgba(216, 40, 136, 0.1); color: var(--pink); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.order-mode { display: none; }
body.picking-mode .menu-controls, body.picking-mode #menu-list, body.picking-mode #cart-bar, body.picking-mode .track-chip { display: none !important; }
