/* موقع العميل — طلبات جرجا. عربي RTL، الموبايل أولًا. */
:root {
    --brand: #f2671f;
    --brand-dark: #d4530f;
    --brand-soft: #fff1e8;
    --brand-glow: rgba(242, 103, 31, .18);
    --ink: #1e1915;
    --ink-2: #4a423c;
    --muted: #857b73;
    --line: #eee8e2;
    --bg: #f7f4f1;
    --card: #ffffff;
    --ok: #179a52;
    --ok-soft: #e5f6ec;
    --warn: #b56a00;
    --warn-soft: #fff5e0;
    --danger: #d23f3f;
    --danger-soft: #fdecec;
    --radius: 18px;
    --radius-sm: 12px;
    --shadow-sm: 0 1px 2px rgba(30, 25, 21, .05);
    --shadow: 0 1px 2px rgba(30, 25, 21, .04), 0 8px 24px rgba(30, 25, 21, .07);
    --shadow-lg: 0 18px 50px rgba(30, 25, 21, .14);
    --header-h: 64px;
    --tabbar-h: 0px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font: 400 15px/1.7 "Cairo", "Segoe UI", Tahoma, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { margin: 0; line-height: 1.35; font-weight: 800; }
h1 { font-size: clamp(22px, 4vw, 30px); letter-spacing: -.01em; }
h2 { font-size: 19px; }
h3 { font-size: 16px; font-weight: 700; }
p { margin: 0; }
:focus-visible { outline: 3px solid rgba(242, 103, 31, .45); outline-offset: 2px; border-radius: 8px; }
[x-cloak] { display: none !important; }
.icon { flex: none; }

.container { width: 100%; max-width: 1120px; margin-inline: auto; padding-inline: 16px; }
.site-main { flex: 1; padding-block: 22px calc(110px + var(--tabbar-h)); display: flex; flex-direction: column; gap: 24px; }
.page-narrow { max-width: 720px; width: 100%; margin-inline: auto; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.price { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.loading-fade { opacity: .55; transition: opacity .2s; }

/* ---------- الهيدر ---------- */
.site-header { position: sticky; top: 0; z-index: 40; background: rgba(255, 255, 255, .86); backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px); border-bottom: 1px solid rgba(238, 232, 226, .9); }
.header-row { display: flex; align-items: center; gap: 12px; height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; flex: none; }
.brand-mark { width: 38px; height: 38px; border-radius: 12px; background: linear-gradient(140deg, #ff8a3d, var(--brand) 55%, #e2500c); color: #fff; display: grid; place-items: center; font-size: 20px; box-shadow: 0 6px 16px var(--brand-glow); }
.header-nav { display: flex; align-items: center; gap: 4px; margin-inline-start: auto; }
.nav-link { padding: 8px 12px; border-radius: 12px; font-weight: 700; color: var(--ink-2); display: inline-flex; align-items: center; gap: 6px; position: relative; transition: background .15s, color .15s; }
.nav-link:hover, .nav-link.active { background: var(--brand-soft); color: var(--brand-dark); }
.nav-icon { padding: 9px; }
.cart-count { position: absolute; top: 1px; inset-inline-end: 0; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 99px; background: var(--brand); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; line-height: 1; border: 2px solid #fff; box-sizing: content-box; }

.deliver-to { display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 14px; border-radius: 99px; background: var(--bg); border: 1px solid var(--line); min-width: 0; max-width: 260px; color: var(--brand-dark); transition: border-color .15s; }
.deliver-to:hover { border-color: var(--brand); }
.deliver-text { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; font-size: 12px; }
.deliver-text strong { color: var(--ink); font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.avatar { width: 46px; height: 46px; border-radius: 99px; background: linear-gradient(140deg, #ffb37f, var(--brand)); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 19px; flex: none; }
.avatar-sm { width: 36px; height: 36px; font-size: 15px; margin-inline-start: 4px; box-shadow: 0 0 0 3px #fff, 0 0 0 4px var(--line); }

.site-footer { border-top: 1px solid var(--line); background: var(--card); padding-block: 22px calc(22px + var(--tabbar-h)); color: var(--ink-2); font-size: 14px; }
.footer-row { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: flex-end; }
.site-footer .brand { font-size: 16px; }
.site-footer .brand-mark { width: 30px; height: 30px; font-size: 16px; border-radius: 9px; box-shadow: none; }

/* شريط التنقل السفلي (موبايل) */
.tabbar { display: none; }
@media (max-width: 767px) {
    :root { --tabbar-h: 64px; --header-h: 58px; }
    .desktop-only { display: none !important; }
    .brand-name { display: none; }
    .deliver-to { flex: 1; max-width: none; }
    .tabbar { display: flex; position: fixed; bottom: 0; inset-inline: 0; z-index: 45; background: rgba(255, 255, 255, .95); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom, 0px); }
    .tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; height: var(--tabbar-h); font-size: 11.5px; font-weight: 700; color: var(--muted); position: relative; }
    .tabbar a.active { color: var(--brand); }
    .tabbar a.active::before { content: ""; position: absolute; top: 0; width: 28px; height: 3px; border-radius: 0 0 4px 4px; background: var(--brand); }
    .tab-icon { position: relative; display: inline-flex; }
    .tab-icon .cart-count { top: -5px; inset-inline-end: -11px; min-width: 15px; height: 15px; font-size: 10px; padding: 0 4px; }
    .site-header .nav-icon { display: none; }
}

/* ---------- أزرار وحقول ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 20px; border-radius: 14px; border: 1px solid transparent; font-weight: 700; line-height: 1.3; text-align: center; transition: background .15s, box-shadow .15s, border-color .15s, transform .06s; }
.btn:active { transform: translateY(1px) scale(.99); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn-primary { background: linear-gradient(180deg, #f6782f, var(--brand)); color: #fff; box-shadow: 0 6px 16px var(--brand-glow); }
.btn-primary:hover { background: var(--brand-dark); }
.btn-ghost { background: var(--card); border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand-dark); }
.btn-danger { background: var(--card); border-color: #f2c6c6; color: var(--danger); }
.btn-danger:hover { background: var(--danger-soft); }
.btn-sm { padding: 7px 14px; font-size: 13.5px; border-radius: 11px; }
.btn-block { width: 100%; }
.link { color: var(--brand-dark); font-weight: 700; background: none; border: 0; padding: 0; display: inline-flex; align-items: center; gap: 4px; }
.link:hover { text-decoration: underline; }
.link.danger { color: var(--danger); }
.icon-btn { width: 36px; height: 36px; border-radius: 11px; border: 1px solid var(--line); background: var(--card); display: grid; place-items: center; color: var(--muted); }
.icon-btn:hover { color: var(--ink); border-color: var(--ink-2); }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .field .label { font-weight: 700; font-size: 14px; color: var(--ink-2); }
.input { width: 100%; padding: 12px 14px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: #fdfcfb; transition: border-color .15s, box-shadow .15s, background .15s; }
.input:hover { border-color: #ddd4cc; }
.input:focus { outline: none; border-color: var(--brand); background: #fff; box-shadow: 0 0 0 4px rgba(242, 103, 31, .13); }
.input:disabled { background: var(--bg); color: var(--muted); }
textarea.input { resize: vertical; min-height: 76px; }
.check { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; cursor: pointer; }
.check input { width: 19px; height: 19px; accent-color: var(--brand); }
.error { color: var(--danger); font-size: 13px; font-weight: 600; }
.alert { padding: 12px 14px; border-radius: var(--radius-sm); font-weight: 600; font-size: 14px; }
.alert-error { background: var(--danger-soft); color: var(--danger); }
.alert-ok { background: var(--ok-soft); color: var(--ok); }
.alert-info { background: var(--brand-soft); color: var(--brand-dark); }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow-sm); }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 99px; font-size: 12px; font-weight: 700; background: #f1ece7; color: var(--muted); white-space: nowrap; }
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-closed { background: rgba(30, 25, 21, .72); color: #fff; }
.badge-brand { background: var(--brand-soft); color: var(--brand-dark); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }

/* ---------- الرئيسية ---------- */
.hero { position: relative; overflow: hidden; background: radial-gradient(120% 140% at 0% 0%, #ffb37f 0%, transparent 45%), linear-gradient(135deg, #f2671f 0%, #e5540f 55%, #c9430a 100%); color: #fff; border-radius: 26px; padding: 30px 22px 22px; display: flex; flex-direction: column; gap: 18px; box-shadow: 0 20px 50px rgba(226, 84, 15, .25); isolation: isolate; }
.hero::before, .hero::after { content: ""; position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .09); z-index: -1; }
.hero::before { width: 320px; height: 320px; inset-inline-start: -80px; top: -150px; }
.hero::after { width: 200px; height: 200px; inset-inline-end: -60px; bottom: -90px; }
.hero h1 { font-size: clamp(24px, 4.4vw, 36px); max-width: 22ch; }
.hero p { opacity: .92; max-width: 58ch; }
.hero-hello { display: inline-block; align-self: flex-start; background: rgba(255, 255, 255, .18); border-radius: 99px; padding: 3px 12px; font-weight: 700; font-size: 14px; }
.search { display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 16px; padding: 6px 14px; color: var(--muted); max-width: 640px; box-shadow: 0 10px 30px rgba(30, 25, 21, .18); cursor: text; }
.search input { flex: 1; min-width: 0; border: 0; padding: 10px 0; background: transparent; color: var(--ink); font-size: 16px; }
.search input:focus { outline: none; }
.search-spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--brand); animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.hero-stats { display: flex; flex-wrap: wrap; gap: 8px; font-size: 13px; font-weight: 700; }
.hero-stats span { display: inline-flex; align-items: center; gap: 6px; background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .22); border-radius: 99px; padding: 4px 12px; }

.chips { display: flex; gap: 8px; overflow-x: auto; padding-block: 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 99px; border: 1px solid var(--line); background: var(--card); font-weight: 700; font-size: 14px; white-space: nowrap; transition: border-color .15s, background .15s; }
.chip:hover { border-color: var(--brand); }
.chip.active { background: var(--ink); border-color: var(--ink); color: #fff; }

.categories { display: flex; gap: 12px; overflow-x: auto; padding: 2px 2px 6px; scrollbar-width: none; }
.categories::-webkit-scrollbar { display: none; }
.category { flex: none; width: 92px; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 6px 10px; border-radius: 18px; border: 1px solid var(--line); background: var(--card); font-weight: 700; font-size: 13px; text-align: center; line-height: 1.3; transition: transform .15s, box-shadow .15s, border-color .15s; }
.category:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.category-icon { width: 52px; height: 52px; border-radius: 16px; background: var(--brand-soft); display: grid; place-items: center; font-size: 26px; overflow: hidden; }
.category-icon img { width: 100%; height: 100%; object-fit: cover; }
.category.active { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-dark); box-shadow: 0 0 0 3px var(--brand-glow); }
.category.active .category-icon { background: #fff; }

.banners { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.banners::-webkit-scrollbar { display: none; }
.banner { flex: none; width: min(86%, 520px); aspect-ratio: 12 / 5; border-radius: var(--radius); overflow: hidden; scroll-snap-align: start; background: var(--line); box-shadow: var(--shadow); }
.banner img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.banner:hover img { transform: scale(1.03); }

.store-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); gap: 16px; }
.store-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .2s, transform .2s; }
.store-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.store-cover { aspect-ratio: 16 / 9; background: linear-gradient(140deg, var(--brand-soft), #ffe0cc); position: relative; display: grid; place-items: center; color: var(--brand-dark); font-size: 44px; font-weight: 800; overflow: hidden; }
.store-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.store-card:hover .store-cover img { transform: scale(1.05); }
.store-cover:has(img)::after { content: ""; position: absolute; inset: auto 0 0; height: 40%; background: linear-gradient(transparent, rgba(0, 0, 0, .18)); pointer-events: none; }
.store-cover .badge { position: absolute; top: 10px; inset-inline-start: 10px; z-index: 1; backdrop-filter: blur(4px); }
.store-cover.closed img, .store-cover.closed > span[aria-hidden] { filter: grayscale(.9); opacity: .8; }
.store-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 8px; }
.store-mini-logo { width: 40px; height: 40px; border-radius: 12px; object-fit: cover; border: 1px solid var(--line); flex: none; }
.store-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--muted); font-size: 13px; }
.store-meta span { display: inline-flex; align-items: center; gap: 4px; }
.rating { display: inline-flex; align-items: center; gap: 3px; background: #fff7e0; color: #a36a00; border-radius: 99px; padding: 2px 9px; font-size: 13px; font-weight: 800; flex: none; }
.rating .icon { fill: #f0a500; stroke: #f0a500; }
.star { color: #f0a500; }
.empty { text-align: center; padding: 40px 16px; color: var(--muted); }

/* ---------- صفحة المتجر ---------- */
.store-head { background: var(--card); border: 1px solid var(--line); border-radius: 24px; overflow: hidden; box-shadow: var(--shadow); }
.store-head .store-cover { aspect-ratio: 16 / 5; max-height: 220px; width: 100%; font-size: 56px; }
.store-info { padding: 14px 18px 18px; display: flex; gap: 14px; align-items: flex-start; }
.store-logo { width: 76px; height: 76px; border-radius: 20px; border: 4px solid #fff; background: var(--brand-soft); color: var(--brand-dark); display: grid; place-items: center; font-size: 28px; font-weight: 800; margin-top: -48px; position: relative; overflow: hidden; flex: none; box-shadow: var(--shadow); z-index: 2; }
.store-logo img { width: 100%; height: 100%; object-fit: cover; }
.cat-nav { position: sticky; top: var(--header-h); z-index: 20; background: rgba(247, 244, 241, .92); backdrop-filter: blur(10px); padding-block: 10px; margin-inline: -16px; padding-inline: 16px; }
.menu-section { display: flex; flex-direction: column; gap: 12px; scroll-margin-top: 130px; }
.product-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.product { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; display: flex; gap: 14px; align-items: center; transition: box-shadow .15s, border-color .15s; }
.product:hover { box-shadow: var(--shadow); border-color: #e6ddd4; }
.product.unavailable { opacity: .55; }
.product-img { width: 84px; height: 84px; border-radius: 14px; background: var(--brand-soft); flex: none; object-fit: cover; display: grid; place-items: center; color: var(--brand-dark); font-weight: 800; font-size: 24px; overflow: hidden; }
.product-img img { width: 100%; height: 100%; object-fit: cover; }
.product-desc { color: var(--muted); font-size: 13px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.old-price { color: var(--muted); text-decoration: line-through; font-size: 13px; font-weight: 400; }
.add-btn { width: 40px; height: 40px; border-radius: 13px; border: 0; background: var(--brand); color: #fff; font-size: 22px; font-weight: 700; line-height: 1; flex: none; display: grid; place-items: center; box-shadow: 0 6px 14px var(--brand-glow); transition: background .15s, transform .1s; }
.add-btn:hover { background: var(--brand-dark); transform: scale(1.06); }
.add-btn[disabled] { background: var(--line); color: var(--muted); cursor: not-allowed; box-shadow: none; transform: none; }

/* ---------- نافذة الاختيارات ---------- */
.modal-backdrop { position: fixed; inset: 0; z-index: 60; background: rgba(30, 25, 21, .5); backdrop-filter: blur(3px); display: flex; align-items: flex-end; justify-content: center; animation: fade .15s ease-out; }
.modal { background: var(--card); width: 100%; max-width: 520px; max-height: 90vh; border-radius: 24px 24px 0 0; display: flex; flex-direction: column; overflow: hidden; box-shadow: var(--shadow-lg); animation: rise .2s ease-out; }
.modal-body { padding: 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; }
.modal-foot { padding: 12px 20px calc(12px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); display: flex; gap: 12px; align-items: center; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { transform: translateY(24px); opacity: .6; } }
.option-group { display: flex; flex-direction: column; gap: 6px; }
.option { display: flex; align-items: center; gap: 10px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 13px; cursor: pointer; transition: border-color .15s, background .15s; }
.option:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.option input { accent-color: var(--brand); width: 18px; height: 18px; flex: none; }
.option.disabled { opacity: .5; cursor: not-allowed; }
.qty { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line); border-radius: 13px; padding: 3px; background: var(--card); }
.qty button { width: 32px; height: 32px; border-radius: 10px; border: 0; background: var(--brand-soft); color: var(--brand-dark); font-size: 18px; font-weight: 700; line-height: 1; }
.qty button:hover { background: #ffe2cf; }
.qty span { min-width: 28px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
@media (min-width: 640px) {
    .modal-backdrop { align-items: center; padding: 16px; }
    .modal { border-radius: 24px; }
}

/* ---------- شريط السلة ---------- */
.cart-bar { position: fixed; bottom: calc(14px + var(--tabbar-h) + env(safe-area-inset-bottom, 0px)); inset-inline: 0; z-index: 50; display: flex; justify-content: center; padding-inline: 16px; pointer-events: none; animation: rise .25s ease-out; }
.cart-bar a { pointer-events: auto; width: 100%; max-width: 520px; background: linear-gradient(180deg, #f6782f, var(--brand)); color: #fff; border-radius: 18px; padding: 13px 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; font-weight: 700; box-shadow: 0 12px 32px rgba(242, 103, 31, .42); }
.cart-bar a:hover { background: var(--brand-dark); }
.cart-bar .count { background: rgba(255, 255, 255, .22); border-radius: 9px; padding: 1px 9px; }

/* ---------- السلة والدفع ---------- */
.checkout { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 900px) {
    .checkout { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
    .checkout > aside { position: sticky; top: calc(var(--header-h) + 16px); }
}
.line { display: flex; gap: 12px; align-items: flex-start; padding-block: 12px; border-bottom: 1px solid var(--line); }
.line:last-child { border-bottom: 0; }
.totals { display: flex; flex-direction: column; gap: 8px; }
.totals .row { justify-content: space-between; flex-wrap: nowrap; }
.totals .grand { font-size: 18px; font-weight: 800; border-top: 1px dashed var(--line); padding-top: 10px; }
.address-option { display: flex; gap: 10px; align-items: flex-start; padding: 13px; border: 1px solid var(--line); border-radius: 14px; cursor: pointer; transition: border-color .15s, background .15s; }
.address-option:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.address-option input { accent-color: var(--brand); margin-top: 5px; flex: none; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }

/* ---------- الخريطة ونموذج العنوان ---------- */
.map-box { position: relative; }
.map { height: 300px; border-radius: 16px; border: 1px solid var(--line); overflow: hidden; z-index: 0; }
.map-search { position: absolute; top: 10px; inset-inline: 10px; z-index: 6; }
.map-search-field { display: flex; align-items: center; gap: 8px; background: #fff; border-radius: 14px; padding: 5px 5px 5px 8px; padding-inline-start: 12px; box-shadow: var(--shadow); color: var(--muted); }
.map-search-field input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 6px 0; color: var(--ink); }
.map-search-field input:focus { outline: none; }
.map-results { list-style: none; margin: 6px 0 0; padding: 4px; background: #fff; border-radius: 14px; box-shadow: var(--shadow-lg); max-height: 220px; overflow-y: auto; }
.map-results button { width: 100%; text-align: start; border: 0; background: none; padding: 9px 10px; border-radius: 10px; font-size: 13px; line-height: 1.5; }
.map-results button:hover { background: var(--brand-soft); }
.map-locate { position: absolute; bottom: 28px; inset-inline-start: 12px; z-index: 5; display: inline-flex; align-items: center; gap: 6px; border: 0; background: #fff; color: var(--brand-dark); font-weight: 700; font-size: 13px; padding: 8px 12px; border-radius: 12px; box-shadow: var(--shadow); }
.map-locate[disabled] { opacity: .7; }
.map-box > .error { position: static; }
.pin span { display: block; width: 34px; height: 34px; border-radius: 50% 50% 50% 0; background: var(--brand); transform: rotate(-45deg); border: 3px solid #fff; box-shadow: 0 6px 14px rgba(0, 0, 0, .3); }
.pin span::after { content: ""; position: absolute; inset: 9px; border-radius: 50%; background: #fff; }
.zone-hint { display: flex; align-items: flex-start; gap: 8px; padding: 10px 12px; border-radius: 12px; background: var(--bg); color: var(--ink-2); font-size: 13.5px; font-weight: 600; }
.zone-hint.ok { background: var(--ok-soft); color: var(--ok); }
.zone-hint.warn { background: var(--warn-soft); color: var(--warn); }

/* ---------- حسابي وعناويني ---------- */
.profile-head { display: flex; align-items: center; gap: 14px; }
.profile-head strong { font-size: 18px; }
.segmented { display: flex; gap: 4px; background: #efe9e3; padding: 4px; border-radius: 16px; overflow-x: auto; scrollbar-width: none; }
.segmented a { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 12px; border-radius: 12px; font-weight: 700; font-size: 14px; color: var(--muted); white-space: nowrap; transition: background .15s, color .15s; }
.segmented a:hover { color: var(--ink); }
.segmented a.active { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }
.link-card { display: flex; align-items: center; gap: 14px; transition: box-shadow .15s, border-color .15s; }
.link-card:hover { box-shadow: var(--shadow); border-color: #e6ddd4; }
.link-card .icon:last-child { transform: none; }
.address-list { display: flex; flex-direction: column; gap: 12px; }
.address-card { display: flex; gap: 14px; align-items: flex-start; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow-sm); transition: border-color .15s, box-shadow .15s; }
.address-card.is-default { border-color: #f7c4a6; background: linear-gradient(180deg, #fffaf6, #fff); }
.address-card.is-editing { box-shadow: 0 0 0 3px var(--brand-glow); }
.address-icon { width: 46px; height: 46px; border-radius: 14px; background: var(--brand-soft); color: var(--brand-dark); display: grid; place-items: center; flex: none; }
.address-actions { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 4px; }

/* ---------- الدخول ---------- */
.auth { max-width: 440px; width: 100%; margin-inline: auto; display: flex; flex-direction: column; gap: 16px; }
.auth > .card { box-shadow: var(--shadow); padding: 22px; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; background: #efe9e3; border-radius: 14px; padding: 4px; gap: 4px; }
.tab { padding: 9px; border: 0; border-radius: 11px; background: transparent; font-weight: 700; color: var(--muted); }
.tab.active { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }
.code-input { text-align: center; font-size: 26px; letter-spacing: .5em; font-weight: 800; direction: ltr; padding-inline-start: calc(13px + .5em); }

/* ---------- متابعة الطلب ---------- */
.steps { display: flex; flex-direction: column; gap: 0; }
.step { display: flex; gap: 12px; align-items: flex-start; position: relative; padding-bottom: 18px; color: var(--muted); }
.step:last-child { padding-bottom: 0; }
.step::before { content: ""; position: absolute; inset-inline-start: 11px; top: 24px; bottom: 0; width: 2px; background: var(--line); }
.step:last-child::before { display: none; }
.step .dot { width: 24px; height: 24px; border-radius: 99px; border: 2px solid var(--line); background: var(--card); flex: none; display: grid; place-items: center; font-size: 13px; position: relative; z-index: 1; }
.step.done { color: var(--ink); }
.step.done .dot { background: var(--ok); border-color: var(--ok); color: #fff; }
.step.done::before { background: var(--ok); }
.step.current { color: var(--ink); font-weight: 700; }
.step.current .dot { border-color: var(--brand); background: var(--brand); box-shadow: 0 0 0 5px rgba(242, 103, 31, .18); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 9px rgba(242, 103, 31, .08); } }
.delivery-code { font-size: 30px; font-weight: 800; letter-spacing: .3em; direction: ltr; color: var(--brand-dark); }
.stars { display: inline-flex; flex-direction: row-reverse; gap: 2px; }
.stars input { position: absolute; opacity: 0; pointer-events: none; }
.stars label { font-size: 28px; color: var(--line); cursor: pointer; line-height: 1; }
.stars input:checked ~ label, .stars label:hover, .stars label:hover ~ label { color: #f0a500; }

.order-card { display: flex; gap: 14px; justify-content: space-between; align-items: center; flex-wrap: wrap; transition: box-shadow .15s, border-color .15s; }
.order-card:hover { box-shadow: var(--shadow); border-color: #e6ddd4; }
.order-card > .grow { min-width: 190px; }
.order-logo { width: 48px; height: 48px; border-radius: 14px; background: var(--brand-soft); color: var(--brand-dark); display: grid; place-items: center; font-weight: 800; font-size: 20px; overflow: hidden; flex: none; }
.order-logo img { width: 100%; height: 100%; object-fit: cover; }
.pagination { display: flex; justify-content: center; gap: 12px; align-items: center; }

/* ---------- رسائل قصيرة ---------- */
.toasts { position: fixed; top: calc(var(--header-h) + 10px); inset-inline: 0; z-index: 80; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding-inline: 16px; }
.toast { padding: 10px 18px; border-radius: 14px; font-weight: 700; font-size: 14px; color: #fff; box-shadow: var(--shadow-lg); animation: rise .2s ease-out; }
.toast-ok { background: var(--ink); }
.toast-error { background: var(--danger); }

@media (max-width: 480px) {
    .hero { padding: 24px 18px 18px; border-radius: 22px; }
    .product-list { grid-template-columns: 1fr; }
    .store-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
    .store-body { padding: 10px; }
    .store-mini-logo { display: none; }
    .rating { padding: 1px 7px; font-size: 12px; }
    .card { padding: 15px; }
    .grid-3 { gap: 8px; }
    .map { height: 260px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } html { scroll-behavior: auto; } }
