:root {
  --bg: #f6f6f7;
  --surface: #ffffff;
  --surface-2: #f4f4f6;
  --line: #e2e2e8;
  --text: #17171c;
  --muted: #62626e;
  --accent: #7c3aed;
  --accent-hover: #6d28d9;
  --accent-soft: #f3edff;
  --accent-ink: #ffffff;
  --danger: #be123c;
  --danger-soft: #fff1f3;
  --radius: 16px;
  --shadow-sm: 0 1px 2px rgba(23, 23, 28, .04);
  --shadow: 0 1px 2px rgba(23, 23, 28, .04), 0 8px 24px rgba(23, 23, 28, .06);
  --shadow-lg: 0 2px 4px rgba(23, 23, 28, .04), 0 20px 44px rgba(23, 23, 28, .12);
  --pastel:
    radial-gradient(38% 130% at 6% 50%, #ffd3ee 0, transparent 72%),
    radial-gradient(38% 150% at 94% 50%, #e2d5ff 0, transparent 72%),
    linear-gradient(90deg, #fdf1f8, #edf6ff 50%, #f2ecff);
  --font: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, system-ui, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }

/* ---------- عناصر مشتركة ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 18px; border-radius: 11px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
  font-weight: 600; font-size: .92rem; white-space: nowrap;
  box-shadow: var(--shadow-sm);
  transition: background .15s, border-color .15s, box-shadow .15s, transform .15s;
}
.btn:hover { border-color: #cfd4e1; background: #fafbfd; transform: translateY(-1px); }
.btn:active { transform: translateY(1px) scale(.985); }
.btn.primary { background: var(--text); border-color: var(--text); color: #fff; box-shadow: none; }
.btn.primary:hover { background: #2e2e38; border-color: #2e2e38; }
.btn.lg { padding: 12px 24px; font-size: 1rem; border-radius: 13px; }
.btn svg { width: 16px; height: 16px; flex: none; }

/* ---------- الصفحة الرئيسية ---------- */
.sheet {
  max-width: 1200px; margin: 36px auto; padding: 26px 40px 40px;
  background: var(--surface); border-radius: 28px;
  box-shadow: 0 1px 2px rgba(23, 23, 28, .04), 0 12px 40px rgba(23, 23, 28, .07);
}
.top { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; padding: 4px 0 26px; }
.top > .lang-btn { justify-self: end; }
.logo { width: 34px; height: 34px; flex: none; display: block; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 1.2rem; justify-self: start; margin-inline-start: 8px; }
.brand-mark { width: 24px; height: 24px; border: 2.5px solid var(--accent); border-radius: 8px; position: relative; flex: none; }
.brand-mark::after {
  content: ""; position: absolute; bottom: -6px; inset-inline-end: -6px; width: 9px; height: 9px;
  border: 2.5px solid var(--accent); border-radius: 4px; background: var(--surface);
}
.links { display: flex; gap: 30px; font-weight: 500; font-size: .98rem; color: var(--muted); }
.links a:hover, .links a.on { color: var(--text); }
.links a, .crumbs a, .card h2 a {
  background: linear-gradient(currentColor, currentColor) 100% 100% / 0 1.5px no-repeat;
  transition: background-size .25s, color .15s; padding-bottom: 2px;
}
.links a:hover, .crumbs a:hover, .card h2 a:hover { background-size: 100% 1.5px; }
.links a.on { font-weight: 600; }

.tabs { display: flex; justify-content: center; gap: 34px; padding: 6px 0 24px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  border: 0; background: none; padding: 4px 0 10px; position: relative; flex: none;
  color: var(--muted); font-weight: 500; font-size: .98rem; white-space: nowrap;
}
.tab:hover { color: var(--text); }
.tab[aria-pressed="true"] { color: var(--text); font-weight: 600; }
.tab[aria-pressed="true"]::after {
  content: ""; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 18px; height: 2px; border-radius: 2px; background: var(--text);
  animation: tab-in .25s ease-out;
}
@keyframes tab-in { from { width: 0; } }
@keyframes enter { from { opacity: 0; transform: translateY(10px); } }
.banner:not(.contact), .lead, .p-title, .p-meta { animation: enter .5s cubic-bezier(.2, .7, .2, 1) both; }
.lead, .p-meta { animation-delay: .08s; }

.subcats { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; padding: 0 0 22px; }
.chip { border: 1.5px solid var(--line); background: var(--surface); color: var(--muted); border-radius: 999px; padding: 4px 14px; font-size: .88rem; font-weight: 500; transition: border-color .15s, color .15s; }
.chip:hover { color: var(--text); border-color: #c9c9d2; }
.chip[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-hover); font-weight: 600; }
.chip[aria-pressed="true"]::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-inline-end: 8px; vertical-align: 2px; }
.more { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 0 0 44px; color: var(--muted); }
.grid:has(+ .more:not([hidden])) { padding-bottom: 28px; }
.banner { background: var(--pastel); border-radius: 12px; padding: 12px 24px; text-align: center; }
.banner p { margin: 0; font-size: .96rem; }

.lead { padding: 48px 0 30px; }
.lead h1 { font-size: clamp(1.7rem, 4vw, 2.3rem); line-height: 1.35; margin: 0 0 6px; font-weight: 600; letter-spacing: -.01em; }
.lead p { margin: 0; color: var(--muted); }

.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding-bottom: 18px; scroll-margin-top: 20px; }
.sec-head h2 { margin: 0; font-size: 1.3rem; font-weight: 600; display: flex; align-items: center; gap: 10px; }
.sec-head h2 svg { width: 22px; height: 22px; }
.search {
  background: var(--surface); border: 1.5px solid var(--line); border-radius: 12px;
  padding: 9px 14px; color: var(--text); font: inherit; font-size: .92rem; width: 250px; max-width: 100%;
}
.search::placeholder { color: #9a9aa6; }
.search:focus { outline: none; border-color: var(--text); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 28px 22px; padding-bottom: 48px; }
.card { display: flex; flex-direction: column; min-width: 0; }
.cover {
  aspect-ratio: 2 / 1; position: relative; display: block; border-radius: 14px; overflow: hidden;
  background:
    radial-gradient(60% 75% at 88% 12%, color-mix(in srgb, var(--c1) 34%, #fff) 0, transparent 72%),
    radial-gradient(65% 85% at 15% 95%, color-mix(in srgb, var(--c2) 30%, #fff) 0, transparent 72%),
    #f3f4fa;
}
.cover > img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .45s cubic-bezier(.2, .7, .2, 1); }
.cover-art { transition: transform .45s cubic-bezier(.2, .7, .2, 1); transform-origin: 50% 100%; }
.card:hover .cover > img, .card:hover .cover-art { transform: scale(1.03); }
.cover-art { position: absolute; inset: 0; display: flex; align-items: flex-end; justify-content: center; gap: 12px; padding: 26px 30px 0; }
.cover-art i { display: block; background: rgba(255, 255, 255, .9); box-shadow: 0 8px 24px rgba(23, 23, 28, .08); position: relative; }
.cover-art .scr { flex: 1; height: 78%; border-radius: 9px 9px 0 0; }
.cover-art .scr::before { content: ""; position: absolute; top: 9px; inset-inline-start: 10px; width: 5px; height: 5px; border-radius: 50%; background: #d5d5de; box-shadow: -9px 0 #d5d5de, -18px 0 #d5d5de; }
.cover-art .scr::after { content: ""; position: absolute; top: 26px; inset-inline: 12px; height: 7px; border-radius: 4px; background: #ececf2; box-shadow: 0 16px 0 #f1f1f6, 0 32px 0 #f1f1f6; }
.cover-art .ph { width: 20%; height: 92%; border-radius: 12px 12px 0 0; }
.cover-art .ph::after { content: ""; position: absolute; top: 12px; inset-inline: 8px; height: 24%; border-radius: 5px; background: #ececf2; }
.cover-art i { overflow: hidden; }
.cover-art i img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.cover-art.real i:not(.has-img) { display: none; }
.cover-art .scr.has-img { padding-top: 22px; box-shadow: 0 10px 30px rgba(23, 23, 28, .14); }
.cover-art .scr.has-img::after, .cover-art .ph.has-img::after { display: none; }
.cover-art .ph.has-img { border: 3px solid #1e1e26; border-bottom: 0; box-shadow: 0 10px 30px rgba(23, 23, 28, .18); min-width: 64px; }
.cover-cat {
  position: absolute; bottom: 10px; inset-inline-start: 10px;
  background: linear-gradient(90deg, #6d5efc, #d946ef); color: #fff;
  padding: 1px 10px; border-radius: 7px; font-size: .78rem; font-weight: 600;
}
.card-body { padding: 14px 2px 0; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card h2 { margin: 0; font-size: 1.08rem; line-height: 1.5; font-weight: 600; }
.card p { margin: 0; color: var(--muted); font-size: .92rem; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: .76rem; color: var(--muted); background: var(--surface-2); border-radius: 6px; padding: 2px 9px; direction: ltr; font-weight: 500; }
.pv-list { display: grid; gap: 8px; margin-top: auto; padding-top: 8px; }
.pv-row {
  display: flex; align-items: center; gap: 12px; padding: 9px 10px;
  border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface);
  transition: border-color .15s, box-shadow .2s, transform .2s;
}
.pv-row:hover { border-color: var(--text); box-shadow: var(--shadow-sm); transform: translateY(-2px); }
.pv-row:active { transform: translateY(0); }
.pv-go { transition: transform .2s; }
.pv-row:hover .pv-go { transform: translateX(-4px); }
.pv-ic { width: 38px; height: 38px; border-radius: 9px; flex: none; display: grid; place-items: center; background: var(--text); color: #fff; }
.pv-ic.mobile { background: var(--accent); }
.pv-ic.tablet { background: #0ea5e9; }
.pv-ic svg { width: 19px; height: 19px; }
.pv-txt { flex: 1; min-width: 0; line-height: 1.4; }
.pv-txt b { display: block; font-size: .93rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-txt small { color: var(--muted); font-size: .84rem; }
.pv-go { width: 18px; height: 18px; flex: none; color: var(--muted); }
.pv-row:hover .pv-go { color: var(--text); }
.empty { color: var(--muted); padding: 40px 0 60px; text-align: center; grid-column: 1 / -1; }

.banner.contact { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; text-align: start; padding: 26px 30px; border-radius: 16px; scroll-margin-top: 20px; }
.contact h3 { margin: 0 0 2px; font-size: 1.2rem; font-weight: 600; }
.contact p { color: var(--muted); }
.foot-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.contact .tag { background: rgba(255, 255, 255, .7); direction: rtl; padding: 6px 12px; font-size: .85rem; color: var(--text); }

/* ---------- صفحة تفاصيل العمل ---------- */
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: .9rem; padding-top: 6px; }
.crumbs a:hover { color: var(--text); }
.p-title { font-size: clamp(1.6rem, 3.6vw, 2.2rem); line-height: 1.4; font-weight: 600; margin: 10px 0 8px; letter-spacing: -.01em; }
.p-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; color: var(--muted); font-size: .93rem; padding-bottom: 24px; }
.p-meta .cover-cat { position: static; }
.p-meta .fresh { color: #15803d; font-weight: 600; }
.p-cols { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 34px; align-items: start; }
.p-hero { border: 1.5px solid var(--line); border-radius: 18px; padding: 12px; }
.p-hero .cover { aspect-ratio: 16 / 9; }
.p-hero-btns { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; padding: 14px 0 4px; }
.sec { padding-top: 34px; }
.sec > h2 { font-size: 1.25rem; font-weight: 600; margin: 0 0 14px; padding-bottom: 10px; border-bottom: 1.5px solid var(--line); scroll-margin-top: 20px; }
.prose { font-size: 1.02rem; line-height: 1.95; color: #2d2d36; }
.prose p { margin: 0 0 14px; }
.prose h3 { font-size: 1.1rem; font-weight: 600; margin: 24px 0 8px; color: var(--text); }
.prose ul { margin: 0 0 14px; padding-inline-start: 22px; }
.prose li { margin-bottom: 4px; }
.prose strong { color: var(--text); font-weight: 600; }
.feats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px 20px; }
.feats li { display: flex; align-items: flex-start; gap: 10px; }
.feats li::before {
  content: ""; width: 20px; height: 20px; flex: none; margin-top: 4px; border-radius: 6px;
  background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 13px no-repeat;
}
.gallery { display: flex; flex-wrap: wrap; gap: 12px; }
.gallery button { padding: 0; border: 1.5px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface-2); height: 190px; transition: border-color .15s; }
.gallery button:hover { border-color: var(--text); }
.gallery img { height: 100%; width: auto; max-width: 100%; display: block; object-fit: cover; transition: transform .45s cubic-bezier(.2, .7, .2, 1); }
.gallery button:hover img { transform: scale(1.03); }
.demo { display: grid; gap: 12px; }
.demo-item { border: 1.5px solid var(--line); border-radius: 14px; padding: 14px; }
.demo-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.demo-head .pv-txt { min-width: 120px; }
.demo-creds { margin-top: 12px; padding-top: 4px; border-top: 1px solid var(--line); }
.demo-cred { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; padding: 8px 0 0; font-size: .9rem; color: var(--muted); }
.demo-cred b { color: var(--text); font-weight: 600; min-width: 60px; }
.demo-cred span { display: inline-flex; align-items: center; gap: 8px; }
.demo-cred code { direction: ltr; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .86rem; color: var(--text); background: var(--surface-2); padding: 1px 8px; border-radius: 6px; }

.p-side { display: grid; gap: 16px; position: sticky; top: 20px; }
.box { border: 1.5px solid var(--line); border-radius: 16px; padding: 20px; display: grid; gap: 12px; }
.box.buy { background: var(--pastel); border-color: transparent; }
.price { font-size: 2rem; font-weight: 700; line-height: 1.2; direction: ltr; text-align: end; }
.box h3 { margin: 0; font-size: 1.05rem; font-weight: 600; }
.box p { margin: 0; color: var(--muted); font-size: .92rem; }
.box .btn { width: 100%; }
.attrs { margin: 0; display: grid; gap: 12px; font-size: .93rem; }
.attrs div { display: flex; justify-content: space-between; gap: 14px; align-items: baseline; }
.attrs dt { font-weight: 600; flex: none; }
.attrs dd { margin: 0; color: var(--muted); text-align: end; }
.attrs .tags { justify-content: flex-end; }

.lb { position: fixed; inset: 0; z-index: 50; background: rgba(15, 15, 20, .88); display: grid; place-items: center; padding: 56px 16px 60px; }
.lb img { max-width: 100%; max-height: calc(100vh - 116px); border-radius: 10px; background: #fff; }
.lb button { position: absolute; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .14); color: #fff; display: grid; place-items: center; }
.lb button:hover { background: rgba(255, 255, 255, .26); }
.lb button svg { width: 20px; height: 20px; }
.lb .lb-x { top: 12px; inset-inline-end: 14px; }
.lb .lb-prev { top: 50%; right: 14px; transform: translateY(-50%); }
.lb .lb-next { top: 50%; left: 14px; transform: translateY(-50%); }
.lb-count { position: absolute; bottom: 18px; left: 0; right: 0; text-align: center; color: rgba(255, 255, 255, .8); font-size: .9rem; }

@media (max-width: 900px) {
  .p-cols { grid-template-columns: minmax(0, 1fr); }
  .p-side { position: static; }
  .gallery button { height: 150px; }
}

/* ---------- اللغة ---------- */
.lang-btn { border: 1.5px solid var(--line); background: none; border-radius: 8px; padding: 1px 10px; font: inherit; font-size: .86rem; font-weight: 600; color: inherit; line-height: 1.7; }
.lang-btn:hover { border-color: currentColor; }
.links, .it-top-links { align-items: center; }
[dir="ltr"] .pv-go, [dir="ltr"] #back svg { transform: scaleX(-1); }
[dir="ltr"] .pv-row:hover .pv-go { transform: scaleX(-1) translateX(-4px); }
[dir="ltr"] .lb .lb-prev { right: auto; left: 14px; }
[dir="ltr"] .lb .lb-next { left: auto; right: 14px; }
[dir="ltr"] .lb .lb-prev svg, [dir="ltr"] .lb .lb-next svg { transform: scaleX(-1); }
[dir="ltr"] .it-crumbs i, [dir="ltr"] .crumbs span { display: inline-block; }
[dir="ltr"] .it-crumbs i { transform: scaleX(-1); }

/* ---------- صفحة العمل بتخطيط صفحات المتاجر الرقمية ---------- */
body.item { background: #fff; color: #545454; font-size: 16px; line-height: 1.75; }
.it-wrap { max-width: 1060px; margin: 0 auto; padding: 0 20px; }
.it-top { background: rgba(255, 255, 255, .96); backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px); color: var(--text); position: sticky; top: 0; z-index: 30; border-bottom: 1px solid var(--line); }
.it-wrap.wide { max-width: 1200px; }
.it-top-links a { padding: 6px 14px; border-radius: 999px; transition: background .15s, color .15s; }
.it-top-links a:hover { background: var(--surface-2); }
.it-top-links a.on { color: var(--text); font-weight: 600; background: var(--surface-2); }
.it-top-links a.cta { background: var(--text); color: #fff; font-weight: 600; margin-inline-start: 6px; }
.it-top-links a.cta:hover { background: #2e2e38; color: #fff; }
.site-foot { background: var(--surface); color: var(--muted); margin-top: 8px; border-top: 1px solid var(--line); }
.site-foot-in { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 14px 16px; padding-top: 22px; padding-bottom: 22px; }
.site-foot small { justify-self: end; font-size: .84rem; }
body.home .sheet { margin-top: 28px; margin-bottom: 28px; padding-top: 30px; }
body.item .it-body { padding-bottom: 48px; }
.it-top-in { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; min-height: 68px; }
.it-top-in > .lang-btn { justify-self: end; border-color: var(--line); color: var(--text); padding: 3px 14px; border-radius: 999px; }
.it-top-in > .lang-btn:hover { border-color: var(--text); }
.it-brand { display: flex; align-items: center; gap: 10px; justify-self: start; margin-inline-start: 8px; font-size: 1.25rem; font-weight: 700; color: var(--text); letter-spacing: -.01em; }
.it-top-links { display: flex; gap: 4px; color: var(--muted); font-size: .95rem; font-weight: 500; }
.it-top-links a:hover { color: var(--text); }
.it-sub { background: #f5f5f5; border-bottom: 1px solid #e1e8ed; }
.it-sub-in { display: flex; align-items: center; gap: 18px; min-height: 48px; }
.it-cats { display: flex; gap: 22px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; font-size: .9rem; color: #545454; white-space: nowrap; }
.it-cats::-webkit-scrollbar { display: none; }
.it-cats a:hover, .it-cats a.on { color: #000; }
.it-search { display: flex; flex: none; border: 1px solid #d5d9dd; border-radius: 4px; background: #fff; overflow: hidden; }
.it-search input { border: 0; padding: 6px 10px; font: inherit; font-size: .9rem; width: 150px; background: none; color: #333; }
.it-search input:focus { outline: none; }
.it-search:focus-within { border-color: #0084b4; }
.it-search button { border: 0; background: none; padding: 0 8px; color: #999; display: grid; place-items: center; }
.it-search svg { width: 16px; height: 16px; }

.it-head { background: #fafafa; border-bottom: 1px solid #e1e8ed; padding-top: 14px; }
.it-crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: .86rem; color: #545454; align-items: center; }
.it-crumbs i { font-style: normal; color: #b0b0b0; }
.it-crumbs a:hover { color: #0084b4; }
.it-title { margin: 12px 0 6px; font-size: clamp(1.5rem, 3.4vw, 1.9rem); line-height: 1.4; font-weight: 700; color: #454545; letter-spacing: -.01em; animation: none; }
.it-by { display: flex; flex-wrap: wrap; gap: 6px 22px; align-items: center; font-size: 1.05rem; color: #454545; }
.it-by a { color: #0084b4; }
.it-by a:hover { text-decoration: underline; }
.it-fresh { color: #6f9a37; font-weight: 600; }
.it-fresh b { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: #82b440; color: #fff; font-size: .7rem; vertical-align: 2px; }
.it-sales { display: inline-flex; align-items: center; gap: 6px; }
.it-sales span { display: grid; }
.it-sales svg { width: 20px; height: 20px; }
.it-sales b { font-weight: 700; }
.it-stars { color: #f5a623; letter-spacing: 1px; font-size: 1rem; white-space: nowrap; }
.it-avg { font-size: .9rem; color: #7a7a7a; margin-inline-start: 6px; }
.it-review { border-bottom: 1px solid #e1e8ed; padding: 14px 0; }
.it-review:last-child { border-bottom: 0; }
.it-review-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-bottom: 4px; }
.it-review-head small { color: #8a8a8a; font-size: .84rem; }
.it-desc .it-review p { margin: 0; white-space: pre-line; }
.it-tabs { display: flex; gap: 2px; margin-top: 16px; font-size: .88rem; }
.it-tabs > * { padding: 9px 14px; color: #545454; border: 1px solid transparent; border-bottom: 0; border-radius: 4px 4px 0 0; margin-bottom: -1px; }
.it-tabs .on { background: #fff; border-color: #e1e8ed; color: #454545; font-weight: 600; }
.it-tabs a:hover { color: #000; }
.it-tabs b { display: inline-block; min-width: 18px; padding: 0 5px; margin-inline-start: 4px; border-radius: 3px; background: #0084b4; color: #fff; font-size: .72rem; font-weight: 600; text-align: center; line-height: 18px; }

.it-body { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 40px; align-items: start; padding-top: 18px; padding-bottom: 60px; }
.it-preview { background: #fafafa; border: 1px solid #e1e8ed; border-radius: 4px; padding: 13px 13px 0; }
.it-preview .cover { aspect-ratio: 590 / 300; border-radius: 0; }
.it-preview-btns { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; padding: 18px 0 13px; }
.it-btn { display: inline-flex; align-items: center; justify-content: center; gap: 18px; min-width: 150px; padding: 6px 20px; border: 0; border-radius: 4px; color: #fff; font: inherit; font-size: .95rem; font-weight: 600; line-height: 1.6; }
.it-btn span { display: grid; }
.it-btn svg { width: 16px; height: 16px; }
.it-btn.blue { background: var(--text); }
.it-btn.blue:hover { background: #2e2e38; }
.it-btn.grey { background: var(--surface); color: var(--text); box-shadow: inset 0 0 0 1.5px var(--line); }
.it-btn.grey:hover { box-shadow: inset 0 0 0 1.5px var(--text); }

.it-desc { padding-top: 26px; font-size: 1rem; }
.it-desc h2 { margin: 34px 0 18px; padding-bottom: 12px; border-bottom: 1px solid #e1e8ed; font-size: 1.32rem; font-weight: 400; color: #545454; line-height: 1.5; scroll-margin-top: 16px; }
.it-desc h2:first-child { margin-top: 0; }
.it-desc p { margin: 0 0 20px; }
.it-desc .prose { font-size: inherit; line-height: inherit; color: inherit; }
.it-desc .prose p { margin: 0 0 20px; }
.it-desc .prose h3 { font-size: 1.05rem; font-weight: 700; color: #454545; margin: 26px 0 10px; }
.it-desc ul { margin: 0 0 20px; padding-inline-start: 34px; }
.it-desc li { margin-bottom: 2px; }
.it-desc strong { color: #454545; font-weight: 700; }
.it-desc .gallery { margin-bottom: 20px; }
.it-desc .gallery button { border-radius: 4px; border: 1px solid #e1e8ed; height: 170px; }
.it-demo { margin-bottom: 22px; }
.it-demo strong { display: block; }
.it-demo a { color: #0084b4; }
.it-demo a:hover { text-decoration: underline; }
.it-cred { display: flex; flex-wrap: wrap; gap: 0 8px; }
.it-cred code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .82em; color: #454545; direction: ltr; unicode-bidi: isolate; }

.it-side { display: grid; gap: 22px; }
.it-box { background: #fafafa; border: 1px solid #e1e8ed; border-radius: 4px; padding: 18px 16px; font-size: .95rem; line-height: 1.65; }
.it-box p { margin: 0 0 14px; }
.it-box a:not(.it-buy):not(.it-btn-flat) { color: #0084b4; }
.it-box a:not(.it-buy):not(.it-btn-flat):hover { text-decoration: underline; }
.it-price-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.it-lic { border: 1px solid #999; border-radius: 4px; background: #fff; padding: 3px 12px; color: #333; font-size: .9rem; }
.it-price { font-size: 2.1rem; font-weight: 700; color: #333; line-height: 1.1; }
.it-buy { display: flex; align-items: center; justify-content: center; gap: 10px; background: var(--text); color: #fff; font-weight: 700; font-size: 1.05rem; padding: 10px 16px; border-radius: 4px; }
.it-buy:hover { background: #2e2e38; }
.it-buy span { display: grid; }
.it-buy svg { width: 20px; height: 20px; }
.it-box .it-note { margin: 14px 0 0; text-align: center; font-style: italic; font-size: .82rem; }
.it-author-row { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.it-avatar { width: 80px; height: 80px; flex: none; background: #262626; color: #fff; display: grid; place-items: center; font-size: 2rem; font-weight: 700; }
.it-author-row strong { font-size: 1.3rem; color: #454545; line-height: 1.4; }
.it-btn-flat { display: block; text-align: center; background: var(--surface); color: var(--text); font-weight: 600; padding: 6px 12px; border-radius: 4px; box-shadow: inset 0 0 0 1.5px var(--line); }
.it-btn-flat:hover { box-shadow: inset 0 0 0 1.5px var(--text); }
.it-attrs { margin: 0; display: grid; gap: 10px; }
.it-attrs div { display: grid; grid-template-columns: 110px 1fr; gap: 10px; }
.it-attrs dt { font-weight: 700; color: #454545; }
.it-attrs dd { margin: 0; }
.it-copy { margin: 0; text-align: center; font-size: .84rem; }
.it-copy a { color: #0084b4; }
body.item .notfound { grid-column: 1 / -1; padding: 60px 0; }

@media (max-width: 900px) {
  .it-body { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .it-search input { width: 96px; }
  .it-desc .gallery button { height: 140px; }
}

@media (max-width: 700px) {
  .sheet { margin: 0; border-radius: 0; padding: 18px 16px 28px; box-shadow: none; }
  .top, .it-top-in { grid-template-columns: 1fr auto; row-gap: 8px; }
  .site-foot-in { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .site-foot-in .it-brand, .site-foot small { justify-self: center; margin: 0; }
  .site-foot-in .it-top-links { flex-wrap: wrap; justify-content: center; gap: 4px; font-size: .88rem; }
  body.home .sheet { margin-top: 0; margin-bottom: 0; }
  .site-foot { margin-top: 0; }
  .top .links, .it-top-in .it-top-links { grid-column: 1 / -1; grid-row: 2; justify-content: center; flex-wrap: wrap; gap: 4px; font-size: .86rem; }
  .it-top-links a { padding: 5px 10px; }
  .it-top-in { min-height: 0; }
  .it-top-in { padding-top: 10px; padding-bottom: 10px; }
  .brand, .it-brand { margin-inline-start: 2px; }
  .tabs { justify-content: flex-start; gap: 24px; }
  .lead { padding: 32px 0 22px; }
  .search { width: 100%; }
  .banner { padding: 12px 16px; }
  .banner.contact { padding: 22px 18px; }
}

/* ---------- صفحة المعاينة الحيّة ---------- */
body.pv { height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; background: #e9ecf3; }
.bar {
  flex: none; height: 58px; display: flex; align-items: center; gap: 12px;
  padding: 0 14px; background: var(--surface); border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 6px rgba(15, 23, 42, .05); position: relative; z-index: 2;
}
.bar .btn { box-shadow: none; }
.bar-title { min-width: 0; display: flex; align-items: center; gap: 10px; }
.bar-title strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .98rem; }
.icon-btn {
  width: 36px; height: 36px; flex: none; display: grid; place-items: center;
  border-radius: 10px; border: 1px solid transparent; background: transparent; color: var(--muted);
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn svg { width: 18px; height: 18px; }
.seg { display: flex; background: var(--surface-2); border-radius: 11px; padding: 3px; gap: 2px; flex: none; }
.seg button {
  border: 0; background: transparent; color: var(--muted);
  padding: 5px 13px; border-radius: 8px; font-size: .88rem; font-weight: 600;
  display: grid; place-items: center; white-space: nowrap;
}
.seg button:hover { color: var(--text); }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--accent); box-shadow: 0 1px 3px rgba(15, 23, 42, .12); }
.seg.devices button { padding: 5px 9px; }
.seg svg { width: 17px; height: 17px; }
.bar-space { flex: 1; }
.bar-end { display: flex; align-items: center; gap: 8px; flex: none; }

.stage { flex: 1; position: relative; overflow: hidden; }
.device {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(var(--s, 1));
  background: #fff; overflow: hidden;
  transition: width .25s, height .25s, border-radius .25s;
}
.device iframe { width: 100%; height: 100%; border: 0; display: block; background: #fff; }
.device[data-mode="desktop"] { width: 100%; height: 100%; }
.device[data-mode="tablet"] { width: 820px; height: 1100px; border: 12px solid #1e2433; border-radius: 28px; box-sizing: content-box; box-shadow: 0 30px 70px rgba(15, 23, 42, .25); }
.device[data-mode="mobile"] { width: 390px; height: 800px; border: 11px solid #1e2433; border-radius: 44px; box-sizing: content-box; box-shadow: 0 30px 70px rgba(15, 23, 42, .28); }
.loading {
  position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted);
  pointer-events: none; transition: opacity .2s;
}
.loading.hide { opacity: 0; }
.spin { width: 28px; height: 28px; border: 3px solid #d5d9e4; border-top-color: var(--accent); border-radius: 50%; animation: sp .8s linear infinite; }
@keyframes sp { to { transform: rotate(360deg); } }

.creds { position: relative; }
.creds-pop {
  position: absolute; top: calc(100% + 10px); inset-inline-end: 0; z-index: 10;
  width: 290px; max-width: calc(100vw - 28px);
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  padding: 14px; box-shadow: var(--shadow-lg);
}
.creds-pop[hidden] { display: none; }
.creds-pop h4 { margin: 0 0 8px; font-size: .9rem; }
.cred { border-top: 1px solid var(--line); padding: 8px 0 2px; font-size: .85rem; }
.cred b { display: block; color: var(--muted); font-weight: 500; margin-bottom: 4px; }
.cred-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.cred-row code { direction: ltr; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .84rem; overflow: hidden; text-overflow: ellipsis; }
.copy { border: 1px solid var(--line); background: var(--surface-2); border-radius: 6px; font-size: .75rem; padding: 1px 8px; flex: none; }
.copy:hover { background: var(--accent-soft); color: var(--accent); }

.notfound { margin: auto; text-align: center; padding: 24px; }
.notfound p { color: var(--muted); }

@media (max-width: 820px) {
  .seg.devices, .hide-sm { display: none; }
  .bar { gap: 8px; padding: 0 8px; }
  .seg button { padding: 5px 9px; font-size: .82rem; }
  .btn.sm-icon span { display: none; }
  .btn.sm-icon { padding: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation-duration: 0s !important; scroll-behavior: auto !important; }
}
