/* ═══════════════════════════════════════════════════════════════
   matjre store — واجهة متجر التينانت المخصصة (مرجع تصميم §3.4)
   ═══════════════════════════════════════════════════════════════
   MOBILE-FIRST: القاعدة = موبايل، والترقية عبر min-width فقط
   (641px / 769px / 1024px — نفس نقاط الكسر القانونية في النظام).
   نفس tokens النظام المركزي (--color-*) + نفس كلاسات الـprimitives
   (.primary-button / .button.secondary / .ui-card / .badge)
   + namespace مخصص st-* — لا لمس لسكن معرضي.
   هوية التينانت تُفرش عبر CSS vars — لا ألوان ثابتة في المكوّنات.
   صفر inline styles: كل التنسيق هنا (palettes + swatches + utilities).
   ═══════════════════════════════════════════════════════════════ */

:root {
  /* هوية التينانت — تُحقن من إعدادات المتجر */
  --st-brand: var(--color-primary, #0f766e);
  --st-brand-rgb: var(--color-primary-rgb, 15 118 110);
  --st-accent: var(--color-accent, #d9a441);

  /* أسطح */
  --st-bg: var(--color-bg, #f7f7f5);
  --st-surface: var(--color-surface, #ffffff);
  --st-surface-2: var(--color-surface-2, #f1f1ee);
  --st-text: var(--color-text, #16181a);
  --st-muted: var(--color-text-muted, #6b7280);
  --st-border: var(--color-border, #e5e7eb);
  --st-border-strong: var(--color-border-strong, #d1d5db);
  --st-success: var(--color-success, #16a34a);
  --st-danger: var(--color-danger, #dc2626);
  --st-warning: var(--color-warning, #d97706);

  /* نصف أقطار — نطاق موحد لكل القالب، لا قيم متفرقة */
  --st-radius-xs: 0;     /* شارات صغيرة/علامات دفع */
  --st-radius-ctrl: 0;   /* كل عناصر التحكم: أزرار/حقول/شرائح/خيارات/صور داخلية */
  --st-radius-card: 0;   /* بطاقات وصناديق */
  --st-radius-panel: 0;  /* هيرو/بانر/معرض رئيسي */
  --st-radius-pill: 0;   /* كبسولات وعدادات */

  /* ارتفاعات تحكم موحدة — --control-h المركزي (40px) مرجع الأزرار */
  --st-ctrl-h-s: var(--control-h, 40px);
  --st-ctrl-h: var(--control-h, 40px);
  --st-ctrl-h-xl: 54px;
  --st-icon-h: var(--control-h, 40px); /* أزرار أيقونية — نفس ارتفاع الأزرار المركزية */

  /* مسافات */
  --st-space-1: 8px;
  --st-space-2: 12px;
  --st-space-3: 16px;
  --st-space-4: 24px;

  --st-shadow-card: none; /* flat: لا ظلال — الفصل بالحدود */
  --st-shadow-pop: none;
  --st-container: 1280px;
  --st-header-h: 62px;
  --st-gap: clamp(14px, 2vw, 24px);
  --st-ease: cubic-bezier(.2, .7, .2, 1);
}

/* ملاحظة: لا تعريفات --color-* ولا قواعد html/body هنا — الغلاف المركزي
   (publicShell + app.css) يملك توكنز الثيم والعناصر العامة. كل محتوى
   المتجر يعيش داخل .st-root فلا تتسرب تنسيقاتنا للناف/الفوتر/المودالات. */

.st-root img, .st-root video { max-width: 100%; display: block; }
.st-root a { color: inherit; text-decoration: none; }
.st-root button { font: inherit; cursor: pointer; }

.st-container { max-width: var(--st-container); margin-inline: auto; padding-inline: var(--st-space-3); }
.st-muted { color: var(--st-muted); }
.st-note { font-size: .85rem; color: var(--st-muted); }
.st-price { font-weight: 800; font-variant-numeric: tabular-nums; }
.st-price small { font-weight: 500; font-size: .72em; opacity: .7; }
.st-price-old { color: var(--st-muted); text-decoration: line-through; font-weight: 400; font-size: .82em; }
.st-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.st-h2 { margin: 0 0 var(--st-space-3); font-size: 1.25rem; font-weight: 800; letter-spacing: -.02em; }
.st-flush { overflow: hidden; }
.st-divider { border: 0; border-top: 1px solid var(--st-border); margin-block: var(--st-space-2); }
.st-row-between { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; }
.st-spacer { flex: 1; }
.st-offset-s { margin-inline-start: var(--st-space-1); }
.st-root .is-hidden { display: none !important; }
.st-root .is-danger { color: var(--st-danger); }
.st-mt-1 { margin-block-start: var(--st-space-1); }
.st-mt-2 { margin-block-start: var(--st-space-2); }
.st-mt-3 { margin-block-start: var(--st-space-3); }
.st-mt-4 { margin-block-start: var(--st-space-4); }
.st-mb-3 { margin-block-end: var(--st-space-3); }
.st-mb-4 { margin-block-end: var(--st-space-4); }

/* ── primitives محلية على نمط المركزي — معزولة داخل .st-root حتى لا
   تتجاوز نسخها المركزية على عناصر الغلاف (ناف/فوتر/مودالات/شارات) ── */
.st-root .primary-button, .st-root .button.secondary, .st-root .btn-outline {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--st-ctrl-h); padding: 0 22px; border-radius: var(--st-radius-ctrl); border: 0;
  font-weight: 700; transition: background .2s;
}
.st-root .primary-button { background: var(--st-brand); color: var(--color-text-on-primary, #fff); }
.st-root .primary-button:hover:not(:disabled) { background: var(--color-primary-hover, var(--st-brand)); }
.st-root .primary-button:disabled { opacity: .55; cursor: not-allowed; }
.st-root .button.secondary, .st-root .btn-outline { background: transparent; color: var(--st-text); border: 1.5px solid var(--st-border-strong); }
.st-root .button.secondary:hover, .st-root .btn-outline:hover { border-color: var(--st-brand); color: var(--st-brand); }
.st-root .btn--sm { min-height: var(--st-ctrl-h-s); padding: 0 14px; font-size: .85rem; }
.st-root .btn--xl { min-height: var(--st-ctrl-h-xl); padding: 0 30px; font-size: 1.05rem; }
.st-root .btn--block { width: 100%; }

.st-root .badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: var(--st-radius-pill); font-size: .74rem; font-weight: 700; }
.st-root .badge--sale { background: var(--st-danger); color: #fff; }
.st-root .badge--new { background: rgb(var(--st-brand-rgb) / .12); color: var(--st-brand); }
.st-root .badge--muted, .st-root .badge--subtle { background: var(--st-surface-2); color: var(--st-muted); }
.st-root .badge--ok { background: var(--color-success-subtle, #dcfce7); color: var(--st-success); }
.st-root .badge--warn { background: var(--color-warning-subtle, #fef3c7); color: var(--st-warning); }
.st-root .badge--danger { background: var(--color-danger-subtle, #fee2e2); color: var(--st-danger); }

.st-root .ui-card { background: var(--st-surface); border: 1px solid var(--st-border); border-radius: var(--st-radius-card); }

.st-input, .st-select {
  width: 100%; min-height: var(--st-ctrl-h); padding: 0 14px; border-radius: var(--st-radius-ctrl);
  border: 1.5px solid var(--st-border); background: var(--st-surface); color: var(--st-text); font: inherit;
}
textarea.st-input { padding-block: 10px; }
.st-input:focus, .st-select:focus { outline: 0; border-color: var(--st-brand); box-shadow: 0 0 0 3px rgb(var(--st-brand-rgb) / .15); }
.st-input--ltr { direction: ltr; text-align: right; }
.st-label { display: block; font-weight: 600; font-size: .86rem; margin-bottom: 6px; }

/* ═══════════ أزرار أيقونية (درج السلة/إغلاق الفلاتر) ═══════════ */
.st-iconbtn { position: relative; width: var(--st-icon-h); height: var(--st-icon-h); border-radius: var(--st-radius-ctrl); border: 0; background: transparent; display: grid; place-items: center; font-size: 1.3rem; color: var(--st-text); }
.st-iconbtn:hover { background: var(--st-surface-2); }
.st-iconbtn--border { border: 1.5px solid var(--st-border); }
.st-iconbtn .st-count {
  position: absolute; top: 2px; inset-inline-end: 0; min-width: 19px; height: 19px; padding: 0 5px;
  border-radius: var(--st-radius-pill); background: var(--st-brand); color: #fff; font-size: .68rem; font-weight: 800;
  display: grid; place-items: center; border: 2px solid var(--st-surface);
}

/* شرائح (تُستخدم داخل المحتوى — مثلاً اختيارات/تصنيفات مضمّنة) */
.st-chip { flex: 0 0 auto; min-height: var(--st-ctrl-h-s); padding: 0 16px; display: inline-flex; align-items: center; border-radius: var(--st-radius-pill); border: 1.5px solid var(--st-border); background: var(--st-surface); font-weight: 600; font-size: .86rem; color: var(--st-muted); }
.st-chip:hover { border-color: var(--st-brand); color: var(--st-brand); }
.st-chip[aria-pressed="true"], .st-chip--active { background: var(--st-text); border-color: var(--st-text); color: var(--st-surface); }

/* ═══════════ هيرو — موبايل: مكدّس ═══════════ */
.st-hero { display: grid; grid-template-columns: 1fr; gap: var(--st-gap); padding-block: var(--st-gap); }
.st-hero__main {
  position: relative; overflow: hidden; border-radius: var(--st-radius-panel); min-height: 300px;
  background: var(--st-brand);
  color: #fff; display: flex; align-items: center;
}

.st-hero__content { position: relative; z-index: 1; padding: clamp(24px, 5vw, 56px); max-width: 560px; }
.st-hero__eyebrow { display: inline-flex; gap: 6px; align-items: center; background: rgb(255 255 255 / .16); padding: 5px 14px; border-radius: var(--st-radius-pill); font-size: .8rem; font-weight: 700; margin-bottom: var(--st-space-3); }
.st-hero__title { font-size: clamp(1.7rem, 6vw, 2.9rem); font-weight: 800; line-height: 1.25; margin: 0 0 var(--st-space-2); letter-spacing: -.02em; }
.st-hero__sub { font-size: clamp(.95rem, 1.4vw, 1.1rem); opacity: .88; margin: 0 0 var(--st-space-4); }
.st-hero__cta { display: flex; gap: var(--st-space-2); flex-wrap: wrap; }
.st-hero__cta .primary-button { background: #fff; color: var(--st-brand); }
.st-hero__cta .button.secondary { border-color: rgb(255 255 255 / .5); color: #fff; }
.st-hero__side { display: grid; gap: var(--st-gap); grid-template-columns: 1fr; }
.st-hero__mini { position: relative; overflow: hidden; border-radius: var(--st-radius-panel); padding: 22px; display: flex; flex-direction: column; justify-content: end; color: #fff; min-height: 160px; }
.st-hero__mini h3 { margin: 0 0 4px; font-size: 1.15rem; }
.st-hero__mini p { margin: 0; font-size: .85rem; opacity: .85; }
.st-hero__mini--a { background: #7c3aed; }
.st-hero__mini--b { background: #b45309; }

/* شريط الثقة — 2 عمود موبايل */
.st-trust { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding-block: var(--st-gap); }
.st-trust__item { display: flex; gap: 12px; align-items: center; padding: 14px; }
.st-trust__icon { width: 40px; height: 40px; flex: 0 0 40px; border-radius: var(--st-radius-ctrl); display: grid; place-items: center; font-size: 1.25rem; background: rgb(var(--st-brand-rgb) / .1); color: var(--st-brand); }
.st-trust__item h4 { margin: 0; font-size: .88rem; }
.st-trust__item p { margin: 0; font-size: .76rem; color: var(--st-muted); }

/* ═══════════ عناوين الأقسام ═══════════ */
.st-sec { padding-block: calc(var(--st-gap) * 1.2); }
.st-sec__head { display: flex; align-items: end; justify-content: space-between; gap: var(--st-space-3); margin-bottom: 20px; }
.st-sec__head h2 { margin: 0; font-size: clamp(1.25rem, 2.4vw, 1.7rem); font-weight: 800; letter-spacing: -.02em; }
.st-sec__head p { margin: 4px 0 0; color: var(--st-muted); font-size: .9rem; }
.st-sec__link { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--st-brand); font-size: .9rem; white-space: nowrap; }
.st-sec__link i { transition: translate .2s var(--st-ease); }
.st-sec__link:hover i { translate: -4px 0; }

/* ═══════════ بطاقة المنتج التجارية ═══════════ */
.st-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--st-gap); }
.st-grid--dense { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.st-grid--list { grid-template-columns: 1fr; }
.st-card { position: relative; display: flex; flex-direction: column; overflow: hidden; border-radius: var(--st-radius-card); background: var(--st-surface); border: 1px solid var(--st-border); transition: border-color .25s; }
.st-card:hover { border-color: var(--st-border-strong); }
.st-card__media { position: relative; aspect-ratio: 1; overflow: hidden; background: var(--st-surface-2); }
.st-card__media-link { position: absolute; inset: 0; display: block; }
.st-card__media .st-ph { position: absolute; inset: 0; transition: scale .5s var(--st-ease); }
.st-card:hover .st-ph { scale: 1.06; }
.st-card__badges { position: absolute; top: 10px; inset-inline-start: 10px; display: flex; flex-direction: column; gap: 6px; z-index: 2; }
.st-card__fav { position: absolute; top: 10px; inset-inline-end: 10px; z-index: 2; width: 38px; height: 38px; border-radius: var(--st-radius-ctrl); border: 0; background: color-mix(in srgb, var(--st-surface) 92%, transparent); color: var(--st-muted); font-size: 1.15rem; display: grid; place-items: center; transition: color .2s, scale .2s; }
.st-card__fav:hover { color: var(--st-danger); scale: 1.1; }
.st-card__fav[aria-pressed="true"] { color: var(--st-danger); }
.st-card__quick { position: absolute; bottom: 10px; inset-inline: 10px; z-index: 2; opacity: 0; translate: 0 8px; transition: opacity .2s, translate .2s var(--st-ease); }
.st-card__quick .button { width: 100%; background: var(--st-surface); }
.st-card:hover .st-card__quick, .st-card:focus-within .st-card__quick { opacity: 1; translate: 0 0; }
.st-card__body { display: flex; flex-direction: column; gap: 6px; padding: var(--st-space-2) var(--st-space-3) var(--st-space-3); flex: 1; }
.st-card__cat { font-size: .74rem; color: var(--st-muted); font-weight: 600; }
.st-card__name { margin: 0; font-size: .95rem; font-weight: 700; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.st-card__rating { display: flex; align-items: center; gap: 5px; font-size: .78rem; color: var(--st-muted); }
.st-card__rating .ri-star-fill, .st-rating .ri-star-fill, .st-rating .ri-star-half-fill { color: var(--st-accent); }
.st-card__foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: var(--st-space-1); }
.st-card__price { font-size: 1.08rem; }
.st-card__add { display: inline-flex; align-items: center; gap: 6px; min-height: var(--st-ctrl-h-s); padding: 0 14px; border-radius: var(--st-radius-ctrl); border: 0; background: var(--st-text); color: var(--st-surface); font-weight: 700; font-size: .85rem; transition: background .2s, transform .15s; }
.st-card__add:hover { background: var(--st-brand); }
.st-card__add:disabled { background: var(--st-surface-2); color: var(--st-muted); cursor: not-allowed; transform: none; }
.st-card--oos .st-card__media { opacity: .55; }

/* عرض القائمة */
.st-grid--list .st-card { flex-direction: row; }
.st-grid--list .st-card__media { flex: 0 0 140px; width: 140px; }

/* ═══════════ placeholder — palettes مركزية بدل inline vars ═══════════ */
.st-ph { background: var(--ph-a, #e0e7ff); display: grid; place-items: center; color: rgb(0 0 0 / .22); font-size: 3.2rem; }
.st-ph--blue   { --ph-a: #bfdbfe; --ph-b: #60a5fa; }
.st-ph--indigo { --ph-a: #c7d2fe; --ph-b: #818cf8; }
.st-ph--green  { --ph-a: #a7f3d0; --ph-b: #34d399; }
.st-ph--rose   { --ph-a: #fecdd3; --ph-b: #fb7185; }
.st-ph--violet { --ph-a: #ddd6fe; --ph-b: #a78bfa; }
.st-ph--lav    { --ph-a: #e9d5ff; --ph-b: #c084fc; }
.st-ph--amber  { --ph-a: #fde68a; --ph-b: #f59e0b; }
.st-ph--pink   { --ph-a: #fbcfe8; --ph-b: #f472b6; }
.st-ph--gray   { --ph-a: #e5e7eb; --ph-b: #9ca3af; }
.st-ph--dark   { --ph-a: #1f2937; --ph-b: #111827; color: rgb(255 255 255 / .35); }
/* تدرجات عميقة لبطاقات التصنيفات */
.st-ph--sky    { --ph-a: #0ea5e9; --ph-b: #0369a1; }
.st-ph--magenta{ --ph-a: #f472b6; --ph-b: #be185d; }
.st-ph--teal   { --ph-a: #34d399; --ph-b: #047857; }
.st-ph--deep   { --ph-a: #a78bfa; --ph-b: #6d28d9; }
.st-ph--gold   { --ph-a: #fbbf24; --ph-b: #b45309; }
.st-ph--mint   { --ph-a: #bbf7d0; --ph-b: #4ade80; }
/* st-ph تملأ إطارها أينما وُضعت */
.st-catcard .st-ph, .st-gallery__main > .st-ph, .st-gallery__thumbs .st-ph,
.st-cartitem__img .st-ph, .st-orderline__img .st-ph, .st-miniitem__img .st-ph { position: absolute; inset: 0; }
.st-cartitem__img, .st-orderline__img, .st-gallery__thumbs button { position: relative; }

/* عينات ألوان المتغيرات — مركزية بدل inline background */
.st-swatch--black  { background: #111827; }
.st-swatch--silver { background: #e5e7eb; }
.st-swatch--navy   { background: #1e3a8a; }

/* ═══════════ شبكة التصنيفات ═══════════ */
.st-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: var(--st-gap); }
.st-catcard { position: relative; overflow: hidden; border-radius: var(--st-radius-card); aspect-ratio: 4/3; display: flex; align-items: end; padding: var(--st-space-3); color: #fff; }
.st-catcard::before { content: ""; position: absolute; inset: 0; background: rgb(0 0 0 / .45); z-index: 1; }
.st-catcard > * { position: relative; z-index: 2; }
.st-catcard .st-ph { z-index: 0; }
.st-catcard h3 { margin: 0; font-size: 1.05rem; }
.st-catcard span { font-size: .78rem; opacity: .85; }

/* ═══════════ بانر عرض ═══════════ */
.st-banner { position: relative; overflow: hidden; border-radius: var(--st-radius-panel); padding: clamp(24px, 4vw, 48px); background: #111827; color: #fff; display: flex; align-items: center; justify-content: space-between; gap: var(--st-space-4); flex-wrap: wrap; }
.st-banner h2 { margin: 0 0 6px; font-size: clamp(1.4rem, 3vw, 2rem); }
.st-banner p { margin: 0; opacity: .8; }
.st-banner .primary-button { background: var(--st-accent); color: #1a1205; }
.st-countdown { display: flex; gap: 10px; }
.st-countdown b { display: grid; place-items: center; min-width: 52px; padding: 10px 8px; border-radius: var(--st-radius-ctrl); background: rgb(255 255 255 / .1); font-size: 1.25rem; }
.st-countdown b small { display: block; font-size: .65rem; font-weight: 500; opacity: .7; }

/* ═══════════ فوتر ═══════════ */
/* الفوتر من الغلاف المركزي (publicShell) — لا قواعد st-footer هنا. */
.st-social { display: flex; gap: var(--st-space-1); margin-top: var(--st-space-2); }
.st-social a { width: var(--st-ctrl-h-s); height: var(--st-ctrl-h-s); border-radius: var(--st-radius-ctrl); display: grid; place-items: center; background: var(--st-surface-2); color: var(--st-muted); font-size: 1.1rem; }
.st-social a:hover { background: var(--st-brand); color: #fff; }
.st-paymarks { display: flex; gap: 6px; }
.st-paymarks span { padding: 4px 10px; border-radius: var(--st-radius-xs); border: 1px solid var(--st-border); font-size: .7rem; font-weight: 800; color: var(--st-muted); }

/* ═══════════ المتجر الموحّد — شريط التصنيفات الهرمي ═══════════
   الآباء رقائق في صف أفقي قابل للتمرير، والأبناء في صف ثانٍ أخفّ
   يظهر عند فتح الأب. flat: بلا حواف ولا ظلال — الفصل بالحدود. */
.st-cats-wrap { display: grid; gap: 6px; margin-bottom: var(--st-space-4); }
.st-cats-row {
  display: flex; gap: 6px; overflow-x: auto; overscroll-behavior-inline: contain;
  scrollbar-width: none; padding-bottom: 2px;
}
.st-cats-row::-webkit-scrollbar { display: none; }
.st-cats-row--sub { border-top: 1px dashed var(--st-border); padding-top: 8px; }
.st-catchip {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 5px;
  min-height: var(--st-ctrl-h-s); padding: 0 14px; border-radius: var(--st-radius-ctrl);
  border: 1.5px solid var(--st-border); background: var(--st-surface);
  font-weight: 700; font-size: .84rem; color: var(--st-text); white-space: nowrap;
  transition: border-color .2s, color .2s, background .2s;
}
.st-catchip:hover { border-color: var(--st-brand); color: var(--st-brand); }
.st-catchip i { font-size: .95rem; color: var(--st-muted); }
.st-catchip.is-active { background: var(--st-text); border-color: var(--st-text); color: var(--st-surface); }
.st-catchip.is-active i { color: inherit; opacity: .7; }
.st-catchip--all { font-weight: 800; }
.st-catchip--sub { min-height: 32px; padding: 0 12px; font-size: .8rem; font-weight: 600; border-color: var(--st-border); }
.st-catchip--sub.is-active { background: var(--st-brand); border-color: var(--st-brand); color: var(--color-text-on-primary, #fff); }

/* ═══════════ صفحة الكتالوج — موبايل: عمود واحد + فلاتر منسدلة ═══════════ */
.st-catalog { display: grid; grid-template-columns: 1fr; gap: var(--st-space-4); align-items: start; }
.st-filters { display: none; }
.st-filters.st-filters--open { display: grid; gap: var(--st-space-3); }
.st-filters .ui-card { padding: var(--st-space-3); }
.st-filters h3 { margin: 0 0 var(--st-space-2); font-size: .92rem; display: flex; justify-content: space-between; align-items: center; }
.st-filters__sub { margin: var(--st-space-2) 0 4px; font-size: .8rem; font-weight: 700; color: var(--st-muted); }
.st-filters__actions { display: flex; gap: var(--st-space-1); }
.st-filters__actions > * { flex: 1; justify-content: center; }
.st-check { display: flex; align-items: center; gap: 9px; padding-block: 5px; font-size: .88rem; cursor: pointer; }
.st-check input { accent-color: var(--st-brand); width: 17px; height: 17px; }
.st-check small { margin-inline-start: auto; color: var(--st-muted); }
.st-toolbar { display: flex; align-items: center; gap: var(--st-space-2); margin-bottom: var(--st-space-3); flex-wrap: wrap; }
.st-toolbar .st-select { width: auto; min-height: var(--st-ctrl-h-s); font-size: .86rem; }
.st-viewtoggle { display: flex; border: 1.5px solid var(--st-border); border-radius: var(--st-radius-ctrl); overflow: hidden; }
.st-viewtoggle button { width: var(--st-ctrl-h-s); height: var(--st-ctrl-h-s); border: 0; background: transparent; color: var(--st-muted); font-size: 1.05rem; }
.st-viewtoggle button[aria-pressed="true"] { background: var(--st-text); color: var(--st-surface); }
.st-pager { display: flex; justify-content: center; gap: var(--st-space-1); margin-top: var(--st-space-4); }
.st-pager a, .st-pager span { min-width: var(--st-ctrl-h-s); height: var(--st-ctrl-h-s); display: grid; place-items: center; border-radius: var(--st-radius-ctrl); border: 1.5px solid var(--st-border); font-weight: 700; font-size: .9rem; }
.st-pager [aria-current] { background: var(--st-text); color: var(--st-surface); border-color: var(--st-text); }
.st-drawerfilters { display: inline-flex; }

/* ═══════════ صفحة المنتج — موبايل: معرض ثم معلومات ═══════════ */
.st-product { display: grid; grid-template-columns: 1fr; gap: var(--st-space-4); align-items: start; }
.st-gallery__main { position: relative; border-radius: var(--st-radius-panel); overflow: hidden; aspect-ratio: 1; background: var(--st-surface-2); }
.st-gallery__main .st-ph { font-size: 6rem; }
.st-gallery__badges { position: absolute; top: var(--st-space-3); inset-inline-start: var(--st-space-3); display: flex; gap: var(--st-space-1); z-index: 2; }
.st-gallery__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #111827; }
.st-gallery__thumbs { display: flex; gap: 10px; margin-top: var(--st-space-2); overflow-x: auto; scrollbar-width: none; }
.st-gallery__thumbs::-webkit-scrollbar { display: none; }
.st-gallery__thumbs button { flex: 0 0 72px; width: 72px; height: 72px; border-radius: var(--st-radius-ctrl); overflow: hidden; border: 2px solid var(--st-border); padding: 0; background: var(--st-surface-2); }
.st-gallery__thumbs button[aria-pressed="true"] { border-color: var(--st-brand); }
.st-gallery__thumbs .st-ph { font-size: 1.6rem; }
.st-pinfo h1 { margin: 0 0 var(--st-space-1); font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 800; line-height: 1.35; letter-spacing: -.02em; }
.st-pinfo__meta { display: flex; align-items: center; gap: var(--st-space-2); flex-wrap: wrap; font-size: .85rem; color: var(--st-muted); margin-bottom: var(--st-space-3); }
.st-rating { display: inline-flex; align-items: center; gap: 4px; }
.st-priceblock { display: flex; align-items: baseline; gap: var(--st-space-2); flex-wrap: wrap; padding: var(--st-space-3) 20px; background: var(--st-surface); border: 1px solid var(--st-border); border-radius: var(--st-radius-card); margin-block: var(--st-space-3); }
.st-priceblock .st-price { font-size: 1.7rem; }
.st-priceblock .badge--sale { font-size: .8rem; }
.st-priceblock__tax { margin-inline-start: auto; font-size: .8rem; color: var(--st-muted); }
.st-opt { margin-block: var(--st-space-3); }
.st-opt__label { font-size: .88rem; font-weight: 700; margin-bottom: var(--st-space-1); }
.st-opt__label span { font-weight: 400; color: var(--st-muted); }
.st-pills { display: flex; gap: var(--st-space-1); flex-wrap: wrap; }
.st-pill { min-width: 46px; min-height: var(--st-ctrl-h-s); padding: 0 16px; border-radius: var(--st-radius-ctrl); border: 1.5px solid var(--st-border); background: var(--st-surface); font-weight: 700; font-size: .88rem; }
.st-pill:hover { border-color: var(--st-brand); }
.st-pill[aria-pressed="true"] { border-color: var(--st-brand); background: rgb(var(--st-brand-rgb) / .08); color: var(--st-brand); }
.st-pill--color { width: 38px; height: 38px; min-width: 0; padding: 0; border-radius: var(--st-radius-ctrl); border-width: 2.5px; }
.st-qty { display: inline-flex; align-items: center; border: 1.5px solid var(--st-border-strong); border-radius: var(--st-radius-ctrl); overflow: hidden; }
.st-qty button { width: var(--control-h, 40px); height: var(--st-ctrl-h); border: 0; background: transparent; font-size: 1.15rem; color: var(--st-text); }
.st-qty button:hover { background: var(--st-surface-2); }
.st-qty output { min-width: 46px; text-align: center; font-weight: 800; }
.st-qty--sm { transform: scale(.88); transform-origin: left center; }
[dir="rtl"] .st-qty--sm { transform-origin: right center; }
.st-buyrow { display: flex; gap: var(--st-space-2); margin-block: 20px; flex-wrap: wrap; }
.st-buyrow .primary-button { flex: 1; min-width: 190px; }
.st-stocknote { display: flex; align-items: center; gap: var(--st-space-1); font-size: .86rem; font-weight: 600; margin-block-start: var(--st-space-2); }
.st-stocknote--ok { color: var(--st-success); }
.st-stocknote--low { color: var(--st-warning); }
.st-stocknote--out { color: var(--st-danger); }
.st-pacc { border-top: 1px solid var(--st-border); margin-top: var(--st-space-4); }
.st-pacc details { border-bottom: 1px solid var(--st-border); }
.st-pacc summary { list-style: none; display: flex; align-items: center; justify-content: space-between; padding: var(--st-space-3) 4px; font-weight: 700; cursor: pointer; }
.st-pacc summary i { transition: rotate .2s; color: var(--st-muted); }
.st-pacc details[open] summary i { rotate: 180deg; }
.st-pacc__body { padding: 0 4px var(--st-space-3); color: var(--st-muted); font-size: .92rem; }
.st-specs { width: 100%; border-collapse: collapse; font-size: .9rem; }
.st-specs th, .st-specs td { text-align: start; padding: 10px 14px; border-bottom: 1px solid var(--st-border); }
.st-specs th { width: 160px; color: var(--st-muted); font-weight: 600; background: var(--st-surface-2); }

/* شريط شراء ثابت — موبايل فقط (يختفي بـmin-width) */
.st-buybar { position: fixed; bottom: 0; inset-inline: 0; z-index: 55; display: flex; gap: var(--st-space-2); align-items: center; padding: 12px var(--st-space-3) calc(12px + env(safe-area-inset-bottom)); background: var(--st-surface); border-top: 1px solid var(--st-border); }
.st-buybar__price { font-weight: 800; }
.st-buybar__price small { display: block; font-size: .7rem; color: var(--st-muted); font-weight: 500; }
.st-buybar .primary-button { flex: 1; }
.has-buybar { padding-bottom: 78px; }

/* ═══════════ السلة — موبايل: بند بصفين ═══════════ */
.st-cartlayout { display: grid; grid-template-columns: 1fr; gap: var(--st-space-4); align-items: start; }
.st-cartlayout--narrow { max-width: 1024px; margin-inline: auto; }
.st-cartitem { display: grid; grid-template-columns: 76px 1fr; gap: var(--st-space-2) var(--st-space-3); padding: var(--st-space-3); align-items: center; }
.st-cartitem + .st-cartitem { border-top: 1px solid var(--st-border); }
.st-cartitem__img { width: 76px; height: 76px; border-radius: var(--st-radius-ctrl); overflow: hidden; background: var(--st-surface-2); }
.st-cartitem__name { font-weight: 700; font-size: .96rem; margin: 0 0 4px; }
.st-cartitem__meta { font-size: .8rem; color: var(--st-muted); display: flex; gap: var(--st-space-1); flex-wrap: wrap; align-items: center; }
.st-cartitem__side { grid-column: 2; display: flex; justify-content: space-between; align-items: center; }
.st-cartitem__side .st-cartitem__remove { order: 2; }
.st-cartitem__remove { border: 0; background: none; color: var(--st-muted); font-size: 1.15rem; padding: 4px; }
.st-cartitem__remove:hover { color: var(--st-danger); }
.st-summary { padding: var(--st-space-4); }
.st-summary h2 { margin: 0 0 var(--st-space-3); font-size: 1.1rem; }
.st-sumrow { display: flex; justify-content: space-between; padding-block: var(--st-space-1); font-size: .93rem; }
.st-sumrow--total { border-top: 1.5px solid var(--st-border); margin-top: var(--st-space-1); padding-top: var(--st-space-2); font-weight: 800; font-size: 1.1rem; }
.st-freebar { margin-block: var(--st-space-2); }
.st-freebar__track { height: 8px; border-radius: var(--st-radius-pill); background: var(--st-surface-2); overflow: hidden; }
.st-freebar__fill { height: 100%; width: 68%; border-radius: var(--st-radius-pill); background: var(--st-brand); transition: width .5s var(--st-ease); }
/* قيمة 68% mock — في الإنتاج يحقنها الخادم */
.st-freebar p { font-size: .8rem; margin: var(--st-space-1) 0 0; }
.st-summary .primary-button, .st-drawer__foot .primary-button, .st-drawer__foot .button { width: 100%; margin-block-start: var(--st-space-2); }
.st-secure { display: flex; justify-content: center; gap: 6px; align-items: center; margin-top: var(--st-space-2); font-size: .78rem; color: var(--st-muted); }
.st-promo { display: flex; gap: var(--st-space-1); margin-block: 10px; }
.st-promo .st-input { flex: 1; min-height: var(--st-ctrl-h); }
.st-actions { display: grid; gap: 10px; }
.st-center { justify-content: center; }

/* ═══════════ Checkout ═══════════ */
.st-steps { display: none; justify-content: center; margin-block: var(--st-space-4); }
.st-step { display: flex; align-items: center; gap: 10px; color: var(--st-muted); font-size: .88rem; font-weight: 600; }
.st-step b { width: var(--st-ctrl-h-s); height: var(--st-ctrl-h-s); border-radius: var(--st-radius-ctrl); display: grid; place-items: center; border: 2px solid var(--st-border-strong); font-size: .85rem; }
.st-step--done { color: var(--st-success); }
.st-step--done b { background: var(--st-success); border-color: var(--st-success); color: #fff; }
.st-step--active { color: var(--st-text); }
.st-step--active b { border-color: var(--st-brand); color: var(--st-brand); }
.st-step + .st-step::before { content: ""; width: clamp(20px, 6vw, 70px); height: 2px; background: var(--st-border); margin-inline: var(--st-space-2); }
.st-formcard { padding: var(--st-space-4); margin-bottom: var(--st-space-3); }
.st-formcard h2 { margin: 0 0 var(--st-space-3); font-size: 1.05rem; display: flex; align-items: center; gap: 10px; }
.st-formcard h2 i { color: var(--st-brand); }
.st-formgrid { display: grid; grid-template-columns: 1fr; gap: var(--st-space-2); }
.st-payopt { display: flex; align-items: center; gap: var(--st-space-2); padding: var(--st-space-3) var(--st-space-3); border: 2px solid var(--st-border); border-radius: var(--st-radius-card); cursor: pointer; margin-bottom: 10px; transition: border-color .2s, background .2s; }
.st-payopt:hover { border-color: var(--st-border-strong); }
.st-payopt:has(input:checked) { border-color: var(--st-brand); background: rgb(var(--st-brand-rgb) / .05); }
.st-payopt input { accent-color: var(--st-brand); width: 19px; height: 19px; flex: 0 0 19px; }
.st-payopt__icon { width: var(--st-icon-h); height: var(--st-icon-h); flex: 0 0 var(--st-icon-h); border-radius: var(--st-radius-ctrl); display: grid; place-items: center; font-size: 1.3rem; background: var(--st-surface-2); }
.st-payopt h4 { margin: 0; font-size: .95rem; }
.st-payopt p { margin: 0; font-size: .79rem; color: var(--st-muted); }
.st-payopt__tag { margin-inline-start: auto; }
.st-stripe-slot { border: 1.5px dashed var(--st-border-strong); border-radius: var(--st-radius-card); padding: var(--st-space-4); text-align: center; color: var(--st-muted); font-size: .85rem; margin-top: var(--st-space-2); }
.st-stripe-slot i { font-size: 1.6rem; display: block; margin-bottom: 6px; }
.st-minisum { padding: var(--st-space-4); }
.st-minisum > h2 { margin: 0 0 var(--st-space-2); font-size: 1.05rem; }
.st-miniitem { display: flex; gap: var(--st-space-2); align-items: center; padding-block: 10px; font-size: .87rem; }
.st-miniitem__img { width: 52px; height: 52px; border-radius: var(--st-radius-ctrl); flex: 0 0 52px; position: relative; overflow: hidden; }
.st-miniitem__img .st-ph { font-size: 1.3rem; }
.st-miniitem__img b { position: absolute; top: -4px; inset-inline-end: -4px; min-width: 18px; height: 18px; border-radius: var(--st-radius-pill); background: var(--st-text); color: var(--st-surface); font-size: .65rem; display: grid; place-items: center; z-index: 2; }
.st-miniitem span:last-child { margin-inline-start: auto; font-weight: 700; }

/* ═══════════ صفحة الطلب/التأكيد ═══════════ */
.st-orderhero { text-align: center; padding: clamp(28px, 5vw, 48px) 20px; }
.st-orderhero__icon { width: 76px; height: 76px; margin: 0 auto var(--st-space-3); border-radius: var(--st-radius-ctrl); display: grid; place-items: center; font-size: 2.2rem; background: var(--color-success-subtle, #dcfce7); color: var(--st-success); }
.st-orderhero h1 { margin: 0 0 var(--st-space-1); }
.st-orderhero p { margin: 0; color: var(--st-muted); }
.st-orderline { display: grid; grid-template-columns: 64px 1fr; gap: var(--st-space-2) var(--st-space-3); padding: var(--st-space-3); align-items: center; }
.st-orderline + .st-orderline { border-top: 1px solid var(--st-border); }
.st-orderline__img { width: 64px; height: 64px; border-radius: var(--st-radius-ctrl); overflow: hidden; }
.st-orderline .badge { justify-self: start; grid-column: 2; }
.st-timeline { display: flex; margin-block: var(--st-space-1); }
.st-tl { flex: 1; text-align: center; font-size: .75rem; color: var(--st-muted); position: relative; padding-top: 26px; }
.st-tl::before { content: ""; position: absolute; top: 8px; inset-inline-start: calc(50% - 6px); width: 12px; height: 12px; border-radius: var(--st-radius-ctrl); background: var(--st-border-strong); }
.st-tl::after { content: ""; position: absolute; top: 13px; inset-inline-start: 0; width: 100%; height: 2px; background: var(--st-border); }
.st-tl:first-child::after { width: 50%; inset-inline-start: 50%; }
.st-tl:last-child::after { width: 50%; }
.st-tl--done { color: var(--st-success); font-weight: 700; }
.st-tl--done::before, .st-tl--done::after { background: var(--st-success); }

/* ═══════════ حساب العميل — موبايل: تبويبات أفقية ═══════════ */
.st-account { display: grid; grid-template-columns: 1fr; gap: var(--st-space-4); align-items: start; }
.st-side { display: flex; overflow-x: auto; gap: 6px; padding: var(--st-space-1); scrollbar-width: none; }
.st-side::-webkit-scrollbar { display: none; }
.st-side a { display: flex; align-items: center; gap: var(--st-space-2); padding: 12px 14px; border-radius: var(--st-radius-ctrl); font-weight: 600; font-size: .92rem; color: var(--st-muted); white-space: nowrap; }
.st-side a:hover { background: var(--st-surface-2); color: var(--st-text); }
.st-side a[aria-current] { background: rgb(var(--st-brand-rgb) / .09); color: var(--st-brand); }
.st-side a i { font-size: 1.2rem; }
.st-orderrow { display: grid; grid-template-columns: 1fr auto; gap: 10px var(--st-space-3); padding: var(--st-space-3); align-items: center; }
.st-orderrow + .st-orderrow { border-top: 1px solid var(--st-border); }
.st-orderrow__desc { display: none; }
.st-orderrow .badge { justify-self: start; }
.st-address-card { display: flex; justify-content: space-between; align-items: center; gap: var(--st-space-2); flex-wrap: wrap; }
.st-address-card p { margin: 6px 0 0; font-size: .88rem; color: var(--st-muted); }

/* ═══════════ درج السلة الجانبي ═══════════ */
/* z-index فوق الناف المركزي (1000) + visibility:hidden مغلقاً حتى لا
   يومض/يظهر قبل تحميل CSS أو يبقى قابلاً للتفاعل وهو خارج الشاشة */
.st-drawer { position: fixed; inset-block: 0; inset-inline-end: 0; z-index: 1200; width: min(420px, 94vw); background: var(--st-surface); border-inline-start: 1px solid var(--st-border); display: flex; flex-direction: column; translate: 105% 0; visibility: hidden; pointer-events: none; transition: translate .3s var(--st-ease), visibility 0s .3s; }
[dir="rtl"] .st-drawer { translate: -105% 0; }
.st-drawer[open], .st-drawer--open,
[dir="rtl"] .st-drawer[open], [dir="rtl"] .st-drawer--open { translate: 0 0; visibility: visible; pointer-events: auto; transition: translate .3s var(--st-ease), visibility 0s 0s; }
.st-drawer__head { display: flex; align-items: center; justify-content: space-between; padding: var(--st-space-3) 20px; border-bottom: 1px solid var(--st-border); }
.st-drawer__head h2 { margin: 0; font-size: 1.05rem; }
.st-drawer__items { flex: 1; overflow-y: auto; padding: var(--st-space-1) 20px; }
.st-drawer__items .st-empty { padding: var(--st-space-4) var(--st-space-3); }
.st-drawer__foot { border-top: 1px solid var(--st-border); padding: var(--st-space-3) 20px; }
.st-backdrop { position: fixed; inset: 0; z-index: 1190; background: rgb(0 0 0 / .45); opacity: 0; pointer-events: none; transition: opacity .25s; }
.st-backdrop--on { opacity: 1; pointer-events: auto; }

/* ═══════════ toast ═══════════ */
.st-toast { position: fixed; bottom: 24px; inset-inline-start: 50%; translate: -50% 20px; z-index: 90; padding: var(--st-space-2) 22px; border-radius: var(--st-radius-card); background: var(--st-text); color: var(--st-surface); font-weight: 700; font-size: .9rem; opacity: 0; pointer-events: none; transition: opacity .25s, translate .25s var(--st-ease); }
[dir="rtl"] .st-toast { translate: 50% 20px; }
.st-toast--on { opacity: 1; translate: -50% 0; }
[dir="rtl"] .st-toast--on { translate: 50% 0; }

/* ═══════════ empty state ═══════════ */
.st-empty { text-align: center; padding: 60px 20px; }
.st-empty i { font-size: 3.4rem; color: var(--st-border-strong); display: block; margin-bottom: var(--st-space-2); }
.st-empty h2 { margin: 0 0 6px; }
.st-empty p { color: var(--st-muted); margin: 0 0 20px; }

/* ═══════════════════════════════════════════════════════════════
   ترقيات الشاشة — min-width فقط (mobile-first)
   ═══════════════════════════════════════════════════════════════ */

/* ── ≥641px: أجهزة لوحية عمودية ── */
@media (min-width: 641px) {
  .st-hero__side { grid-template-columns: 1fr 1fr; }
  .st-formgrid { grid-template-columns: 1fr 1fr; }
  .st-formgrid .st-span2 { grid-column: span 2; }
  .st-orderrow { grid-template-columns: auto 1fr auto auto; }
  .st-orderrow__desc { display: block; }
  .st-orderline { grid-template-columns: 64px 1fr auto; }
  .st-orderline .badge { grid-column: auto; }
  .st-countdown b { min-width: 58px; font-size: 1.3rem; }
  .st-contactgrid { grid-template-columns: repeat(3, 1fr); gap: var(--st-space-3); }
}

/* ── ≥769px: أجهزة لوحية أفقية وديسكتوب صغير ── */
@media (min-width: 769px) {
  :root { --st-header-h: 72px; }
  .st-hero { grid-template-columns: 1.6fr 1fr; }
  .st-hero__side { grid-template-columns: 1fr; grid-template-rows: 1fr 1fr; }
  .st-hero__main { min-height: 380px; }
  .st-grid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
  .st-cats { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
  .st-cartitem { grid-template-columns: 96px 1fr auto; }
  .st-cartitem__img { width: 96px; height: 96px; }
  .st-cartitem__side { grid-column: auto; display: grid; gap: 10px; justify-items: end; }
  .st-cartitem__side .st-cartitem__remove { order: 0; }
  .st-steps { display: flex; }
  .st-buybar { display: none; }
  .has-buybar { padding-bottom: 0; }
  .st-card__name { font-size: .98rem; }
  .st-trust__item { padding: var(--st-space-3) 18px; }
  .st-trust__icon { width: 44px; height: 44px; flex-basis: 44px; }
  .st-trust__item h4 { font-size: .92rem; }
  .st-trust__item p { font-size: .78rem; }
}

/* ── ≥1024px: ديسكتوب — جانبيات sticky ── */
@media (min-width: 1024px) {
  /* عرض القائمة (--list) فقط: البطاقة تملأ الصف بصورة أكبر — الشبكة تبقى grid */
  .st-grid--list .st-card__media { flex-basis: 200px; width: 200px; }
  .st-grid--list .st-card__body { justify-content: center; }
  .st-trust { grid-template-columns: repeat(4, 1fr); }
  .st-stats { grid-template-columns: repeat(4, 1fr); }
  .st-legal { grid-template-columns: 230px 1fr; gap: 28px; }
  .st-legal__toc { position: sticky; top: calc(var(--st-header-h) + 80px); }
  .st-catalog { grid-template-columns: 260px 1fr; gap: 28px; }
  .st-filters { display: grid; gap: var(--st-space-3); position: sticky; top: calc(var(--st-header-h) + 16px); }
  .st-drawerfilters { display: none; }
  .st-product { grid-template-columns: 1.05fr 1fr; gap: clamp(24px, 4vw, 56px); }
  .st-gallery { position: sticky; top: calc(var(--st-header-h) + 16px); }
  .st-cartlayout { grid-template-columns: 1fr 380px; gap: 28px; }
  .st-summary, .st-minisum { position: sticky; top: calc(var(--st-header-h) + 16px); }
  .st-minisum--static { position: static; }
  .st-account { grid-template-columns: 250px 1fr; gap: 28px; }
  .st-side { display: block; overflow: visible; padding: var(--st-space-2); position: sticky; top: calc(var(--st-header-h) + 16px); }
  .st-side a { white-space: normal; }
  .st-pinfo__meta { gap: var(--st-space-2); }
}

/* ═══════════ رأس صفحة داخلية ═══════════ */
.st-pagehead { padding-block: var(--st-space-2) var(--st-space-3); }
.st-pagehead h1 { margin: 0 0 6px; font-size: clamp(1.5rem, 4vw, 2rem); font-weight: 800; letter-spacing: -.02em; }
.st-pagehead p { margin: 0; color: var(--st-muted); max-width: 640px; }

/* ═══════════ بطاقة مقال ═══════════ */
.st-post .st-card__media { aspect-ratio: 16 / 10; }
.st-post__excerpt { font-size: .86rem; color: var(--st-muted); margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.st-post__meta { display: flex; gap: 12px; align-items: center; font-size: .78rem; color: var(--st-muted); margin-top: auto; padding-top: var(--st-space-1); }
.st-post__meta i { font-size: .9rem; }
.st-post--hero { grid-column: 1 / -1; }
.st-post--hero .st-card__media { aspect-ratio: 21 / 9; }

/* ═══════════ صفحة المقال — prose ═══════════ */
.st-article { max-width: 780px; margin-inline: auto; }
.st-article__hero { position: relative; aspect-ratio: 21 / 9; border-radius: var(--st-radius-panel); overflow: hidden; margin-block: var(--st-space-3); }
.st-article__hero .st-ph { position: absolute; inset: 0; font-size: 5rem; }
.st-prose { font-size: .98rem; }
.st-prose p { margin-block: var(--st-space-2); line-height: 1.9; }
.st-prose h2 { font-size: 1.3rem; font-weight: 800; margin: var(--st-space-4) 0 var(--st-space-2); letter-spacing: -.02em; }
.st-prose h3 { font-size: 1.1rem; font-weight: 800; margin: var(--st-space-3) 0 var(--st-space-1); }
.st-prose ul, .st-prose ol { padding-inline-start: 22px; margin-block: var(--st-space-2); display: grid; gap: 6px; }
.st-prose a { color: var(--st-brand); font-weight: 600; text-decoration: underline; }
.st-prose blockquote { margin: var(--st-space-3) 0; padding: var(--st-space-2) var(--st-space-3); border-inline-start: 3px solid var(--st-brand); background: var(--st-surface-2); border-radius: var(--st-radius-ctrl); color: var(--st-muted); }
.st-prose blockquote p { margin: 0; }
.st-article__share { display: flex; align-items: center; gap: 10px; margin-block: var(--st-space-4); flex-wrap: wrap; }
.st-article__share b { font-size: .9rem; }

/* ═══════════ صفحات قانونية — فهرس جانبي + نص ═══════════ */
.st-legal { display: grid; grid-template-columns: 1fr; gap: var(--st-space-4); align-items: start; }
.st-legal__toc { padding: var(--st-space-2); }
.st-legal__toc a { display: block; padding: 10px var(--st-space-2); border-radius: var(--st-radius-ctrl); font-size: .9rem; font-weight: 600; color: var(--st-muted); }
.st-legal__toc a:hover { background: var(--st-surface-2); color: var(--st-text); }
.st-legal__body { padding: var(--st-space-4); }
.st-legal__body h2 { font-size: 1.15rem; font-weight: 800; margin: var(--st-space-4) 0 var(--st-space-2); }
.st-legal__body h2:first-child { margin-top: 0; }
.st-legal__body p, .st-legal__body li { color: var(--st-muted); font-size: .94rem; line-height: 1.85; }
.st-legal__body ul { padding-inline-start: 20px; display: grid; gap: 6px; margin-block: var(--st-space-2); }

/* ═══════════ أسئلة شائعة — accordions (نفس مكوّن المنتج) ═══════════ */
.st-faq__group { margin-bottom: var(--st-space-3); }
.st-faq__group > h2 { font-size: 1.05rem; font-weight: 800; margin: 0 0 var(--st-space-2); display: flex; align-items: center; gap: 10px; }
.st-faq__group > h2 i { color: var(--st-brand); }
.st-faq__group .ui-card { overflow: hidden; }
.st-faq__group .st-pacc { border-top: 0; margin-top: 0; }
.st-faq__group .st-pacc summary { padding-inline: var(--st-space-3); }
.st-faq__group .st-pacc__body { padding-inline: var(--st-space-3); }

/* ═══════════ تواصل — بطاقات معلومات + نموذج ═══════════ */
.st-contactgrid { display: grid; grid-template-columns: 1fr; gap: var(--st-space-2); margin-block: var(--st-space-3); }
.st-contactcard { display: flex; align-items: center; gap: var(--st-space-2); padding: var(--st-space-3); }
.st-contactcard .st-trust__icon { width: var(--st-icon-h); height: var(--st-icon-h); flex-basis: var(--st-icon-h); }
.st-contactcard h3 { margin: 0; font-size: .92rem; }
.st-contactcard p { margin: 0; font-size: .82rem; color: var(--st-muted); }
.st-contactcard p a { color: inherit; }
.st-contactcard p a:hover { color: var(--st-brand); }
.st-map { aspect-ratio: 21 / 9; border-radius: var(--st-radius-panel); position: relative; overflow: hidden; }
.st-map .st-ph { position: absolute; inset: 0; font-size: 4rem; }

/* ═══════════ من نحن — إحصاءات ═══════════ */
.st-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--st-space-2); margin-block: var(--st-space-3); }
.st-stat { text-align: center; padding: var(--st-space-4) var(--st-space-2); }
.st-stat b { display: block; font-size: clamp(1.7rem, 4vw, 2.4rem); font-weight: 800; color: var(--st-brand); letter-spacing: -.03em; }
.st-stat span { font-size: .85rem; color: var(--st-muted); }

/* ═══════════ دخول / تسجيل ═══════════ */
.st-auth { max-width: 440px; margin: var(--st-space-4) auto calc(var(--st-space-4) * 2); }
.st-auth .ui-card { padding: var(--st-space-4); }
.st-auth__logo { display: flex; justify-content: center; margin-bottom: var(--st-space-2); }

.st-auth__head { text-align: center; margin-bottom: var(--st-space-4); }
.st-auth__head h1 { margin: 0 0 4px; font-size: 1.4rem; font-weight: 800; }
.st-auth__head p { margin: 0; font-size: .88rem; color: var(--st-muted); }
.st-auth form { display: grid; gap: var(--st-space-2); }
.st-auth__row { display: flex; justify-content: space-between; align-items: center; font-size: .85rem; }
.st-auth__row a { color: var(--st-brand); font-weight: 600; }
.st-auth__foot { text-align: center; font-size: .88rem; color: var(--st-muted); margin-top: var(--st-space-3); }
.st-auth__foot a { color: var(--st-brand); font-weight: 700; }
.st-auth__divider { display: flex; align-items: center; gap: var(--st-space-2); margin-block: var(--st-space-2); font-size: .78rem; color: var(--st-muted); }
.st-auth__divider::before, .st-auth__divider::after { content: ""; flex: 1; height: 1px; background: var(--st-border); }

/* ═══════════════════════════════════════════════════════════════
   أنظمة التفاعل والولاء — Loyalty / Abandoned Cart / Offers / Wheel / Seasons
   ═══════════════════════════════════════════════════════════════ */

/* ── 1) نقاط الولاء ── */
.st-loyalty { position: relative; overflow: hidden; border-radius: var(--st-radius-panel); padding: clamp(20px, 4vw, 32px); color: #fff; background: var(--st-brand); }
.st-loyalty > * { position: relative; z-index: 1; }
.st-loyalty__top { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--st-space-2); flex-wrap: wrap; }
.st-loyalty__balance b { display: block; font-size: clamp(2rem, 5vw, 2.8rem); font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.st-loyalty__balance span { font-size: .85rem; opacity: .85; }
.st-loyalty__tier { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: var(--st-radius-pill); background: rgb(255 255 255 / .16); font-size: .8rem; font-weight: 700; }
.st-loyalty__bar { height: 10px; border-radius: var(--st-radius-pill); background: rgb(255 255 255 / .22); overflow: hidden; margin-top: var(--st-space-3); }
.st-loyalty__bar i { display: block; height: 100%; width: 62%; border-radius: var(--st-radius-pill); background: #fff; transition: width .6s var(--st-ease); }
/* قيمة 62% demo — في الإنتاج تُحسب من رصيد النقاط/عتبة المستوى التالي */
.st-loyalty__next { font-size: .82rem; opacity: .85; margin-top: 8px; }

.st-loyrow { display: flex; align-items: center; gap: var(--st-space-2); padding: var(--st-space-2) var(--st-space-3); font-size: .9rem; }
.st-loyrow + .st-loyrow { border-top: 1px solid var(--st-border); }
.st-loyrow__icon { width: 38px; height: 38px; flex: 0 0 38px; border-radius: var(--st-radius-ctrl); display: grid; place-items: center; font-size: 1.15rem; }
.st-loyrow__icon--earn { background: var(--color-success-subtle, #dcfce7); color: var(--st-success); }
.st-loyrow__icon--use { background: rgb(var(--st-brand-rgb) / .1); color: var(--st-brand); }
.st-loyrow__icon--expire { background: var(--st-surface-2); color: var(--st-muted); }
.st-loyrow small { display: block; color: var(--st-muted); font-size: .76rem; }
.st-loyrow__pts { margin-inline-start: auto; font-weight: 800; font-variant-numeric: tabular-nums; }
.st-loyrow__pts--earn { color: var(--st-success); }
.st-loyrow__pts--use { color: var(--st-brand); }
.st-loyrow__pts--expire { color: var(--st-muted); text-decoration: line-through; }

.st-rewards { display: grid; grid-template-columns: 1fr; gap: var(--st-space-2); }
.st-reward { padding: var(--st-space-3); display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.st-reward__cost { display: inline-flex; align-items: center; gap: 5px; padding: 4px 12px; border-radius: var(--st-radius-pill); background: rgb(var(--st-brand-rgb) / .1); color: var(--st-brand); font-weight: 800; font-size: .82rem; }
.st-reward h4 { margin: 0; font-size: .95rem; }
.st-reward p { margin: 0; font-size: .8rem; color: var(--st-muted); flex: 1; }

/* نقاط تُكتسب — وسم موحد يظهر بالمنتج/السلة/الطلب */
.st-ptag { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: var(--st-radius-pill); background: rgb(var(--st-brand-rgb) / .08); color: var(--st-brand); font-size: .8rem; font-weight: 700; }
.st-ptag i { font-size: .95rem; }

/* ── 2) تذكير السلة المتروكة — بطاقة عائمة غير معيقة ── */
.st-reminder { position: fixed; bottom: 20px; inset-inline-start: 20px; z-index: 72; width: min(360px, calc(100vw - 40px)); background: var(--st-surface); border: 1px solid var(--st-border); border-radius: var(--st-radius-card); padding: var(--st-space-3); opacity: 0; translate: 0 24px; pointer-events: none; transition: opacity .3s, translate .3s var(--st-ease); }
.st-reminder--on { opacity: 1; translate: 0 0; pointer-events: auto; }
.st-reminder__head { display: flex; align-items: center; gap: 10px; }
.st-reminder__head h3 { margin: 0; font-size: .95rem; flex: 1; }
.st-reminder__head .st-iconbtn { width: 32px; height: 32px; font-size: 1.05rem; }
.st-reminder__items { display: flex; gap: 8px; margin-block: 10px; }
.st-reminder__thumb { width: 44px; height: 44px; border-radius: var(--st-radius-ctrl); position: relative; overflow: hidden; }
.st-reminder__thumb .st-ph { position: absolute; inset: 0; font-size: 1.3rem; }
.st-reminder__more { width: 44px; height: 44px; border-radius: var(--st-radius-ctrl); background: var(--st-surface-2); display: grid; place-items: center; font-weight: 800; font-size: .8rem; color: var(--st-muted); }
.st-reminder p { margin: 0 0 10px; font-size: .82rem; color: var(--st-muted); }
.st-reminder__actions { display: flex; gap: 8px; }
.st-reminder__actions .primary-button { flex: 1; min-height: var(--st-ctrl-h-s); }

/* ── 3) عروض BOGO ── */
.st-root .badge--offer { background: var(--st-accent); color: #1a1205; }
.st-offerbox { display: flex; gap: var(--st-space-2); align-items: flex-start; padding: var(--st-space-2) var(--st-space-3); border-radius: var(--st-radius-card); border: 1.5px dashed var(--st-accent); background: color-mix(in srgb, var(--st-accent) 8%, var(--st-surface)); margin-block: var(--st-space-2); }
.st-offerbox > i { color: var(--st-accent); font-size: 1.35rem; margin-top: 2px; }
.st-offerbox h4 { margin: 0 0 2px; font-size: .92rem; }
.st-offerbox p { margin: 0; font-size: .8rem; color: var(--st-muted); }
.st-offerline { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 10px var(--st-space-2); border-radius: var(--st-radius-ctrl); background: color-mix(in srgb, var(--st-accent) 10%, var(--st-surface)); font-size: .85rem; margin-block: var(--st-space-1); }
.st-offerline b { color: var(--st-success); font-variant-numeric: tabular-nums; }

/* ── 4) عجلة الحظ ── */
.st-fab--raise, .st-reminder--raise { bottom: 84px; }
@media (min-width: 641px) { .st-fab--raise, .st-reminder--raise { bottom: 20px; } }
.st-fab { position: fixed; bottom: 20px; inset-inline-end: 20px; z-index: 72; width: 52px; height: 52px; border-radius: var(--st-radius-ctrl); border: 0; background: var(--st-brand); color: #fff; font-size: 1.5rem; display: grid; place-items: center; transition: scale .2s var(--st-ease); }
.st-fab:hover { scale: 1.08; }
.st-fab i { animation: st-fab-spin 9s linear infinite; }
@keyframes st-fab-spin { to { rotate: 360deg; } }
.st-wheel-modal { position: fixed; inset: 0; z-index: 85; display: grid; place-items: center; padding: var(--st-space-3); opacity: 0; pointer-events: none; transition: opacity .25s; }
.st-wheel-modal--on { opacity: 1; pointer-events: auto; }
.st-wheel-modal__bg { position: absolute; inset: 0; background: rgb(0 0 0 / .55); }
.st-wheel-card { position: relative; width: min(380px, 94vw); max-height: calc(100dvh - 32px); overflow-y: auto; background: var(--st-surface); border: 1px solid var(--st-border); border-radius: var(--st-radius-panel); padding: var(--st-space-4) var(--st-space-3) var(--st-space-3); text-align: center; }
.st-wheel-card > h2 { margin: 0 0 4px; font-size: 1.3rem; }
.st-wheel-card > p { margin: 0; font-size: .85rem; color: var(--st-muted); }
.st-wheel-card .st-iconbtn--close { position: absolute; top: 10px; inset-inline-end: 10px; width: 36px; height: 36px; }
.st-wheel-frame { position: relative; width: min(270px, 72vw); aspect-ratio: 1; margin: var(--st-space-3) auto; }
.st-wheel-disc { position: relative; width: 100%; height: 100%; border-radius: 50%; border: 8px solid var(--st-surface-2); background: conic-gradient(var(--st-brand) 0 60deg, var(--st-surface-2) 60deg 120deg, var(--st-accent) 120deg 180deg, var(--st-surface-2) 180deg 240deg, var(--st-brand) 240deg 300deg, var(--st-accent) 300deg 360deg); transition: transform 4.2s cubic-bezier(.12, .8, .2, 1); }
.st-wheel-seg { position: absolute; inset: 0; display: flex; justify-content: center; font-size: .68rem; font-weight: 800; color: var(--st-text); pointer-events: none; }
.st-wheel-seg > span { translate: 0 18px; display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; line-height: 1.2; }
.st-wheel-seg > span i { font-size: 1rem; }
.st-wheel-pointer { position: absolute; top: -4px; inset-inline-start: calc(50% - 13px); z-index: 2; width: 26px; height: 34px; background: var(--st-danger); clip-path: polygon(0 0, 100% 0, 50% 100%); }
.st-wheel-hub { position: absolute; inset: calc(50% - 27px); border-radius: 50%; background: var(--st-surface); border: 5px solid var(--st-surface-2); display: grid; place-items: center; font-size: 1.3rem; color: var(--st-brand); z-index: 2; }
.st-wheel-result { margin-top: var(--st-space-2); padding: var(--st-space-2) var(--st-space-3); border-radius: var(--st-radius-card); font-weight: 800; display: none; }
.st-wheel-result--on { display: block; }
.st-wheel-result--win { background: var(--color-success-subtle, #dcfce7); color: var(--st-success); }
.st-wheel-result--luck { background: var(--st-surface-2); color: var(--st-muted); }
.st-wheel-actions { display: flex; gap: 8px; justify-content: center; margin-top: var(--st-space-2); flex-wrap: wrap; }
.st-wheel-note { font-size: .72rem; color: var(--st-muted); margin-top: var(--st-space-2); }

/* ── 5) المؤثرات الموسمية — مكوّن مركزي، بلا حجب ── */
.st-fx { position: fixed; inset: 0; z-index: 65; pointer-events: none; overflow: hidden; }
.st-fx__p { position: absolute; top: -10%; display: block; will-change: transform, opacity; animation: st-fall linear infinite; opacity: .85; }

/* ── أدوات مساعدة مركزية (نفس نمط st-mt-*) ── */
.st-p-0 { padding: 0; }
.st-p-3 { padding: var(--st-space-3); }
.st-mb-2 { margin-bottom: var(--st-space-2); }
.st-pointer { cursor: pointer; }
.st-border-t { border-top: 1px solid var(--st-border); }
.st-empty--pad { padding: var(--st-space-4); }
.st-savedfoot { border-top: 1px solid var(--st-border); }
.st-actions-row { display: flex; gap: var(--st-space-2); flex-wrap: wrap; margin-block: var(--st-space-2); }

/* ── مقارنة المنتجات ── */
.st-card__cmp { position: absolute; top: 52px; inset-inline-end: 10px; z-index: 2; width: 38px; height: 38px; border-radius: var(--st-radius-ctrl); border: 0; background: color-mix(in srgb, var(--st-surface) 92%, transparent); color: var(--st-muted); font-size: 1.1rem; display: grid; place-items: center; transition: color .2s, scale .2s; }
.st-card__cmp:hover { color: var(--st-brand); scale: 1.1; }
.st-card__cmp[aria-pressed="true"], .st-root .st-card__cmp.is-comparing { color: var(--st-brand); }
.st-cmp { display: grid; grid-template-columns: 110px repeat(var(--cmp-n, 2), minmax(0, 1fr)); border: 1px solid var(--st-border); border-radius: var(--st-radius-card); overflow: hidden; }
.st-cmp__attr { padding: 12px; font-weight: 700; font-size: .85rem; background: var(--st-surface-2); border-bottom: 1px solid var(--st-border); display: flex; align-items: center; }
.st-cmp__val { padding: 12px; text-align: center; font-size: .9rem; border-bottom: 1px solid var(--st-border); display: flex; align-items: center; justify-content: center; }
.st-cmp__col { position: relative; padding: 14px 10px; text-align: center; border-bottom: 1px solid var(--st-border); }
.st-cmp__col h3 { font-size: .85rem; margin: 8px 0 10px; min-height: 2.4em; }
.st-cmp__img { aspect-ratio: 16 / 10; border-radius: var(--st-radius-ctrl); position: relative; overflow: hidden; }
.st-cmp__img .st-ph { position: absolute; inset: 0; font-size: 2.2rem; }
.st-cmp__x { position: absolute; top: 8px; inset-inline-start: 8px; width: 30px; height: 30px; font-size: .95rem; }

/* ── نموذج عنوان مضمَّن ── */
.st-addrform { display: none; }
.st-addrform--on { display: grid; gap: var(--st-space-2); }

/* ── ترقيم صفحات — حالة معطّلة ── */
.st-pager__off { opacity: .35; pointer-events: none; }

/* ── تقييمات المنتج ── */
.st-review { padding: var(--st-space-3); }
.st-review + .st-review { border-top: 1px solid var(--st-border); }
.st-review__head { display: flex; align-items: center; gap: var(--st-space-2); flex-wrap: wrap; margin-bottom: 6px; }
.st-review p { margin: 0; font-size: .9rem; color: var(--st-text); }

/* ── معاينة بريد استعادة السلة (UI فقط) ── */
.st-email { max-width: 560px; margin-inline: auto; border: 1px solid var(--st-border); border-radius: var(--st-radius-card); overflow: hidden; background: var(--st-surface); }
.st-email__head { padding: var(--st-space-3) var(--st-space-4); background: var(--st-brand); color: #fff; font-weight: 800; }
.st-email__body { padding: var(--st-space-4); }
.st-email__body h3 { margin: 0 0 var(--st-space-1); font-size: 1.05rem; }
.st-email__body > p { margin: 0 0 var(--st-space-2); font-size: .88rem; color: var(--st-muted); }
.st-email__foot { padding: var(--st-space-2) var(--st-space-4); border-top: 1px solid var(--st-border); font-size: .75rem; color: var(--st-muted); text-align: center; }

/* PJAX المركزي (app-public-pjax.js) يتولى الاستبدال والانتقالات —
   لا شريط/انتقالات خاصة هنا. */
[hidden] { display: none !important; }

/* ── ترقيات ── */
@media (min-width: 641px) {
  .st-rewards { grid-template-columns: repeat(3, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  .st-fx { display: none; }
  .st-wheel-disc { transition: none; }
  .st-fab i { animation: none; }
  .st-root *, .st-root *::before, .st-root *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ═══ إنتاج: وسائط حقيقية (القالب استخدم placeholders أيقونية) ═══ */
.st-card__media img,
.st-gallery__main > img,
.st-gallery__thumbs [data-st-thumb] > img,
.st-cartitem__img > img,
.st-catcard > img,
.st-cmp__img > img,
.st-miniitem__img > img,
.st-reminder__thumb > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.st-card__media img { transition: scale .5s var(--st-ease); }
.st-card:hover .st-card__media img { scale: 1.06; }
.st-card--oos .st-card__media img { opacity: .55; }
.st-card__media .st-card__badges, .st-card__media .st-card__fav, .st-card__media .st-card__cmp, .st-card__media .st-card__quick { z-index: 2; }
.st-gallery__thumbs [data-st-thumb] { position: relative; overflow: hidden; }

.st-gallery__video { position: absolute; inset: 0; width: 100%; height: 100%; }
.st-gallery__video video, .st-gallery__video iframe { width: 100%; height: 100%; object-fit: cover; border: 0; }
.st-gallery { position: relative; }
.st-gallery__main { position: relative; aspect-ratio: 1; overflow: hidden; background: var(--st-surface-2); }

/* مودال الاستفسار: المركزي #ui-inquiry-dialog (publicShell) — لا st-modal. */
