/* Layout: gray top bar, white sticky header, stats strip, stacked ad slots, brand marquee, product rows, slate footer. Neutral grays plus a red accent for "new". */
:root {
  --blue: #3D4553; --blue-deep: #2E343F; --blue-title: #3D4553; --sky: #ECEEF1; --sky-soft: #F4F5F7; --pale: #F4F5F7;
  --gold: #D92D27; --red: #D92D27; --ablue: #1F57E8; --ablue-d: #1440B5; --ayellow: #F6D248; --ink: #222936; --muted: #6B7280; --line: #E5E7EB; --gray: #F4F5F7; --slate: #3D4553; --dark: #2E343F; --wa: #25D366; --on-wa: #06301C;
  --shadow: 0 12px 26px -18px rgba(20, 24, 32, .45);
  --font: 'IBM Plex Sans Arabic', 'Cairo', Tahoma, 'Segoe UI', system-ui, sans-serif; color-scheme: light;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: #fff; color: var(--ink); font-family: var(--font); font-size: 14px; line-height: 1.6; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.3; text-wrap: balance; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
img, svg { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 6px; }
.wrap { width: 100%; max-width: 1280px; margin-inline: auto; padding-inline: clamp(16px, 3vw, 32px); }
[hidden] { display: none !important; }
main { position: relative; overflow-x: clip; }
.ico { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* top bar */
.util { background: var(--gray); border-bottom: 1px solid #E7E8EB; font-size: .82rem; }
.util .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 46px; }
.util .u { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); }
.util .u svg { width: 19px; height: 19px; flex: none; }
.util b { font-weight: 700; } .util .num { direction: ltr; unicode-bidi: isolate; font-weight: 700; }
.util .left { display: inline-flex; align-items: center; gap: 22px; }
@media (max-width: 560px) { .util .left .u:first-child { display: none; } }

/* header */
.head { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 40; background: #fff; box-shadow: 0 2px 10px rgba(20, 24, 32, .08); }
.head .wrap { display: flex; align-items: center; gap: clamp(12px, 2.4vw, 28px); min-height: 66px; }
.brand { flex: none; display: block; }
.brand img { height: 46px; width: auto; }
.catbtn { display: inline-flex; align-items: center; gap: 10px; border: 0; background: none; padding: 4px 0; text-align: start; flex: none; }
.catbtn .gi { width: 26px; height: 26px; stroke: var(--ablue); }
.catbtn small { display: block; font-size: .72rem; color: var(--muted); line-height: 1.2; } .catbtn b { display: block; font-size: .92rem; font-weight: 700; line-height: 1.3; color: var(--ablue); }
.search { position: relative; flex: 1; min-width: 0; }
.search input { width: 100%; height: 44px; border: 1px solid transparent; border-radius: 10px; background: var(--gray); padding: 0 46px 0 16px; font-size: .9rem; }
.search input:focus { background: #fff; border-color: var(--slate); outline: none; }
.search svg { position: absolute; right: 16px; top: 12px; width: 20px; height: 20px; stroke: var(--muted); }
.results { position: absolute; top: 50px; inset-inline: 0; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 24px 40px -20px rgba(20, 24, 32, .4); padding: 6px; max-height: 60vh; overflow: auto; z-index: 5; }
.results a { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 12px; border-radius: 8px; }
.results a:hover, .results a:focus-visible { background: var(--gray); }
.results small { color: var(--muted); } .results .none { padding: 12px; color: var(--muted); }
.acct { display: inline-flex; align-items: center; gap: 10px; flex: none; text-align: start; }
.acct svg { width: 30px; height: 30px; stroke: var(--ablue); }
.acct small { display: block; font-size: .72rem; color: var(--muted); line-height: 1.2; } .acct b { display: block; font-size: .92rem; font-weight: 700; line-height: 1.3; color: var(--ablue); }
@media (max-width: 860px) { .acct span, .catbtn span.t { display: none; } .brand img { height: 40px; } .head .wrap { gap: 10px; } }

/* mega menu */
.mega { position: absolute; inset-inline: 0; top: 100%; background: #fff; border-top: 1px solid var(--line); box-shadow: 0 30px 40px -24px rgba(0, 0, 0, .5); }
.mega .wrap { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; padding-block: 26px 30px; }
.mega h3 { font-size: .95rem; font-weight: 700; color: var(--blue); padding-bottom: 8px; margin-bottom: 8px; border-bottom: 3px solid var(--gold); display: inline-block; }
.mega a { display: block; padding: 5px 0; color: var(--muted); font-weight: 500; }
.mega a:hover { color: var(--blue); }
@media (max-width: 860px) { .mega .wrap { grid-template-columns: repeat(2, 1fr); } }


.mega a { font-weight: 400; }

/* stats strip: same gray and type as the top bar */
.stats { background: var(--gray); border-bottom: 1px solid #E7E8EB; }
.stats .wrap { display: grid; grid-template-columns: repeat(4, 1fr); }
.stats .it { display: flex; align-items: baseline; justify-content: center; gap: 8px; padding: 12px 8px; font-size: .86rem; color: var(--ink); }
.stats b { font-size: 1.35rem; font-weight: 700; direction: ltr; unicode-bidi: isolate; font-variant-numeric: tabular-nums; display: inline-block; min-width: 2.2ch; text-align: center; }
.stats.on b { animation: pop .6s ease; }
@keyframes pop { 0% { transform: translateY(8px); opacity: 0; } 100% { transform: none; opacity: 1; } }
@media (max-width: 640px) { .stats .wrap { grid-template-columns: repeat(2, 1fr); } .stats .it { padding: 8px; } }

/* ad slots: each one is a placeholder until an image is set in ADS['id'] */
.ad { position: relative; display: block; border-radius: 10px; overflow: hidden; background: repeating-linear-gradient(135deg, #F6F6F7 0 14px, #EEEFF1 14px 28px); border: 2px dashed #CDD0D5; color: var(--slate); min-width: 0; }
.ad.has { border: 0; background: none; }
.ad img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ad .ph-txt { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; gap: 2px; padding: 8px; }
.ad .ph-txt b { font-size: clamp(.8rem, 1.5vw, 1.05rem); font-weight: 700; } .ad .ph-txt span { font-size: .72rem; color: var(--muted); direction: ltr; unicode-bidi: isolate; }
.ads-stack { display: grid; gap: 12px; margin-top: 14px; }
.ads-stack .slot { position: relative; } .ads-stack .track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; border-radius: 10px; } .ads-stack .track::-webkit-scrollbar { display: none; }
.ads-stack .track > .ad { flex: 0 0 100%; scroll-snap-align: start; aspect-ratio: 1600 / 531; }
.dots2 { position: absolute; bottom: 10px; inset-inline: 0; display: flex; justify-content: center; gap: 6px; z-index: 3; }
.dots2 button { width: 8px; height: 8px; padding: 0; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .7); box-shadow: 0 0 0 1px rgba(0, 0, 0, .25); } .dots2 button[aria-current="true"] { background: var(--ayellow); width: 20px; border-radius: 5px; }
@media (max-width: 700px) { .ads-stack .track > .ad { aspect-ratio: 1600 / 531; } }

/* sections */
.sec { padding-top: clamp(20px, 3vw, 32px); }
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.sec-head h2 { font-size: 1.05rem; font-weight: 700; color: var(--ink); }
.sec-head a { color: var(--muted); font-size: .84rem; } .sec-head a:hover { color: var(--ink); }
.arrow { position: absolute; top: 40%; z-index: 3; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: #fff; color: var(--ink); box-shadow: 0 6px 14px -6px rgba(0, 0, 0, .35); display: grid; place-items: center; }
.arrow svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.arrow.prev { inset-inline-start: -8px; } .arrow.next { inset-inline-end: -8px; } .arrow:hover { background: var(--gray); }
@media (max-width: 800px) { .arrow { display: none; } }

/* categories */
.catrow { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px clamp(18px, 4vw, 48px); }
.cat { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 120px; text-align: center; font-size: .8rem; color: var(--ink); line-height: 1.5; }
.cat .ic { width: 76px; height: 76px; border-radius: 50%; background: var(--gray); display: grid; place-items: center; border: 1px solid transparent; transition: border-color .2s ease, background .2s ease; }
.cat .ic svg { width: 36px; fill: none; stroke: var(--slate); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.cat:hover .ic { border-color: var(--red); background: #fff; } .cat:hover .ic svg { stroke: var(--red); }

/* brands marquee (keeps moving) */
.marq { overflow: hidden; direction: ltr; }
.marq-track { display: flex; width: max-content; animation: marq 38s linear infinite; }
.marq:hover .marq-track { animation-play-state: paused; }
.brand-t { flex: none; width: 118px; height: 60px; margin-inline-end: 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; display: grid; place-items: center; padding: 8px; font-size: .72rem; color: var(--muted); }
.brand-t img { max-height: 40px; max-width: 100%; width: auto; height: auto; object-fit: contain; }
@keyframes marq { to { transform: translateX(-50%); } }

/* image slot (replace with real photos later) */
.ph { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: #F6F7F8; display: grid; place-items: center; }
.ph::before { content: ''; position: absolute; width: 74%; aspect-ratio: 1.3; border: 10px solid rgba(255, 255, 255, .9); border-radius: 50%; transform: rotate(-18deg); left: -14%; bottom: -26%; }
.ph svg { position: relative; width: 38%; height: auto; fill: none; stroke: var(--blue); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; opacity: .9; }
.ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.ph .lbl { position: absolute; inset-inline: 0; bottom: 10px; text-align: center; font-size: .68rem; color: var(--muted); font-weight: 400; }


/* products */
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.card { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 10px 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; transition: box-shadow .2s ease; min-width: 0; }
.card:hover { box-shadow: var(--shadow); }
.badge { position: absolute; z-index: 2; top: 16px; inset-inline-start: 16px; padding: 2px 10px; border-radius: 6px; font-size: .72rem; font-weight: 700; background: var(--red); color: #fff; } .badge.hot { background: var(--slate); }
.card .tagline { font-size: .72rem; color: var(--muted); }
.card h3 { font-size: .88rem; font-weight: 500; color: var(--ink); line-height: 1.5; min-height: 2.6em; }
.ask { font-size: .78rem; color: var(--muted); font-weight: 500; }
.book { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.qty { display: inline-flex; align-items: center; height: 36px; border: 1px solid var(--line); border-radius: 8px; flex: none; }
.qty button { width: 28px; height: 34px; border: 0; background: transparent; font-size: 1.1rem; color: var(--ink); }
.qty button:hover { color: var(--red); }
.qty output { min-width: 22px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.add { position: relative; overflow: hidden; flex: 1; min-width: 0; height: 36px; border-radius: 8px; color: #fff; display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-weight: 700; font-size: .85rem; isolation: isolate;
  background: linear-gradient(100deg, var(--ablue-d), var(--ablue), #4C86FF, var(--ablue), var(--ablue-d)); background-size: 250% 100%; animation: flow 4.5s linear infinite; }
.add::after { content: ''; position: absolute; inset: 0; z-index: -1; width: 40%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .38), transparent); transform: translateX(-160%) skewX(-18deg); animation: sheen 3.6s ease-in-out infinite; }
.add:hover { filter: brightness(1.08); }
@keyframes flow { to { background-position: -250% 0; } }
@keyframes sheen { 0%, 55% { transform: translateX(-160%) skewX(-18deg); } 100% { transform: translateX(380%) skewX(-18deg); } }
.add svg { width: 16px; height: 16px; fill: currentColor; }
.carousel { position: relative; }
.row-track { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; padding-block: 2px 8px; }
.row-track::-webkit-scrollbar { display: none; }
.row-track .card { flex: 0 0 clamp(168px, 18.5%, 230px); scroll-snap-align: start; }
@media (max-width: 1000px) { .grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 680px) { .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; } .card { padding: 8px 8px 10px; } .book { flex-direction: column; align-items: stretch; } .qty { justify-content: space-between; } .row-track .card { flex-basis: 46%; } }

/* category page */
.crumbs { display: flex; flex-wrap: wrap; gap: 6px 10px; padding-block: 12px 4px; color: var(--muted); font-size: .8rem; }
.crumbs a:hover { color: var(--blue); } .crumbs b { color: var(--blue); font-weight: 700; }
.cat-title { display: flex; align-items: end; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-block: 8px 20px; }
.cat-title h1 { font-size: clamp(1.3rem, 2.2vw, 1.7rem); font-weight: 700; color: var(--ink); }
.cat-title span { color: var(--muted); font-size: .85rem; }
.layout { display: grid; grid-template-columns: 220px 1fr; gap: 20px; align-items: start; padding-bottom: 20px; }
.side { position: sticky; top: 100px; border: 1px solid var(--line); border-radius: 10px; padding: 14px; background: #fff; }
.side h3 { font-size: .92rem; font-weight: 700; color: var(--blue); padding-bottom: 8px; border-bottom: 3px solid var(--ayellow); margin-bottom: 10px; }
.side label { display: flex; align-items: center; gap: 10px; padding: 5px 4px; cursor: pointer; font-weight: 400; font-size: .88rem; border-radius: 10px; }
.side label:hover { background: var(--pale); }
.side input { accent-color: var(--blue); width: 18px; height: 18px; }
.side .sort { margin-top: 18px; }
.side select { width: 100%; min-height: 38px; border: 1px solid var(--line); border-radius: 8px; padding: 0 10px; background: #fff; font-size: .88rem; }
.empty { grid-column: 1 / -1; text-align: center; color: var(--muted); padding: 40px 12px; }
@media (max-width: 860px) { .layout { grid-template-columns: 1fr; } .side { position: static; display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; } .side h3 { border: 0; margin: 0; padding: 0; } .side .grp { display: flex; flex-wrap: wrap; gap: 6px; } .side label { border: 2px solid var(--line); border-radius: 999px; padding: 4px 14px; } .side .sort { margin: 0; flex: 1; min-width: 160px; } }


/* footer */
footer.site { margin-top: clamp(40px, 6vw, 72px); }
.fsub { position: relative; background: #F1F2F4; padding-block: 44px 30px; }
.fsub .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 26px 40px; max-width: 1180px; }
.fsub h4 { margin: 0 0 14px; font-size: .84rem; font-weight: 700; color: var(--ink); }
.subform { display: flex; width: min(100%, 580px); border-radius: 999px; overflow: hidden; background: #fff; }
.subform input { flex: 1; min-width: 0; height: 42px; border: 0; padding: 0 18px; outline: none; font-size: .86rem; }
.subform button { flex: none; border: 0; background: #ECEDEF; color: var(--ink); padding: 0 26px; font-size: .9rem; } .subform button:hover { background: #E1E3E6; }
.subs { flex: 1 1 380px; }
.soc { display: flex; gap: 14px; flex-wrap: wrap; }
.soc a { width: 46px; height: 46px; border-radius: 8px; background: #fff; display: grid; place-items: center; box-shadow: 0 1px 3px rgba(20, 24, 32, .1); transition: transform .15s ease; } .soc a:hover { transform: translateY(-2px); }
.soc svg { width: 26px; height: 26px; }
.totop { position: absolute; top: -20px; inset-inline-start: calc(50% - 560px); width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--slate); color: #fff; display: grid; place-items: center; }
.totop svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 1220px) { .totop { inset-inline-start: 16px; } }
.flinks { background: var(--slate); color: #fff; padding-block: 18px; text-align: center; font-size: .88rem; font-weight: 700; }
.flinks a { padding: 0 14px; } .flinks a + a { border-inline-start: 1px solid rgba(255, 255, 255, .8); } .flinks a:hover { text-decoration: underline; }
.fcopy { background: var(--dark); color: #fff; text-align: center; padding: 16px 12px; font-size: .86rem; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .marq-track, .add, .add::after { animation: none; } .stats.on b { animation: none; } }

/* ====== المتجر الحقيقي: عناصر إضافية فوق التصميم الأصلي ====== */
.util .cursel { border: 0; background: transparent; font: inherit; color: var(--ink); font-weight: 700; padding: 2px 4px; cursor: pointer; }
.cartbtn { position: relative; flex: none; width: 44px; height: 44px; border-radius: 10px; border: 0; background: var(--gray); display: grid; place-items: center; color: var(--ablue); }
.cartbtn svg { width: 24px; height: 24px; } .cartbtn:hover { background: #E9EBEF; }
.cartbtn b { position: absolute; top: -5px; inset-inline-start: -5px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; background: var(--red); color: #fff; font-size: .7rem; display: grid; place-items: center; }
.price { font-size: .95rem; font-weight: 700; color: var(--ink); } .price small { font-weight: 500; color: var(--muted); font-size: .72rem; }
.stock { font-size: .72rem; font-weight: 700; } .stock.low { color: #B7791F; } .stock.out { color: var(--red); } .stock.ok { color: #1D7A46; }
.badge.out { background: #6B7280; } .badge.low { background: var(--ayellow); color: #3B3200; }
.card .nm { color: inherit; } .card h3 a:hover { color: var(--ablue); }
.cartadd { flex: none; width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--line); background: #fff; display: grid; place-items: center; color: var(--ink); }
.cartadd svg { width: 19px; height: 19px; } .cartadd:hover:not(:disabled) { border-color: var(--ablue); color: var(--ablue); } .cartadd:disabled { opacity: .4; cursor: not-allowed; }
.ph img { object-fit: contain; background: #fff; }
.more { display: block; margin: 18px auto 0; min-height: 40px; padding: 0 28px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font-weight: 700; }
.more:hover { border-color: var(--ink); }
.side label.chk { padding: 8px 4px; }

/* صفحة المنتج */
.pdp { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(20px, 4vw, 48px); padding-block: 12px 8px; align-items: start; }
.gal .big { aspect-ratio: 1; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; display: grid; place-items: center; }
.gal .big img { width: 100%; height: 100%; object-fit: contain; }
.gal .ph { height: 100%; width: 100%; border-radius: 0; }
.thumbs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; } .thumbs button { width: 64px; height: 64px; padding: 0; border: 2px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; } .thumbs button[aria-current="true"] { border-color: var(--ablue); } .thumbs img { width: 100%; height: 100%; object-fit: cover; }
.info h1 { font-size: 1.4rem; font-weight: 700; line-height: 1.5; }
.info .meta { color: var(--muted); font-size: .84rem; margin-top: 4px; display: flex; gap: 14px; flex-wrap: wrap; }
.info .bigprice { font-size: 1.7rem; font-weight: 700; margin-block: 14px 4px; }
.info .actions { display: flex; flex-wrap: wrap; gap: 10px; margin-block: 16px; align-items: center; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 22px; border: 0; border-radius: 10px; font: inherit; font-weight: 700; font-size: .95rem; line-height: 1.2; cursor: pointer; text-decoration: none; color: #fff; text-align: center; }
.btn:hover:not(:disabled) { filter: brightness(1.06); }
.wai { width: 20px; height: 20px; flex: none; border-radius: 50%; display: inline-block; vertical-align: middle; }
.btn .wai { width: 28px; height: 28px; }
.info .actions .btn { min-width: 150px; }
.btn-cart { background: var(--slate); color: #fff; } .btn-cart:hover:not(:disabled) { background: var(--dark); } .btn-cart:disabled { opacity: .45; cursor: not-allowed; }
.btn-book { position: relative; overflow: hidden; color: #0E7A36; background: #fff; box-shadow: inset 0 0 0 2px #25D366; } .btn-book:hover { background: #F0FBF4; }
.desc { white-space: pre-line; line-height: 1.9; color: #3a4150; border-top: 1px solid var(--line); padding-top: 14px; margin-top: 8px; }
@media (max-width: 800px) { .pdp { grid-template-columns: 1fr; } }

/* السلة */
.scrim { position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, .5); }
.drawer { position: fixed; z-index: 61; top: 0; bottom: 0; left: 0; width: min(430px, 100%); background: #fff; display: flex; flex-direction: column; box-shadow: 30px 0 60px -20px rgba(0, 0, 0, .5); }
.drawer header { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--line); } .drawer h2 { font-size: 1.1rem; }
.x { width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--gray); font-size: 1.3rem; }
.lines { flex: 1; overflow: auto; padding: 6px 18px; list-style: none; margin: 0; }
.lines li { display: grid; grid-template-columns: 56px 1fr auto; gap: 10px; align-items: center; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.lines .im { width: 56px; height: 56px; border-radius: 8px; background: var(--gray); overflow: hidden; } .lines .im img { width: 100%; height: 100%; object-fit: cover; }
.lines .t { min-width: 0; font-size: .88rem; line-height: 1.5; } .lines .t small { display: block; color: var(--muted); }
.lines .none { display: block; color: var(--muted); border: 0; padding: 26px 0; text-align: center; }
.lines .err { color: var(--red); font-size: .78rem; }
.lines .rm { border: 0; background: none; color: var(--muted); font-size: .76rem; text-decoration: underline; padding: 2px; }
.drawer footer { padding: 14px 18px calc(16px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); display: grid; gap: 8px; }
.sum { display: flex; justify-content: space-between; font-size: .9rem; } .sum.tot { font-size: 1.05rem; font-weight: 700; }
.hint { font-size: .78rem; color: var(--muted); line-height: 1.6; }
.notice { padding: 10px 12px; border-radius: 8px; background: #FFF7DB; border: 1px solid #F0DC8A; font-size: .84rem; line-height: 1.7; }
.notice.err { background: #FDECEC; border-color: #F3B7B5; color: #8A1D1A; } .notice.ok { background: #E8F6EE; border-color: #9DD5B4; color: #14532D; }

/* إتمام الطلب */
.co { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 24px; padding-block: 12px 8px; align-items: start; }
.box { border: 1px solid var(--line); border-radius: 12px; padding: 16px; background: #fff; }
.box h2 { font-size: 1rem; margin-bottom: 12px; }
.fld { display: grid; gap: 5px; margin-bottom: 12px; } .fld label { font-size: .82rem; font-weight: 700; }
.fld input, .fld select, .fld textarea { width: 100%; min-height: 42px; border: 1px solid #D5D8DE; border-radius: 8px; padding: 8px 12px; background: #fff; }
.fld input:focus, .fld select:focus, .fld textarea:focus { outline: 2px solid var(--ablue); outline-offset: 0; border-color: var(--ablue); }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.seg label { display: flex; align-items: center; gap: 8px; border: 1px solid #D5D8DE; border-radius: 8px; padding: 10px 12px; cursor: pointer; font-weight: 700; font-size: .88rem; } .seg label:has(input:checked) { border-color: var(--ablue); background: #F0F5FF; }
.co .lines { padding: 0; } .co .lines li { grid-template-columns: 48px 1fr auto; }
@media (max-width: 860px) { .co { grid-template-columns: 1fr; } }
.ok-card { max-width: 640px; margin: 24px auto; text-align: center; }
.ok-card .no { font-size: 1.5rem; font-weight: 700; direction: ltr; letter-spacing: .06em; margin: 8px 0; }
.toast { position: fixed; z-index: 80; bottom: 22px; inset-inline: 0; margin-inline: auto; width: max-content; max-width: calc(100% - 32px); background: var(--dark); color: #fff; padding: 10px 18px; border-radius: 10px; font-size: .88rem; box-shadow: 0 14px 30px -12px rgba(0, 0, 0, .5); }
.track-form { max-width: 520px; margin: 20px auto; }
.sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---- تحسينات الجوال ---- */
.flinks { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 0; }
.flinks a { white-space: nowrap; }
@media (max-width: 560px) {
  .util .wrap { flex-wrap: wrap; gap: 4px 10px; padding-block: 4px; }
  #uwa b { font-size: .8rem; }
  .cursel { max-width: 130px; }
}
