/* admin-offers.css — صفحة «العروض والإعلانات» (ص91): قائمة بطاقات + معالج بأربع خطوات + معاينة هاتف.
   خاص بهذه الصفحة فقط (لا يُحمَّل بغيرها). الألوان كلها توكِنات الحزمة؛ الحرفي الوحيد هو الذهب المعدني
   (نفس تدرّج store.css) لمعاينة الشريط العلوي كما يراه الزبون. */

.ofx { --ofx-w: 1180px; --ofx-r: var(--r-md, 20px); --gold-metal: linear-gradient(120deg, #8A6A2B 0%, #E9CF86 38%, #B08A3E 58%, #F0DC9E 78%, #A7823A 100%);
  /* ترويسة المتجر داكنة بالوضعين (DESIGN.md «Dark Chrome»)، بينما اللوحة تفتّح --chrome نهاراً ⇒ قيمة المتجر للمعاينة */
  --pv-chrome: #0B0B0D; --pv-on-chrome: #EFE9DC; }
.ofx > div, .ofx-ed { max-width: var(--ofx-w); margin-inline: auto; }
.ofx .mi { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.ofx button { font: inherit; cursor: pointer; }
.ofx button:disabled { cursor: not-allowed; }
.ofx bdi { font-variant-numeric: tabular-nums; }

/* ═════════ الرأس ═════════ */
.ofx-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px 20px; margin-bottom: 18px; }
.ofx-head h1 { margin: 0; font-size: 30px; line-height: 1.25; }
.ofx-lede { margin: 4px 0 0; font-size: 14px; color: var(--text-2); max-width: 52ch; }
.ofx-new { gap: 8px; padding-inline: 22px; }
.ofx-new .mi { width: 20px; height: 20px; stroke-width: 2.4; }

.ofx-master { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--ofx-r);
  background: var(--surface); cursor: pointer; }
.ofx-master span { display: grid; gap: 2px; min-width: 0; }
.ofx-master b { font-size: 15px; }
.ofx-master small { font-size: 13px; color: var(--text-3); }
.ofx-master.off { border-color: var(--line); border-color: color-mix(in srgb, var(--deal) 45%, transparent); background: var(--surface); background: color-mix(in srgb, var(--deal) 6%, var(--surface)); }
.ofx-master.off b { color: var(--deal); }

.ofx-alert { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 0 0 16px; padding: 12px 16px; border-radius: var(--r-sm, 12px);
  border: 1px solid var(--line);
  border: 1px solid color-mix(in srgb, var(--deal) 40%, transparent); background: var(--surface); background: color-mix(in srgb, var(--deal) 7%, var(--surface)); color: var(--deal); font-size: 14px; font-weight: 600; }

/* ═════════ الإحصاءات (أزرار فلترة) ═════════ */
.ofx-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.ofx-stat { display: grid; gap: 2px; justify-items: start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--text);
  text-align: start; transition: border-color .2s, background-color .2s, transform .2s var(--ease-out); }
.ofx-stat b { font-family: var(--font-display); font-size: 26px; font-weight: 900; line-height: 1.1; font-variant-numeric: tabular-nums; }
.ofx-stat span { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--text-2); line-height: 1.35; }
.ofx-stat span::before { content: ''; width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; background: var(--ink-3); }
.ofx-stat.s-live span::before { background: var(--ok); box-shadow: 0 0 0 3px transparent; box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 20%, transparent); }
.ofx-stat.s-soon span::before { background: var(--volt); }
.ofx-stat.s-over span::before { background: var(--deal); }
.ofx-stat.s-draft span::before { background: transparent; border: 1.5px dashed var(--ink-3); }
.ofx-stat:hover { border-color: var(--volt); border-color: color-mix(in srgb, var(--volt) 60%, var(--line)); }
.ofx-stat.on { border-color: var(--volt); background: var(--surface); background: color-mix(in srgb, var(--volt) 10%, var(--surface)); box-shadow: inset 0 0 0 1px var(--volt); }

/* ═════════ البحث والفلترة ═════════ */
.ofx-tools { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; margin-bottom: 16px; }
.ofx-search { position: relative; display: block; }
.ofx-search .mi { position: absolute; inset-inline-start: 14px; top: 50%; transform: translateY(-50%); color: var(--text-3); pointer-events: none; }
/* !important: قاعدة الحقول العامة في admin.css أعلى تحديداً (:is بستة محددات) */
body.admin .ofx-search input { width: 100%; min-height: 48px !important; padding-inline-start: 42px !important; border-radius: var(--radius-pill) !important; }
.ofx-sel { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
body.admin .ofx-sel select { width: 100%; min-height: 48px !important; border-radius: var(--radius-pill) !important; }
@media (min-width: 760px) { .ofx-tools { grid-template-columns: minmax(0, 1fr) minmax(0, 420px); } }

/* ═════════ التحميل والفراغ ═════════ */
.ofx-loading { display: grid; gap: 10px; }
.ofx-loading i { height: 132px; border-radius: var(--ofx-r); background: linear-gradient(90deg, var(--surface) 0 40%, var(--surface) 50%, var(--surface) 60%) 0 0 / 300% 100%; background: linear-gradient(90deg, color-mix(in srgb, var(--text) 5%, var(--surface)) 0 40%, color-mix(in srgb, var(--text) 9%, var(--surface)) 50%, color-mix(in srgb, var(--text) 5%, var(--surface)) 60%) 0 0 / 300% 100%;
  animation: ofx-shim 1.4s linear infinite; }
@keyframes ofx-shim { to { background-position: -150% 0; } }
.ofx-empty { display: grid; justify-items: center; gap: 8px; padding: 44px 20px; border: 1px dashed var(--line); border: 1px dashed color-mix(in srgb, var(--text) 22%, transparent); border-radius: var(--ofx-r); text-align: center; }
.ofx-empty > .mi { width: 40px; height: 40px; color: var(--gold-ink); stroke-width: 1.5; }
.ofx-empty b { font-size: 17px; }
.ofx-empty p { margin: 0 0 8px; max-width: 42ch; color: var(--text-2); font-size: 14px; }
.ofx-empty.sm { padding: 26px 16px; }

/* ═════════ البطاقات ═════════ */
.ofx-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
@media (min-width: 1100px) { .ofx-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ofx-list > li { min-width: 0; }
.ofx-card { height: 100%; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--ofx-r); background: var(--surface); overflow: hidden;
  transition: border-color .25s, box-shadow .25s, background-color .6s; }
.ofx-card:hover { border-color: var(--line); border-color: color-mix(in srgb, var(--volt) 45%, var(--line)); }
.ofx-card.st-draft { border-style: dashed; }
.ofx-card.st-off, .ofx-card.st-over { background: var(--surface); background: color-mix(in srgb, var(--text) 2%, var(--surface)); }
.ofx-card.hl { border-color: var(--volt); box-shadow: 0 0 0 3px transparent; box-shadow: 0 0 0 3px color-mix(in srgb, var(--volt) 30%, transparent); background: var(--surface); background: color-mix(in srgb, var(--volt) 7%, var(--surface)); }
.ofx-c-main { flex: 1; display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 14px 14px 12px; }
.ofx-c-thumb { width: 64px; height: 64px; display: grid; place-items: center; padding: 6px; border: 0; border-radius: 14px; overflow: hidden;
  background: radial-gradient(circle at 50% 40%, #FFFFFF, #F1EDE5 70%, #DDD6C8); color: #8A6A2B; }
.ofx-c-thumb img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.ofx-c-thumb .mi { width: 26px; height: 26px; stroke-width: 1.6; }
.st-off .ofx-c-thumb img, .st-over .ofx-c-thumb img, .st-draft .ofx-c-thumb img { filter: grayscale(.85); opacity: .7; }
.ofx-c-txt { min-width: 0; display: grid; gap: 4px; }
.ofx-c-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ofx-type { font-size: 12px; font-weight: 600; color: var(--text-2); }
.ofx-c-txt h3 { margin: 0; font-family: var(--font-head); font-size: 15.5px; font-weight: 700; line-height: 1.45; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.st-off h3, .st-draft h3, .st-over h3 { color: var(--text-2); }
.ofx-c-meta { display: flex; flex-wrap: wrap; gap: 2px 12px; margin: 0; font-size: 12.5px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.ofx-c-meta .soon { color: var(--gold-ink); font-weight: 700; }
.ofx-c-link { display: inline-flex; align-items: center; gap: 3px; color: var(--gold-ink); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.ofx-c-link .mi { width: 13px; height: 13px; }
.ofx-c-warn { margin: 2px 0 0; padding: 6px 10px; border-radius: 10px; font-size: 12.5px; line-height: 1.5; color: var(--text);
  background: transparent;
  background: color-mix(in srgb, var(--warn, var(--volt)) 14%, transparent); }

.ofx-st { display: inline-flex; align-items: center; gap: 5px; flex-shrink: 0; padding: 2px 10px 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; line-height: 1.6;
  background: transparent;
  background: color-mix(in srgb, var(--text) 7%, transparent); color: var(--text-2); }
.ofx-st::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.ofx-st.s-live { background: transparent; background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); }
.ofx-st.s-soon { background: transparent; background: color-mix(in srgb, var(--volt) 22%, transparent); color: var(--gold-ink); }
.ofx-st.s-over { background: transparent; background: color-mix(in srgb, var(--deal) 11%, transparent); color: var(--deal); }
.ofx-st.s-draft { background: transparent; box-shadow: inset 0 0 0 1px transparent; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--text) 25%, transparent); }
.ofx-st.s-draft::before { background: transparent; border: 1px dashed currentColor; }

.ofx-c-ord { display: grid; justify-items: center; gap: 0; margin-inline-end: -4px; }
.ofx-c-ord button { width: 36px; height: 32px; display: grid; place-items: center; border: 0; border-radius: 10px; background: none; color: var(--text-2); }
.ofx-c-ord button:hover:not(:disabled) { background: transparent; background: color-mix(in srgb, var(--volt) 14%, transparent); color: var(--text); }
.ofx-c-ord button:disabled { opacity: .28; }
.ofx-c-ord span { font-size: 11.5px; font-weight: 700; color: var(--text-3); font-variant-numeric: tabular-nums; }

.ofx-c-acts { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.ofx-c-acts.ro { grid-template-columns: minmax(0, 1fr); }
.ofx-c-acts button { min-height: 54px; display: grid; justify-items: center; align-content: center; gap: 3px; padding: 6px 2px; border: 0; border-inline-start: 1px solid var(--line);
  background: none; color: var(--text-2); font-size: 12px; font-weight: 700; transition: background-color .2s, color .2s; }
.ofx-c-acts button:first-child { border-inline-start: 0; }
.ofx-c-acts.ro button { border-inline-start: 0; }
.ofx-c-acts button:hover:not(:disabled) { background: transparent; background: color-mix(in srgb, var(--volt) 10%, transparent); color: var(--text); }
.ofx-c-acts button.go { color: var(--ok); }
.ofx-c-acts button.del { color: var(--deal); }
.ofx-c-acts button.del:hover { background: transparent; background: color-mix(in srgb, var(--deal) 9%, transparent); color: var(--deal); }
.ofx-c-acts button:disabled { opacity: .5; }
@media (min-width: 640px) {
  .ofx-c-acts button { grid-auto-flow: column; gap: 6px; font-size: 13px; min-height: 48px; }
}

/* ═════════ المعاينة السريعة (لوحة سفلية على الهاتف، حوار على الكمبيوتر) ═════════ */
.ofx-sheet { position: fixed; inset: 0; z-index: 965; display: flex; align-items: flex-end; justify-content: center; background: rgba(0, 0, 0, .55); }
.ofx-sheet-b { width: 100%; max-height: 94dvh; overflow: auto; overscroll-behavior: contain; padding: 14px 16px calc(16px + env(safe-area-inset-bottom));
  border-radius: 24px 24px 0 0; background: var(--paper); box-shadow: var(--shadow-3); animation: ofx-up .35s var(--ease-out); }
@keyframes ofx-up { from { transform: translateY(24px); opacity: .4; } }
@media (min-width: 700px) {
  .ofx-sheet { align-items: center; padding: 24px; }
  .ofx-sheet-b { width: 420px; border-radius: 24px; padding-bottom: 18px; }
}
.ofx-sheet-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.ofx-sheet-h div { display: grid; gap: 2px; min-width: 0; }
.ofx-sheet-h b { font-size: 16px; overflow-wrap: anywhere; }
.ofx-sheet-h small { font-size: 13px; color: var(--text-3); }
.ofx-sheet-f { margin-top: 14px; }
.ofx-sheet-f .btn { width: 100%; gap: 8px; }
.ofx-icon { width: 44px; height: 44px; flex-shrink: 0; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); color: var(--text); }
.ofx-icon:hover { border-color: var(--volt); }

/* ═════════ المحرّر ═════════ */
.ofx.editing { padding-bottom: 0; }
.ofx-ed { display: grid; gap: 16px; }
.ofx-ed-head { display: flex; align-items: center; gap: 12px; }
.ofx-ed-head h1 { margin: 0; font-size: 24px; line-height: 1.3; min-width: 0; }
.ofx-ed-head h1:focus { outline: none; }

/* مؤشر الخطوات */
.ofx-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); counter-reset: s; }
.ofx-steps li { position: relative; min-width: 0; }
.ofx-steps li + li::before { content: ''; position: absolute; top: 19px; inset-inline-end: calc(50% + 20px); inset-inline-start: calc(-50% + 20px); height: 2px; border-radius: 2px; background: var(--line); }
.ofx-steps li.done::before, .ofx-steps li.on::before { background: var(--volt); background: color-mix(in srgb, var(--volt) 70%, var(--line)); }
.ofx-steps button { width: 100%; display: grid; justify-items: center; gap: 6px; padding: 0 2px 4px; border: 0; background: none; color: var(--text-3); }
.ofx-sn { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; border: 1.5px solid var(--line); background: var(--surface);
  font-family: var(--font-display); font-weight: 900; font-size: 15px; color: var(--text-2); transition: background-color .25s, border-color .25s, color .25s; }
.ofx-sn .mi { width: 18px; height: 18px; stroke-width: 2.6; }
.ofx-sl { font-size: 12px; font-weight: 700; line-height: 1.35; text-align: center; }
.ofx-steps li.done .ofx-sn { border-color: var(--volt); color: var(--gold-ink); }
.ofx-steps li.on .ofx-sn { border-color: var(--volt); background: var(--volt); color: var(--on-volt); box-shadow: 0 0 0 5px transparent; box-shadow: 0 0 0 5px color-mix(in srgb, var(--volt) 18%, transparent); }
.ofx-steps li.on .ofx-sl { color: var(--text); }
@media (min-width: 760px) { .ofx-sl { font-size: 13.5px; } }

.ofx-ed-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; align-items: start; }
.ofx-ed-pv { display: none; }
@media (min-width: 1100px) {
  .ofx-ed-grid { grid-template-columns: minmax(0, 1fr) 360px; }
  .ofx-ed-pv { display: block; position: sticky; top: 16px; }
  .ofx-pv-mob { display: none; }
}
.ofx-ed-pv-h { margin: 0 0 10px; font-size: 13px; font-weight: 700; color: var(--text-2); text-align: center; }

.ofx-pane { display: grid; gap: 14px; animation: ofx-in .3s var(--ease-out); }
@keyframes ofx-in { from { opacity: 0; transform: translateY(6px); } }
.ofx-pane > h2 { margin: 0; font-size: 22px; line-height: 1.35; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.ofx-pane > h2 small { font-family: var(--font-head); font-size: 13px; font-weight: 700; color: var(--gold-ink); }
.ofx-pane > .ofx-help { margin-top: -8px; }
.ofx-help { display: block; font-size: 13px; line-height: 1.6; color: var(--text-3); }
.ofx-help:empty { display: none; }

.ofx-grp-b { min-width: 0; margin: 0; padding: 16px; border: 1px solid var(--line); border-radius: var(--ofx-r); background: var(--surface); display: grid; gap: 14px; }
.ofx-grp-b > legend { float: inline-start; width: 100%; padding: 0; margin: 0 0 2px; font-family: var(--font-head); font-size: 15px; font-weight: 700; color: var(--text); }
.ofx-grp-b > legend small { font-weight: 500; font-size: 12.5px; color: var(--text-3); margin-inline-start: 6px; }
.ofx-grp-b > legend + * { clear: both; }

.ofx-f { display: grid; gap: 6px; min-width: 0; }
.ofx-f > label { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-weight: 600; font-size: 14px; color: var(--text-2); }
.ofx-f > label small { font-weight: 400; font-size: 12.5px; color: var(--text-3); margin-inline-end: auto; }
.ofx-cnt { font-size: 12px; font-weight: 500; color: var(--text-3); font-variant-numeric: tabular-nums; }
body.admin .ofx-f :is(input:not([type=checkbox]):not([type=radio]), select, textarea) { width: 100%; max-width: 100%; box-sizing: border-box; min-height: 50px !important; font-size: 16px; }
body.admin .ofx-f textarea { min-height: 120px; line-height: 1.7; resize: vertical; }
body.admin .ofx-f.bad :is(input, textarea, select):not(.ofx-slug input) { border-color: var(--deal) !important; box-shadow: 0 0 0 3px transparent !important; box-shadow: 0 0 0 3px color-mix(in srgb, var(--deal) 14%, transparent) !important; }
.ofx-err { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--deal); }
.ofx-err::before { content: ''; width: 6px; height: 6px; flex-shrink: 0; border-radius: 50%; background: currentColor; }
.ofx-row2 { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
@media (min-width: 640px) { .ofx-row2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ofx-inline { display: flex; align-items: center; gap: 10px; }
.ofx-inline input { flex: 1; }
.ofx-pct { flex-shrink: 0; padding: 4px 12px; border-radius: 999px; background: transparent; background: color-mix(in srgb, var(--deal) 12%, transparent); color: var(--deal); font-weight: 800; font-size: 13px; }

/* أنواع الإعلان: بطاقة لكل نوع مع رسم مصغّر لمكانه في الهاتف */
.ofx-types { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
@media (min-width: 700px) { .ofx-types { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ofx-tp { display: grid; grid-template-columns: 52px minmax(0, 1fr) 22px; gap: 14px; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: 18px;
  background: var(--surface); color: var(--text); text-align: start; transition: border-color .2s, background-color .2s, box-shadow .2s; }
.ofx-tp:hover { border-color: var(--volt); border-color: color-mix(in srgb, var(--volt) 55%, var(--line)); }
.ofx-tp.on { border-color: var(--volt); background: var(--surface); background: color-mix(in srgb, var(--volt) 8%, var(--surface)); box-shadow: inset 0 0 0 1px var(--volt); }
.ofx-tp.idle:not(.on) { opacity: .72; }
.ofx-tp-txt { display: grid; gap: 3px; min-width: 0; }
.ofx-tp-txt b { font-size: 15.5px; }
.ofx-tp-txt small { font-size: 12.5px; line-height: 1.55; color: var(--text-2); }
.ofx-tp-txt em { font-style: normal; font-size: 12px; color: var(--text-3); }
.ofx-tp-dot { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--line); border: 1.5px solid color-mix(in srgb, var(--text) 30%, transparent); transition: border .2s; }
.ofx-tp.on .ofx-tp-dot { border: 7px solid var(--volt); }
.ofx-tp-art { position: relative; width: 52px; height: 76px; border-radius: 10px; border: 1.5px solid var(--line); border: 1.5px solid color-mix(in srgb, var(--text) 28%, transparent); background: var(--paper); overflow: hidden; }
.ofx-tp-art i { position: absolute; inset-inline: 5px; border-radius: 3px; background: transparent; background: color-mix(in srgb, var(--text) 12%, transparent); }
.ofx-tp-art i:nth-child(1) { top: 5px; height: 6px; }
.ofx-tp-art i:nth-child(2) { top: 15px; height: 22px; }
.ofx-tp-art i:nth-child(3) { top: 41px; height: 28px; }
.tp-topbar .ofx-tp-art i:nth-child(1), .tp-strip .ofx-tp-art i:nth-child(3),
.tp-hero .ofx-tp-art i:nth-child(2), .tp-flash .ofx-tp-art i:nth-child(2) { background: var(--gold-metal); }
.tp-topbar .ofx-tp-art i:nth-child(1) { inset-inline: 0; top: 0; height: 9px; border-radius: 0; }
.tp-side .ofx-tp-art i:nth-child(2) { background: transparent; background: color-mix(in srgb, var(--text) 12%, transparent); }
.tp-side .ofx-tp-art i:nth-child(3) { background: var(--gold-metal); inset-inline-end: 26px; }
.tp-strip .ofx-tp-art i:nth-child(3) { top: 44px; height: 9px; inset-inline: 0; border-radius: 0; }
.tp-flash .ofx-tp-art i:nth-child(1) { background: var(--deal); }

.ofx-opt { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); cursor: pointer; }
.ofx-grp-b .ofx-opt { padding: 4px 0; border: 0; background: none; }
.ofx-opt span { display: grid; gap: 3px; min-width: 0; }
.ofx-opt b { font-size: 15px; }
.ofx-opt small { font-size: 12.5px; line-height: 1.6; color: var(--text-3); }
.ofx-opt.on:not(.ofx-grp-b .ofx-opt) { border-color: var(--volt); border-color: color-mix(in srgb, var(--volt) 60%, var(--line)); }

/* المنتج */
.ofx-picked { display: flex; align-items: center; gap: 12px; padding: 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); background: color-mix(in srgb, var(--text) 2%, var(--surface)); }
.ofx-picked-img { width: 48px; height: 48px; flex-shrink: 0; display: grid; place-items: center; padding: 4px; border-radius: 10px;
  background: radial-gradient(circle at 50% 40%, #FFFFFF, #F1EDE5 70%, #DDD6C8); overflow: hidden; }
.ofx-picked-img img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.ofx-picked-t { flex: 1; min-width: 0; display: grid; gap: 2px; }
.ofx-picked-t b { font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ofx-picked-t small { font-size: 12.5px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.ofx-psearch { display: grid; gap: 6px; }
.ofx-presults { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--surface); box-shadow: var(--shadow-1); }
.ofx-presults button { display: flex; width: 100%; align-items: center; gap: 10px; min-height: 58px; padding: 6px 10px; border: 0; border-top: 1px solid var(--line);
  background: none; color: var(--text); font-size: 14px; text-align: start; }
.ofx-presults button:first-child { border-top: 0; }
.ofx-presults button > span:nth-child(2) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ofx-presults button b { flex-shrink: 0; font-size: 13px; color: var(--gold-ink); font-variant-numeric: tabular-nums; }
.ofx-presults button:hover { background: transparent; background: color-mix(in srgb, var(--volt) 8%, transparent); }

/* الصورة */
.ofx-img-row { display: flex; align-items: center; gap: 10px; }
.ofx-img-row input { flex: 1; }
.ofx-img-pv { width: 50px; height: 50px; flex-shrink: 0; display: grid; place-items: center; padding: 4px; border-radius: 12px; overflow: hidden;
  background: radial-gradient(circle at 50% 40%, #FFFFFF, #F1EDE5 70%, #DDD6C8); }
.ofx-img-pv img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.ofx-img-pv.bad { outline: 2px solid var(--deal); outline-offset: -2px; }
.ofx-img-pv.bad img { display: none; }

/* الخلفية */
.ofx-bgs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.ofx-bg { display: grid; justify-items: center; gap: 6px; padding: 10px 4px; border: 1px solid var(--line); border-radius: 14px; background: none; color: var(--text-2); font-size: 12.5px; font-weight: 700; }
.ofx-bg i { width: 36px; height: 22px; border-radius: 999px; border: 1px solid var(--line); border: 1px solid color-mix(in srgb, var(--text) 18%, transparent); }
.ofx-bg.bg-volt i { background: var(--gold-metal); }
.ofx-bg.bg-ink i { background: var(--pv-chrome); }
.ofx-bg.bg-paper i { background: var(--surface); }
.ofx-bg.bg-deal i { background: var(--deal); }
.ofx-bg.on { border-color: var(--volt); color: var(--text); box-shadow: inset 0 0 0 1px var(--volt); background: transparent; background: color-mix(in srgb, var(--volt) 8%, transparent); }

/* صفحة العرض */
.ofx-slug { display: flex; align-items: stretch; border: 1px solid var(--line); border-radius: var(--r-sm, 12px); overflow: hidden; background: var(--surface); background: color-mix(in srgb, var(--text) 3%, var(--surface)); }
.ofx-slug span { display: grid; place-items: center; padding-inline: 12px; font-size: 14px; color: var(--text-3); background: transparent; background: color-mix(in srgb, var(--text) 5%, transparent); border-inline-end: 1px solid var(--line); }
body.admin .ofx-slug input { border: 0 !important; border-radius: 0 !important; background: none !important; box-shadow: none !important; }
.ofx-slug:focus-within { border-color: var(--volt); box-shadow: 0 0 0 4px transparent; box-shadow: 0 0 0 4px color-mix(in srgb, var(--volt) 16%, transparent); }
.ofx-f.bad .ofx-slug { border-color: var(--deal); }

/* الجدولة */
.ofx-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ofx-chips button { min-height: 42px; padding: 0 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--text-2); font-size: 14px; font-weight: 700; }
.ofx-chips button:hover { border-color: var(--volt); color: var(--text); }
.ofx-chips button.on { border-color: var(--volt); background: var(--surface); background: color-mix(in srgb, var(--volt) 14%, var(--surface)); color: var(--text); }

/* المراجعة */
.ofx-sum { margin: 0; border: 1px solid var(--line); border-radius: var(--ofx-r); background: var(--surface); overflow: hidden; }
.ofx-sum > div { display: grid; grid-template-columns: 82px minmax(0, 1fr); gap: 10px; padding: 12px 16px; border-top: 1px solid var(--line); }
.ofx-sum > div:first-child { border-top: 0; }
.ofx-sum dt { font-size: 13px; color: var(--text-3); }
.ofx-sum dd { margin: 0; font-size: 14.5px; font-weight: 600; overflow-wrap: anywhere; }
.ofx-lnk { border: 0; background: none; padding: 0 4px; color: var(--gold-ink); font-size: 13px; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.ofx-warns { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ofx-warns li { padding: 10px 14px; border-radius: 14px; font-size: 13.5px; line-height: 1.6; background: transparent; background: color-mix(in srgb, var(--warn, var(--volt)) 15%, transparent); }

/* شريط الإجراءات */
.ofx-bar { position: sticky; bottom: var(--abar, 0px); z-index: 30; display: flex; align-items: center; gap: 8px; margin-inline: -16px; padding: 12px 16px;
  background: var(--paper);
  background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(10px); border-top: 1px solid var(--line); }
.ofx-bar-sp { flex: 1; }
.ofx-bar .btn { gap: 8px; padding-inline: 20px; white-space: nowrap; }
.ofx-prev .mi { display: none; }
@media (max-width: 480px) {
  .ofx-bar .btn { padding-inline: 16px; font-size: 14.5px; }
  .ofx-bar .ofx-prev { width: 48px; padding: 0; justify-content: center; flex-shrink: 0; }
  .ofx-prev .mi { display: block; }
  .ofx-prev span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
}
@media (min-width: 961px) { .ofx-bar { margin-inline: 0; border: 1px solid var(--line); border-radius: var(--ofx-r); bottom: 12px; } }
.ofx-spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-inline-end-color: transparent; animation: ofx-rot .7s linear infinite; }
@keyframes ofx-rot { to { transform: rotate(360deg); } }

/* ═════════ معاينة الهاتف ═════════ */
.ofx-pv { display: grid; gap: 10px; justify-items: center; }
.ofx-pv-tabs { display: inline-flex; padding: 3px; border-radius: 999px; background: transparent; background: color-mix(in srgb, var(--text) 7%, transparent); }
.ofx-pv-tabs button { min-height: 38px; padding: 0 16px; border: 0; border-radius: 999px; background: none; color: var(--text-2); font-size: 13px; font-weight: 700; }
.ofx-pv-tabs button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .14); }
.ofx-phone { width: 300px; max-width: 100%; padding: 9px; border-radius: 40px; background: #0B0B0D; box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .55), inset 0 0 0 1px #3B393E; }
.ofx-scr { position: relative; height: 520px; overflow: hidden; border-radius: 32px; background: var(--paper); color: var(--text); font-size: 13px; }
.ofx-pv-note { margin: 0; max-width: 300px; font-size: 12.5px; line-height: 1.6; color: var(--text-3); text-align: center; }
.ofx-pv-note.warn { color: var(--deal); font-weight: 600; }

.pv-ann { padding: 22px 12px 8px; display: grid; gap: 4px; }
.pv-ann.bg-volt { background: var(--gold-metal); color: #111; }
.pv-ann.bg-ink { background: var(--pv-chrome); color: var(--pv-on-chrome); border-bottom: 1px solid var(--volt); border-bottom: 1px solid color-mix(in srgb, var(--volt) 55%, transparent); }
.pv-ann.bg-paper { background: var(--surface); color: var(--text); border-bottom: 1px solid var(--line); }
.pv-ann.bg-deal { background: var(--deal); color: var(--on-deal); }
.pv-ann-top { display: flex; align-items: center; gap: 6px; min-height: 0; }
.pv-ann-clock { font-family: var(--font-head); font-weight: 700; font-size: 12px; font-variant-numeric: tabular-nums; }
.ofx .pv-ann-x { width: 14px; height: 14px; margin-inline-start: auto; opacity: .7; }
.pv-ann-txt { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-width: 0; }
.pv-ann-txt b { font-family: var(--font-head); font-size: 13.5px; font-weight: 600; overflow-wrap: anywhere; }
.pv-ann-badge { padding: 1px 8px; border-radius: 999px; font-size: 10px; font-weight: 700; background: rgba(0, 0, 0, .14); }
.pv-ann.bg-ink .pv-ann-badge, .pv-ann.bg-deal .pv-ann-badge { background: rgba(255, 255, 255, .18); }
.pv-ann-sub { font-size: 11.5px; opacity: .82; overflow-wrap: anywhere; }
.pv-ann-cta { font-size: 11.5px; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.pv-head { display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 12px; background: var(--pv-chrome); border-bottom: 1px solid var(--line); border-bottom: 1px solid color-mix(in srgb, var(--volt) 40%, transparent); }
.pv-head.top { padding-top: 14px; height: 58px; }
.pv-logo { width: 34px; height: 18px; border-radius: 6px; background: var(--gold-metal); }
.pv-search { flex: 1; height: 24px; border-radius: 999px; background: rgba(255, 255, 255, .14); }
.pv-slide { margin: 10px; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: center; gap: 6px; min-height: 160px; padding: 14px 12px;
  border-radius: 18px; border: 1px solid var(--line); background: radial-gradient(120% 120% at 0% 50%, rgba(212, 175, 55, .16), transparent 60%), var(--surface); }
.pv-s-txt { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; min-width: 0; }
.pv-s-chip { font-size: 10px; font-weight: 700; color: var(--gold-ink); padding: 2px 8px; border-radius: 999px; background: transparent; background: color-mix(in srgb, var(--volt) 14%, transparent); }
.pv-s-title { font-family: var(--font-display); font-size: 16px; line-height: 1.35; font-weight: 800; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.pv-s-sub { font-size: 10.5px; color: var(--text-2); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; }
.pv-s-cta { display: inline-flex; align-items: center; min-height: 28px; padding: 0 12px; border-radius: 999px; background: var(--volt); color: var(--on-volt); font-size: 11px; font-weight: 800; }
.pv-s-img { display: grid; place-items: center; height: 120px; }
.pv-s-img img { max-width: 100%; max-height: 120px; object-fit: contain; filter: drop-shadow(0 10px 14px rgba(0, 0, 0, .22)); }
.pv-noimg { font-size: 11px; color: var(--text-3); }
.pv-dots { display: flex; justify-content: center; gap: 5px; margin-top: -2px; }
.pv-dots i { width: 6px; height: 6px; border-radius: 999px; background: transparent; background: color-mix(in srgb, var(--text) 20%, transparent); }
.pv-dots i.on { width: 16px; background: var(--volt); }
.pv-skel { display: flex; justify-content: space-between; gap: 8px; padding: 14px 14px 8px; }
.pv-skel i { width: 50px; height: 50px; border-radius: 50%; background: transparent; background: color-mix(in srgb, var(--text) 7%, transparent); }
.pv-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 6px 14px; }
.pv-cards i { height: 150px; border-radius: 14px; background: transparent; background: color-mix(in srgb, var(--text) 6%, transparent); }

.pv-land { display: grid; gap: 8px; padding: 30px 14px 14px; height: 100%; overflow: auto; scrollbar-width: none; align-content: start; }
.pv-l-img { display: grid; place-items: center; height: 170px; padding: 10px; border-radius: 16px; background: radial-gradient(circle at 50% 40%, #FFFFFF, #F1EDE5 70%, #DDD6C8); }
.pv-l-img img { max-width: 100%; max-height: 150px; object-fit: contain; mix-blend-mode: multiply; }
.pv-l-img .pv-noimg { color: #656A72; }
.pv-l-badge { justify-self: start; padding: 2px 10px; border-radius: 999px; background: var(--deal); color: var(--on-deal); font-size: 10.5px; font-weight: 700; }
.pv-l-title { font-family: var(--font-display); font-size: 19px; line-height: 1.35; font-weight: 800; overflow-wrap: anywhere; }
.pv-l-sub { margin: 0; font-size: 12px; color: var(--text-2); }
.pv-l-price { display: flex; align-items: baseline; gap: 8px; }
.pv-l-price .now { font-family: var(--font-head); font-size: 19px; font-weight: 700; color: var(--gold-ink); }
.pv-l-price s { font-size: 12px; color: var(--text-3); }
.pv-l-cd { font-size: 12px; color: var(--text-2); }
.pv-l-cd b { font-family: var(--font-head); color: var(--deal); font-variant-numeric: tabular-nums; }
.pv-l-p { margin: 0; font-size: 12px; line-height: 1.75; color: var(--text-2); overflow-wrap: anywhere; }
.pv-l-btn { display: grid; place-items: center; min-height: 40px; margin-top: 4px; border-radius: 999px; background: var(--volt); color: var(--on-volt); font-weight: 800; font-size: 13px; }

@media (prefers-reduced-motion: reduce) {
  .ofx-pane, .ofx-sheet-b, .ofx-loading i, .ofx-spin { animation: none; }
}
