/* الحوساني للرخام والجرانيت — واجهة بيضاء، حبر فحمي، ولمسة ذهبية */
:root {
  --bg: #FFFFFF; --ink: #14161A; --ink2: #3B3F45; --mut: #6B6F76;
  --line: #ECEAE5; --line2: #E3E0D9; --panel: #F5F4F1; --page: #EDEBE6;
  --gold: #C9A24B; --gold-l: #D8B45A; --gold-d: #7F6218; --gold-bg: #F7F0DF;
  --ok: #1F6B3A; --ok-bg: #E6F2EA; --warn: #7A5A10; --warn-bg: #FBF1D9; --info: #1F4E8C; --info-bg: #E3ECF8; --bad: #B3261E; --bad-bg: #FBE9E7;
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--page); color: var(--ink); font-family: 'Cairo', Tahoma, 'Segoe UI', system-ui, sans-serif; font-size: 15px; line-height: 1.6; -webkit-tap-highlight-color: transparent; }
body.adminmode { background: #F7F6F3; }
body.lock { overflow: hidden; }
h1, h2, h3, p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.serif { font-family: 'El Messiri', 'Cairo', serif; }
.ltr { direction: ltr; unicode-bidi: isolate; }
input.ltr, textarea.ltr { text-align: right; }
.dim { color: var(--mut); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.noscroll { scrollbar-width: none; }
.noscroll::-webkit-scrollbar { display: none; }
@keyframes drift { from { transform: scale(1) translate(0, 0); } to { transform: scale(1.18) translate(-4%, 3%); } }
.drift { animation: drift 16s ease-in-out infinite alternate; }
@media (prefers-reduced-motion: reduce) { .drift { animation: none; } * { scroll-behavior: auto !important; } }

/* بدون أشرطة تمرير (التمرير بالإصبع والعجلة يعمل كالمعتاد) */
* { scrollbar-width: none; -ms-overflow-style: none; }
*::-webkit-scrollbar { display: none; width: 0; height: 0; }

/* ----- أزرار وعناصر عامة ----- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 48px; padding: 0 20px; border-radius: 16px; border: 1.5px solid transparent; font-weight: 700; font-size: 15px; white-space: nowrap; background: var(--panel); }
.btn.dark { background: var(--ink); color: #fff; }
.btn.light { background: #fff; color: var(--ink); border-radius: 24px; height: 46px; }
.btn.gold { background: var(--gold-l); color: var(--ink); }
.btn.ghost { background: #fff; border-color: var(--line2); color: var(--ink); }
.btn.danger { background: var(--bad); color: #fff; }
.btn.bad { color: var(--bad); }
.btn.sm { height: 38px; padding: 0 14px; font-size: 13.5px; border-radius: 12px; }
.btn.lg { height: 56px; font-size: 16.5px; border-radius: 20px; }
.btn.block { display: flex; width: 100%; }
.btn.grow { flex: 1; }
.btn.sq { width: 56px; padding: 0; border-radius: 20px; height: 56px; }
.btn.mx { margin: 16px 20px 0; width: calc(100% - 40px); }
.btn:disabled { opacity: .6; cursor: default; }
.roundbtn { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: #fff; display: inline-flex; align-items: center; justify-content: center; padding: 0; flex: 0 0 auto; }
.roundbtn.dark { background: rgba(10,10,12,.4); border-color: rgba(255,255,255,.3); color: #fff; }
.ib { width: 36px; height: 36px; border-radius: 11px; border: 1px solid var(--line); background: #fff; display: inline-flex; align-items: center; justify-content: center; padding: 0; flex: 0 0 auto; }
.ib.bad { color: var(--bad); }
.ib.flat { border-color: transparent; background: transparent; }
.linkbtn { border: none; background: none; padding: 0; font-weight: 700; font-size: 13.5px; color: var(--gold-d); }
.initial { font-weight: 700; font-size: 17px; }
.initial.s { width: 40px; height: 40px; border-radius: 50%; background: var(--panel); display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--ink); color: var(--gold-l); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 17px; flex: 0 0 auto; }
.pill { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 11px; border-radius: 20px; background: var(--panel); color: var(--ink2); white-space: nowrap; }
.pill.warn { background: var(--warn-bg); color: var(--warn); } .pill.info { background: var(--info-bg); color: var(--info); } .pill.ok { background: var(--ok-bg); color: var(--ok); }
.pill.gold { background: var(--gold-bg); color: var(--warn); } .pill.bad { background: var(--bad-bg); color: var(--bad); } .pill.gray { background: var(--panel); color: var(--ink2); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chip { direction: ltr; unicode-bidi: isolate; font-size: 12px; font-weight: 600; color: var(--ink2); background: #F4F3F0; border-radius: 9px; padding: 2px 8px; white-space: nowrap; }
.more { font-size: 12px; font-weight: 700; color: var(--gold-d); }
.badge { display: inline-block; font-size: 12.5px; font-weight: 700; color: #EBD398; border: 1px solid rgba(216,180,90,.75); background: rgba(216,180,90,.16); padding: 3px 14px; border-radius: 20px; }
.badge-new { position: absolute; top: 10px; right: 10px; font-size: 12px; font-weight: 700; color: #fff; background: var(--ink); border-radius: 20px; padding: 1px 11px; }
.badge-new.inline { position: static; display: inline-block; margin-inline-start: 6px; vertical-align: middle; }
.err { min-height: 22px; font-size: 13.5px; font-weight: 600; color: var(--bad); margin: 2px 0 8px; }
.hint { color: var(--mut); font-size: 12.5px; }
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 40px 28px; color: var(--mut); }
.empty b { color: var(--ink); font-size: 16px; } .empty .btn { margin-top: 8px; }
#toast { position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 20px); background: var(--ink); color: #fff; padding: 11px 20px; border-radius: 24px; font-size: 14px; font-weight: 600; opacity: 0; pointer-events: none; transition: .25s; z-index: 200; max-width: calc(100% - 32px); text-align: center; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ----- نماذج ----- */
.field { display: grid; gap: 6px; margin-bottom: 14px; min-width: 0; }
.field > * { min-width: 0; }
.field > label { font-size: 13.5px; font-weight: 700; }
.in { width: 100%; height: 46px; border-radius: 14px; border: 1.5px solid var(--line2); background: #fff; padding: 0 14px; font-size: 14.5px; outline: none; }
.in:focus { border-color: var(--ink); }
textarea.in { height: auto; padding: 10px 14px; resize: vertical; }
select.in { appearance: auto; }
.in.sm { height: 42px; width: auto; min-width: 140px; border-radius: 12px; }
.two { display: flex; gap: 12px; } .two > * { flex: 1; min-width: 0; }
.form.tight { margin-top: 16px; }
.chk { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 14.5px; min-height: 44px; }
.chk input { width: 20px; height: 20px; accent-color: var(--ink); }
.checks { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-bottom: 8px; }
.search { margin: 16px 20px 0; height: 52px; border-radius: 18px; background: var(--panel); border: 1px solid var(--line); display: flex; align-items: center; gap: 10px; padding: 0 16px 0 6px; }
.search.inline { margin-top: 14px; padding: 0 16px; }
.search.inline.sm { margin: 0; height: 42px; width: 240px; border-radius: 12px; background: #fff; }
.search input { flex: 1; min-width: 0; border: none; outline: none; background: transparent; font-size: 14.5px; height: 100%; }
.search input::placeholder { color: var(--mut); }
.s-ic { color: var(--mut); display: flex; }
.s-btn { width: 40px; height: 40px; border-radius: 13px; border: none; background: var(--ink); color: #fff; display: flex; align-items: center; justify-content: center; padding: 0; }
.upl { display: flex; gap: 14px; align-items: center; margin-bottom: 16px; }
.upl-prev { width: 84px; height: 84px; border-radius: 18px; flex: 0 0 auto; box-shadow: inset 0 0 0 1px rgba(20,22,26,.08); }
.upl-b { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }

/* ----- هيكل العميل ----- */
.shell { max-width: 480px; margin: 0 auto; min-height: 100dvh; background: var(--bg); position: relative; padding-bottom: calc(92px + env(safe-area-inset-bottom, 0px)); box-shadow: 0 0 60px rgba(0,0,0,.08); overflow-x: clip; }
.topbar { display: flex; align-items: center; justify-content: space-between; padding: calc(14px + env(safe-area-inset-top, 0px)) 20px 12px; background: #fff; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { width: 52px; height: 52px; object-fit: contain; }
.brand-t { display: flex; flex-direction: column; line-height: 1.15; }
.brand-t b { font-size: 22px; } .brand-t small { font-size: 12.5px; font-weight: 600; color: var(--mut); }
.installbar { margin: 0 20px 12px; padding: 8px 14px; border-radius: 16px; background: var(--gold-bg); display: flex; align-items: center; gap: 10px; font-size: 13.5px; font-weight: 600; }
.installbar span { flex: 1; }
.banner { position: relative; height: 236px; overflow: hidden; background: #15161A; }
.banner-media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.banner-media.drift { inset: -12%; width: auto; height: auto; }
.banner-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,10,12,.25) 0%, rgba(10,10,12,.1) 30%, rgba(10,10,12,.4) 55%, rgba(10,10,12,.9) 100%); pointer-events: none; }
.banner-shade.strong { background: linear-gradient(180deg, rgba(10,10,12,.55), rgba(10,10,12,.78)); }
.banner-copy { position: absolute; inset-inline: 20px; bottom: 18px; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; color: #fff; }
.banner-copy h1 { font-size: 27px; line-height: 1.2; }
.banner-copy .badge { font-size: 12px; padding: 1px 12px; }
.banner-copy .btn { height: 40px; padding: 0 18px; font-size: 14px; margin-top: 2px; }
.banner-copy p { font-size: 13.5px; line-height: 1.5; color: rgba(255,255,255,.94); max-width: 300px; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.mutebtn { position: absolute; left: 20px; bottom: 20px; width: 40px; height: 40px; border-radius: 50%; border: none; background: rgba(10,10,12,.5); color: #fff; display: flex; align-items: center; justify-content: center; padding: 0; }
.stories { display: flex; gap: 14px; overflow-x: auto; padding: 16px 20px 6px; }
.story { flex: 0 0 68px; display: flex; flex-direction: column; align-items: center; gap: 8px; background: none; border: none; padding: 0; }
.ring { width: 68px; height: 68px; border-radius: 50%; padding: 3px; background: linear-gradient(135deg, #D8B45A, #14161A 85%); display: block; }
.ring.seen { background: #D9D6D0; }
.ringin { display: block; width: 100%; height: 100%; border-radius: 50%; background: #fff; padding: 3px; }
.ringimg { display: block; width: 100%; height: 100%; border-radius: 50%; }
.ringimg.sm { width: 54px; height: 54px; flex: 0 0 54px; box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--gold); }
.slabel { font-size: 12.5px; font-weight: 600; max-width: 68px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sec-h { margin: 26px 20px 0; display: flex; align-items: center; justify-content: space-between; }
.sec-h h2 { font-size: 19px; } .sec-h a { font-size: 14px; font-weight: 600; color: var(--gold-d); }
.catgrid { margin: 14px 20px 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.catcard { position: relative; display: block; height: 112px; border-radius: 22px; overflow: hidden; background: var(--ink); }
.catcard.all { background: var(--ink); }
.shade { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(10,10,12,.78), rgba(10,10,12,.28) 55%, rgba(10,10,12,0)); }
.ctext { position: absolute; inset-inline: 14px; bottom: 11px; display: flex; flex-direction: column; color: #fff; }
.ctext b { font-size: 16px; } .ctext small { font-size: 12px; color: rgba(255,255,255,.9); }
.pgrid { margin: 14px 20px 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 14px; }
.pcard { position: relative; }
.pcard-link { display: flex; flex-direction: column; gap: 4px; }
.pimg { height: 156px; border-radius: 22px; box-shadow: inset 0 0 0 1px rgba(20,22,26,.06); margin-bottom: 6px; }
.pname { font-size: 15px; font-weight: 700; } .pmeta { font-size: 12.5px; color: var(--mut); }
.favbtn { position: absolute; top: 10px; left: 10px; width: 36px; height: 36px; border-radius: 50%; border: none; background: rgba(255,255,255,.94); color: var(--ink); display: flex; align-items: center; justify-content: center; padding: 0; box-shadow: 0 2px 8px rgba(0,0,0,.14); }
.favbtn.on { color: var(--bad); } .favbtn.on svg { fill: currentColor; }
.roundbtn.favbtn { position: static; box-shadow: 0 2px 10px rgba(0,0,0,.12); border: none; }
.ctacard { position: relative; margin: 26px 20px 0; border-radius: 26px; overflow: hidden; background: #15161A; }
.ctacard-media { position: absolute; inset: -12%; }
.ctacard-in { position: relative; padding: 22px 20px; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; color: #fff; }
.ctacard-in h2 { font-size: 24px; } .ctacard-in p { font-size: 14px; line-height: 1.7; max-width: 270px; color: rgba(255,255,255,.94); }
.tabs { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: min(480px, 100%); display: flex; padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px)); background: #fff; border-top: 1px solid var(--line); z-index: 20; }
.tab { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; padding-top: 6px; position: relative; font-size: 11.5px; white-space: nowrap; font-weight: 600; color: var(--mut); }
.tab.on { color: var(--ink); font-weight: 700; }
.tab.on::before { content: ''; position: absolute; top: -10px; width: 26px; height: 3px; border-radius: 2px; background: var(--gold); }
.pagehead { display: flex; padding: calc(16px + env(safe-area-inset-top, 0px)) 20px 0; }
.ptitle { padding: 16px 20px 0; display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.ptitle h1 { font-size: 34px; line-height: 1.15; } .ptitle p { font-size: 14px; color: var(--mut); }
.tthumb { width: 56px; height: 56px; border-radius: 18px; flex: 0 0 auto; box-shadow: inset 0 0 0 1px rgba(20,22,26,.08); }
.fchips { display: flex; gap: 10px; overflow-x: auto; padding: 16px 20px 2px; }
.fchip { flex: 0 0 auto; height: 42px; padding: 0 20px; border-radius: 21px; border: 1px solid var(--line2); background: #fff; font-weight: 700; font-size: 14px; display: inline-flex; align-items: center; color: var(--ink2); }
.fchip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.admin .fchips { padding: 0 0 16px; flex-wrap: wrap; }
.plist { padding: 0 20px; display: flex; flex-direction: column; gap: 14px; }
.count { margin-top: 16px; font-size: 14px; font-weight: 600; color: var(--mut); }
.lcard { position: relative; border-radius: 26px; border: 1px solid var(--line); background: #fff; box-shadow: 0 6px 20px rgba(20,22,26,.05); }
.lcard-link { display: flex; gap: 14px; padding: 10px; }
.limg { flex: 0 0 112px; height: 128px; border-radius: 20px; box-shadow: inset 0 0 0 1px rgba(20,22,26,.06); }
.lbody { flex: 1; min-width: 0; display: flex; flex-direction: column; padding: 4px 0; }
.lname { font-size: 17px; font-weight: 700; padding-inline-end: 34px; }
.lsizes { margin-top: auto; display: flex; flex-direction: column; gap: 6px; } .lhint { font-size: 12px; font-weight: 700; color: var(--gold-d); }
.lcard .favbtn { top: 12px; left: 12px; width: 34px; height: 34px; box-shadow: 0 1px 6px rgba(0,0,0,.14); }
.plist .empty { padding-top: 24px; }
.pshell { padding-bottom: calc(110px + env(safe-area-inset-bottom, 0px)); }
.phero { height: 380px; position: relative; overflow: hidden; background: var(--panel); }
.gal-one, .gal-track { position: absolute; inset: 0; }
.gal-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; }
.gal-slide { flex: 0 0 100%; height: 100%; scroll-snap-align: center; }
.gal-dots { position: absolute; bottom: 50px; inset-inline: 0; display: flex; justify-content: center; gap: 6px; pointer-events: none; }
.gal-dots i { width: 7px; height: 7px; border-radius: 4px; background: rgba(255,255,255,.6); box-shadow: 0 0 4px rgba(0,0,0,.3); transition: width .2s; }
.gal-dots i.on { width: 20px; background: #fff; }
.phero-bar { z-index: 2; }
.phero-bar { position: absolute; inset-inline: 20px; top: calc(24px + env(safe-area-inset-top, 0px)); display: flex; justify-content: space-between; }
.phero-bar .roundbtn { background: rgba(255,255,255,.94); border: none; box-shadow: 0 2px 10px rgba(0,0,0,.12); }
.phero-r { display: flex; gap: 10px; }
.psheet { position: relative; margin-top: -32px; background: #fff; border-radius: 32px 32px 0 0; box-shadow: 0 -10px 28px rgba(20,22,26,.07); padding: 26px 20px 0; }
.psheet h1 { font-size: 32px; line-height: 1.15; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.tag { font-size: 12.5px; font-weight: 600; color: var(--ink2); background: #F4F3F0; border-radius: 20px; padding: 2px 12px; }
.tag.gold { background: var(--gold-bg); color: var(--gold-d); font-weight: 700; } .tag.dark { background: var(--ink); color: #fff; }
.pdesc { margin-top: 14px; font-size: 14.5px; line-height: 1.85; color: #4A4E55; }
.grp { margin-top: 24px; } .grp-h { display: flex; align-items: center; justify-content: space-between; } .grp-h h2 { font-size: 17px; } .grp-h span { font-size: 13px; color: var(--mut); }
.opts { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 10px; }
.opt { min-height: 46px; min-width: 78px; padding: 0 16px; border-radius: 16px; font-weight: 700; font-size: 14.5px; border: 1.5px solid var(--line2); background: #fff; color: var(--ink2); }
.opt.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.picked { margin-top: 12px; display: flex; align-items: center; gap: 8px; font-size: 14px; color: #4A4E55; } .picked svg { color: var(--gold-d); }
.uses { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 10px; }
.use { font-size: 14px; font-weight: 600; color: var(--ink2); background: #F4F3F0; border-radius: 14px; padding: 6px 16px; }
.actionbar { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: min(480px, 100%); display: flex; gap: 12px; padding: 14px 20px calc(14px + env(safe-area-inset-bottom, 0px)); background: #fff; border-top: 1px solid var(--line); z-index: 20; }
.cbox { margin: 18px 20px 0; border: 1px solid var(--line); border-radius: 22px; padding: 6px 18px; }
.crow { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid #F0EEE9; } .crow:last-child { border-bottom: none; }
.crow small { display: block; font-size: 12.5px; color: var(--mut); } .crow b { font-weight: 700; } .crow b.dim { color: var(--mut); font-weight: 600; }
.cic { width: 44px; height: 44px; border-radius: 14px; background: var(--gold-bg); color: var(--gold-d); display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.ltr-a { direction: ltr; unicode-bidi: isolate; font-weight: 700; display: inline-block; }
.installcard { margin: 18px 20px 0; padding: 20px; border-radius: 22px; background: var(--panel); display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.installcard h2 { font-size: 18px; } .installcard p { color: var(--ink2); font-size: 14px; line-height: 1.7; }
.guest { margin: 18px 20px 0; padding: 28px 22px; border-radius: 24px; background: var(--panel); display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; color: var(--mut); }
.guest b { color: var(--ink); font-size: 17px; } .guest p { line-height: 1.7; margin-bottom: 6px; } .guest .btn + .btn { margin-top: 0; }
.acard { margin: 18px 20px 0; padding: 16px; border: 1px solid var(--line); border-radius: 22px; display: flex; align-items: center; gap: 14px; }
.acard > div { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.4; }
.avatar.big { width: 56px; height: 56px; font-size: 22px; }
.qcard { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 20px; }
.qcard > div { display: flex; flex-direction: column; line-height: 1.45; min-width: 0; }
.deny { max-width: 420px; margin: 0 auto; padding: 90px 28px; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; color: var(--mut); } .deny h1 { color: var(--ink); font-size: 30px; }

/* ----- الدخول ----- */
.loginshell { padding-bottom: 0; background: #fff; }
.lhead { position: relative; height: 290px; overflow: hidden; background: #15161A; display: flex; align-items: center; justify-content: center; }
.lhead .drift { position: absolute; inset: -12%; }
.lhead img { position: relative; width: 220px; height: auto; margin-bottom: 26px; }
.lhead .back { position: absolute; top: calc(18px + env(safe-area-inset-top, 0px)); right: 20px; }
.lsheet { margin-top: -36px; position: relative; background: #fff; border-radius: 34px 34px 0 0; box-shadow: 0 -10px 28px rgba(20,22,26,.1); padding: 28px 24px calc(28px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 4px; }
.lsheet h1 { font-size: 30px; line-height: 1.2; } .lsub { font-size: 14.5px; line-height: 1.7; color: #4A4E55; margin-bottom: 12px; }
.lsheet form { margin-top: 8px; } .lsheet .btn.ghost { margin-top: 12px; }
.seg { display: flex; padding: 4px; border-radius: 16px; background: var(--panel); margin-bottom: 8px; }
.seg button { flex: 1; height: 42px; border: none; border-radius: 12px; background: transparent; font-weight: 700; color: var(--mut); }
.seg button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 6px rgba(0,0,0,.1); }
.phonein { display: flex; align-items: center; gap: 12px; height: 56px; border-radius: 18px; background: var(--panel); border: 1.5px solid var(--line2); padding: 0 16px; }
.phonein:focus-within { border-color: var(--ink); }
.phonein { width: 100%; }
.phonein input { flex: 1; width: 100%; min-width: 0; border: none; outline: none; background: transparent; font-size: 16px; font-weight: 600; letter-spacing: .5px; }
.cc { font-weight: 700; font-size: 14px; color: var(--ink2); padding-inline-end: 12px; border-inline-end: 1.5px solid var(--line2); order: 2; }
.pinwrap { position: relative; }
.pins { display: flex; gap: 10px; direction: ltr; }
.pinbox { flex: 1; height: 58px; border-radius: 16px; background: var(--panel); border: 1.5px solid var(--line2); display: flex; align-items: center; justify-content: center; }
.pinbox i { width: 11px; height: 11px; border-radius: 50%; background: var(--ink); opacity: 0; }
.pinbox.full { background: #fff; border-color: var(--ink); } .pinbox.full i { opacity: 1; }
.pinwrap:focus-within .pinbox.cur { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,162,75,.35); }
.pinin { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: text; border: none; }

/* ----- الستوري ----- */
#story { position: fixed; inset: 0; z-index: 100; background: #000; display: flex; justify-content: center; }
#story[hidden], #modal[hidden] { display: none; }
.sv { position: relative; width: min(480px, 100%); height: 100%; overflow: hidden; color: #fff; }
.sv-bars { position: absolute; top: calc(14px + env(safe-area-inset-top, 0px)); inset-inline: 14px; display: flex; gap: 5px; z-index: 3; }
.bar { flex: 1; height: 3px; border-radius: 2px; background: rgba(255,255,255,.4); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: #fff; }
.bar i.done { width: 100%; } .bar i.run { animation: fill 5.5s linear forwards; }
@keyframes fill { to { width: 100%; } }
.sv-head { position: absolute; top: calc(30px + env(safe-area-inset-top, 0px)); inset-inline: 16px; display: flex; align-items: center; justify-content: space-between; z-index: 3; }
.sv-id { display: flex; align-items: center; gap: 10px; } .sv-id img { width: 40px; height: 40px; object-fit: contain; }
.sv-id div { display: flex; flex-direction: column; line-height: 1.2; } .sv-id small { font-size: 12.5px; color: rgba(255,255,255,.88); }
.sv-zone { position: absolute; top: 100px; bottom: 0; width: 50%; background: none; border: none; z-index: 2; }
.sv-zone.prev { right: 0; } .sv-zone.next { left: 0; }
.sv-cap { position: absolute; inset-inline: 20px; bottom: calc(40px + env(safe-area-inset-bottom, 0px)); z-index: 3; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.sv-cap h2 { font-size: 40px; line-height: 1.1; } .sv-cap p { font-size: 15px; line-height: 1.75; max-width: 320px; color: rgba(255,255,255,.94); }
.sv-cap .btn { margin-top: 6px; align-self: stretch; }

/* ----- النوافذ ----- */
#modal { position: fixed; inset: 0; z-index: 90; }
.mback { position: absolute; inset: 0; background: rgba(20,22,26,.5); display: flex; }
.msheet { display: flex; flex-direction: column; background: #fff; overflow: hidden; max-height: 100dvh; }
.msheet.bottom { width: min(480px, 100%); margin: auto auto 0; border-radius: 28px 28px 0 0; max-height: 92dvh; }
.msheet.center { width: min(420px, calc(100% - 32px)); margin: auto; border-radius: 26px; max-height: 90dvh; }
.msheet.drawer { width: min(460px, 100%); height: 100%; margin: 0 auto 0 0; box-shadow: 12px 0 40px rgba(0,0,0,.2); }
.mhead { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.mhead h2 { font-size: 24px; }
.mbody { padding: 20px 22px; overflow-y: auto; flex: 1; }
.mfoot { display: flex; gap: 12px; padding: 14px 22px calc(18px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); }
.qsum { display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: 18px; background: var(--panel); margin-bottom: 18px; }
.qsum small { display: block; color: var(--mut); font-size: 13px; } .qimg { width: 56px; height: 56px; border-radius: 14px; flex: 0 0 auto; }
.done { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; color: var(--ok); } .done b { color: var(--ink); font-size: 18px; } .done p { color: var(--ink2); } .done .btn { margin-top: 6px; }
.cmsg { line-height: 1.8; color: var(--ink2); margin-bottom: 8px; }
.acc { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; } .acc > div { display: flex; flex-direction: column; line-height: 1.4; }
.mbody .btn.block + .btn.block { margin-top: 10px; }
.slide { border: 1px solid var(--line2); border-radius: 18px; padding: 14px; margin: 0 0 14px; } .slide legend { font-weight: 700; padding: 0 8px; font-size: 14px; }

/* ----- لوحة التحكم ----- */
.admin { display: flex; min-height: 100dvh; }
.a-side { flex: 0 0 260px; background: #fff; border-inline-end: 1px solid var(--line); padding: 24px 16px; display: flex; flex-direction: column; gap: 6px; position: sticky; top: 0; height: 100dvh; }
.a-brand { display: flex; align-items: center; gap: 12px; padding: 0 8px 20px; } .a-brand span { display: flex; flex-direction: column; line-height: 1.2; } .a-brand b { font-size: 21px; } .a-brand small { font-size: 12.5px; color: var(--mut); font-weight: 600; }
.a-nav { display: flex; flex-direction: column; gap: 6px; }
.a-link { display: flex; align-items: center; gap: 12px; height: 48px; padding: 0 14px; border-radius: 14px; font-weight: 700; font-size: 14.5px; color: var(--ink2); white-space: nowrap; }
.a-link svg { color: var(--mut); } .a-link span { flex: 1; }
.a-link.on { background: var(--ink); color: #fff; } .a-link.on svg { color: var(--gold-l); }
.a-link em { font-style: normal; min-width: 22px; height: 22px; border-radius: 11px; background: var(--gold-l); color: var(--ink); font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; padding: 0 6px; }
.a-user { margin-top: auto; padding: 14px; border-radius: 18px; background: #F7F6F3; display: flex; align-items: center; gap: 12px; } .a-user div { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.35; }
.a-main { flex: 1; min-width: 0; padding: 28px 32px 56px; display: flex; flex-direction: column; gap: 22px; }
.a-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.a-head h1 { font-size: 32px; line-height: 1.15; } .a-head p { color: var(--mut); font-size: 14px; }
.a-tools { display: flex; gap: 10px; }
.notice { display: flex; gap: 14px; padding: 16px 18px; border-radius: 20px; background: var(--gold-bg); color: var(--warn); } .notice b { display: block; } .notice p { font-size: 13.5px; line-height: 1.7; color: #5C4510; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 20px; display: flex; flex-direction: column; gap: 8px; }
.stat-h { display: flex; align-items: center; justify-content: space-between; font-weight: 600; color: var(--ink2); }
.stat-h i { width: 40px; height: 40px; border-radius: 13px; background: var(--gold-bg); color: var(--gold-d); display: flex; align-items: center; justify-content: center; }
.stat b { font-size: 36px; line-height: 1; } .stat small { color: var(--mut); font-weight: 600; font-size: 12.5px; }
.a-two { display: flex; flex-wrap: wrap; gap: 16px; } .a-two > * { flex: 1 1 380px; min-width: 0; } .a-two.top { align-items: flex-start; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 24px; padding: 22px; } .card h2 { font-size: 17px; } .card h2.mt { margin-top: 24px; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.bars { display: flex; align-items: flex-end; gap: 12px; height: 220px; margin-top: 14px; }
.bcol { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; font-weight: 700; font-size: 13px; }
.bcol i { width: 100%; max-width: 40px; border-radius: 8px 8px 3px 3px; background: var(--ink); } .bcol i.hot { background: var(--gold); }
.bcol small { font-weight: 600; color: var(--mut); font-size: 12px; }
.rrow { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid #F0EEE9; } .rrow div { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.35; } small { color: var(--mut); }
.pad { padding: 16px 0; }
.a-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; } .a-filters { display: flex; gap: 10px; flex-wrap: wrap; }
.tablewrap { background: #fff; border: 1px solid var(--line); border-radius: 22px; overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; min-width: 760px; }
.tbl th { text-align: start; padding: 14px 18px; font-size: 12.5px; font-weight: 700; color: var(--mut); background: #FAF9F7; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 12px 18px; border-bottom: 1px solid #F0EEE9; vertical-align: middle; font-size: 14px; } .tbl tr:last-child td { border-bottom: none; }
.tbl td small { display: block; }
.qnote { max-width: 240px; font-style: normal; }
.who { display: flex; align-items: center; gap: 12px; min-width: 0; } .who > div { display: flex; flex-direction: column; line-height: 1.35; }
.thumb { width: 52px; height: 52px; border-radius: 14px; flex: 0 0 auto; box-shadow: inset 0 0 0 1px rgba(20,22,26,.07); }
.sw { width: 46px; height: 28px; border-radius: 14px; border: none; background: #CFCBC2; padding: 3px; display: inline-flex; justify-content: flex-start; vertical-align: middle; }
.sw i { width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.sw.on { background: var(--ink); justify-content: flex-end; } .swl { font-size: 12.5px; font-weight: 700; margin-inline-start: 6px; }
.acts { white-space: nowrap; } .acts > * { margin-inline-end: 6px; }
.cgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.ccard { background: #fff; border: 1px solid var(--line); border-radius: 24px; overflow: hidden; } .cimg { height: 130px; }
.cbody { padding: 16px 18px; display: flex; flex-direction: column; gap: 2px; } .cbody b { font-size: 17px; } .cacts { display: flex; gap: 8px; margin-top: 12px; }
.cadd { min-height: 250px; border-radius: 24px; border: 2px dashed #CFCBC2; background: transparent; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; font-weight: 700; color: var(--gold-d); }
.cadd span { width: 48px; height: 48px; border-radius: 50%; background: var(--gold-bg); display: flex; align-items: center; justify-content: center; }
.vprev { position: relative; height: 210px; border-radius: 18px; overflow: hidden; background: #15161A; margin: 14px 0; }
.vprev video { width: 100%; height: 100%; object-fit: cover; } .vprev .drift { position: absolute; inset: -12%; }
.vnote { position: absolute; inset-inline: 16px; bottom: 12px; color: #fff; font-size: 13px; font-weight: 600; }
.vbtns { display: flex; gap: 10px; flex-wrap: wrap; margin: 12px 0; }
.srow { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid #F0EEE9; } .sinfo { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.in.st-new { background: var(--warn-bg); border-color: transparent; color: var(--warn); font-weight: 700; }
.in.st-progress { background: var(--info-bg); border-color: transparent; color: var(--info); font-weight: 700; }
.in.st-done { background: var(--ok-bg); border-color: transparent; color: var(--ok); font-weight: 700; }

/* ----- شاشات ضيقة ----- */
@media (max-width: 860px) {
  .admin { flex-direction: column; }
  .a-side { flex: none; height: auto; position: sticky; top: 0; z-index: 30; flex-direction: row; align-items: center; gap: 10px; padding: 10px 14px; border-inline-end: none; border-bottom: 1px solid var(--line); overflow-x: auto; }
  .a-brand { padding: 0; } .a-brand span { display: none; }
  .a-nav { flex-direction: row; } .a-user { display: none; }
  .a-main { padding: 20px 16px 48px; }
}
@media (max-width: 520px) { .two { flex-direction: column; gap: 0; } .search.inline.sm { width: 100%; } }
@media (min-width: 521px) { body:not(.adminmode) { padding-block: 0; } }

.thumb.s { width: 42px; height: 42px; border-radius: 12px; }
.step { color: inherit; align-items: flex-start; } .step b { font-weight: 700; }
.tick { width: 26px; height: 26px; border-radius: 50%; border: 2px solid #CFCBC2; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; color: #fff; margin-top: 2px; }
.tick.on { background: var(--ok); border-color: var(--ok); }

/* ----- صور إضافية في نموذج المنتج ----- */
.galed { display: flex; flex-wrap: wrap; gap: 10px; }
.galthumb { position: relative; width: 72px; height: 72px; border-radius: 14px; box-shadow: inset 0 0 0 1px rgba(20,22,26,.08); }
.galx { position: absolute; top: -6px; left: -6px; width: 24px; height: 24px; border-radius: 50%; border: 2px solid #fff; background: var(--bad); color: #fff; display: flex; align-items: center; justify-content: center; padding: 0; }
.galadd { width: 72px; height: 72px; border-radius: 14px; border: 2px dashed #CFCBC2; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; font-size: 12px; font-weight: 700; color: var(--gold-d); cursor: pointer; }
.notice.ok { background: var(--ok-bg); color: var(--ok); } .notice.ok p { color: #24553A; }

/* ----- استيراد PDF ----- */
.pdfhead { display: flex; flex-direction: column; gap: 10px; }
.pdfup { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; }
.pdfmeta { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; padding-top: 12px; border-top: 1px solid #F0EEE9; }
.pdfmeta > div:first-child { display: flex; flex-direction: column; line-height: 1.4; }
.pdfmeta .field { margin: 0; min-width: 220px; }
.pdfgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; padding-bottom: 90px; }
.pdftile { position: relative; aspect-ratio: 1; border-radius: 18px; border: 2px solid var(--line); background: #fff; padding: 0; overflow: hidden; display: block; }
.pdftile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pdftile small { position: absolute; bottom: 6px; left: 8px; font-size: 11px; font-weight: 700; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.pdftile.on { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,162,75,.45); }
.pdftile.used img { opacity: .45; }
.pdfnum { position: absolute; top: 8px; right: 8px; min-width: 26px; height: 26px; border-radius: 13px; background: rgba(20,22,26,.7); color: #fff; font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; padding: 0 6px; }
.pdfk { position: absolute; top: 8px; left: 8px; width: 30px; height: 30px; border-radius: 50%; background: var(--gold-l); color: var(--ink); font-weight: 800; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 6px rgba(0,0,0,.25); }
.pdfused { position: absolute; inset-inline: 8px; bottom: 26px; background: var(--ok); color: #fff; font-size: 11.5px; font-weight: 700; border-radius: 10px; padding: 2px 8px; display: flex; align-items: center; gap: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pdftile.wait { display: flex; align-items: center; justify-content: center; background: var(--panel); }
.spin { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--line2); border-top-color: var(--gold); animation: spin .8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.pdfbar { position: fixed; bottom: 16px; left: 50%; transform: translate(-50%, 140%); width: min(760px, calc(100% - 24px)); display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 20px; background: var(--ink); color: #fff; box-shadow: 0 10px 30px rgba(0,0,0,.25); z-index: 40; transition: transform .25s; }
.pdfbar.show { transform: translate(-50%, 0); }
.pdfbar > span { flex: 1; min-width: 110px; font-weight: 600; } .pdfbar b { color: var(--gold-l); }
.pdfbar .btn { height: 40px; padding: 0 14px; font-size: 14px; border-radius: 12px; }
.pdfbar .btn.ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.3); }
.pdfbar .ib { color: #fff; }

/* ----- دليل التثبيت على الآيفون ----- */
.ios-app { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 20px; background: var(--panel); margin-bottom: 18px; }
.ios-app img { width: 64px; height: 64px; border-radius: 15px; box-shadow: 0 2px 8px rgba(0,0,0,.18); flex: 0 0 auto; }
.ios-app > div { display: flex; flex-direction: column; line-height: 1.45; } .ios-app b { font-size: 16px; }
.ios-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.ios-step { display: flex; gap: 12px; align-items: flex-start; }
.ios-step > div { display: flex; flex-direction: column; line-height: 1.55; } .ios-step b { font-size: 15.5px; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.ios-n { width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: var(--gold-l); font-weight: 800; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.ios-ic { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 30px; border-radius: 9px; background: #fff; border: 1px solid var(--line2); }
.ios-arrow { display: flex; justify-content: center; margin-top: 16px; color: var(--gold-d); transform: rotate(90deg); animation: bob 1.2s ease-in-out infinite; }
@keyframes bob { 50% { transform: rotate(90deg) translateX(6px); } }
.mbody .btn.ghost.block { margin-top: 16px; }

/* ----- شاشة التحميل ----- */
.boot { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; background: #fff; }
.boot img { width: 84px; height: 84px; }

/* ----- صور المنتج: عرض كامل، أسهم، تكبير ----- */
.gal-slide { border: none; padding: 0; cursor: zoom-in; }
.gal-arr { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 44px; height: 44px; border-radius: 50%; border: none; background: rgba(255,255,255,.94); color: var(--ink); box-shadow: 0 2px 10px rgba(0,0,0,.18); display: flex; align-items: center; justify-content: center; padding: 0; }
.gal-arr.prev { right: 12px; } .gal-arr.next { left: 12px; } .gal-arr.next svg { transform: scaleX(-1); }
.gal-arr[hidden] { display: none; }
.gal-zoom { position: absolute; left: 16px; bottom: 46px; z-index: 2; height: 34px; padding: 0 12px; border-radius: 17px; border: none; background: rgba(20,22,26,.72); color: #fff; font-size: 13px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.imgcount { position: absolute; bottom: 8px; left: 8px; display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 700; color: #fff; background: rgba(20,22,26,.68); border-radius: 10px; padding: 1px 8px; }
.pimg, .limg { position: relative; }
button.tthumb { border: none; padding: 0; cursor: zoom-in; }

#lightbox { position: fixed; inset: 0; z-index: 110; background: #0B0B0D; }
#lightbox[hidden] { display: none; }
.lb { position: absolute; inset: 0; }
.lb-track { position: absolute; inset: 0; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior: contain; }
.lb-track.locked { overflow: hidden; }
.lb-slide { flex: 0 0 100%; height: 100%; scroll-snap-align: center; display: flex; align-items: center; justify-content: center; overflow: hidden; direction: ltr; }
.lb-slide img { max-width: 100%; max-height: 100%; object-fit: contain; cursor: zoom-in; user-select: none; -webkit-user-select: none; }
.lb-slide.zoomed { overflow: auto; display: block; }
.lb-slide.zoomed img { max-width: none; max-height: none; width: 250%; height: auto; cursor: zoom-out; }
.lb-top { position: absolute; top: calc(14px + env(safe-area-inset-top, 0px)); inset-inline: 16px; display: flex; align-items: center; justify-content: space-between; z-index: 2; color: #fff; pointer-events: none; }
.lb-top > * { pointer-events: auto; }
.lb-count { font-weight: 700; font-size: 15px; background: rgba(255,255,255,.12); border-radius: 14px; padding: 2px 12px; }
.lb-count:empty { visibility: hidden; }
.lb-arr { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 48px; height: 48px; border-radius: 50%; border: none; background: rgba(255,255,255,.16); color: #fff; display: flex; align-items: center; justify-content: center; padding: 0; }
.lb-arr.prev { right: 14px; } .lb-arr.next { left: 14px; } .lb-arr.next svg { transform: scaleX(-1); }
.lb-arr[hidden] { display: none; }
.lb-hint { position: absolute; bottom: calc(22px + env(safe-area-inset-bottom, 0px)); inset-inline: 0; text-align: center; color: rgba(255,255,255,.6); font-size: 13px; pointer-events: none; }

/* ----- الإشعارات ----- */
.pushcard { margin: 14px 20px 0; padding: 12px 14px; border-radius: 18px; background: var(--ink); color: #fff; display: flex; align-items: center; gap: 12px; }
.pushcard > svg { color: var(--gold-l); flex: 0 0 auto; }
.pushcard > div { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.pushcard small { color: rgba(255,255,255,.8); font-size: 12.5px; }
.pushcard .ib { color: #fff; }
.pushrow { margin: 16px 20px 0; padding: 12px 16px; border-radius: 16px; background: var(--panel); display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; color: var(--ink2); }
.pushrow.on { background: var(--ok-bg); color: var(--ok); }
.pushnote { margin: 16px 20px 0; display: flex; gap: 8px; align-items: flex-start; font-size: 13.5px; line-height: 1.7; color: var(--gold-d); }
.mbody .pushnote { margin: 18px 0 0; }
.pushnote svg { flex: 0 0 auto; margin-top: 4px; }
.spin.sm { width: 20px; height: 20px; border-width: 2.5px; }
.mt8 { margin-top: 10px; }

/* ----- الأصناف: مربعات متساوية متلاصقة بعرض الشاشة ----- */
.catgrid { margin: 12px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: rgba(255,255,255,.9); }
.catcell { position: relative; display: block; aspect-ratio: 1 / 1; background-size: cover !important; background-position: center !important; overflow: hidden; min-width: 0; }
.catcell::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(10,10,12,.7), rgba(10,10,12,0) 42%); }
.catname { position: absolute; inset-inline: 10px; bottom: 10px; z-index: 1; color: #fff; font-size: 16px; font-weight: 700; line-height: 1.3; text-shadow: 0 1px 4px rgba(0,0,0,.4); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.catname small { display: block; font-size: 12px; font-weight: 600; opacity: .85; }
.catcell.all { background: var(--ink); color: var(--gold-l); display: flex; align-items: center; justify-content: center; padding-bottom: 30px; }
.catcell.all::after { display: none; }
.catgrid + .sec-h { margin-top: 18px; }

/* ----- قص صورة الصنف ----- */
.upl-prev.sq { background-size: cover !important; background-position: center !important; }
.cropwrap { margin-bottom: 16px; }
.crop { position: relative; width: 100%; max-width: 340px; aspect-ratio: 1 / 1; margin: 0 auto; overflow: hidden; border-radius: 6px; background: #1a1a1d; touch-action: none; cursor: grab; direction: ltr; user-select: none; -webkit-user-select: none; }
.crop:active { cursor: grabbing; }
.crop img { position: absolute; left: 0; top: 0; max-width: none; transform-origin: 0 0; pointer-events: none; }
.crop-grid { position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 0 2px rgba(255,255,255,.85); background:
  linear-gradient(rgba(255,255,255,.35), rgba(255,255,255,.35)) 33.33% 0 / 1px 100% no-repeat,
  linear-gradient(rgba(255,255,255,.35), rgba(255,255,255,.35)) 66.66% 0 / 1px 100% no-repeat,
  linear-gradient(rgba(255,255,255,.35), rgba(255,255,255,.35)) 0 33.33% / 100% 1px no-repeat,
  linear-gradient(rgba(255,255,255,.35), rgba(255,255,255,.35)) 0 66.66% / 100% 1px no-repeat; }
.crop-ctl { display: flex; align-items: center; gap: 10px; max-width: 340px; margin: 12px auto 4px; color: var(--mut); }
.crop-ctl input { flex: 1; accent-color: var(--ink); }
.cropwrap .hint { display: block; text-align: center; }
.crop-btns { display: flex; gap: 8px; justify-content: center; margin-top: 10px; }

/* ----- الستوري: الصورة كاملة بحجمها ----- */
.sv.hasimg { background: #000; }
.sv-blur { position: absolute; inset: -40px; background-size: cover !important; background-position: center !important; filter: blur(28px) brightness(.55); }
.sv-img { position: absolute; inset: 0; background-color: transparent !important; }
.banner-shade.soft { background: linear-gradient(180deg, rgba(10,10,12,.45) 0%, rgba(10,10,12,0) 22%, rgba(10,10,12,0) 55%, rgba(10,10,12,.75) 100%); }

/* ----- رفع فيديو البانر ----- */
.vprog { position: relative; height: 34px; border-radius: 12px; background: var(--panel); overflow: hidden; margin: 4px 0 10px; }
.vprog i { position: absolute; inset-block: 0; right: 0; background: var(--gold-l); transition: width .2s; }
.vprog span { position: relative; display: flex; align-items: center; justify-content: center; height: 100%; font-size: 13.5px; font-weight: 700; }
.btn.disabled { opacity: .5; pointer-events: none; }

/* ----- صفحة المنتج: الصورة بحجمها الطبيعي + الصور الإضافية تحت الاسم ----- */
.phero.natural { height: auto; background: #EFEDE8; }
.pmain-btn { display: block; width: 100%; border: none; padding: 0; background: none; cursor: zoom-in; }
.pmain { display: block; width: 100%; height: auto; max-height: 88vh; object-fit: contain; margin: 0 auto; }
img.pmain:not([src]) { min-height: 300px; background: var(--panel); }
.phero.natural + .psheet { margin-top: 0; border-radius: 0; box-shadow: none; }
.pextra { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line2); margin: 18px -20px 0; border-block: 1px solid var(--line2); }
.pextra-i { display: block; aspect-ratio: 1 / 1; border: none; padding: 0; background: #EFEDE8; cursor: zoom-in; overflow: hidden; }
.pextra-i.empty { background: #fff; cursor: default; }
.pextra-i img { width: 100%; height: 100%; object-fit: contain; display: block; }
.pextra-i img:not([src]) { background: var(--panel); }
