/* تتبّع طلبي — هاتف أولاً (390px) ثم الشاشات الأكبر. هوية المتجر: برتقالي محروق + تركوازي على ورق دافئ وحبر داكن. خط Tajawal محلي. */
@font-face { font-family: "Tajawal"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/tajawal-400-ar.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41; }
@font-face { font-family: "Tajawal"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/tajawal-400-lat.woff2") format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+2191, U+2193, U+FEFF; }
@font-face { font-family: "Tajawal"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/tajawal-700-ar.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41; }
@font-face { font-family: "Tajawal"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/tajawal-700-lat.woff2") format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+2191, U+2193, U+FEFF; }

:root {
	--ink: #16191c;
	--ink-2: #4a5259;
	--mute: #7b838a;
	--paper: #f5f2ed;
	--card: #fff;
	--line: #e7e2da;
	--primary: #c2410c;
	--primary-d: #9a3412;
	--teal: #0f766e;
	--teal-bg: #e3f3f0;
	--amber: #b45309;
	--amber-bg: #fdf1dc;
	--red: #b91c1c;
	--red-bg: #fde8e6;
	--r: 22px;
	--shadow: 0 1px 2px rgba(22, 25, 28, .05), 0 14px 34px -14px rgba(22, 25, 28, .22);
	--ease: cubic-bezier(.22, .9, .3, 1);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; overflow-x: hidden; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/1.6 Tajawal, system-ui, -apple-system, "Segoe UI", sans-serif; min-height: 100vh; overflow-x: hidden; }
svg { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
button, input { font: inherit; color: inherit; }
[hidden] { display: none !important; }

/* ---------- الغلاف: سلايدر ---------- */
.hero { position: relative; height: 380px; color: #fff; overflow: hidden; background: var(--ink); isolation: isolate; }
.slides { position: absolute; inset: 0; z-index: -2; }
.slide { position: absolute; inset: 0; margin: 0; opacity: 0; transition: opacity 1.3s ease; overflow: hidden; }
.slide.on { opacity: 1; }
.slide img { width: 100%; height: 100%; object-fit: cover; display: block; transform: scale(1.02); }
.slide.on img { animation: kb 9s ease-out both; }
@keyframes kb { from { transform: scale(1.02) translate3d(0, 0, 0); } to { transform: scale(1.12) translate3d(-1.5%, -1%, 0); } }
/* مشاهد بديلة تظهر لو لم تُحمَّل الصور: تدرّجات بالهوية */
.slide.s1 { background: radial-gradient(120% 90% at 85% 10%, #f59e0b 0, transparent 55%), linear-gradient(140deg, #7c2d12, #c2410c 55%, #ea580c); }
.slide.s2 { background: radial-gradient(110% 90% at 10% 20%, #2dd4bf 0, transparent 55%), linear-gradient(140deg, #134e4a, #0f766e 60%, #14b8a6); }
.slide.s3 { background: radial-gradient(100% 80% at 70% 0, #fbbf24 0, transparent 50%), linear-gradient(140deg, #1f2937, #3b2a1a 60%, #92400e); }
.hero-shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(22, 25, 28, .55) 0, rgba(22, 25, 28, .08) 42%, rgba(22, 25, 28, .72) 100%); }
.hero-in { position: relative; padding: 18px 20px 0; max-width: 640px; margin: 0 auto; }
.brand { display: inline-flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; font: 700 15px/1 Tajawal, sans-serif; letter-spacing: .06em; padding: 8px 14px 9px; border-radius: 999px; background: rgba(255, 255, 255, .14); backdrop-filter: blur(6px); border: 1px solid rgba(255, 255, 255, .22); animation: rise .7s var(--ease) both; }
.hero h1 { margin: 20px 0 4px; font: 700 30px/1.2 Tajawal, sans-serif; text-wrap: balance; text-shadow: 0 2px 18px rgba(0, 0, 0, .35); animation: rise .8s .08s var(--ease) both; }
.hero p { margin: 0; color: rgba(255, 255, 255, .86); font-size: 15px; animation: rise .8s .16s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* مشهد الطريق: بنايات بعيدة وقريبة تتحرك بسرعات مختلفة (بارالاكس)، رصيف وأسفلت بخط وسطي متحرك، والسائق يقطع الشاشة */
.scene { position: absolute; inset-inline: 0; bottom: 24px; height: 200px; direction: ltr; overflow: hidden; pointer-events: none; }
.ly { position: absolute; left: 0; right: 0; background-repeat: repeat-x; background-position: 0 100%; }
.ly.far { bottom: 66px; height: 110px; background-image: url("scene/far.svg"); background-size: 720px 110px; animation: pan 90s linear infinite; }
.ly.near { bottom: 66px; height: 70px; background-image: url("scene/near.svg"); background-size: 720px 70px; animation: pan 34s linear infinite; }
@keyframes pan { to { background-position-x: -720px; } }
.road { position: absolute; left: 0; right: 0; bottom: 0; height: 74px; background: radial-gradient(rgba(255, 255, 255, .07) 1px, transparent 1.6px) 0 0 / 7px 7px, radial-gradient(rgba(0, 0, 0, .18) 1px, transparent 1.6px) 3px 3px / 9px 9px, linear-gradient(180deg, #8a8f95 0, #8a8f95 2px, #5d646b 2px, #5d646b 8px, #343a41 8px, #1a1e22 100%); box-shadow: 0 -10px 22px -6px rgba(0, 0, 0, .35); }
.road::after { content: ""; position: absolute; left: 0; right: 0; bottom: 14px; height: 2px; background: rgba(255, 255, 255, .22); }
.road i { position: absolute; left: 0; right: 0; bottom: 42px; height: 3px; background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .8) 0 22px, transparent 22px 52px); background-size: 52px 3px; animation: dash .75s linear infinite; }
@keyframes dash { to { background-position-x: -52px; } }
.rider-wrap { position: absolute; left: 0; bottom: 48px; width: 78px; animation: ride 10s linear infinite; will-change: transform; }
.rider { display: block; width: 78px; height: auto; transform-origin: 50% 100%; filter: drop-shadow(0 3px 5px rgba(0, 0, 0, .28)); animation: bob .42s ease-in-out infinite alternate; }
.rider-wrap::after { content: ""; position: absolute; left: 4px; right: 0; bottom: -5px; height: 8px; border-radius: 50%; background: radial-gradient(closest-side, rgba(0, 0, 0, .5), transparent); z-index: -1; }
.rider-wrap::before { content: ""; position: absolute; right: 96%; top: 34%; width: 38px; height: 22px; background: repeating-linear-gradient(180deg, rgba(255, 255, 255, .7) 0 2px, transparent 2px 7px); -webkit-mask-image: linear-gradient(90deg, transparent, #000); mask-image: linear-gradient(90deg, transparent, #000); animation: flick .3s steps(2) infinite; }
@keyframes ride { from { transform: translateX(-110px); } to { transform: translateX(calc(100vw + 30px)); } }
@keyframes bob { from { transform: translateY(0) rotate(-.4deg); } to { transform: translateY(-1.6px) rotate(.5deg); } }
@keyframes flick { 50% { opacity: .35; transform: translateX(-3px); } }
.dots { position: absolute; top: 30px; inset-inline-end: 20px; display: flex; gap: 7px; align-items: center; }
.dots button { width: 7px; height: 7px; padding: 0; border: 0; border-radius: 999px; background: rgba(255, 255, 255, .5); cursor: pointer; transition: width .35s var(--ease), background .3s; }
.dots button.on { width: 24px; background: #fff; }

/* ---------- المحتوى ---------- */
.wrap { max-width: 640px; margin: -38px auto 0; padding: 0 16px 36px; position: relative; z-index: 2; }
.card { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 18px; }
.form-card { animation: rise .7s .2s var(--ease) both; }
.fld { display: block; margin-bottom: 12px; }
.lbl { display: block; font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.inp { display: flex; align-items: center; gap: 10px; height: 54px; padding: 0 14px; border: 1.5px solid var(--line); border-radius: 14px; background: #fcfbf9; transition: border-color .2s, box-shadow .2s, background .2s; }
.inp:focus-within { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(194, 65, 12, .13); background: #fff; }
.inp svg { width: 21px; height: 21px; color: var(--mute); }
.inp:focus-within svg { color: var(--primary); }
.inp input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; height: 100%; font-size: 17px; font-weight: 500; letter-spacing: .02em; text-align: left; }
.inp input::placeholder { color: #b8bdc2; font-weight: 400; }
.hp { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; inset-inline-start: 0; top: 0; clip-path: inset(50%); }
.hint { display: flex; gap: 7px; align-items: center; margin: 2px 0 14px; color: var(--mute); font-size: 13.5px; }
.hint svg { width: 17px; height: 17px; }
.go { position: relative; width: 100%; height: 56px; border: 0; border-radius: 16px; background: linear-gradient(180deg, #d4500f, var(--primary)); color: #fff; font-weight: 700; font-size: 18px; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 10px; box-shadow: 0 12px 24px -12px rgba(194, 65, 12, .75); transition: transform .15s, filter .2s; overflow: hidden; }
.go:hover { filter: brightness(1.06); }
.go:active { transform: scale(.985); }
.go-i svg { width: 22px; height: 22px; transition: transform .3s var(--ease); }
.go:hover .go-i svg { transform: translateX(-3px) scale(1.08); }
.go .spin { position: absolute; width: 24px; height: 24px; border: 3px solid rgba(255, 255, 255, .35); border-top-color: #fff; border-radius: 50%; opacity: 0; animation: sp .8s linear infinite; }
.go.busy .go-t, .go.busy .go-i { opacity: 0; }
.go.busy .spin { opacity: 1; }
.go.busy { pointer-events: none; }
@keyframes sp { to { transform: rotate(360deg); } }
.err { margin: 12px 0 0; padding: 10px 14px; border-radius: 12px; background: var(--red-bg); color: var(--red); font-size: 14.5px; animation: shake .45s; }
@keyframes shake { 20% { transform: translateX(-7px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(3px); } }

/* ---------- النتيجة ---------- */
.res { margin-top: 16px; display: grid; gap: 14px; }
.res > * { animation: rise .6s var(--ease) both; }
.res > :nth-child(2) { animation-delay: .06s; } .res > :nth-child(3) { animation-delay: .12s; } .res > :nth-child(4) { animation-delay: .18s; } .res > :nth-child(5) { animation-delay: .24s; }

.status { position: relative; display: flex; align-items: center; gap: 14px; padding: 18px; border-radius: var(--r); color: #fff; overflow: hidden; background: linear-gradient(135deg, #7c2d12, var(--primary)); box-shadow: var(--shadow); }
.status::after { content: ""; position: absolute; inset-inline-end: -30px; top: -40px; width: 150px; height: 150px; border-radius: 50%; background: rgba(255, 255, 255, .1); }
.status h2 { margin: 0; font: 700 21px/1.3 Tajawal, sans-serif; }
.status p { margin: 2px 0 0; opacity: .9; font-size: 14.5px; }
.st-ic { position: relative; flex: none; width: 58px; height: 58px; border-radius: 18px; background: rgba(255, 255, 255, .18); display: grid; place-items: center; }
.st-ic svg { width: 30px; height: 30px; stroke-width: 1.7; }
.status.st-shipped .st-ic svg { animation: bob 1.6s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateX(-3px) translateY(-1px); } }
.status.st-delivered { background: linear-gradient(135deg, #115e59, var(--teal)); }
.status.st-confirmed { background: linear-gradient(135deg, #0f4c75, #0b7285); }
.status.st-cancelled, .status.st-returned { background: linear-gradient(135deg, #7f1d1d, #b91c1c); }

.alert { display: flex; gap: 12px; padding: 14px 16px; border-radius: 16px; background: var(--amber-bg); color: #7c3a06; border: 1px solid #f3d9a8; font-size: 15px; }
.alert svg { width: 24px; height: 24px; margin-top: 1px; color: var(--amber); }

.sum { display: grid; gap: 12px; }
.sum-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; background: #f1ede6; font-weight: 700; font-size: 14px; }
.chip svg { width: 16px; height: 16px; color: var(--primary); }
.sum-date { color: var(--mute); font-size: 14px; }
.items { display: grid; gap: 10px; }
.item { display: flex; align-items: center; gap: 12px; }
.item .ph { flex: none; width: 54px; height: 54px; border-radius: 14px; background: #efeae2 center/cover no-repeat; border: 1px solid var(--line); display: grid; place-items: center; color: var(--mute); }
.item .ph svg { width: 24px; height: 24px; }
.item .nm { flex: 1; min-width: 0; font-weight: 500; line-height: 1.4; }
.item .q { flex: none; font-weight: 700; color: var(--primary); }
.cod { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-radius: 14px; background: var(--teal-bg); color: #0b4f49; font-weight: 700; }
.cod small { font-weight: 400; display: block; opacity: .85; }
.cod b { font-size: 20px; }

.journey h3 { margin: 0 0 14px; font: 700 18px/1.3 Tajawal, sans-serif; }
.steps { list-style: none; margin: 0; padding: 0; position: relative; --fill: 0; }
.steps::before, .steps::after { content: ""; position: absolute; inset-inline-start: 21px; top: 21px; bottom: 21px; width: 3px; margin-inline-start: -1.5px; border-radius: 3px; }
.steps::before { background: var(--line); }
.steps::after { background: linear-gradient(180deg, var(--teal), var(--primary)); transform-origin: top; transform: scaleY(0); animation: fill 1.4s .35s var(--ease) forwards; top: 21px; bottom: auto; height: var(--fillpx, 0px); }
@keyframes fill { to { transform: scaleY(1); } }
.step { position: relative; display: grid; grid-template-columns: 42px 1fr; gap: 14px; padding-bottom: 20px; opacity: 0; animation: rise .55s var(--ease) forwards; animation-delay: calc(.15s + var(--i) * .16s); }
.step:last-child { padding-bottom: 0; }
.mk { position: relative; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: #fff; border: 2px solid var(--line); color: #b3aaa0; z-index: 1; }
.mk svg { width: 21px; height: 21px; }
.step.done .mk { background: var(--teal); border-color: var(--teal); color: #fff; animation: pop .6s calc(.3s + var(--i) * .16s) var(--ease) both; }
.step.current .mk { background: var(--primary); border-color: var(--primary); color: #fff; }
.step.current .mk::before { content: ""; position: absolute; inset: -7px; border-radius: 50%; border: 2px solid var(--primary); opacity: .5; animation: ring 1.8s ease-out infinite; }
.step.bad .mk { background: var(--red); border-color: var(--red); color: #fff; }
@keyframes pop { 0% { transform: scale(.4); } 60% { transform: scale(1.18); } 100% { transform: scale(1); } }
@keyframes ring { from { transform: scale(.85); opacity: .6; } to { transform: scale(1.35); opacity: 0; } }
.mk .ok { position: absolute; inset-inline-end: -4px; bottom: -3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; color: var(--teal); display: grid; place-items: center; box-shadow: 0 0 0 1.5px var(--teal); }
.mk .ok svg { width: 11px; height: 11px; stroke-width: 3.2; stroke-dasharray: 22; stroke-dashoffset: 22; animation: draw .5s calc(.65s + var(--i) * .16s) ease forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.sb { padding-top: 2px; min-width: 0; }
.sb .t { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.sb b { font-size: 16.5px; }
.step.todo .sb b { color: var(--mute); font-weight: 500; }
.sb .d { color: var(--mute); font-size: 13px; }
.sb p { margin: 2px 0 0; color: var(--ink-2); font-size: 14.5px; line-height: 1.55; }
.step.todo .sb p { color: #9aa1a7; }

/* مسار الطرد داخل المرحلة الأخيرة */
.cr { margin-top: 12px; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: #fdfcfa; }
.cr-h { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: #f6f2eb; }
.cr-h svg { width: 22px; height: 22px; color: var(--primary); }
.cr-h b { font-size: 14.5px; }
.cr-h small { display: block; color: var(--mute); font-size: 12.5px; }
.code { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.code span { direction: ltr; font-weight: 700; letter-spacing: .03em; word-break: break-all; }
.mini { display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-size: 13px; cursor: pointer; color: var(--ink-2); text-decoration: none; }
.mini svg { width: 15px; height: 15px; }
.mini:active { transform: scale(.96); }
.cr-s { padding: 10px 14px 0; color: var(--mute); font-size: 13px; }
.ev { list-style: none; margin: 0; padding: 8px 14px 6px; }
.ev li { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-top: 1px dashed var(--line); animation: rise .5s var(--ease) both; animation-delay: calc(.7s + var(--j) * .09s); }
.ev li:first-child { border-top: 0; }
.ev .ei { flex: none; width: 30px; height: 30px; border-radius: 10px; background: #f1ede6; color: var(--ink-2); display: grid; place-items: center; }
.ev .ei svg { width: 16px; height: 16px; }
/* كل الحالات بخط واحد ولون واحد وسُمك واحد: اسم الحالة بالحبر العادي، وتحته المكان والتاريخ بالرمادي. */
.ev .en { font-weight: 500; font-size: 14.5px; line-height: 1.4; color: var(--ink); }
.ev .em { display: flex; flex-wrap: wrap; gap: 2px 10px; color: var(--mute); font-size: 12.5px; font-weight: 400; }
.cr-f { display: flex; gap: 8px; flex-wrap: wrap; padding: 4px 14px 14px; }

.actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn { flex: 1 1 140px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 48px; padding: 0 16px; border-radius: 14px; border: 1.5px solid var(--line); background: #fff; font-weight: 700; font-size: 15px; cursor: pointer; text-decoration: none; color: var(--ink); transition: transform .15s, border-color .2s; }
.btn svg { width: 19px; height: 19px; }
.btn:active { transform: scale(.98); }
.btn.wa { background: #16a34a; border-color: #16a34a; color: #fff; }
.btn.spinning svg { animation: sp .8s linear infinite; }
.foot { margin-top: 22px; text-align: center; font-size: 14px; }
.foot a { color: var(--mute); text-decoration: none; }
.foot a:hover { color: var(--primary); }

/* احتفال بالتسليم */
.confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.confetti i { position: absolute; top: 50%; left: 50%; width: 8px; height: 12px; border-radius: 2px; background: var(--c); opacity: 0; animation: burst 1.6s var(--d) var(--ease) forwards; }
@keyframes burst { 0% { opacity: 1; transform: translate(0, 0) rotate(0); } 100% { opacity: 0; transform: translate(var(--x), var(--y)) rotate(var(--r)); } }

@media (min-width: 720px) {
	.hero { height: 450px; }
	.rider-wrap, .rider { width: 96px; }
	.rider-wrap { bottom: 50px; }
	.hero-in { padding-top: 26px; }
	.hero h1 { font-size: 40px; }
	.hero p { font-size: 17px; }
	.wrap { margin-top: -50px; }
	.card { padding: 24px; }
}
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
	.slide.on img { animation: none; }
	.ly, .road i, .rider, .rider-wrap::before { animation: none; }
	.rider-wrap { animation: none; transform: translateX(32vw); }
	.step { opacity: 1; }
	.steps::after { transform: scaleY(1); }
}
