/* ==========================================================================
   قالب «نَدى» Nada — theme.css
   تخطيط: شريطٌ علويّ أخضر هادئ، ورأسٌ أبيض بقائمةٍ تفصل روابطها شرطاتٌ مائلة وبحثٍ كبسوليّ،
   وسلايدر بعرض الشاشة بحافّةٍ متموّجة، وأقسامٌ كريميّة وخضراء تفصلها ضربات فرشاة،
   وعناوين كبيرة خفيفة تحتها خطٌّ قصير، وبطاقاتٌ مستديرة الزوايا، وتبويباتٌ على هيئة ألسنة ملفّ.
   ألوان الهويّة الخمسة وحدها متغيّرة؛ وما عداها محايد ثابت.
   ========================================================================== */

:root {
  /* ألوان الهويّة — قيم تجريبيّة يستبدلها كلّ ناشر */
  --store-primary: #66724F;
  --store-primary-dark: #4E583B;
  --store-accent: #E9B949;
  --store-bg: #FFFFFF;
  --store-text: #1F1F1F;

  /* محايدات ثابتة (ليست من الهويّة) */
  --nd-cream: #FEF5EC;      /* خلفيّة الأقسام الكريميّة */
  --nd-lav: #FBF6F0;        /* لوحٌ فاتح */
  --nd-peach: #FEF5EC;
  --nd-line: #E9E1D6;
  --nd-dash: #B9AE9C;       /* الإطار المنقّط للدوائر */
  --nd-muted: #5E5A54;
  --nd-ink: #141414;
  --nd-on-dark: #FFFFFF;
  --nd-on-accent: #1F1F1F;
  --nd-star: #E5A913;
  --nd-star-off: #DDD5C9;
  --nd-ok: #2E7D32;
  --nd-out: #6B6760;
  --nd-overlay: rgba(25, 28, 20, .55);

  /* ألوان أنواع الكتب — ثابتة في المنصّة */
  --nd-type-paper: #DB7056;
  --nd-type-ebook: #5675A3;
  --nd-type-audio: #986AB0;
  --nd-type-edu: #3f8f6b;

  /* الخطّ والمقاسات */
  --nd-font: "Tajawal", "Segoe UI", Tahoma, Arial, sans-serif;
  --nd-fs-xs: .8125rem;
  --nd-fs-sm: .9375rem;
  --nd-fs-md: 1rem;
  --nd-fs-lg: 1.25rem;
  --nd-fs-xl: 2.125rem;
  --nd-fs-2xl: 3.25rem;

  --nd-r-xs: 6px;
  --nd-r-sm: 10px;
  --nd-r-md: 16px;
  --nd-r-lg: 26px;
  --nd-r-full: 999px;
  --nd-shadow: 0 14px 34px rgba(60, 50, 30, .1);
  --nd-shadow-cover: 0 12px 24px -12px rgba(40, 35, 25, .45);
  --nd-container: 1280px;
  --nd-gutter-l: max(16px, env(safe-area-inset-left, 0px));
  --nd-gutter-r: max(16px, env(safe-area-inset-right, 0px));
}

/* ---------- الأساس ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: light; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--nd-font); font-size: var(--nd-fs-md); line-height: 1.75; color: var(--store-text); background: var(--store-bg); }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
input, select { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.35; text-wrap: balance; font-weight: 500; color: var(--nd-ink); }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 3px solid var(--store-accent); outline-offset: 2px; border-radius: 4px; }
.nd-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nd-flip { transform: scaleX(-1); }
.nd-note { color: var(--nd-muted); font-size: var(--nd-fs-sm); }

.nd-container { width: 100%; max-width: var(--nd-container); margin-inline: auto; padding-left: var(--nd-gutter-l); padding-right: var(--nd-gutter-r); }
.nd-section { padding-block: 72px; position: relative; }
.nd-section--lav, .nd-section--cream { background: var(--nd-cream); }
.nd-section--peach { background: var(--nd-cream); }

/* ---------- الأيقونات ---------- */
.nd-icon { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.nd-icon--sm { width: 18px; height: 18px; }
.nd-icon--xs { width: 15px; height: 15px; }

/* ---------- الأزرار ---------- */
.nd-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 10px 26px;
  border: 1.5px solid transparent; border-radius: var(--nd-r-xs);
  font-weight: 700; font-size: var(--nd-fs-sm); line-height: 1.2;
  transition: background-color .2s, color .2s, border-color .2s, transform .2s;
}
.nd-btn:active { transform: translateY(1px); }
.nd-btn--primary { background: var(--store-primary); color: var(--nd-on-dark); }
.nd-btn--primary:hover { background: var(--store-primary-dark); }
.nd-btn--dark { background: var(--store-primary-dark); color: var(--nd-on-dark); }
.nd-btn--dark:hover { background: var(--nd-ink); }
.nd-btn--outline { background: transparent; border-color: var(--store-primary); color: var(--store-primary); }
.nd-btn--outline:hover { background: var(--store-primary); color: var(--nd-on-dark); }
.nd-btn--light { background: var(--store-bg); color: var(--nd-ink); }
.nd-btn--light:hover { background: var(--nd-cream); }
.nd-btn--ghost { background: var(--nd-cream); color: var(--store-text); }
.nd-btn--ghost:hover { background: var(--nd-line); }
.nd-btn--block { width: 100%; }
.nd-btn--sm { min-height: 40px; padding: 6px 18px; font-size: .875rem; }
.nd-btn--xs { min-height: 34px; padding: 4px 12px; font-size: var(--nd-fs-xs); }
.nd-btn[disabled] { background: var(--nd-cream); color: var(--nd-muted); border-color: transparent; cursor: not-allowed; transform: none; }
.nd-btn .nd-arrow { transform: scaleX(-1); }

.nd-icon-btn {
  position: relative; display: inline-grid; place-items: center;
  width: 40px; height: 40px; border-radius: 50%; border: 0;
  background: var(--store-bg); color: var(--nd-ink); box-shadow: var(--nd-shadow);
  transition: background-color .2s, color .2s;
}
.nd-icon-btn:hover { background: var(--store-primary); color: var(--nd-on-dark); }
.nd-icon-btn--plain { box-shadow: none; background: transparent; }
.nd-icon-btn--plain:hover { background: var(--nd-cream); color: var(--store-primary); }
.nd-icon-btn--cart { border-radius: var(--nd-r-xs); background: var(--store-primary); color: var(--nd-on-dark); box-shadow: none; }
.nd-icon-btn--cart:hover { background: var(--store-primary-dark); }
.nd-icon-btn[aria-pressed="true"] { color: var(--store-primary); }
.nd-icon-btn[aria-pressed="true"] .nd-icon { fill: currentColor; }

.nd-count {
  position: absolute; top: -8px; inset-inline-end: -10px;
  min-width: 18px; height: 18px; padding-inline: 4px; border-radius: var(--nd-r-full);
  background: var(--store-primary); color: var(--nd-on-dark);
  font-size: .6875rem; font-weight: 800; line-height: 18px; text-align: center; font-variant-numeric: tabular-nums;
}
.nd-count:empty { display: none; }

/* ---------- عنوان القسم ---------- */
.nd-title { display: grid; justify-items: center; gap: 12px; text-align: center; margin-bottom: 40px; }
.nd-title h2, .nd-title h1 { font-size: var(--nd-fs-xl); font-weight: 500; letter-spacing: -.01em; }
.nd-title__eyebrow { font-size: var(--nd-fs-sm); color: var(--nd-muted); }
.nd-title__line { display: block; width: 52px; height: 1px; background: currentColor; opacity: .35; }
.nd-title__sub { color: var(--nd-muted); font-size: var(--nd-fs-sm); max-width: 60ch; }
.nd-title--start { justify-items: start; text-align: start; }
.nd-title--start .nd-title__eyebrow { order: -2; }
.nd-title--start .nd-title__line { order: -1; }
.nd-title--light h2, .nd-title--light .nd-title__sub, .nd-title--light .nd-title__eyebrow { color: var(--nd-on-dark); }
.nd-head { margin-bottom: 30px; }

/* التبويبات: كبسولات، أو ألسنة ملفّ فوق لوح */
.nd-tabs { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin: -16px 0 30px; }
.nd-tabs button { border: 1px solid var(--nd-line); background: var(--store-bg); padding: 8px 20px; border-radius: var(--nd-r-full); font-weight: 700; font-size: var(--nd-fs-sm); color: var(--nd-muted); }
.nd-tabs button:hover { color: var(--store-primary); }
.nd-tabs button:is([aria-pressed="true"], [aria-selected="true"]) { background: var(--store-primary); border-color: var(--store-primary); color: var(--nd-on-dark); }
.nd-tabs--folder { gap: 6px; margin: 0; flex-wrap: nowrap; }
.nd-tabs--folder button { border: 0; border-radius: var(--nd-r-lg) var(--nd-r-lg) 0 0; padding: 14px 34px; background: var(--store-primary-dark); color: var(--nd-on-dark); }
.nd-tabs--folder button:hover { color: var(--nd-on-dark); background: color-mix(in srgb, var(--store-primary-dark) 85%, #000); }
.nd-tabs--folder button:is([aria-pressed="true"], [aria-selected="true"]) { background: var(--nd-cream); color: var(--nd-ink); }

/* ---------- الحافّة المتموّجة ---------- */
.nd-wave { display: block; width: 100%; height: 34px; }
.nd-wave path { fill: currentColor; }
.nd-wave .nd-wave__stroke { fill: none; stroke: currentColor; stroke-width: 2; opacity: .6; }

/* ---------- الشريط العلويّ ---------- */
.nd-topbar { background: var(--store-primary); color: var(--nd-on-dark); font-size: var(--nd-fs-xs); }
.nd-topbar .nd-container { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 40px; }
.nd-topbar__msg { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.nd-topbar__msg a { text-decoration: underline; text-underline-offset: 3px; }
.nd-topbar__links { display: flex; gap: 22px; font-weight: 700; }
.nd-topbar__links a { display: inline-flex; align-items: center; gap: 6px; }
.nd-topbar__links a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- الرأس ---------- */
.nd-header { position: sticky; top: 0; z-index: 30; background: var(--store-bg); box-shadow: 0 1px 0 var(--nd-line); }
.nd-header .nd-bar { display: flex; align-items: center; gap: 26px; min-height: 84px; }
.nd-brand { display: inline-flex; align-items: center; gap: 10px; flex: none; }
.nd-brand img { width: 42px; height: 42px; border-radius: 12px; }
.nd-brand__name { font-size: 1.375rem; font-weight: 800; color: var(--nd-ink); white-space: nowrap; }
.nd-menu { display: flex; align-items: center; }
.nd-menu li { display: flex; align-items: center; }
.nd-menu li + li::before { content: "/"; color: var(--nd-dash); padding-inline: 12px; }
.nd-menu a { font-weight: 500; padding-block: 6px; border-bottom: 1.5px solid transparent; }
.nd-menu a:hover, .nd-menu [aria-current="page"] { color: var(--store-primary); border-bottom-color: currentColor; }
.nd-hsearch { display: flex; align-items: center; flex: 1; max-width: 300px; height: 44px; padding: 4px; padding-inline-start: 16px; margin-inline-start: auto; border: 1px solid var(--nd-line); border-radius: var(--nd-r-full); background: var(--nd-lav); }
.nd-hsearch input { flex: 1; min-width: 0; border: 0; background: transparent; font-size: var(--nd-fs-sm); }
.nd-hsearch input:focus { outline: none; }
.nd-hsearch:focus-within { border-color: var(--store-primary); }
.nd-hsearch__btn { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border: 0; border-radius: 50%; background: var(--store-primary); color: var(--nd-on-dark); }
.nd-hsearch__btn:hover { background: var(--store-primary-dark); }
.nd-actions { display: flex; align-items: center; gap: 18px; flex: none; }
.nd-actions__link { position: relative; display: inline-flex; align-items: center; gap: 6px; font-weight: 500; font-size: var(--nd-fs-sm); }
.nd-actions__link:hover { color: var(--store-primary); }
.nd-actions__link b { font-weight: 800; font-variant-numeric: tabular-nums; }
.nd-actions__link .nd-count { top: -10px; inset-inline-end: auto; inset-inline-start: 8px; }
.nd-menu-btn { display: none; }

.nd-field { flex: 1; min-width: 0; padding: 11px 16px; border: 1.5px solid var(--nd-line); border-radius: var(--nd-r-xs); background: var(--store-bg); font-size: var(--nd-fs-sm); }
.nd-field:focus { outline: none; border-color: var(--store-primary); }

/* ---------- الدرج الجانبيّ ---------- */
.nd-drawer { position: fixed; inset: 0; z-index: 60; visibility: hidden; }
.nd-drawer.is-open { visibility: visible; }
.nd-drawer__backdrop { position: absolute; inset: 0; background: var(--nd-overlay); opacity: 0; transition: opacity .25s; }
.nd-drawer.is-open .nd-drawer__backdrop { opacity: 1; }
.nd-drawer__panel {
  position: absolute; top: 0; bottom: 0; inset-inline-start: 0; width: min(86vw, 340px); background: var(--store-bg);
  display: flex; flex-direction: column; overflow-y: auto;
  padding: calc(16px + env(safe-area-inset-top, 0px)) 18px calc(18px + env(safe-area-inset-bottom, 0px));
  transform: translateX(100%); transition: transform .3s ease;
}
.nd-drawer.is-open .nd-drawer__panel { transform: translateX(0); }
.nd-drawer__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.nd-drawer__head .nd-brand__name { font-size: 1.125rem; }
.nd-drawer__title { font-size: var(--nd-fs-xs); font-weight: 700; color: var(--nd-muted); margin: 16px 0 6px; }
.nd-drawer__links a { display: block; padding: 11px 4px; border-bottom: 1px solid var(--nd-line); font-weight: 500; }
.nd-drawer__links a:hover { color: var(--store-primary); }
.nd-drawer__contacts { margin-top: auto; padding-top: 18px; display: grid; gap: 6px; font-size: var(--nd-fs-sm); color: var(--nd-muted); }

/* ---------- بطاقة الكتاب ---------- */
.nd-grid { display: grid; gap: 30px 24px; grid-template-columns: repeat(var(--nd-cols, 5), minmax(0, 1fr)); }
.nd-card { display: flex; flex-direction: column; gap: 14px; min-width: 0; text-align: center; }
.nd-card__media { position: relative; padding: 22px 18% 18px; border-radius: var(--nd-r-md); background: var(--nd-cream); overflow: hidden; }
.nd-cover { position: relative; display: block; aspect-ratio: 2 / 3; max-width: 100%; border-radius: 4px; overflow: hidden; box-shadow: var(--nd-shadow-cover); background: var(--nd-line); }
.nd-cover img { width: 100%; height: 100%; object-fit: cover; transition: opacity .4s ease; }
.nd-cover__back { position: absolute; inset: 0; opacity: 0; }
.nd-card:hover .nd-cover__back, .nd-card:focus-within .nd-cover__back { opacity: 1; }

.nd-type {
  position: absolute; bottom: 8px; inset-inline-start: 8px; z-index: 2;
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  color: #FFFFFF; border: 2px solid #FFFFFF; box-shadow: 0 2px 8px rgba(40, 35, 25, .3);
}
.nd-type .nd-icon { width: 15px; height: 15px; stroke-width: 2; }
.nd-type--paper { background: var(--nd-type-paper); }
.nd-type--ebook { background: var(--nd-type-ebook); }
.nd-type--audio { background: var(--nd-type-audio); }
.nd-type--edu   { background: var(--nd-type-edu); }

.nd-badges { position: absolute; top: 12px; inset-inline-start: 12px; z-index: 3; display: grid; justify-items: start; gap: 4px; }
.nd-badge { padding: 2px 10px; border-radius: var(--nd-r-full); font-size: .75rem; font-weight: 800; line-height: 1.6; color: var(--nd-on-dark); }
.nd-badge--sale { background: var(--store-primary); }
.nd-badge--new  { background: var(--nd-ok); }
.nd-badge--out  { background: var(--nd-out); }

/* المفضّلة والنظرة السريعة تطفوان فوق الغلاف (عند الوقوف في الحاسوب، ودائمًا في اللمس) ولا تحجزان مكانًا */
.nd-card__tools { position: absolute; top: 10px; inset-inline-end: 10px; z-index: 3; display: grid; gap: 6px; opacity: 0; transform: translateY(-4px); transition: opacity .25s, transform .25s; }
.nd-card__tool { width: 36px; height: 36px; }
.nd-card:hover .nd-card__tools, .nd-card:focus-within .nd-card__tools { opacity: 1; transform: none; }
@media (hover: none) { .nd-card__tools { opacity: 1; transform: none; } }
.nd-card.is-out .nd-cover img:not(.nd-cover__back) { filter: grayscale(1); opacity: .6; }
.nd-card.is-out .nd-cover__back { display: none; }

.nd-card__body { display: flex; flex-direction: column; align-items: center; gap: 3px; flex: 1; min-width: 0; }
/* صفّ السعر وزرّ السلّة: ظاهرٌ دائمًا، ويُدفع وحده إلى أسفل البطاقة ليتساوى بين البطاقات (البند 7) */
.nd-card__foot { align-self: stretch; display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 10px; border-top: 1px dashed var(--nd-line); }
.nd-card__foot .nd-price { justify-content: flex-start; text-align: start; }
.nd-card__foot .nd-price__now { order: -1; }
/* زرّ السلّة: زرّ القالب الأصليّ (بلون المتجر، بأيقونة الحقيبة و«أضف إلى السلّة») كان يظهر فوق الغلاف عند التحويم فقط، فصار ظاهرًا دائمًا تحت السعر (البند 7) */
.nd-card__add { align-self: stretch; display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; margin-top: 10px; padding: 0 10px; border: 0; border-radius: var(--nd-r-xs); background: var(--store-primary); color: var(--nd-on-dark); font-weight: 700; font-size: var(--nd-fs-xs); white-space: nowrap; transition: background-color .2s; }
.nd-card__add:hover { background: var(--store-primary-dark); }
.nd-card__add[disabled] { background: transparent; border: 1.5px dashed var(--nd-dash); color: var(--nd-out); cursor: not-allowed; }
.nd-card__cat { font-size: var(--nd-fs-xs); color: var(--nd-muted); }
.nd-card__cat:hover { color: var(--store-primary); }
.nd-card__title { font-size: 1.0625rem; max-width: 100%; font-weight: 500; line-height: 1.5; color: var(--nd-ink);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.nd-card__title a:hover { color: var(--store-primary); }

/* ---------- البند الصغير (لوح القوائم) ---------- */
.nd-mini { display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: 16px; align-items: center; min-width: 0; }
.nd-mini__media { display: grid; place-items: center; aspect-ratio: 1; border-radius: var(--nd-r-sm); background: var(--nd-cream); padding: 8px; }
.nd-mini__media img { height: 100%; width: auto; border-radius: 3px; box-shadow: 0 6px 12px -6px rgba(40, 35, 25, .45); }
.nd-mini__title { font-size: 1rem; font-weight: 500; line-height: 1.45; margin-bottom: 2px; }
.nd-mini__title a:hover { color: var(--store-primary); }
.nd-mini .nd-price { justify-content: flex-start; }

/* ---------- السعر ---------- */
.nd-price { display: flex; align-items: baseline; justify-content: center; flex-wrap: wrap; gap: 2px 8px; }
.nd-price__now { font-size: 1.0625rem; font-weight: 700; color: var(--nd-ink); font-variant-numeric: tabular-nums; }
.nd-price__old { font-size: var(--nd-fs-sm); color: var(--nd-muted); text-decoration: line-through; font-variant-numeric: tabular-nums; }
.nd-price--start { justify-content: flex-start; }

/* ---------- التقييم ---------- */
.nd-rating { display: inline-flex; align-items: center; gap: 6px; font-size: var(--nd-fs-xs); color: var(--nd-muted); }
.nd-stars { position: relative; display: inline-block; width: 80px; height: 16px; flex: none; }
.nd-stars svg { position: absolute; inset: 0; width: 80px; height: 16px; }
.nd-stars__off { fill: var(--nd-star-off); }
.nd-stars__on { fill: var(--nd-star); clip-path: inset(0 calc(100% - var(--nd-score, 0) * 20%) 0 0); }
[dir="rtl"] .nd-stars__on { clip-path: inset(0 0 0 calc(100% - var(--nd-score, 0) * 20%)); }
.nd-rating--lg .nd-stars, .nd-rating--lg .nd-stars svg { width: 110px; height: 22px; }
.nd-rating--lg { font-size: var(--nd-fs-sm); }
.nd-rating__value { font-weight: 800; color: var(--store-text); font-variant-numeric: tabular-nums; }

/* ---------- البطاقة الأفقيّة ---------- */
.nd-hcard { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 18px; align-items: start; padding: 18px; border-radius: var(--nd-r-md); background: var(--nd-cream); min-width: 0; }
.nd-hcard .nd-type { width: 24px; height: 24px; bottom: 5px; inset-inline-start: 5px; }
.nd-hcard .nd-type .nd-icon { width: 12px; height: 12px; }
.nd-hcard__body { display: grid; gap: 4px; min-width: 0; }
.nd-hcard__cat { font-size: var(--nd-fs-xs); color: var(--nd-muted); }
.nd-hcard__title { font-size: 1.0625rem; font-weight: 500; color: var(--nd-ink); line-height: 1.45; }
.nd-hcard__title a:hover { color: var(--store-primary); }
.nd-hcard__desc { font-size: var(--nd-fs-sm); color: var(--nd-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.nd-hcard__buy { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.nd-qty { display: inline-flex; align-items: center; height: 40px; border: 1px solid var(--nd-line); border-radius: var(--nd-r-xs); background: var(--store-bg); }
.nd-qty button { width: 34px; height: 100%; border: 0; background: transparent; font-size: 1.125rem; font-weight: 700; }
.nd-qty button:hover { color: var(--store-primary); }
.nd-qty input { width: 34px; border: 0; background: transparent; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; -moz-appearance: textfield; }
.nd-qty input::-webkit-inner-spin-button, .nd-qty input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

/* ---------- بطاقة العرض الأفقيّة (شريط «متاح / بيع») ---------- */
.nd-fcard { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 18px; padding: 18px; border-radius: var(--nd-r-md); border: 1px solid var(--nd-line); background: var(--store-bg); min-width: 0; }
.nd-fcard .nd-type { width: 24px; height: 24px; bottom: 5px; inset-inline-start: 5px; }
.nd-fcard .nd-type .nd-icon { width: 12px; height: 12px; }
.nd-fcard__body { display: grid; gap: 4px; align-content: start; min-width: 0; }
.nd-fcard .nd-btn { margin-top: 8px; justify-self: start; }

/* ---------- بطاقة الغلاف الكامل ---------- */
.nd-poster { position: relative; display: block; aspect-ratio: 3 / 4; overflow: hidden; border-radius: var(--nd-r-md); background: var(--store-primary-dark); color: var(--nd-on-dark); }
.nd-poster img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.nd-poster:hover img { transform: scale(1.04); }
.nd-poster__text { position: absolute; inset: auto 0 0 0; display: grid; gap: 6px; padding: 70px 22px 22px; background: linear-gradient(to top, rgba(25, 28, 20, .92) 25%, rgba(25, 28, 20, 0)); }
.nd-poster__text h3 { color: var(--nd-on-dark); font-size: var(--nd-fs-lg); }
.nd-poster__text p { font-size: var(--nd-fs-sm); opacity: .9; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.nd-poster__price { font-weight: 800; color: var(--store-accent); font-variant-numeric: tabular-nums; }
.nd-poster .nd-type { top: 14px; bottom: auto; inset-inline-start: 14px; }

/* ---------- دوائر التصنيفات ---------- */
.nd-circles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 30px; }
.nd-circle { display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 8px; text-align: center; }
.nd-circle__disc { display: grid; place-items: center; width: 200px; max-width: 100%; aspect-ratio: 1; border-radius: 50%; background: var(--store-bg); border: 1.5px dashed var(--nd-dash); padding: 14px; transition: transform .3s, border-color .3s; }
.nd-circle__disc img { width: 64%; height: auto; }
.nd-circle:hover .nd-circle__disc { transform: translateY(-4px); border-color: var(--store-primary); }
.nd-circle__name { font-size: 1.375rem; font-weight: 500; color: var(--nd-ink); margin-top: 8px; }
.nd-circle__count { font-size: var(--nd-fs-sm); color: var(--nd-muted); }

/* ---------- الشريط المتحرّك ---------- */
.nd-marquee { overflow: hidden; background: var(--store-primary); color: var(--nd-on-dark); }
.nd-marquee__track { display: flex; width: max-content; animation: nd-marquee 38s linear infinite; }
.nd-marquee ul { display: flex; align-items: center; flex: none; }
.nd-marquee li { display: inline-flex; align-items: center; gap: 10px; padding: 18px 26px; font-weight: 700; white-space: nowrap; }
.nd-marquee li::after { content: ""; width: 6px; height: 6px; margin-inline-start: 40px; border-radius: 50%; background: currentColor; opacity: .5; }
.nd-marquee .nd-icon { width: 20px; height: 20px; }
.nd-marquee:hover .nd-marquee__track { animation-play-state: paused; }
@keyframes nd-marquee { from { transform: translateX(0); } to { transform: translateX(50%); } }
[dir="ltr"] .nd-marquee__track { animation-name: nd-marquee-ltr; }
@keyframes nd-marquee-ltr { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- رأي قارئ ---------- */
.nd-quote { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 16px; align-items: start; padding: 24px; border-radius: var(--nd-r-md); background: var(--nd-cream); }
.nd-avatar { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--store-primary); color: var(--nd-on-dark); font-weight: 800; font-size: 1.125rem; }
.nd-quote__text { font-size: var(--nd-fs-md); color: var(--nd-muted); margin-block: 6px 10px; }
.nd-quote__name { font-weight: 800; color: var(--nd-ink); }
.nd-quote__role { font-size: var(--nd-fs-xs); color: var(--nd-muted); }


/* ---------- ترقيم الصفحات ---------- */
.nd-pager { display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; }
.nd-pager a, .nd-pager span { display: inline-grid; place-items: center; min-width: 42px; height: 42px; padding-inline: 8px; border-radius: 50%; border: 1px solid var(--nd-line); font-weight: 700; font-variant-numeric: tabular-nums; color: var(--store-text); }
.nd-pager a:hover { border-color: var(--store-primary); color: var(--store-primary); }
.nd-pager [aria-current="page"] { background: var(--store-primary); border-color: var(--store-primary); color: var(--nd-on-dark); }
.nd-pager .is-gap { border-color: transparent; color: var(--nd-muted); }
.nd-pager .nd-icon { width: 16px; height: 16px; }
.nd-dots { display: flex; justify-content: center; gap: 8px; margin-top: 18px; }
.nd-dots button { width: 10px; height: 10px; padding: 0; border: 0; border-radius: var(--nd-r-full); background: rgba(255, 255, 255, .55); transition: width .25s, background-color .25s; }
.nd-dots button[aria-current="true"] { width: 28px; background: var(--nd-on-dark); }

/* ---------- البانرات: صورةٌ يرفعها الناشر (banner.image) ونصٌّ اختياريّ فوقها ---------- */
.nd-banner { position: relative; isolation: isolate; display: flex; align-items: center; min-height: 380px; padding: 48px 56px; overflow: hidden; border-radius: var(--nd-r-lg); background: var(--nd-cream); }
.nd-banner__img { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; object-fit: cover; object-position: left center; }
[dir="ltr"] .nd-banner__img { object-position: right center; }
.nd-banner__text { position: relative; display: grid; justify-items: start; gap: 12px; max-width: 46%; }
.nd-banner__eyebrow { font-size: var(--nd-fs-sm); color: var(--store-primary); font-weight: 700; }
.nd-banner__title { font-size: 2.25rem; font-weight: 500; line-height: 1.25; color: var(--nd-ink); }
.nd-banner__lead { color: var(--nd-muted); font-size: var(--nd-fs-md); max-width: 42ch; }
/* البانر بلا نصّ: تحذف المنصّة .nd-banner__text إن كانت الصورة تحمل نصّها */

/* ---------- السلايدر بعرض الشاشة ---------- */
.nd-hero { position: relative; color: var(--nd-cream); }
.nd-hero__track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.nd-hero__track::-webkit-scrollbar { display: none; }
.nd-slide { position: relative; isolation: isolate; flex: 0 0 100%; scroll-snap-align: start; display: grid; place-items: center; min-height: 600px; padding: 80px 20px 110px; text-align: center; }
.nd-slide__img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.nd-slide::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(ellipse 60% 55% at 50% 50%, rgba(25, 28, 20, .5), rgba(25, 28, 20, .2)); }
.nd-slide__text { display: grid; justify-items: center; gap: 14px; max-width: 760px; color: var(--nd-on-dark); }
.nd-slide__eyebrow { font-size: 1.125rem; font-weight: 500; }
.nd-slide__title { font-size: 4rem; font-weight: 400; line-height: 1.15; color: var(--nd-on-dark); }
.nd-slide__lead { font-size: 1.25rem; font-weight: 700; }
.nd-slide .nd-btn { margin-top: 10px; }
.nd-hero .nd-dots { position: absolute; bottom: 58px; inset-inline: 0; margin: 0; }
.nd-hero > .nd-wave { position: absolute; bottom: -1px; inset-inline: 0; color: var(--nd-cream); }

/* ---------- عن المتجر: نصٌّ وصورةٌ عليها ختم ---------- */
.nd-about { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 60px; align-items: center; }
.nd-about__text { display: grid; gap: 22px; justify-items: start; }
.nd-about__text p { color: var(--nd-muted); font-size: 1.0625rem; max-width: 52ch; }
.nd-about__media { position: relative; padding-inline-end: 70px; }
.nd-about__media .nd-banner__img { position: static; z-index: auto; width: 100%; height: auto; aspect-ratio: 4 / 5; border-radius: var(--nd-r-md); }
.nd-stamp { position: absolute; top: 18%; inset-inline-end: 0; width: 150px; height: 150px; color: var(--store-primary); filter: drop-shadow(0 8px 16px rgba(40, 35, 25, .2)); }
.nd-stamp svg { width: 100%; height: 100%; }
.nd-stamp__bg { fill: var(--store-primary); }
.nd-stamp__ring { fill: none; stroke: var(--nd-on-dark); stroke-width: 1.5; }
.nd-stamp text { fill: var(--nd-on-dark); font-family: var(--nd-font); font-weight: 800; font-size: 13px; }
.nd-stamp__icon { stroke: var(--nd-on-dark); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@media (prefers-reduced-motion: no-preference) { .nd-stamp svg { animation: nd-spin 30s linear infinite; } .nd-stamp svg .nd-stamp__still { animation: nd-spin 30s linear infinite reverse; transform-origin: 80px 80px; } }
@keyframes nd-spin { to { transform: rotate(360deg); } }

/* ---------- القسم الأخضر المتموّج: قائمة في لوحٍ أبيض ---------- */
.nd-green { position: relative; background: var(--store-primary); color: var(--nd-on-dark); }
.nd-green > .nd-wave { position: absolute; inset-inline: 0; color: var(--store-primary); }
.nd-green > .nd-wave--top { top: -33px; }
.nd-green > .nd-wave--bottom { bottom: -33px; z-index: 1; }
.nd-green__doodles { position: absolute; inset: 0; pointer-events: none; color: rgba(255, 255, 255, .1); overflow: hidden; }
.nd-green__doodles svg { position: absolute; width: 80px; height: 80px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.nd-green .nd-container { position: relative; }
.nd-panel-wrap { display: grid; justify-items: center; }
.nd-panel { width: 100%; padding: 46px 50px; border-radius: var(--nd-r-lg); background: var(--store-bg); color: var(--store-text); }
.nd-panel__list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px 40px; }

/* ---------- صفّ بطاقاتٍ بأسهم ---------- */
.nd-row { position: relative; }
.nd-row__track { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 4 * 24px) / 5); gap: 24px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 4px; }
.nd-row__track::-webkit-scrollbar { display: none; }
.nd-row__track > * { scroll-snap-align: start; }
.nd-row__nav { position: absolute; top: 34%; z-index: 4; }
.nd-row__nav--prev { inset-inline-start: -20px; }
.nd-row__nav--next { inset-inline-end: -20px; }

/* ---------- المزايا ---------- */
.nd-features { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 30px; text-align: center; }
.nd-features li { display: grid; justify-items: center; gap: 8px; }
.nd-feature__icon { display: grid; place-items: center; width: 84px; height: 84px; border-radius: 50%; border: 1.5px dashed var(--nd-dash); color: var(--store-primary); margin-bottom: 8px; }
.nd-feature__icon .nd-icon { width: 34px; height: 34px; stroke-width: 1.4; }
.nd-features b { font-size: 1.25rem; font-weight: 500; color: var(--nd-ink); }
.nd-features small { font-size: var(--nd-fs-sm); color: var(--nd-muted); max-width: 26ch; }

/* ---------- بطاقة المؤلّف (بأسلوب بطاقات المقالات) ---------- */
.nd-authors { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 3 * 24px) / 4); gap: 24px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.nd-authors::-webkit-scrollbar { display: none; }
.nd-author { display: grid; gap: 10px; scroll-snap-align: start; }
.nd-author img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--nd-r-md); background: var(--nd-cream); transition: transform .4s; }
.nd-author:hover img { transform: scale(1.02); }
.nd-author__meta { justify-self: start; padding: 2px 12px; border-radius: var(--nd-r-full); background: var(--nd-cream); font-size: var(--nd-fs-xs); color: var(--nd-muted); }
.nd-author__name { font-size: 1.25rem; font-weight: 500; color: var(--nd-ink); line-height: 1.4; }
.nd-author:hover .nd-author__name { color: var(--store-primary); }
.nd-featured { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }

/* ---------- التذييل الكريميّ ---------- */
.nd-footer { position: relative; margin-top: 34px; background: var(--nd-cream); color: var(--nd-muted); }
.nd-footer > .nd-wave--footer { position: absolute; top: -33px; inset-inline: 0; color: var(--nd-cream); }
.nd-footer__grid { display: grid; grid-template-columns: 1.4fr .8fr .8fr 1.2fr; gap: 40px; padding-block: 60px 40px; }
.nd-footer h3 { color: var(--nd-ink); font-size: 1.125rem; margin-bottom: 18px; }
.nd-footer__about { display: grid; gap: 16px; align-content: start; }
.nd-footer__about p { font-size: var(--nd-fs-sm); max-width: 40ch; }
.nd-subscribe { display: flex; gap: 6px; max-width: 380px; }
.nd-subscribe input { flex: 1; min-width: 0; padding: 0 16px; border: 1px solid var(--nd-line); border-radius: var(--nd-r-xs); background: var(--store-bg); font-size: var(--nd-fs-sm); }
.nd-subscribe input:focus { outline: none; border-color: var(--store-primary); }
.nd-footer__links { display: grid; gap: 10px; font-size: var(--nd-fs-sm); }
.nd-footer__links a:hover { color: var(--store-primary); }
.nd-contact { display: grid; gap: 14px; font-size: var(--nd-fs-sm); }
.nd-contact li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; align-items: start; }
.nd-contact .nd-icon { width: 18px; height: 18px; margin-top: 3px; color: var(--store-primary); }
.nd-contact bdi { color: var(--nd-ink); font-weight: 700; }
.nd-social { display: flex; gap: 8px; margin-top: 18px; }
.nd-social a { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--store-bg); color: var(--store-primary); transition: background-color .2s, color .2s; }
.nd-social a:hover { background: var(--store-primary); color: var(--nd-on-dark); }
.nd-social .nd-icon { width: 16px; height: 16px; }
.nd-footer__bottom { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding-block: 20px; border-top: 1px solid var(--nd-line); font-size: var(--nd-fs-xs); }
.nd-pay { display: flex; gap: 6px; flex-wrap: wrap; }
.nd-pay span { padding: 3px 10px; border-radius: var(--nd-r-full); background: var(--store-bg); font-weight: 700; font-size: .75rem; color: var(--nd-ink); }

/* ---------- المواضع الاختياريّة ---------- */
.nd-cover__back:not([src]), .nd-cover__back[src=""] { display: none; }
.nd-contact__addr:has([data-slot="store.address"]:empty) { display: none; }

/* ---------- معرض صفحة الكتاب: الغلاف وظهره ---------- */
.nd-gallery { display: grid; gap: 14px; justify-items: center; }
.nd-gallery__stage { position: relative; width: min(300px, 100%); }
.nd-gallery__stage .nd-cover { box-shadow: 0 26px 44px -20px rgba(40, 35, 25, .55); }
.nd-gallery.is-flipped .nd-cover__back { opacity: 1; }
.nd-gallery__tools { display: flex; align-items: center; justify-content: center; gap: 10px; }
.nd-thumbs { display: flex; gap: 8px; }
.nd-thumbs button { width: 52px; padding: 3px; border-radius: var(--nd-r-xs); border: 1.5px solid var(--nd-line); background: var(--store-bg); }
.nd-thumbs button[aria-pressed="true"] { border-color: var(--store-primary); }
.nd-thumbs img { width: 100%; height: auto; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 3px; }
.nd-flip-btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border: 1px solid var(--nd-line); border-radius: var(--nd-r-full); background: var(--store-bg); font-size: var(--nd-fs-sm); font-weight: 700; }
.nd-flip-btn:hover { border-color: var(--store-primary); color: var(--store-primary); }
.nd-gallery:not(:has(.nd-cover__back[src]:not([src=""]))) .nd-gallery__tools { display: none; }

/* ---------- الشريط السفليّ للهاتف ---------- */
.nd-tabbar { display: none; }

/* ==========================================================================
   صفحة التصنيف (وتُستعمل للبحث والعروض)
   ========================================================================== */
.nd-pagehead { position: relative; overflow: hidden; background: var(--nd-lav); padding-block: 46px; text-align: center; }
.nd-pagehead h1 { font-size: 2.5rem; font-weight: 800; color: var(--nd-ink); }
.nd-pagehead p { color: var(--nd-muted); font-size: var(--nd-fs-sm); margin-top: 6px; }
.nd-pagehead .nd-blob { opacity: .8; }
.nd-crumbs { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; font-size: var(--nd-fs-xs); color: var(--nd-muted); margin-bottom: 8px; }
.nd-crumbs a:hover { color: var(--store-primary); }
.nd-crumbs .nd-icon { width: 13px; height: 13px; transform: scaleX(-1); }
.nd-crumbs [aria-current="page"] { color: var(--store-text); font-weight: 700; }

.nd-shop { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 40px; align-items: start; padding-block: 44px 64px; }
.nd-shop .nd-grid { --nd-cols: 4; gap: 34px 22px; }
.nd-shop__strip { margin-bottom: 34px; }
.nd-shop__strip .nd-title { margin-bottom: 22px; }
.nd-shop__strip .nd-featured { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.nd-shop__strip .nd-fcard:nth-child(n+3) { display: none; }

/* التصفية: عمودٌ جانبيّ في الحاسوب، ودرجٌ في الجهاز اللوحيّ والهاتف */
.nd-drawer--filters { position: static; visibility: visible; z-index: auto; }
.nd-drawer--filters .nd-drawer__backdrop, .nd-drawer--filters .nd-drawer__head, .nd-drawer--filters .nd-drawer__foot { display: none; }
.nd-drawer--filters .nd-drawer__panel { position: static; transform: none; width: auto; padding: 0; overflow: visible; background: transparent; }
.nd-filters { display: grid; gap: 30px; }
.nd-filter h2 { position: relative; font-size: var(--nd-fs-md); font-weight: 800; color: var(--nd-ink); padding-bottom: 12px; margin-bottom: 14px; border-bottom: 1px solid var(--nd-line); }
.nd-filter h2::after { content: ""; position: absolute; bottom: -1px; inset-inline-start: 0; width: 46px; height: 2px; background: var(--store-primary); }
.nd-filter__body { display: grid; gap: 11px; }
.nd-check { display: flex; align-items: center; gap: 10px; font-size: var(--nd-fs-sm); cursor: pointer; }
.nd-check input { width: 17px; height: 17px; margin: 0; accent-color: var(--store-primary); flex: none; }
.nd-check__count { margin-inline-start: auto; min-width: 30px; padding: 1px 8px; border-radius: var(--nd-r-full); background: var(--nd-lav); font-size: .75rem; color: var(--nd-muted); text-align: center; font-variant-numeric: tabular-nums; }
.nd-check .nd-type { position: static; width: 24px; height: 24px; box-shadow: none; }
.nd-check .nd-type .nd-icon { width: 13px; height: 13px; }
.nd-check .nd-rating { font-size: var(--nd-fs-xs); color: var(--nd-muted); }
.nd-range { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 8px; }
.nd-range input { width: 100%; min-width: 0; padding: 9px 10px; border: 1px solid var(--nd-line); border-radius: var(--nd-r-xs); font-size: var(--nd-fs-sm); font-variant-numeric: tabular-nums; background: var(--store-bg); }
.nd-range input:focus { outline: none; border-color: var(--store-primary); }
.nd-range span { font-size: var(--nd-fs-xs); color: var(--nd-muted); }
.nd-taglist { display: flex; flex-wrap: wrap; gap: 8px; }
.nd-taglist a { padding: 5px 12px; border: 1px solid var(--nd-line); border-radius: var(--nd-r-xs); font-size: var(--nd-fs-xs); }
.nd-taglist a:hover { border-color: var(--store-primary); color: var(--store-primary); }
.nd-filters__actions { display: flex; gap: 10px; }
.nd-filters__actions .nd-btn { flex: 1; white-space: nowrap; }
.nd-side-promo { position: relative; isolation: isolate; overflow: hidden; display: grid; align-content: start; gap: 8px; min-height: 0; padding: 0 0 22px; background: var(--nd-cream); border-radius: var(--nd-r-md, 10px); text-align: center; }
.nd-side-promo > :not(img) { padding-inline: 18px; }
.nd-side-promo .nd-btn { justify-self: center; }
.nd-side-promo .nd-banner__img { position: static; width: 100%; height: auto; aspect-ratio: 270/300; object-fit: cover; margin-bottom: 8px; z-index: auto; }
.nd-side-promo b { font-size: var(--nd-fs-lg); font-weight: 800; color: var(--nd-ink); line-height: 1.4; }
.nd-side-promo p { font-size: var(--nd-fs-sm); color: var(--nd-muted); }
.nd-side-promo .nd-btn { margin-top: 6px; }

.nd-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-bottom: 16px; margin-bottom: 18px; border-bottom: 1px solid var(--nd-line); }
.nd-toolbar__count { font-size: var(--nd-fs-sm); color: var(--nd-muted); }
.nd-toolbar__count b { color: var(--store-text); font-variant-numeric: tabular-nums; }
.nd-toolbar__tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.nd-select { position: relative; display: inline-flex; align-items: center; gap: 8px; font-size: var(--nd-fs-sm); }
.nd-select select { appearance: none; -webkit-appearance: none; padding: 8px 14px; padding-inline-end: 32px; border: 1px solid var(--nd-line); border-radius: var(--nd-r-xs); background: var(--store-bg); font-size: var(--nd-fs-sm); color: var(--store-text); }
.nd-select select:focus { outline: none; border-color: var(--store-primary); }
.nd-select::after { content: ""; position: absolute; inset-inline-end: 13px; top: 50%; width: 7px; height: 7px; margin-top: -5px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); pointer-events: none; }
.nd-select__label { color: var(--nd-muted); }
.nd-filter-btn { display: none; }
.nd-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 24px; }
.nd-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; padding-inline-end: 8px; border: 0; border-radius: var(--nd-r-full); background: var(--nd-lav); font-size: var(--nd-fs-xs); font-weight: 700; color: var(--store-text); }
.nd-chip .nd-icon { width: 14px; height: 14px; }
.nd-chip:hover { background: var(--nd-peach); color: var(--store-primary); }
.nd-chip--clear { background: transparent; color: var(--store-primary); text-decoration: underline; padding-inline: 4px; }
.nd-shop .nd-pager { margin-top: 48px; }
.nd-pager .nd-icon { width: 16px; height: 16px; }

@media (max-width: 1199px) {
  .nd-shop { grid-template-columns: 240px minmax(0, 1fr); gap: 28px; }
  .nd-shop .nd-grid { --nd-cols: 3; }
}
@media (max-width: 1023px) {
  .nd-shop { grid-template-columns: 1fr; padding-block: 30px 48px; }
  .nd-filter-btn { display: inline-flex; }
  .nd-drawer--filters { position: fixed; inset: 0; z-index: 60; visibility: hidden; }
  .nd-drawer--filters.is-open { visibility: visible; }
  .nd-drawer--filters .nd-drawer__backdrop { display: block; }
  .nd-drawer--filters .nd-drawer__head { display: flex; }
  .nd-drawer--filters .nd-drawer__foot { display: flex; position: sticky; bottom: 0; gap: 10px; background: var(--store-bg); padding-top: 14px; margin-top: auto; }
  .nd-drawer--filters .nd-drawer__foot .nd-btn { flex: 1; white-space: nowrap; padding-inline: 12px; }
  .nd-drawer--filters .nd-drawer__panel {
    position: absolute; top: 0; bottom: 0; inset-inline-start: 0; width: min(88vw, 360px);
    background: var(--store-bg); transform: translateX(100%); overflow-y: auto;
    padding: calc(16px + env(safe-area-inset-top, 0px)) 18px calc(18px + env(safe-area-inset-bottom, 0px));
  }
  .nd-drawer--filters.is-open .nd-drawer__panel { transform: translateX(0); }
  .nd-filters { gap: 24px; padding-bottom: 16px; }
  .nd-filters__actions.is-desktop, .nd-drawer--filters .nd-side-promo { display: none; }
}
@media (max-width: 767px) {
  .nd-pagehead { padding-block: 28px; }
  .nd-pagehead h1 { font-size: var(--nd-fs-xl); }
  .nd-pagehead .nd-blob { display: none; }
  .nd-shop .nd-grid { --nd-cols: 2; gap: 26px 14px; }
  .nd-shop__strip .nd-featured { grid-template-columns: 1fr; }
  .nd-shop__strip .nd-fcard:nth-child(n+2) { display: none; }
  .nd-toolbar__tools { width: 100%; }
  .nd-toolbar__tools .nd-select:not(.nd-select--per) { flex: 1; }
  .nd-toolbar__tools .nd-select select { width: 100%; }
  .nd-select__label { display: none; }
}

/* ==========================================================================
   صفحة المنتج: كتاب ورقيّ، وإلكترونيّ، وصوتيّ، ووسيلة تعليميّة
   ========================================================================== */
.nd-pagehead__cat { font-size: 2rem; font-weight: 800; color: var(--nd-ink); }
.nd-pagehead .nd-pagehead__cat { margin: 0; font-size: 2rem; font-weight: 800; color: var(--nd-ink); }
.nd-product { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr) 250px; gap: 40px; align-items: start; padding-block: 44px 56px; }
@media (min-width: 1200px) { .nd-product:not(:has(.nd-aside)) { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); } }
.nd-product__media { position: relative; display: grid; place-items: center; padding: 36px 24px 24px; border-radius: var(--nd-r-lg); background: var(--nd-peach); }
.nd-product__media .nd-badges { top: 16px; inset-inline-start: 16px; }
.nd-product__media .nd-gallery__stage { width: min(320px, 100%); }

.nd-info { display: grid; gap: 16px; min-width: 0; }
.nd-info__kicker { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: var(--nd-fs-sm); color: var(--nd-muted); }
.nd-info__kicker a { color: var(--store-primary); font-weight: 700; }
.nd-info__kind { display: inline-flex; align-items: center; gap: 6px; }
.nd-info__kind .nd-type { position: static; width: 24px; height: 24px; box-shadow: none; }
.nd-info__kind .nd-type .nd-icon { width: 13px; height: 13px; }
.nd-info__title { font-size: 1.75rem; font-weight: 800; line-height: 1.35; color: var(--nd-ink); }
.nd-info__by { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; font-size: var(--nd-fs-sm); color: var(--nd-muted); }
.nd-info__by a { color: var(--store-text); font-weight: 700; }
.nd-info__by a:hover { color: var(--store-primary); }
.nd-info .nd-price { gap: 12px; align-items: baseline; }
.nd-info .nd-price__now { font-size: 1.875rem; }
.nd-info .nd-price__old { font-size: 1.125rem; }
.nd-off { display: inline-block; padding: 2px 8px; border-radius: var(--nd-r-xs); background: var(--nd-peach); color: var(--store-primary); font-size: .8125rem; font-weight: 800; }
.nd-avail { display: inline-flex; align-items: center; gap: 6px; font-size: var(--nd-fs-sm); font-weight: 700; color: var(--nd-ok); }
.nd-avail::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.nd-info__lead { color: var(--nd-muted); max-width: 62ch; }
.nd-info hr { width: 100%; margin: 0; border: 0; border-top: 1px solid var(--nd-line); }

.nd-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.nd-fact { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: var(--nd-r-sm); background: var(--nd-lav); }
.nd-fact .nd-icon { width: 22px; height: 22px; color: var(--store-primary); flex: none; }
.nd-fact small { display: block; font-size: .75rem; color: var(--nd-muted); line-height: 1.4; }
.nd-fact b { display: block; font-size: var(--nd-fs-sm); font-weight: 700; line-height: 1.4; }

.nd-sample { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 14px 16px; border: 1.5px dashed var(--store-primary); border-radius: var(--nd-r-md); background: var(--store-bg); }
.nd-sample p { flex: 1 1 220px; font-size: var(--nd-fs-sm); color: var(--nd-muted); }
.nd-sample b { color: var(--store-text); }

.nd-buy { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.nd-buy .nd-qty { height: 50px; }
.nd-buy .nd-btn { min-height: 50px; padding-inline: 26px; }
.nd-buy .nd-btn--primary { flex: 1 1 180px; }
.nd-buy__or { font-size: var(--nd-fs-xs); font-weight: 700; color: var(--nd-muted); }
.nd-buy .nd-btn--dark { flex: 1 1 140px; }
.nd-links { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: var(--nd-fs-sm); }
.nd-links button { display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; background: none; font-weight: 700; color: var(--store-text); }
.nd-links button:hover, .nd-links button[aria-pressed="true"] { color: var(--store-primary); }
.nd-meta { display: grid; gap: 6px; margin: 0; padding-top: 14px; border-top: 1px solid var(--nd-line); font-size: var(--nd-fs-sm); }
.nd-meta div { display: flex; flex-wrap: wrap; gap: 6px; }
.nd-meta dt { color: var(--nd-muted); }
.nd-meta dd { margin: 0; font-weight: 700; }
.nd-meta dd a:hover { color: var(--store-primary); }

.nd-aside { display: grid; gap: 14px; padding: 20px; border-radius: var(--nd-r-md); background: var(--nd-lav); }
.nd-aside h2 { font-size: var(--nd-fs-md); font-weight: 800; color: var(--nd-ink); padding-bottom: 10px; border-bottom: 1px solid var(--nd-line); }
.nd-mini { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 12px; align-items: center; }
.nd-mini .nd-cover { border-radius: var(--nd-r-sm); }
.nd-mini .nd-cover .nd-type { display: none; }
.nd-mini h3 { font-size: var(--nd-fs-sm); font-weight: 700; line-height: 1.45; }
.nd-mini h3 a:hover { color: var(--store-primary); }
.nd-mini .nd-price { justify-content: flex-start; font-size: var(--nd-fs-sm); margin-top: 4px; }

/* التبويبات */
.nd-ptabs { margin-bottom: 20px; }
.nd-ptabs__bar { display: flex; justify-content: center; gap: 34px; border-bottom: 1px solid var(--nd-line); overflow-x: auto; scrollbar-width: none; }
.nd-ptabs__bar button { position: relative; padding: 16px 2px; border: 0; background: none; font-weight: 800; font-size: var(--nd-fs-md); color: var(--nd-muted); white-space: nowrap; }
.nd-ptabs__bar button[aria-selected="true"] { color: var(--nd-ink); }
.nd-ptabs__bar button[aria-selected="true"]::after { content: ""; position: absolute; inset-inline: 0; bottom: -1px; height: 3px; background: var(--store-primary); }
.nd-ptabs__panel { padding-block: 30px 8px; }
.nd-prose { display: grid; gap: 14px; max-width: 78ch; margin-inline: auto; color: var(--nd-muted); line-height: 1.9; }
.nd-author-box { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 20px; align-items: center; max-width: 78ch; margin: 30px auto 0; padding: 22px; border-radius: var(--nd-r-md); background: var(--nd-lav); }
.nd-author-box img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; border: 3px solid var(--store-bg); box-shadow: 0 0 0 2px var(--store-primary); }
.nd-author-box h3 { font-size: var(--nd-fs-lg); font-weight: 800; }
.nd-author-box p { font-size: var(--nd-fs-sm); color: var(--nd-muted); margin-block: 4px 10px; }
.nd-author-box a { font-size: var(--nd-fs-sm); font-weight: 700; color: var(--store-primary); text-decoration: underline; }
.nd-specs { width: 100%; max-width: 760px; margin-inline: auto; border-collapse: collapse; font-size: var(--nd-fs-sm); }
.nd-specs th, .nd-specs td { text-align: start; padding: 12px 16px; border-bottom: 1px solid var(--nd-line); }
.nd-specs th { width: 34%; color: var(--nd-muted); font-weight: 500; background: var(--nd-lav); }
.nd-specs td { font-weight: 700; font-variant-numeric: tabular-nums; }
.nd-reviews { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 40px; align-items: start; max-width: 1000px; margin-inline: auto; }
.nd-score { display: grid; justify-items: start; gap: 6px; padding: 22px; border-radius: var(--nd-r-md); background: var(--nd-peach); }
.nd-score__big { font-size: 3rem; font-weight: 800; line-height: 1; color: var(--nd-ink); }
.nd-bars { display: grid; gap: 6px; width: 100%; margin-top: 6px; }
.nd-bar { display: grid; grid-template-columns: 52px 1fr 30px; align-items: center; gap: 10px; font-size: var(--nd-fs-xs); color: var(--nd-muted); font-variant-numeric: tabular-nums; }
.nd-bar__track { height: 7px; border-radius: 7px; background: var(--store-bg); overflow: hidden; }
.nd-bar__fill { display: block; width: var(--w); height: 100%; border-radius: 7px; background: var(--nd-star); }
.nd-review-list { display: grid; gap: 22px; }
.nd-review { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 14px; padding-bottom: 22px; border-bottom: 1px solid var(--nd-line); }
.nd-review header { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; }
.nd-review b { font-weight: 800; }
.nd-review time { font-size: var(--nd-fs-xs); color: var(--nd-muted); }
.nd-review p { margin-top: 6px; font-size: var(--nd-fs-sm); color: var(--nd-muted); }
.nd-trust--row { grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 30px 0; border-block: 1px solid var(--nd-line); }

.nd-sticky-buy { display: none; }

@media (max-width: 1199px) {
  .nd-product { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); }
  .nd-aside { grid-column: 1 / -1; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nd-aside h2 { grid-column: 1 / -1; }
  .nd-trust--row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1023px) {
  .nd-product { grid-template-columns: 1fr; gap: 28px; padding-block: 28px 40px; }
  .nd-reviews { grid-template-columns: 1fr; }
  .nd-trust--row { justify-items: stretch; padding-top: 30px; }
}
@media (max-width: 767px) {
  .nd-pagehead .nd-pagehead__cat { font-size: 1.5rem; }
  .nd-product__media { padding: 28px 16px 18px; }
  .nd-product__media .nd-gallery__stage { width: min(230px, 100%); }
  .nd-info__title { font-size: 1.375rem; }
  .nd-info .nd-price__now { font-size: 1.625rem; }
  .nd-facts { grid-template-columns: 1fr 1fr; }
  .nd-fact { padding: 10px; gap: 8px; }
  .nd-buy__or { display: none; }
  .nd-buy .nd-btn--dark { flex: 1 1 100%; }
  .nd-aside { grid-template-columns: 1fr; }
  .nd-ptabs__bar { justify-content: flex-start; gap: 24px; }
  .nd-author-box { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .nd-trust--row { grid-template-columns: 1fr; gap: 14px; }
  .nd-trust--row li { justify-content: flex-start; }
  .nd-sticky-buy {
    display: flex; align-items: center; gap: 12px; position: fixed; inset-inline: 0; z-index: 39;
    bottom: calc(60px + env(safe-area-inset-bottom, 0px)); padding: 10px 16px;
    background: var(--store-bg); border-top: 1px solid var(--nd-line); box-shadow: 0 -6px 18px rgba(31, 27, 28, .06);
  }
  .nd-sticky-buy .nd-price { flex: 1; justify-content: flex-start; }
  .nd-sticky-buy .nd-btn { min-height: 44px; }
  body.has-sticky-buy { padding-bottom: calc(128px + env(safe-area-inset-bottom, 0px)); }
}

/* ==========================================================================
   صفحة المؤلّف
   ========================================================================== */
.nd-profile { position: relative; overflow: hidden; background: var(--nd-lav); padding-block: 40px 56px; text-align: center; }
.nd-profile__inner { display: grid; justify-items: center; gap: 12px; max-width: 760px; margin-inline: auto; }
.nd-profile__photo { width: 168px; height: 168px; border-radius: 50%; object-fit: cover; border: 6px solid var(--store-bg); box-shadow: 0 0 0 2px var(--store-primary), 0 20px 40px -18px rgba(31, 27, 28, .4); margin-top: 8px; }
.nd-profile__role { color: var(--store-primary); font-weight: 700; font-size: var(--nd-fs-sm); }
.nd-profile h1 { font-size: var(--nd-fs-2xl); font-weight: 800; color: var(--nd-ink); line-height: 1.25; }
.nd-profile__bio { display: grid; gap: 10px; color: var(--nd-muted); line-height: 1.9; }
.nd-stats { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 10px; }
.nd-stat { display: grid; min-width: 130px; padding: 14px 18px; border-radius: var(--nd-r-md); background: var(--store-bg); box-shadow: var(--nd-shadow); }
.nd-stat b { font-size: 1.5rem; font-weight: 800; color: var(--store-primary); font-variant-numeric: tabular-nums; }
.nd-stat small { font-size: var(--nd-fs-xs); color: var(--nd-muted); }
.nd-grid--5 { --nd-cols: 5; }
.nd-works-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px; margin-bottom: 30px; }
.nd-works-tools .nd-tabs { margin: 0; }

@media (max-width: 1199px) { .nd-grid--5 { --nd-cols: 4; } }
@media (max-width: 1023px) { .nd-grid.nd-grid--5 { --nd-cols: 3; } }
@media (max-width: 767px) {
  .nd-profile { padding-block: 28px 40px; }
  .nd-profile__photo { width: 128px; height: 128px; }
  .nd-profile h1 { font-size: var(--nd-fs-xl); }
  .nd-profile .nd-blob { display: none; }
  .nd-stat { min-width: 0; flex: 1 1 90px; padding: 12px; }
  .nd-grid.nd-grid--5 { --nd-cols: 2; }
}

/* ==========================================================================
   السلّة (الشكل فقط)
   ========================================================================== */
.nd-cart { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 36px; align-items: start; padding-block: 44px 60px; }
.nd-ship-goal { display: grid; gap: 10px; padding: 16px 20px; margin-bottom: 22px; border-radius: var(--nd-r-md); background: var(--nd-peach); font-size: var(--nd-fs-sm); }
.nd-ship-goal b { color: var(--store-primary); }
.nd-progress { height: 8px; border-radius: 8px; background: var(--store-bg); overflow: hidden; }
.nd-progress span { display: block; width: var(--w); height: 100%; border-radius: 8px; background: var(--store-primary); }
.nd-lines { display: grid; }
.nd-lines__head, .nd-line { display: grid; grid-template-columns: minmax(0, 1fr) 120px 130px 120px 40px; gap: 16px; align-items: center; }
.nd-lines__head { padding: 12px 16px; border-radius: var(--nd-r-sm); background: var(--nd-lav); font-size: var(--nd-fs-xs); font-weight: 800; color: var(--nd-muted); }
.nd-line { padding: 18px 16px; border-bottom: 1px solid var(--nd-line); }
.nd-line__item { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 14px; align-items: center; min-width: 0; }
.nd-line__media { position: relative; display: block; }
.nd-line__media .nd-cover { border-radius: var(--nd-r-sm); }
.nd-line__media .nd-type { width: 24px; height: 24px; bottom: 4px; inset-inline-start: 4px; }
.nd-line__media .nd-type .nd-icon { width: 12px; height: 12px; }
.nd-line__title { display: block; font-weight: 800; line-height: 1.45; color: var(--nd-ink); }
.nd-line__title:hover { color: var(--store-primary); }
.nd-line__meta { font-size: var(--nd-fs-xs); color: var(--nd-muted); margin-top: 4px; }
.nd-line__price { display: grid; font-weight: 700; font-variant-numeric: tabular-nums; }
.nd-line__price del { font-size: var(--nd-fs-xs); font-weight: 400; color: var(--nd-muted); }
.nd-line__total { font-weight: 800; color: var(--store-primary); font-variant-numeric: tabular-nums; }
.nd-line__remove { width: 36px; height: 36px; box-shadow: none; background: transparent; color: var(--nd-muted); }
.nd-line__remove:hover { background: var(--nd-peach); color: var(--store-primary); }
.nd-cart__after { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-top: 20px; }
.nd-back-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: var(--nd-fs-sm); }
.nd-back-link:hover { color: var(--store-primary); }

.nd-summary { position: sticky; top: 104px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 26px 24px; border-radius: var(--nd-r-md); background: var(--nd-lav); }
.nd-summary h2 { position: relative; font-size: var(--nd-fs-lg); font-weight: 800; padding-bottom: 12px; border-bottom: 1px solid var(--nd-line); }
.nd-summary h2::after { content: ""; position: absolute; bottom: -1px; inset-inline-start: 0; width: 46px; height: 2px; background: var(--store-primary); }
.nd-coupon { display: flex; gap: 8px; }
.nd-coupon .nd-field { padding-block: 10px; }
.nd-summary dl { display: grid; gap: 10px; margin: 0; font-size: var(--nd-fs-sm); }
.nd-summary dl div { display: flex; justify-content: space-between; gap: 12px; }
.nd-summary dt { color: var(--nd-muted); }
.nd-summary dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.nd-summary .is-discount dd { color: var(--nd-ok); }
.nd-summary .is-total { padding-top: 12px; border-top: 1px dashed var(--nd-line); font-size: var(--nd-fs-lg); }
.nd-summary .is-total dt { color: var(--store-text); font-weight: 800; }
.nd-summary .is-total dd { font-weight: 800; color: var(--store-primary); }
.nd-summary__note { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: var(--nd-fs-xs); color: var(--nd-muted); }
.nd-summary__note .nd-icon { width: 16px; height: 16px; }
.nd-summary .nd-chips { margin: 0; }
.nd-summary .nd-chip { background: var(--store-bg); }
.nd-chip__x { display: inline-grid; place-items: center; width: 22px; height: 22px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--nd-muted); }
.nd-chip__x:hover { background: var(--nd-peach); color: var(--store-primary); }

/* ==========================================================================
   صفحة 404
   ========================================================================== */
.nd-404 { position: relative; overflow: hidden; background: var(--nd-lav); }
.nd-404__inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: center; padding-block: 70px; }
.nd-404 .nd-404__num { font-size: 8rem; font-weight: 800; line-height: 1; color: var(--store-primary); letter-spacing: -2px; }
.nd-404 h1 { font-size: 2.25rem; font-weight: 800; color: var(--nd-ink); margin-block: 10px; }
.nd-404 p { color: var(--nd-muted); max-width: 52ch; }
.nd-404__search { display: flex; gap: 8px; max-width: 460px; margin-top: 24px; }
.nd-404__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.nd-404__art { position: relative; display: grid; place-items: center; min-height: 380px; }
.nd-404__art::before { content: ""; position: absolute; width: 360px; height: 340px; background: var(--nd-peach); border-radius: 62% 38% 46% 54% / 55% 45% 55% 45%; }
.nd-404__stack { position: relative; display: flex; align-items: flex-end; }
.nd-404__stack .nd-cover { width: 150px; box-shadow: 0 24px 40px -18px rgba(31, 27, 28, .55); }
.nd-404__stack .nd-cover:nth-child(1) { transform: rotate(-9deg) translateX(-40px); }
.nd-404__stack .nd-cover:nth-child(2) { z-index: 2; transform: translateY(-20px); }
.nd-404__stack .nd-cover:nth-child(3) { transform: rotate(9deg) translateX(40px); }

@media (max-width: 1199px) {
  .nd-cart { grid-template-columns: minmax(0, 1fr) 320px; gap: 26px; }
  .nd-lines__head, .nd-line { grid-template-columns: minmax(0, 1fr) 100px 120px 100px 36px; gap: 12px; }
}
@media (max-width: 1023px) {
  .nd-cart { grid-template-columns: 1fr; padding-block: 28px 44px; }
  .nd-summary { position: static; }
  .nd-404__inner { grid-template-columns: 1fr; text-align: center; padding-block: 44px; }
  .nd-404 p { margin-inline: auto; }
  .nd-404__search, .nd-404__actions { margin-inline: auto; justify-content: center; }
  .nd-404__art { min-height: 300px; order: -1; }
}
@media (max-width: 767px) {
  .nd-lines__head { display: none; }
  .nd-line { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "item remove" "price price" "qty total"; gap: 12px; padding: 16px 0; }
  .nd-line__item { grid-area: item; grid-template-columns: 64px minmax(0, 1fr); }
  .nd-line__remove { grid-area: remove; align-self: start; }
  .nd-line__price { grid-area: price; display: flex; gap: 8px; align-items: baseline; font-size: var(--nd-fs-sm); }
  .nd-line > .nd-qty, .nd-line > .nd-line__meta { grid-area: qty; justify-self: start; }
  .nd-line__total { grid-area: total; justify-self: end; }
  .nd-summary { padding: 20px 16px; }
  .nd-404 .nd-404__num { font-size: 5.5rem; }
  .nd-404 h1 { font-size: var(--nd-fs-xl); }
  .nd-404__art { min-height: 230px; }
  .nd-404__art::before { width: 250px; height: 230px; }
  .nd-404__stack .nd-cover { width: 104px; }
  .nd-404__stack .nd-cover:nth-child(1) { transform: rotate(-9deg) translateX(-26px); }
  .nd-404__stack .nd-cover:nth-child(3) { transform: rotate(9deg) translateX(26px); }
  .nd-404 .nd-blob { display: none; }
}

/* خيار books_per_row: تضعه المنصّة سمةً على <body>، ويطبَّق على صفوف الأقسام في الشاشات الواسعة */
@media (min-width: 1200px) {
  body[data-books-per-row="4"] .nd-section .nd-grid[data-books-row] { --nd-cols: 4; }
  body[data-books-per-row="5"] .nd-section .nd-grid[data-books-row] { --nd-cols: 5; }
  body[data-books-per-row="6"] .nd-section .nd-grid[data-books-row] { --nd-cols: 6; }
}
/* ==========================================================================
   الاستجابة: 1440 / 768 / 390
   ========================================================================== */
@media (max-width: 1199px) {
  .nd-grid { --nd-cols: 4; }
  .nd-header .nd-bar { gap: 18px; }
  .nd-hsearch { max-width: 220px; }
  .nd-row__track { grid-auto-columns: calc((100% - 3 * 24px) / 4); }
  .nd-panel__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nd-footer__grid { grid-template-columns: 1.3fr 1fr 1fr; }
  .nd-footer__contact { grid-column: 1 / -1; }
  .nd-authors { grid-auto-columns: calc((100% - 2 * 24px) / 3); }
  .nd-featured { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1023px) {
  .nd-nav, .nd-hide-md { display: none; }
  .nd-menu-btn { display: inline-grid; }
  .nd-topbar__links { display: none; }
  .nd-topbar .nd-container { justify-content: center; }
  .nd-header .nd-bar { flex-wrap: wrap; gap: 10px 14px; min-height: 0; padding-block: 12px; }
  .nd-hsearch { order: 5; flex-basis: 100%; max-width: none; margin: 0; }
  .nd-actions { margin-inline-start: auto; }
  .nd-grid { --nd-cols: 3; }
  .nd-section { padding-block: 64px; }
  .nd-slide { min-height: 480px; }
  .nd-slide__title { font-size: 3rem; }
  .nd-circles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nd-about { grid-template-columns: 1fr; gap: 36px; }
  .nd-panel { padding: 30px; }
  .nd-row__track { grid-auto-columns: calc((100% - 2 * 20px) / 3); gap: 20px; }
  .nd-row__nav { display: none; }
  .nd-features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nd-banner { padding: 36px; }
  .nd-banner__text { max-width: 60%; }
  .nd-footer__grid { grid-template-columns: 1fr 1fr; }
  .nd-footer__about { grid-column: 1 / -1; }
}
@media (max-width: 767px) {
  .nd-section { padding-block: 52px; }
  .nd-grid { --nd-cols: 2; gap: 24px 14px; }
  .nd-title h2, .nd-title h1 { font-size: 1.625rem; }
  .nd-title { margin-bottom: 28px; }
  .nd-card__media { padding: 16px 14% 14px; }
  .nd-card__title { font-size: var(--nd-fs-md); }
  .nd-type { width: 26px; height: 26px; bottom: 6px; inset-inline-start: 6px; }
  .nd-type .nd-icon { width: 13px; height: 13px; }
  .nd-hcard { grid-template-columns: 86px minmax(0, 1fr); gap: 14px; padding: 14px; }
  .nd-fcard { grid-template-columns: 86px minmax(0, 1fr); gap: 14px; padding: 14px; }
  .nd-brand img { width: 36px; height: 36px; }
  .nd-brand__name { font-size: 1.125rem; }
  .nd-topbar { font-size: .75rem; }
  .nd-topbar__msg a { display: none; }
  .nd-topbar .nd-container { text-align: center; }
  .nd-hide-sm, .nd-actions__link b { display: none; }
  .nd-slide { min-height: 420px; padding: 60px 16px 90px; }
  .nd-slide__title { font-size: 2.25rem; }
  .nd-slide__lead { font-size: 1rem; }
  .nd-hero .nd-dots { bottom: 46px; }
  .nd-circles { gap: 24px 14px; }
  .nd-circle__name { font-size: 1.125rem; }
  .nd-marquee li { padding: 14px 18px; }
  .nd-about__media { padding-inline-end: 34px; }
  .nd-stamp { width: 104px; height: 104px; }
  .nd-tabs--folder { overflow-x: auto; scrollbar-width: none; justify-content: flex-start; }
  .nd-tabs--folder button { flex: none; padding: 12px 20px; }
  .nd-panel { padding: 22px 18px; border-radius: var(--nd-r-md); }
  .nd-panel__list { grid-template-columns: 1fr; gap: 18px; }
  .nd-row__track { grid-auto-columns: 62%; gap: 14px; }
  .nd-features { gap: 28px 14px; }
  .nd-feature__icon { width: 68px; height: 68px; }
  .nd-features b { font-size: 1.0625rem; }
  .nd-banner { flex-direction: column; align-items: stretch; padding: 0; min-height: 0; border-radius: var(--nd-r-md); }
  .nd-banner__img { position: static; z-index: auto; height: auto; aspect-ratio: 16 / 10; }
  .nd-banner__text { max-width: none; padding: 22px 20px; }
  .nd-banner__title { font-size: 1.625rem; }
  .nd-authors { grid-auto-columns: 72%; gap: 14px; }
  .nd-featured { grid-template-columns: 1fr; }
  .nd-footer__grid { gap: 30px 18px; padding-block: 44px 28px; }

  body { padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px)); }
  .nd-tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; inset-inline: 0; bottom: 0; z-index: 40;
    background: var(--store-bg); border-top: 1px solid var(--nd-line); box-shadow: 0 -4px 20px rgba(40, 35, 25, .08);
    padding-bottom: env(safe-area-inset-bottom, 0px); padding-left: env(safe-area-inset-left, 0px); padding-right: env(safe-area-inset-right, 0px);
  }
  .nd-tabbar a, .nd-tabbar button { display: grid; justify-items: center; gap: 2px; padding: 9px 2px 7px; background: none; border: 0; font-size: .75rem; font-weight: 500; color: var(--store-text); }
  .nd-tabbar__icon { position: relative; display: inline-grid; }
  .nd-tabbar [aria-current="page"] { color: var(--store-primary); font-weight: 700; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* خيارات الإظهار (الملحق، البند 3) */
body[data-show-marquee="false"] .nd-marquee-section,
body[data-show-trust-bar="false"] .nd-trust-section { display: none; }

/* ================= ميزات المنصّة المعتمدة (SPEC، الملحق 8) ================= */

/* عدّاد العرض */
.nd-countdown { display: flex; gap: 8px; }
.nd-countdown__unit { display: grid; justify-items: center; min-width: 62px; padding: 8px 6px; border-radius: var(--nd-r-sm); background: var(--store-bg); color: var(--nd-ink); }
.nd-countdown__unit b { font-size: 1.5rem; font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; }
.nd-countdown__unit small { font-size: .6875rem; color: var(--nd-muted); }
.nd-banner__text .nd-countdown { margin-block: 4px 6px; }

/* الأسئلة الشائعة */
.nd-faq { max-width: 860px; margin-inline: auto; display: grid; gap: 12px; }
.nd-faq__item { background: var(--nd-lav); border: 1px solid var(--nd-line); border-radius: var(--nd-r-sm); }
.nd-faq__item[open] { background: var(--store-bg); }
.nd-faq__item summary { position: relative; list-style: none; cursor: pointer; padding: 18px 22px; padding-inline-end: 58px; font-weight: 500; font-size: 1.0625rem; }
.nd-faq__item summary::-webkit-details-marker { display: none; }
.nd-faq__item summary::after {
  content: ""; position: absolute; inset-inline-end: 20px; top: 50%; width: 26px; height: 26px; margin-top: -13px; border-radius: 50%;
  border: 1px dashed var(--nd-dash);
  background: linear-gradient(var(--store-primary-dark), var(--store-primary-dark)) center / 11px 2px no-repeat;
}
.nd-faq__item:not([open]) summary::after {
  background-image: linear-gradient(var(--store-primary-dark), var(--store-primary-dark)), linear-gradient(var(--store-primary-dark), var(--store-primary-dark));
  background-size: 11px 2px, 2px 11px; background-position: center; background-repeat: no-repeat;
}
.nd-faq__answer { padding: 0 22px 20px; color: var(--nd-muted); }

/* اشترِ أكثر ووفّر */
.nd-qty-deal { display: inline-flex; align-items: center; gap: 8px; width: fit-content; margin-top: 10px; padding: 6px 12px; border-radius: var(--nd-r-xs); background: var(--nd-cream); color: var(--store-primary-dark); font-weight: 700; font-size: var(--nd-fs-sm); }

@media (max-width: 600px) {
  .nd-countdown__unit { min-width: 52px; }
  .nd-countdown__unit b { font-size: 1.25rem; }
}

/* تبويبات صفّ الكتب (القاعدة 16): يختفي الشريط إن لم يختر الناشر غير مصدرٍ واحد */
[data-slot="section.tabs"]:not(:has([data-repeat="tab"] ~ [role="tab"])) { display: none; }

/* شريط الشحن المجّانيّ: يختفي موضعه بلا فراغ حين يُخفيه theme.js */
[data-slot="cart.free_shipping_left"][hidden] { display: none !important; }

/* ================= تطوير الرئيسيّة (الإصدار الثاني) ================= */

/* إيقاع الأقسام: لا مسافةٌ مضاعفة بين قسمين أبيضين متجاورين، ومسافةٌ تكفي الحافّة المتموّجة بعد القسم الأخضر */
.nd-section:not(.nd-section--cream):not(.nd-section--lav):not(.nd-section--peach) + .nd-section:not(.nd-section--cream):not(.nd-section--lav):not(.nd-section--peach) { padding-top: 0; }
.nd-green + .nd-section { padding-top: 106px; }
.nd-more { display: flex; justify-content: center; margin-top: 34px; }
.nd-more .nd-arrow { transform: scaleX(-1); }

/* صفوفٌ كاملة دائمًا: تُخفى البطاقات الزائدة عن آخر صفٍّ مكتمل بحسب عدد الأعمدة */
@media (min-width: 1200px) {
  body[data-books-per-row="5"] .nd-grid--many > :nth-child(n+11),
  body[data-books-per-row="4"] .nd-grid--one > :nth-child(n+5),
  body[data-books-per-row="5"] .nd-grid--one > :nth-child(n+6) { display: none; }
}
@media (min-width: 1024px) and (max-width: 1199px) { .nd-grid--one > :nth-child(n+5) { display: none; } }
@media (max-width: 767px) { .nd-grid--one > :nth-child(n+5), .nd-grid--many > :nth-child(n+7) { display: none; } }

/* سطر المؤلّف في البند الصغير */
.nd-mini__by { font-size: var(--nd-fs-xs); color: var(--nd-muted); line-height: 1.4; }

/* كتاب الأسبوع: غلافٌ كبير على قرصٍ منقّط، وبياناتٌ ووصف */
.nd-feature__book { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 56px; align-items: center; max-width: 1080px; margin-inline: auto; }
.nd-feature__media { position: relative; display: grid; place-items: center; padding: 44px 24px; border-radius: var(--nd-r-lg); background: var(--nd-cream); }
.nd-feature__media::before { content: ""; position: absolute; width: min(78%, 380px); aspect-ratio: 1; border-radius: 50%; border: 1.5px dashed var(--nd-dash); background: var(--store-bg); }
.nd-feature__media .nd-cover { position: relative; width: min(250px, 62%); box-shadow: 0 30px 50px -22px rgba(40, 35, 25, .6); transform: rotate(-3deg); }
.nd-feature__body { display: grid; justify-items: start; gap: 12px; }
.nd-feature__by { font-size: var(--nd-fs-sm); color: var(--store-primary); font-weight: 700; }
.nd-feature__title { font-size: 2.25rem; font-weight: 500; line-height: 1.25; }
.nd-feature__title a:hover { color: var(--store-primary); }
.nd-feature__desc { display: grid; gap: 10px; color: var(--nd-muted); max-width: 58ch; }
.nd-feature__facts { display: flex; flex-wrap: wrap; gap: 8px; }
.nd-feature__facts li { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: var(--nd-r-full); background: var(--nd-cream); font-size: var(--nd-fs-xs); font-weight: 700; }
.nd-feature__facts .nd-icon { color: var(--store-primary); width: 16px; height: 16px; }
.nd-feature__buy { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px; margin-top: 6px; }
.nd-feature__price .nd-price__now { font-size: 1.625rem; }

/* آراء القرّاء */
.nd-rcards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.nd-rcard { position: relative; display: grid; align-content: start; gap: 12px; margin: 0; padding: 28px 26px 24px; border-radius: var(--nd-r-md); background: var(--nd-cream); border: 1.5px dashed var(--nd-line); }
.nd-rcard__q { position: absolute; top: 20px; inset-inline-end: 22px; width: 34px; height: 34px; fill: none; stroke: var(--nd-dash); stroke-width: 1.4; }
.nd-rcard blockquote { margin: 0; font-size: 1.0625rem; line-height: 1.85; color: var(--store-text); }
.nd-rcard figcaption { display: flex; align-items: center; gap: 12px; padding-top: 12px; border-top: 1px solid var(--nd-line); }
.nd-rcard .nd-avatar { width: 44px; height: 44px; font-size: 1rem; }
.nd-rcard figcaption b { display: block; font-weight: 800; color: var(--nd-ink); }
.nd-rcard figcaption small { font-size: var(--nd-fs-xs); color: var(--nd-muted); }
body[data-show-reviews="false"] .nd-reviews-section { display: none; }

/* من دفتر المكتبة: بطاقات المقالات */
.nd-posts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.nd-post { display: grid; grid-template-rows: auto 1fr; overflow: hidden; border-radius: var(--nd-r-md); background: var(--store-bg); box-shadow: 0 1px 0 var(--nd-line); min-width: 0; }
.nd-post__media { display: block; overflow: hidden; }
.nd-post__media img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform .5s ease; }
.nd-post:hover .nd-post__media img { transform: scale(1.04); }
.nd-post__body { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 20px 22px 22px; }
.nd-post__date { font-size: var(--nd-fs-xs); color: var(--nd-muted); }
.nd-post__title { font-size: 1.25rem; font-weight: 500; line-height: 1.45; }
.nd-post__title a:hover { color: var(--store-primary); }
.nd-post__excerpt { font-size: var(--nd-fs-sm); color: var(--nd-muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.nd-post__more { display: inline-flex; align-items: center; gap: 6px; margin-top: auto; padding-top: 4px; font-weight: 700; font-size: var(--nd-fs-sm); color: var(--store-primary); }
.nd-post__more .nd-arrow { transform: scaleX(-1); }
.nd-post__more:hover { text-decoration: underline; text-underline-offset: 3px; }

/* البانر العريض الثاني: أقصر */
.nd-banner--slim { min-height: 300px; }

@media (max-width: 1199px) {
  .nd-feature__book { gap: 36px; }
  .nd-feature__title { font-size: 1.875rem; }
}
@media (max-width: 1023px) {
  .nd-feature__book { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 28px; }
  .nd-rcards, .nd-posts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nd-rcards > :nth-child(3) { grid-column: 1 / -1; }
  .nd-posts > :nth-child(3) { display: none; }
}
@media (max-width: 767px) {
  .nd-section { padding-block: 48px; }
  .nd-green + .nd-section { padding-top: 84px; }
  .nd-more { margin-top: 24px; }

  /* السلايدر: الصورة فوق النصّ، لا خلفه */
  .nd-slide { display: block; min-height: 0; padding: 0; background: var(--store-primary-dark); }
  .nd-slide::before { display: none; }
  .nd-slide__img { position: static; z-index: auto; height: auto; aspect-ratio: 16 / 9; }
  .nd-slide__text { gap: 8px; margin-inline: auto; padding: 18px 16px 76px; }
  .nd-slide__eyebrow { font-size: var(--nd-fs-sm); }
  .nd-slide .nd-btn { margin-top: 4px; }
  .nd-hero .nd-dots { bottom: 46px; }

  /* دوائر التصنيفات: صفٌّ واحد يُمرَّر */
  .nd-circles { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 42%; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 4px; }
  .nd-circles::-webkit-scrollbar { display: none; }
  .nd-circle { scroll-snap-align: start; }

  /* المزايا: شريطٌ واحد يُمرَّر */
  .nd-trust-section { padding-block: 28px; }
  .nd-features { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 74%; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; text-align: start; }
  .nd-features::-webkit-scrollbar { display: none; }
  .nd-features li { grid-template-columns: 52px minmax(0, 1fr); justify-items: start; align-items: center; gap: 0 12px; padding: 12px 14px; border: 1px dashed var(--nd-dash); border-radius: var(--nd-r-md); scroll-snap-align: start; }
  .nd-feature__icon { grid-row: span 2; width: 52px; height: 52px; margin: 0; }
  .nd-feature__icon .nd-icon { width: 24px; height: 24px; }
  .nd-features b { font-size: 1rem; }
  .nd-features small { font-size: var(--nd-fs-xs); }

  /* القسم الأخضر: ستّة بنودٍ في الهاتف */
  .nd-panel__list > :nth-child(n+7) { display: none; }

  .nd-feature__book { grid-template-columns: 1fr; gap: 22px; }
  .nd-feature__media { padding: 28px 16px; }
  .nd-feature__media .nd-cover { width: min(180px, 55%); }
  .nd-feature__title { font-size: 1.625rem; }
  .nd-feature__buy .nd-btn--primary { flex: 1; white-space: nowrap; }

  .nd-rcards, .nd-posts { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 84%; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 4px; }
  .nd-rcards::-webkit-scrollbar, .nd-posts::-webkit-scrollbar { display: none; }
  .nd-rcards > *, .nd-posts > * { scroll-snap-align: start; }
  .nd-rcards > :nth-child(3) { grid-column: auto; }
  .nd-posts > :nth-child(3) { display: grid; }
  .nd-rcard { padding: 22px 18px 18px; }
  .nd-banner--slim { min-height: 0; }
}

/* صفحة الكتاب: اختيار الصيغة (book.formats)، ويُخفى إن لم يكن للعنوان غير صيغةٍ واحدة */
.nd-formats { display: grid; gap: 8px; }
.nd-formats__label { font-size: var(--nd-fs-xs); font-weight: 700; color: var(--nd-muted); }
.nd-formats__list { display: flex; flex-wrap: wrap; gap: 8px; }
.nd-format { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 10px; align-items: center; min-width: 132px; padding: 8px 14px 8px 16px; border: 1.5px dashed var(--nd-dash); border-radius: var(--nd-r-sm); background: var(--store-bg); transition: border-color .2s, background-color .2s; }
.nd-format .nd-type { position: static; grid-row: span 2; width: 28px; height: 28px; box-shadow: none; border-width: 0; }
.nd-format .nd-type .nd-icon { width: 14px; height: 14px; }
.nd-format__name { font-weight: 700; font-size: var(--nd-fs-sm); line-height: 1.3; }
.nd-format__price { font-size: var(--nd-fs-xs); color: var(--nd-muted); font-variant-numeric: tabular-nums; line-height: 1.3; }
.nd-format:hover { border-color: var(--store-primary); }
.nd-format.is-current { border-style: solid; border-color: var(--store-primary); background: var(--nd-cream); }
[data-slot="book.formats"]:not(:has([data-repeat="format"] ~ *)) { display: none; }

/* صفحة الكتاب: التوصيل والدفع في سطورٍ قصيرة */
.nd-delivery { display: grid; gap: 8px; padding: 14px 16px; border-radius: var(--nd-r-md); background: var(--nd-lav); font-size: var(--nd-fs-sm); color: var(--nd-muted); }
.nd-delivery li { display: flex; align-items: flex-start; gap: 10px; }
.nd-delivery .nd-icon { flex: none; margin-top: 3px; color: var(--store-primary); }
.nd-delivery b { color: var(--store-text); font-weight: 700; }

/* صفحة التصنيف: زرّا طريقة العرض، وعرض القائمة */
.nd-view { display: inline-flex; gap: 4px; padding: 3px; border: 1px solid var(--nd-line); border-radius: var(--nd-r-xs); background: var(--store-bg); }
.nd-view button { display: grid; place-items: center; width: 36px; height: 34px; padding: 0; border: 0; border-radius: 4px; background: transparent; color: var(--nd-muted); }
.nd-view button[aria-pressed="true"] { background: var(--store-primary); color: var(--nd-on-dark); }
.nd-grid.is-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.nd-grid.is-list .nd-card { flex-direction: row; align-items: stretch; gap: 22px; padding: 14px; border-radius: var(--nd-r-md); border: 1px solid var(--nd-line); text-align: start; }
.nd-grid.is-list .nd-card__media { flex: none; width: 140px; padding: 14px 18px 10px; }
.nd-grid.is-list .nd-card__body { align-items: flex-start; justify-content: center; gap: 6px; }
.nd-grid.is-list .nd-card__title { font-size: var(--nd-fs-lg); }
.nd-grid.is-list .nd-card__foot { justify-content: flex-start; gap: 18px; border-top: 0; padding-top: 6px; margin-top: 6px; }
.nd-grid.is-list .nd-card__add { align-self: flex-start; margin-top: 4px; padding-inline: 22px; }
@media (max-width: 1023px) { .nd-grid.is-list { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 767px) {
  .nd-toolbar__tools .nd-view { flex: none; }
  .nd-grid.is-list .nd-card { gap: 14px; padding: 10px; }
  .nd-grid.is-list .nd-card__media { width: 112px; padding: 10px 12px 8px; }
  .nd-grid.is-list .nd-card__title { font-size: var(--nd-fs-md); }
  .nd-grid.is-list .nd-card__foot { justify-content: space-between; align-self: stretch; }
}

/* المدوّنة وصفحة المقال */
.nd-posts--blog { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.nd-posts--blog .nd-post { box-shadow: 0 0 0 1px var(--nd-line); }
.nd-post--lead { grid-column: 1 / -1; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); grid-template-rows: none; background: var(--nd-cream); }
.nd-post--lead .nd-post__media img { height: 100%; aspect-ratio: auto; min-height: 320px; }
.nd-post--lead .nd-post__body { justify-content: center; padding: 34px 38px; gap: 12px; }
.nd-post--lead .nd-post__title { font-size: 1.875rem; }
.nd-post--lead .nd-post__excerpt { font-size: var(--nd-fs-md); -webkit-line-clamp: 4; }
.nd-post--lead .nd-post__more { margin-top: 6px; }
.nd-article__date { display: block; font-size: var(--nd-fs-sm); color: var(--nd-muted); margin-bottom: 4px; }
.nd-pagehead h1[data-slot="post.title"] { font-size: 2.25rem; max-width: 26ch; margin-inline: auto; }
.nd-article { max-width: 860px; padding-block: 44px 56px; }
.nd-article__img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--nd-r-lg); margin-bottom: 34px; }
.nd-article__body { max-width: 70ch; font-size: 1.0625rem; }
.nd-article__body h2 { font-size: var(--nd-fs-lg); font-weight: 700; color: var(--nd-ink); margin-top: 10px; }
.nd-article__body blockquote { margin: 6px 0; padding: 16px 22px; border-inline-start: 3px solid var(--store-primary); border-radius: var(--nd-r-sm); background: var(--nd-cream); color: var(--nd-ink); font-size: var(--nd-fs-lg); }
.nd-article__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; max-width: 70ch; margin: 34px auto 0; padding-top: 22px; border-top: 1px dashed var(--nd-dash); }
@media (max-width: 1023px) {
  .nd-posts--blog { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nd-posts--blog > :nth-child(3) { display: grid; }
  .nd-posts--blog > :nth-child(4) { grid-column: 1 / -1; }
}
@media (max-width: 767px) {
  .nd-posts--blog { grid-template-columns: minmax(0, 1fr); grid-auto-flow: row; grid-auto-columns: auto; overflow: visible; gap: 18px; }
  .nd-posts--blog > :nth-child(4) { grid-column: auto; }
  .nd-post--lead { grid-template-columns: minmax(0, 1fr); }
  .nd-post--lead .nd-post__media img { min-height: 0; aspect-ratio: 16 / 9; }
  .nd-post--lead .nd-post__body { padding: 20px 20px 22px; }
  .nd-post--lead .nd-post__title { font-size: 1.375rem; }
  .nd-pagehead h1[data-slot="post.title"] { font-size: 1.5rem; }
  .nd-article { padding-block: 24px 40px; }
  .nd-article__img { border-radius: var(--nd-r-md); margin-bottom: 22px; }
}

/* الرأس وأسهم الدوّار بين 1024 و1319: لا تمرير أفقيّ */
@media (max-width: 1319px) { .nd-row__nav--prev { inset-inline-start: -12px; } .nd-row__nav--next { inset-inline-end: -12px; } }
@media (min-width: 1024px) and (max-width: 1199px) {
  .nd-header .nd-bar { gap: 14px; }
  .nd-menu li + li::before { padding-inline: 7px; }
  .nd-actions { gap: 14px; }
  .nd-actions .nd-hide-md { display: none; }
  .nd-hsearch { max-width: 190px; }
}

/* الجهاز اللوحيّ: البانر نصٌّ وبجانبه الصورة، وصورة «مرحبًا بك» بعرضٍ معقول */
@media (min-width: 768px) and (max-width: 1023px) {
  .nd-banner { padding: 0; min-height: 0; align-items: stretch; }
  .nd-banner__img { position: static; z-index: auto; order: 2; width: 48%; height: auto; min-height: 260px; object-fit: cover; object-position: left center; }
  [dir="ltr"] .nd-banner__img { object-position: right center; }
  .nd-banner__text { flex: 1; max-width: none; align-content: center; padding: 28px 30px; }
  .nd-about__media { width: min(440px, 100%); margin-inline: auto; }
}

/* نصّ الرأي: أربعة أسطر على الأكثر، والنصّ الكامل في title (الملحق، البند 5) */
[data-slot="review.text"] { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; line-clamp: 4; overflow: hidden; }
