/* =========================================================
   قالب «تِبر» — متجر أبيض واسع بلونٍ ذهبيّ واحد
   ألوان الهويّة الخمسة وحدها تُعرَّف هنا، وما عداها محايد
   ========================================================= */
:root {
  --store-primary: #C28C2E;
  --store-primary-dark: #8F641A;
  --store-accent: #222222;
  --store-bg: #FFFFFF;
  --store-text: #6F6F6F;

  /* محايدات */
  --soft: #F7F7F7;
  --soft-2: #F2F3F5;
  --line: #E6E6E6;
  --ghost: #E9E9E9;
  --heading: var(--store-accent);
  --star: #F2A900;
  --star-off: #D9D9D9;
  --sale: #222222;

  --type-print: #DB7056;
  --type-ebook: #5675A3;
  --type-audio: #986AB0;
  --type-edu: #3f8f6b;

  --radius: 0px;
  --radius-sm: 0px;
  --shadow: 0 6px 24px rgba(0, 0, 0, .07);
  --container: 1290px;
  --gutter: 24px;
  --header-h: 92px;
  --per-row: 4;
  --font: "Tajawal", system-ui, sans-serif;
}
body[data-corners="rounded"] { --radius: 12px; --radius-sm: 8px; }
body[data-books-per-row="3"] { --per-row: 3; }
body[data-books-per-row="4"] { --per-row: 4; }
body[data-books-per-row="5"] { --per-row: 5; }
body[data-books-per-row="6"] { --per-row: 6; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  color: var(--store-text);
  background: var(--store-bg);
  overflow-x: clip;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
h1, h2, h3, h4 { color: var(--heading); margin: 0; line-height: 1.35; font-weight: 700; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--store-primary-dark); outline-offset: 2px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

.icon { width: 1.25em; height: 1.25em; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.container { width: 100%; max-width: calc(var(--container) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: 56px; }

/* ---------- الأزرار ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 10px 26px;
  font-weight: 700; font-size: 15px; line-height: 1.2;
  border: 1px solid transparent; border-radius: var(--radius-sm);
  transition: background-color .2s, color .2s, border-color .2s;
}
.btn--gold { background: var(--store-primary-dark); color: #fff; }
.btn--gold:hover { background: var(--store-accent); }
.btn--dark { background: var(--store-accent); color: #fff; }
.btn--dark:hover { background: var(--store-primary-dark); }
.btn--outline { border-color: var(--store-accent); color: var(--store-accent); background: transparent; }
.btn--outline:hover { background: var(--store-accent); color: #fff; }
.btn--block { width: 100%; }
.btn[disabled] { background: var(--line); border-color: var(--line); color: #555; cursor: not-allowed; }
.field {
  width: 100%; min-height: 46px; padding: 10px 14px;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff;
}
.field:focus { outline: none; border-color: var(--store-primary-dark); }

/* ---------- شريط الإعلان ---------- */
.announce { background: var(--store-accent); color: #fff; font-size: 14px; }
.announce .container { min-height: 42px; display: flex; align-items: center; }
.announce p { padding-block: 9px; }

/* ---------- الرأس ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: #fff; box-shadow: 0 1px 0 var(--line); }
.header-row { display: flex; align-items: center; gap: 32px; min-height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 10px; flex: none; }
.brand__logo { width: 48px; height: 48px; object-fit: contain; }
.brand__name { font-size: 22px; font-weight: 800; color: var(--heading); white-space: nowrap; }
.main-nav { flex: 1; }
.main-nav__list { display: flex; gap: 30px; align-items: center; }
.main-nav__list > li > a {
  display: inline-flex; align-items: center; gap: 4px; padding-block: 34px;
  font-weight: 700; font-size: 15.5px; color: var(--heading); letter-spacing: .01em;
}
.main-nav__list > li > a:hover, .main-nav__list > li > a[aria-current] { color: var(--store-primary-dark); }
.main-nav .chev { width: 16px; height: 16px; }
.has-menu { position: relative; }
.mega {
  position: absolute; top: 100%; inset-inline-start: -20px; min-width: 230px; padding: 14px 0;
  background: #fff; box-shadow: var(--shadow); border-top: 2px solid var(--store-primary);
  opacity: 0; visibility: hidden; transform: translateY(8px); transition: .2s;
}
.has-menu:hover .mega, .has-menu:focus-within .mega { opacity: 1; visibility: visible; transform: none; }
.mega__list a { display: block; padding: 7px 22px; color: var(--heading); font-size: 15px; }
.mega__list a:hover { color: var(--store-primary-dark); background: var(--soft); }
.hdr-icons { display: flex; align-items: center; gap: 6px; margin-inline-start: auto; }
.hdr-btn { position: relative; display: inline-grid; place-items: center; width: 42px; height: 42px; color: var(--heading); }
.hdr-btn .icon { width: 24px; height: 24px; }
.hdr-btn:hover { color: var(--store-primary-dark); }
.hdr-count {
  position: absolute; top: 2px; inset-inline-end: 0; min-width: 19px; height: 19px; padding-inline: 4px;
  border-radius: 99px; background: var(--store-primary-dark); color: #fff; font-size: 11px; font-weight: 700;
  display: grid; place-items: center; line-height: 1;
}
.menu-toggle { display: none; }
.search-panel { border-top: 1px solid var(--line); background: #fff; }
.search-panel__inner { display: flex; gap: 10px; padding-block: 14px; }
.search-panel .btn { flex: none; }

/* الدرج */
.drawer { position: fixed; inset: 0; z-index: 100; visibility: hidden; }
.drawer.is-open { visibility: visible; }
.drawer__overlay { position: absolute; inset: 0; background: rgba(0, 0, 0, .45); opacity: 0; transition: opacity .25s; }
.drawer.is-open .drawer__overlay { opacity: 1; }
.drawer__panel {
  position: absolute; inset-block: 0; inset-inline-start: 0; width: min(330px, 86vw); background: #fff;
  overflow-y: auto; padding: 18px 20px 28px; transform: translateX(100%); transition: transform .25s;
}
.drawer.is-open .drawer__panel { transform: none; }
.drawer__head { display: flex; align-items: center; justify-content: space-between; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.drawer__links a, .drawer__cats a { display: block; padding: 10px 0; color: var(--heading); font-weight: 700; border-bottom: 1px solid var(--line); }
.drawer__cats a { font-weight: 500; }
.drawer__title { margin-top: 22px; font-size: 13px; color: var(--store-primary-dark); font-weight: 700; }
.drawer__foot { margin-top: 22px; display: grid; gap: 12px; }
.drawer__foot a { display: flex; gap: 10px; align-items: center; color: var(--heading); }

/* ---------- عناوين الأقسام ---------- */
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 30px; }
.section-head--center { flex-direction: column; justify-content: center; text-align: center; gap: 14px; }
.section-title { font-size: clamp(24px, 2.4vw, 32px); font-weight: 700; }
.section-title--center { text-align: center; margin-bottom: 36px; }
.section-sub { width: 100%; }
.section-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--store-primary-dark); }
.section-link:hover { color: var(--store-accent); }
.center-link { text-align: center; margin-top: 30px; }

/* التبويبات: يفصلها خطٌّ عموديّ والمختار ذهبيّ تحته خطّ */
.tabs { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; row-gap: 6px; }
.tab { position: relative; padding: 4px 18px; font-weight: 700; font-size: 15px; color: var(--store-text); }
.tab + .tab::before { content: ""; position: absolute; inset-inline-start: 0; top: 25%; height: 50%; width: 1px; background: var(--line); }
.tab span { padding-bottom: 4px; border-bottom: 2px solid transparent; }
.tab:hover { color: var(--heading); }
.tab[aria-selected="true"] { color: var(--store-primary-dark); }
.tab[aria-selected="true"] span { border-color: var(--store-primary-dark); }
[data-slot="section.tabs"]:not(:has([data-repeat="tab"] ~ [role="tab"])) { display: none; }

/* ---------- النجوم والسعر ودائرة النوع ---------- */
.stars { display: inline-flex; gap: 1px; color: var(--star-off); vertical-align: middle; }
.stars .icon { width: 15px; height: 15px; fill: currentColor; stroke: none; }
.stars .is-on { color: var(--star); }
.rating { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.price { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.price__now { font-weight: 700; color: var(--heading); }
.price__old { font-size: .88em; color: var(--store-text); }
.type-dot {
  position: absolute; top: 10px; inset-inline-start: 10px; z-index: 2;
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .15);
}
.type-dot .icon { width: 17px; height: 17px; }
.type-dot--print { background: var(--type-print); }
.type-dot--ebook { background: var(--type-ebook); }
.type-dot--audio { background: var(--type-audio); }
.type-dot--educational { background: var(--type-edu); }
.type-dot--inline { position: static; width: 26px; height: 26px; box-shadow: none; }
.type-dot--inline .icon { width: 14px; height: 14px; }
.badge {
  position: absolute; top: 10px; inset-inline-end: 10px; z-index: 2;
  padding: 3px 8px; font-size: 12px; font-weight: 700; line-height: 1.4; border-radius: var(--radius-sm);
}
.badge--sale { background: var(--sale); color: #fff; }
.badge--new { background: #fff; color: var(--store-primary-dark); border: 1px solid var(--store-primary-dark); }
.badge--sale + .badge--new { top: 40px; }

/* ---------- بطاقة الكتاب ---------- */
.book-grid { display: grid; grid-template-columns: repeat(var(--per-row), minmax(0, 1fr)); gap: 30px; }
.book-card { display: flex; flex-direction: column; min-width: 0; }
.book-card__media { position: relative; background: var(--soft); border-radius: var(--radius); overflow: hidden; padding: 26px 16% 30px; }
.book-card__cover img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; box-shadow: 0 10px 22px rgba(0, 0, 0, .16); transition: transform .35s; }
.book-card:hover .book-card__cover img { transform: translateY(-4px); }
.book-card__actions {
  position: absolute; inset-inline: 0; bottom: 12px; z-index: 3; display: flex; justify-content: center; gap: 8px;
  opacity: 0; transform: translateY(10px); transition: .25s;
}
.book-card:hover .book-card__actions, .book-card:focus-within .book-card__actions { opacity: 1; transform: none; }
.act {
  width: 40px; height: 40px; display: grid; place-items: center; background: #fff; color: var(--heading);
  border-radius: var(--radius-sm); box-shadow: 0 3px 10px rgba(0, 0, 0, .1); transition: .2s;
}
.act:hover { background: var(--store-primary-dark); color: #fff; }
.act[aria-pressed="true"] { color: #fff; background: var(--store-accent); }
.act[aria-pressed="true"] .icon { fill: currentColor; }
.act[disabled] { background: #fff; color: var(--store-text); cursor: not-allowed; }
.book-card__body { display: flex; flex-direction: column; gap: 3px; padding-top: 14px; flex: 1; }
.book-card__title { font-size: 15.5px; font-weight: 700; line-height: 1.5; }
.book-card__title a:hover { color: var(--store-primary-dark); }
.book-card__author { font-size: 13.5px; }
/* صفّ السعر وزرّ السلّة: ظاهرٌ دائمًا، ويُدفع وحده إلى أسفل البطاقة (البند 7) */
.book-card__foot { margin-top: auto; padding-top: 6px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.book-card__foot .price { gap: 2px 8px; min-width: 0; }
.cart-btn {
  flex: none; width: 40px; height: 40px; display: grid; place-items: center;
  background: var(--store-primary-dark); color: #fff; border-radius: var(--radius-sm); transition: background-color .2s;
}
.cart-btn .icon { width: 20px; height: 20px; }
.cart-btn:hover { background: var(--store-accent); }
.cart-btn[disabled] { background: var(--line); color: #555; cursor: not-allowed; }
.cover-out {
  position: absolute; inset-inline: 0; top: 50%; z-index: 2; transform: translateY(-50%);
  background: rgba(34, 34, 34, .9); color: #fff; text-align: center; font-weight: 700; font-size: 14px; padding: 8px;
}
.book-card.is-out .book-card__cover img { filter: grayscale(.8); opacity: .75; }

body[data-card-style="framed"] .book-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; background: #fff; }
body[data-card-style="framed"] .book-card__body { padding-inline: 4px; }
body[data-card-style="minimal"] .book-card__media { background: transparent; padding: 0; overflow: visible; }
body[data-card-style="minimal"] .book-card__cover img { box-shadow: 0 6px 16px rgba(0, 0, 0, .14); border-radius: var(--radius-sm); }

@media (hover: none) {
  .book-card__actions { opacity: 1; transform: none; }
}

/* ---------- السلايدر ---------- */
.hero { position: relative; background: var(--soft-2); overflow: hidden; }
.hero__track { position: relative; }
.slide { display: none; position: relative; min-height: 600px; }
.slide.is-active { display: block; animation: fade .6s; }
@keyframes fade { from { opacity: .3; } to { opacity: 1; } }
.slide__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.slide__body { position: relative; z-index: 1; display: flex; align-items: center; min-height: 600px; }
.slide__text { max-width: 520px; margin-inline-start: 13%; display: grid; gap: 18px; justify-items: start; }
.slide__eyebrow { color: var(--store-primary-dark); font-size: 20px; font-weight: 500; }
.slide__title { font-size: clamp(30px, 4vw, 54px); font-weight: 800; line-height: 1.25; }
.slide .btn { margin-top: 10px; }
.hero__arrow {
  position: absolute; top: 50%; z-index: 3; transform: translateY(-50%);
  width: 34px; height: 34px; display: grid; place-items: center;
  background: var(--store-primary-dark); color: #fff; border-radius: var(--radius-sm);
}
.hero__arrow:hover { background: var(--store-accent); }
.hero__arrow--prev { inset-inline-start: 30px; }
.hero__arrow--next { inset-inline-end: 30px; }
.hero__dots { position: absolute; bottom: 24px; inset-inline: 0; z-index: 3; display: flex; justify-content: center; gap: 10px; }
.hero__dots button { width: 9px; height: 9px; border-radius: 50%; background: var(--store-primary); opacity: .55; }
.hero__dots button[aria-selected="true"] { background: var(--store-accent); opacity: 1; }

/* ---------- الكلمة الباهتة ---------- */
.ghost {
  position: absolute; inset-inline: 0; top: 18px; z-index: 0;
  font-size: clamp(56px, 7vw, 96px); font-weight: 800; line-height: 1; color: var(--ghost);
  text-align: center; white-space: nowrap; overflow: hidden; pointer-events: none; user-select: none;
}

/* ---------- بطاقات التصنيفات ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 30px; }
.cat-card { display: grid; gap: 20px; }
.cat-card__box {
  position: relative; display: grid; justify-items: center; gap: 16px;
  background: var(--soft); border-radius: var(--radius); padding: 34px 20px 24px; overflow: hidden;
}
.cat-card__box img { position: relative; z-index: 1; width: 78%; aspect-ratio: 4 / 3; object-fit: contain; transition: transform .35s; }
.cat-card:hover .cat-card__box img { transform: scale(1.05); }
.cat-card__count { position: relative; z-index: 1; color: var(--heading); font-size: 15px; border-bottom: 1px solid currentColor; line-height: 1.6; }
.cat-card__name {
  display: block; padding: 13px 10px; text-align: center; background: #fff; color: var(--heading);
  font-weight: 700; box-shadow: 0 4px 18px rgba(0, 0, 0, .08); border-radius: var(--radius-sm); transition: .2s;
}
.cat-card:hover .cat-card__name { background: var(--store-primary-dark); color: #fff; }

/* ---------- الخدمات حول الصورة ---------- */
.trust-ring { padding-block: 40px 64px; }
.svc-ring { display: grid; grid-template-columns: 1fr minmax(0, 1.25fr) 1fr; align-items: center; gap: 30px; }
.svc-ring__img { width: 100%; max-width: 520px; margin-inline: auto; }
.svc-col { display: grid; gap: 70px; }
.svc { display: flex; align-items: center; gap: 24px; }
.svc__ring {
  flex: none; width: 96px; height: 96px; border-radius: 50%; border: 1px solid var(--line);
  display: grid; place-items: center; color: var(--heading); transition: .25s;
}
.svc__ring .icon { width: 28px; height: 28px; stroke-width: 1.4; }
.svc:hover .svc__ring { border-color: var(--store-primary); color: var(--store-primary-dark); }
.svc__text { display: grid; gap: 2px; }
.svc__text strong { color: var(--heading); font-size: 18px; }

/* ---------- عرض بعدّادٍ عموديّ ---------- */
.offer:has(.countdown[hidden]) { grid-template-columns: minmax(0, 1fr); }
.offer { display: grid; grid-template-columns: minmax(0, 1fr) 130px; align-items: stretch; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.offer__banner { position: relative; display: block; min-height: 460px; background: var(--soft); }
.offer__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: left center; }
.offer__text { position: relative; z-index: 1; display: grid; justify-items: start; gap: 14px; max-width: 540px; padding: 90px 8% 60px; }
.offer__eyebrow { color: var(--store-primary-dark); font-weight: 500; font-size: 17px; }
.offer__title { color: var(--heading); font-size: clamp(28px, 3.4vw, 44px); font-weight: 800; line-height: 1.25; }
.offer__text .btn { margin-top: 12px; }
.offer__banner:hover .btn { background: var(--store-accent); }
.countdown { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; background: #fff; padding: 20px 10px; border-inline-start: 1px solid var(--line); }
.countdown__unit { display: grid; justify-items: center; line-height: 1.2; }
.countdown__unit b { font-size: 28px; font-weight: 500; color: var(--heading); font-variant-numeric: tabular-nums; }
.countdown__unit small { font-size: 12.5px; letter-spacing: .04em; }
.countdown__unit--sec b { color: var(--store-primary-dark); }
.countdown__sep { display: flex; gap: 6px; }
.countdown__sep::before, .countdown__sep::after { content: ""; width: 4px; height: 4px; border-radius: 50%; background: var(--store-primary); }

/* ---------- جدار الآراء ---------- */
.reviews-wall { background: var(--soft); padding-block: 64px; }
.store-rating { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; }
.store-rating b { font-size: 20px; color: var(--heading); }
.review-wall { columns: 3; column-gap: 24px; }
.review-card {
  break-inside: avoid; display: grid; gap: 12px; justify-items: start; margin-bottom: 24px;
  background: #fff; padding: 30px; border-radius: var(--radius); box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
}
.review-card__book { font-size: 17px; }
.review-card__text { font-size: 15px; }
.quote-box {
  display: grid; place-items: center; width: 60px; height: 60px; margin-top: 4px;
  border: 1px solid var(--store-primary); padding: 4px; border-radius: var(--radius-sm);
}
.quote-box .icon { width: 100%; height: 100%; padding: 13px; background: var(--store-primary); color: #fff; stroke-width: 2.2; border-radius: var(--radius-sm); }
.review-card__name { color: var(--heading); font-weight: 700; }
.review-card__name::before { content: "— "; }

/* ---------- المقالات ---------- */
.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px; }
.post-card { display: grid; align-content: start; gap: 18px; }
.post-card__media { display: block; overflow: hidden; border-radius: var(--radius); background: var(--soft); }
.post-card__media img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; transition: transform .4s; }
.post-card:hover .post-card__media img { transform: scale(1.04); }
.post-card__body { display: grid; gap: 8px; justify-items: start; }
.post-card__date { font-size: 13px; color: var(--store-primary-dark); font-weight: 500; }
.post-card__title { font-size: 18px; }
.post-card__title a:hover { color: var(--store-primary-dark); }
.post-card__excerpt { font-size: 15px; }
.read-more { display: inline-flex; align-items: center; gap: 6px; color: var(--heading); font-weight: 700; margin-top: 4px; }
.read-more:hover { color: var(--store-primary-dark); }

/* ---------- المؤلّفون (مكان شريط الشعارات) ---------- */
.authors-strip { border-top: 1px solid var(--line); padding-block: 40px; }
.authors-row { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 24px; }
.author-chip { display: grid; justify-items: center; gap: 4px; text-align: center; }
.author-chip img { width: 104px; height: 104px; border-radius: 50%; object-fit: cover; filter: grayscale(1); opacity: .8; transition: .3s; border: 4px solid #fff; box-shadow: 0 0 0 1px var(--line); margin-bottom: 8px; }
.author-chip:hover img { filter: none; opacity: 1; box-shadow: 0 0 0 1px var(--store-primary); }
.author-chip__name { color: var(--heading); font-weight: 700; font-size: 15px; }
.author-chip__count { font-size: 13px; }

/* ---------- التذييل ---------- */
.site-footer { background: var(--soft); margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr 1.5fr; gap: 40px; padding-block: 64px 48px; }
.footer-about { display: grid; gap: 18px; align-content: start; }
.footer-about p { font-size: 15px; }
.socials { display: flex; gap: 10px; }
.socials a { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; color: var(--store-primary-dark); border: 1px solid var(--line); background: #fff; }
.socials a:hover { background: var(--store-primary-dark); color: #fff; }
.footer-col__title { font-size: 16px; margin-bottom: 18px; }
.footer-links { display: grid; gap: 9px; font-size: 15px; }
.footer-links a:hover { color: var(--store-primary-dark); }
.contact-list { display: grid; gap: 10px; font-size: 15px; }
.contact-list li { display: flex; gap: 10px; align-items: flex-start; }
.contact-list .icon { color: var(--store-primary-dark); margin-top: 4px; }
.newsletter { margin-top: 22px; display: grid; gap: 8px; }
.newsletter__label { font-size: 14px; color: var(--heading); font-weight: 700; }
.newsletter__row { display: flex; gap: 8px; }
.newsletter__row .btn { flex: none; padding-inline: 18px; }
.footer-bottom { background: #fff; border-top: 1px solid var(--line); }
.footer-bottom__inner { display: flex; flex-direction: column; align-items: center; gap: 10px; padding-block: 18px; font-size: 14px; text-align: center; }
.pay-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.pay-chips li { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: 13px; }

/* ---------- خيارات الإظهار ---------- */
body[data-show-trust-bar="false"] .trust-ring,
body[data-show-trust-bar="false"] .pdp-services { display: none; }
body[data-show-reviews="false"] .reviews-wall { display: none; }
body[data-show-newsletter="false"] .newsletter { display: none; }

/* ---------- رأس الصفحات الداخليّة (كلمةٌ باهتة خلف العنوان) ---------- */
.page-band { position: relative; background: var(--soft); padding: 46px 0 40px; overflow: hidden; text-align: center; }
.page-band .ghost { top: 50%; transform: translateY(-50%); font-size: clamp(64px, 11vw, 150px); color: #ECECEC; }
.page-band__inner { position: relative; z-index: 1; display: grid; gap: 8px; justify-items: center; }
.page-band h1 { font-size: clamp(28px, 3.4vw, 40px); }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 6px; font-size: 14px; justify-content: center; }
.breadcrumb li + li::before { content: "/"; margin-inline-end: 6px; color: var(--store-text); }
.breadcrumb a:hover { color: var(--store-primary-dark); }
.breadcrumb [aria-current] { color: var(--heading); }
.breadcrumb--start ol { justify-content: flex-start; }

/* ---------- صفحة التصنيف ---------- */
.subcats { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 8px; }
.subcats a { display: inline-block; padding: 5px 14px; background: #fff; color: var(--heading); border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: 14px; }
.subcats a:hover { border-color: var(--store-primary-dark); color: var(--store-primary-dark); }
.listing { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 40px; padding-block: 50px; }
.filters { display: grid; gap: 4px; align-content: start; }
.filters__toggle { display: none; }
.filter-box { border-bottom: 1px solid var(--line); padding-block: 18px; }
.filter-box h2 { font-size: 16px; margin-bottom: 12px; }
.check { display: flex; align-items: center; gap: 10px; padding-block: 4px; font-size: 15px; cursor: pointer; }
.check input { width: 17px; height: 17px; accent-color: var(--store-primary-dark); }
.check .count { margin-inline-start: auto; font-size: 13px; }
.price-range { display: flex; gap: 8px; align-items: center; }
.price-range .field { min-height: 40px; padding: 6px 10px; }
.filters .btn { margin-top: 18px; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; padding-bottom: 18px; margin-bottom: 30px; border-bottom: 1px solid var(--line); }
.toolbar .tabs { justify-content: flex-start; }
.toolbar .tab:first-child { padding-inline-start: 0; }
.sort-label { font-weight: 700; color: var(--heading); margin-inline-end: 6px; font-size: 15px; }
.listing .book-grid { --per-row: 3; }
body[data-books-per-row="5"] .listing .book-grid, body[data-books-per-row="6"] .listing .book-grid { --per-row: 4; }
.pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 48px; }
.pg { min-width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid var(--line); color: var(--heading); font-weight: 700; border-radius: var(--radius-sm); }
.pg:hover { border-color: var(--store-primary-dark); color: var(--store-primary-dark); }
.pg[aria-current] { background: var(--store-primary-dark); border-color: var(--store-primary-dark); color: #fff; }
.pg--gap { border: 0; }

/* ---------- صفحة الكتاب ---------- */
.pdp { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 56px; padding-block: 34px 50px; }
.pdp-gallery { display: grid; gap: 14px; align-content: start; }
.pdp-stage { position: relative; background: var(--soft); border-radius: var(--radius); padding: 56px 20%; }
.pdp-stage img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; box-shadow: 0 16px 34px rgba(0, 0, 0, .2); }
.pdp-stage .type-dot { width: 40px; height: 40px; top: 16px; inset-inline-start: 16px; }
.pdp-stage .type-dot .icon { width: 20px; height: 20px; }
.pdp-stage .badge { top: 16px; inset-inline-end: 16px; }
.pdp-thumbs { display: flex; gap: 12px; }
.pdp-thumbs button { width: 84px; padding: 8px 14px; background: var(--soft); border: 1px solid transparent; border-radius: var(--radius-sm); }
.pdp-thumbs button[aria-pressed="true"] { border-color: var(--store-primary-dark); }
.pdp-thumbs img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; }
.pdp-info { display: grid; gap: 16px; align-content: start; }
.pdp-info h1 { font-size: clamp(26px, 2.8vw, 36px); font-weight: 800; }
.pdp-byline { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; font-size: 15px; }
.pdp-byline a { color: var(--store-primary-dark); font-weight: 700; }
.pdp-type { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; color: var(--heading); }
.pdp-price { font-size: 28px; }
.pdp-price .price__old { font-size: 18px; }
.qty-note { color: var(--store-primary-dark); font-weight: 700; font-size: 15px; }
.stock { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; color: var(--heading); font-weight: 500; }
.stock .icon { color: var(--type-edu); }
.specs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; border-top: 1px solid var(--line); }
.specs div { display: flex; justify-content: space-between; gap: 10px; padding-block: 10px; border-bottom: 1px solid var(--line); font-size: 15px; }
.specs dt { color: var(--store-text); }
.specs dd { margin: 0; color: var(--heading); font-weight: 500; text-align: end; }
.buy-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: stretch; }
.qty { display: inline-flex; align-items: stretch; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.qty button { width: 42px; display: grid; place-items: center; color: var(--heading); }
.qty button:hover { color: var(--store-primary-dark); }
.qty input { width: 52px; border: 0; text-align: center; font-weight: 700; -moz-appearance: textfield; background: transparent; }
.qty input::-webkit-inner-spin-button, .qty input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.buy-row .btn--gold { flex: 1; min-width: 180px; }
.pdp-links { display: flex; flex-wrap: wrap; gap: 18px; font-size: 15px; }
.pdp-links button { display: inline-flex; align-items: center; gap: 6px; color: var(--heading); font-weight: 500; }
.pdp-links button:hover, .pdp-links button[aria-pressed="true"] { color: var(--store-primary-dark); }
.pdp-services { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; padding-top: 18px; border-top: 1px solid var(--line); }
.pdp-services .svc { gap: 14px; }
.pdp-services .svc__ring { width: 56px; height: 56px; }
.pdp-services .svc__ring .icon { width: 22px; height: 22px; }
.pdp-services .svc__text strong { font-size: 15px; }
.pdp-services .svc__text span { font-size: 13.5px; }
.sample-player { display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: var(--soft); border-radius: var(--radius); }
.sample-player .play { width: 46px; height: 46px; flex: none; border-radius: 50%; background: var(--store-accent); color: #fff; display: grid; place-items: center; }
.sample-player .play .icon { fill: currentColor; stroke: none; }
.sample-player__bar { flex: 1; height: 4px; background: var(--line); position: relative; }
.sample-player__bar::after { content: ""; position: absolute; inset-block: 0; inset-inline-start: 0; width: 30%; background: var(--store-primary-dark); }
.sample-player small { font-size: 13px; }

.details { padding-block: 10px 40px; }
.details__tabs { justify-content: center; border-bottom: 1px solid var(--line); padding-bottom: 14px; margin-bottom: 30px; }
.details__tabs .tab { font-size: 17px; }
.prose { max-width: 820px; margin-inline: auto; display: grid; gap: 14px; font-size: 16.5px; line-height: 1.95; }
.spec-table { width: 100%; max-width: 820px; margin-inline: auto; border-collapse: collapse; font-size: 15px; }
.spec-table th, .spec-table td { text-align: start; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.spec-table th { width: 34%; color: var(--heading); font-weight: 700; background: var(--soft); }
.pdp-reviews { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 40px; align-items: start; }
.rating-box { display: grid; gap: 10px; justify-items: center; text-align: center; background: var(--soft); padding: 28px 20px; border-radius: var(--radius); }
.rating-box__score { font-size: 46px; font-weight: 800; color: var(--heading); line-height: 1; }
.rating-box .stars .icon { width: 20px; height: 20px; }
.review-form { display: grid; gap: 10px; margin-top: 18px; text-align: start; width: 100%; }
.review-form h3 { font-size: 17px; }
.star-input { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 2px; }
.star-input input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.star-input label { cursor: pointer; color: var(--star-off); }
.star-input label .icon { width: 26px; height: 26px; fill: currentColor; stroke: none; }
.star-input input:checked ~ label, .star-input label:hover, .star-input label:hover ~ label { color: var(--star); }
.star-input input:focus-visible + label { outline: 2px solid var(--store-primary-dark); }
textarea.field { min-height: 110px; resize: vertical; }
.pdp-reviews .review-wall { columns: 2; }
.pdp-reviews .review-card { background: #fff; border: 1px solid var(--line); box-shadow: none; padding: 24px; }
.review-card__date { font-size: 13px; }

.author-box { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 28px; align-items: center; padding: 30px; border: 1px solid var(--line); border-radius: var(--radius); }
.ring-photo { width: 120px; height: 120px; border-radius: 50%; padding: 6px; border: 1px solid var(--store-primary); }
.ring-photo img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.author-box h2 { font-size: 22px; margin-bottom: 6px; }
.kicker { color: var(--store-primary-dark); font-size: 14px; font-weight: 700; }
.book-grid--scroll { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: calc((100% - 30px * (var(--per-row) - 1)) / var(--per-row)); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 10px; scrollbar-width: thin; }
.book-grid--scroll > * { scroll-snap-align: start; }

/* ---------- المؤلّف ---------- */
.author-hero { position: relative; background: var(--soft); overflow: hidden; padding-block: 50px; }
.author-hero .ghost { top: 50%; transform: translateY(-50%); font-size: clamp(64px, 11vw, 160px); color: #ECECEC; }
.author-hero__inner { position: relative; z-index: 1; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 44px; align-items: center; }
.author-hero .ring-photo { width: 230px; height: 230px; padding: 10px; background: #fff; }
.author-hero h1 { font-size: clamp(30px, 3.6vw, 44px); font-weight: 800; }
.author-hero__meta { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-block: 8px 14px; color: var(--heading); font-weight: 500; }
.author-hero__meta b { color: var(--store-primary-dark); }
.author-bio { max-width: 760px; font-size: 16.5px; line-height: 1.95; }

/* ---------- السلّة ---------- */
.cart-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 40px; align-items: start; padding-block: 44px; }
.cart-head { display: grid; grid-template-columns: minmax(0, 2.6fr) 1fr 1.2fr 1fr 44px; gap: 16px; padding: 0 0 12px; border-bottom: 2px solid var(--store-accent); color: var(--heading); font-weight: 700; font-size: 15px; }
.cart-row { display: grid; grid-template-columns: minmax(0, 2.6fr) 1fr 1.2fr 1fr 44px; gap: 16px; align-items: center; padding: 20px 0; border-bottom: 1px solid var(--line); }
.cart-item { display: flex; gap: 16px; align-items: center; min-width: 0; }
.cart-item__cover { flex: none; width: 82px; background: var(--soft); padding: 10px 12px; border-radius: var(--radius-sm); position: relative; }
.cart-item__cover img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; }
.cart-item__cover .type-dot { width: 24px; height: 24px; top: -6px; inset-inline-start: -6px; }
.cart-item__cover .type-dot .icon { width: 13px; height: 13px; }
.cart-item h3 { font-size: 16px; }
.cart-item p { font-size: 14px; }
.cart-row .label { display: none; }
.cart-row .qty input { width: 40px; }
.cart-row .qty button { width: 34px; }
.cart-remove { width: 40px; height: 40px; display: grid; place-items: center; color: var(--store-text); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.cart-remove:hover { color: #fff; background: var(--store-accent); border-color: var(--store-accent); }
.cart-actions { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 22px; }
.summary { background: var(--soft); padding: 30px; border-radius: var(--radius); display: grid; gap: 14px; position: sticky; top: calc(var(--header-h) + 20px); }
.summary h2 { font-size: 20px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.summary__row { display: flex; justify-content: space-between; gap: 10px; font-size: 15px; }
.summary__row b { color: var(--heading); }
.summary__row--total { padding-top: 14px; border-top: 1px solid var(--line); font-size: 18px; color: var(--heading); font-weight: 700; }
.coupon { display: flex; gap: 8px; }
.coupon .btn { flex: none; padding-inline: 16px; }
.coupon-applied { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 14px; color: var(--heading); background: #fff; border: 1px dashed var(--store-primary-dark); padding: 6px 12px; border-radius: var(--radius-sm); }
.coupon-applied button { color: var(--store-primary-dark); font-weight: 700; font-size: 14px; }
.summary__note { font-size: 13.5px; display: flex; gap: 8px; }
.summary__note .icon { color: var(--store-primary-dark); margin-top: 3px; }
.cart-empty { text-align: center; padding: 60px 20px; display: grid; gap: 14px; justify-items: center; }
.cart-empty .svc__ring { width: 110px; height: 110px; }
.cart-empty .svc__ring .icon { width: 36px; height: 36px; }

/* ---------- 404 ---------- */
.nf { position: relative; text-align: center; padding-block: 70px 50px; overflow: hidden; }
.nf .ghost { top: 50%; transform: translateY(-50%); font-size: clamp(140px, 26vw, 340px); color: #F0F0F0; }
.nf__inner { position: relative; z-index: 1; display: grid; gap: 16px; justify-items: center; max-width: 560px; margin-inline: auto; }
.nf h1 { font-size: clamp(28px, 3.6vw, 42px); font-weight: 800; }
.nf__search { display: flex; gap: 8px; width: 100%; margin-top: 8px; }
.nf__search .btn { flex: none; }
.nf__links { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

/* ---------- المدوّنة والمقال ---------- */
.blog-grid { padding-block: 50px 20px; }
.post { max-width: 860px; margin-inline: auto; padding-block: 44px 30px; display: grid; gap: 22px; }
.post__meta { display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: center; font-size: 14px; }
.post__meta time { color: var(--store-primary-dark); font-weight: 700; }
.post__title { text-align: center; font-size: clamp(28px, 3.6vw, 44px); font-weight: 800; }
.post__image { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); }
.post__body { display: grid; gap: 16px; font-size: 17px; line-height: 2; }
.post__body h2 { font-size: 22px; margin-top: 10px; }
.post__body blockquote { margin: 0; padding: 18px 22px; border-inline-start: 4px solid var(--store-primary); background: var(--soft); color: var(--heading); font-weight: 500; }
.post__back { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding-top: 22px; border-top: 1px solid var(--line); }

/* ---------- صفحة المكوّنات ---------- */
.kit { padding-block: 40px; display: grid; gap: 50px; }
.kit h2.kit__title { font-size: 20px; padding-bottom: 10px; border-bottom: 1px solid var(--line); margin-bottom: 22px; }
.kit__row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.kit__note { font-size: 14px; margin-bottom: 14px; }
.kit .book-grid { --per-row: 4; }

/* =========================================================
   العروض
   ========================================================= */
@media (max-width: 1200px) {
  .main-nav__list { gap: 20px; }
  .footer-grid { grid-template-columns: 1fr 1fr 1fr; }
  .footer-about, .footer-contact { grid-column: span 3; }
  .footer-contact { grid-column: span 3; }
}
@media (max-width: 1024px) {
  :root { --header-h: 72px; --gutter: 20px; }
  .main-nav { display: none; }
  .menu-toggle { display: inline-grid; }
  .header-row { gap: 8px; }
  .book-grid { --per-row: 3; gap: 24px; }
  body[data-books-per-row="3"] .book-grid { --per-row: 3; }
  .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .trust-ring { padding-block: 24px; }
  .trust-ring .section-title--center { margin-bottom: 22px; }
  .svc-ring { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 24px; }
  .svc-ring__img { display: none; }
  .svc-col { display: contents; }
  .svc { gap: 14px; }
  .svc__ring { width: 60px; height: 60px; }
  .svc__ring .icon { width: 22px; height: 22px; }
  .svc__text strong { font-size: 16px; }
  .svc__text span { font-size: 14px; }
  .book-grid--two-rows > :nth-child(n+7) { display: none; }
  .review-wall { columns: 2; }
  .authors-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .listing { grid-template-columns: 1fr; gap: 10px; }
  .filters__toggle { display: flex; }
  .filters:not(.is-open) .filters__body { display: none; }
  .listing .book-grid { --per-row: 3; }
  .pdp { grid-template-columns: 1fr; gap: 30px; }
  .pdp-gallery { max-width: 520px; width: 100%; margin-inline: auto; }
  .pdp-reviews { grid-template-columns: 1fr; }
  .cart-layout { grid-template-columns: 1fr; }
  .summary { position: static; }
  .author-hero__inner { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .author-hero__meta { justify-content: center; }
}
@media (max-width: 760px) {
  :root { --gutter: 16px; }
  .section { padding-block: 40px; }
  .brand__name { font-size: 18px; }
  .brand__logo { width: 40px; height: 40px; }
  .hide-sm { display: none; }
  .hdr-btn { width: 38px; height: 38px; }
  .hdr-icons { gap: 2px; }
  .book-grid { --per-row: 2 !important; gap: 16px; }
  .listing .book-grid { --per-row: 2; }
  .book-card__media { padding: 18px 13% 22px; }
  .book-card__actions { bottom: 8px; gap: 6px; }
  .act .icon { width: 18px; height: 18px; }
  .book-card__title { font-size: 14.5px; }
  .book-grid--scroll { grid-auto-columns: 46%; }
  .slide, .slide__body { min-height: 0; }
  .slide { background: var(--soft-2); }
  .slide__img { position: static; height: 210px; object-position: left center; }
  .slide__body { padding-block: 26px 52px; }
  .slide__text { margin-inline-start: 0; gap: 12px; }
  .slide__eyebrow { font-size: 16px; }
  .hero__arrow { top: 105px; }
  .hero__arrow--prev { inset-inline-start: 12px; }
  .hero__arrow--next { inset-inline-end: 12px; }
  .hero__dots { bottom: 18px; }
  .cat-grid { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; scrollbar-width: none; }
  .cat-grid::-webkit-scrollbar { display: none; }
  .cat-card { flex: 0 0 42%; gap: 10px; scroll-snap-align: start; }
  .cat-card__box { padding: 18px 10px 12px; gap: 10px; }
  .cat-card__box img { width: 70%; }
  .ghost { font-size: 48px; top: 14px; }
  .cat-card__name { font-size: 14px; padding: 10px 6px; }
  .trust-ring { padding-block: 8px 4px; }
  .trust-ring .section-title--center { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .svc-ring { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; scrollbar-width: none; }
  .svc-ring::-webkit-scrollbar { display: none; }
  .svc { flex: 0 0 auto; max-width: 78%; scroll-snap-align: start; gap: 10px; padding: 10px 14px 10px 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
  .svc__ring { width: 42px; height: 42px; }
  .svc__ring .icon { width: 19px; height: 19px; }
  .svc__text strong { font-size: 14.5px; white-space: nowrap; }
  .svc__text span { font-size: 12.5px; white-space: nowrap; }
  .offer { grid-template-columns: 1fr; }
  .offer__banner { min-height: 0; }
  .offer__img { position: static; height: 200px; }
  .offer__text { padding: 24px 20px 28px; }
  .countdown { flex-direction: row; justify-content: center; border-inline-start: 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
  .countdown__sep { flex-direction: column; }
  .reviews-wall { padding-block: 44px; }
  .review-wall { columns: auto; display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; }
  .review-card { flex: 0 0 84%; scroll-snap-align: start; margin: 0; padding: 22px; }
  .pdp-reviews .review-wall { display: grid; overflow: visible; }
  .pdp-reviews .review-card { flex: none; }
  .post-grid { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; }
  .post-card { flex: 0 0 82%; scroll-snap-align: start; gap: 14px; }
  .authors-row { display: flex; overflow-x: auto; gap: 18px; scroll-snap-type: x mandatory; padding-bottom: 6px; }
  .author-chip { flex: 0 0 104px; scroll-snap-align: start; }
  .author-chip img { width: 86px; height: 86px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; padding-block: 44px 30px; }
  .footer-about, .footer-contact { grid-column: span 2; }
  .page-band { padding: 34px 0 30px; }
  .pdp-stage { padding: 34px 18%; }
  .specs { grid-template-columns: 1fr; }
  .pdp-services { grid-template-columns: 1fr; }
  .author-box { grid-template-columns: 1fr; justify-items: center; text-align: center; padding: 22px; }
  .cart-head { display: none; }
  .cart-row { grid-template-columns: 1fr 1fr; gap: 12px; position: relative; }
  .cart-item { grid-column: 1 / -1; padding-inline-end: 48px; }
  .cart-row .label { display: block; font-size: 13px; }
  .cart-remove { position: absolute; top: 20px; inset-inline-end: 0; }
  .cart-row > .cart-cell--total { text-align: end; }
  .summary { padding: 22px; }
  .author-hero .ring-photo { width: 170px; height: 170px; }
  .nf__search { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
.review-card__book cite { font-style: normal; }

/* =========================================================
   الإصدار الثاني: كتاب الأسبوع، ووصل حديثًا، وصفّا «اكتشف كتبنا»،
   واختيار الصيغة، والتصفيات المختارة، وعرض القائمة، وأعمال المؤلّف
   ========================================================= */
/* «اكتشف كتبنا» صفّان كاملان: لا صفّ أخير ناقص */
.book-grid--two-rows > :nth-child(n+9) { display: none; }
body[data-books-per-row="3"] .book-grid--two-rows > :nth-child(n+7) { display: none; }
body[data-books-per-row="5"] .book-grid--two-rows > :nth-child(n+6),
body[data-books-per-row="6"] .book-grid--two-rows > :nth-child(n+7) { display: none; }

/* كتاب الأسبوع: غلافٌ كبير على لوحٍ أبيض، وعنوانه كلمةٌ باهتة خلفه */
.feature-band { position: relative; background: var(--soft); padding-block: 70px; overflow: hidden; }
.feature-band__ghost { top: 50%; transform: translateY(-50%); font-size: clamp(72px, 12vw, 190px); color: #ECECEC; }
.feature { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 400px) minmax(0, 1fr); gap: 64px; align-items: center; max-width: 1080px; margin-inline: auto; }
.feature__media { position: relative; background: #fff; padding: 44px 17%; border-radius: var(--radius); box-shadow: var(--shadow); }
.feature__cover img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; box-shadow: 0 16px 34px rgba(0, 0, 0, .2); transition: transform .35s; }
.feature:hover .feature__cover img { transform: translateY(-4px); }
.feature__media .type-dot { width: 40px; height: 40px; top: 16px; inset-inline-start: 16px; }
.feature__media .type-dot .icon { width: 20px; height: 20px; }
.feature__body { display: grid; gap: 12px; justify-items: start; }
.feature__kicker { color: var(--store-primary-dark); font-size: 18px; font-weight: 500; }
.feature__title { font-size: clamp(28px, 3.2vw, 44px); font-weight: 800; line-height: 1.25; }
.feature__title a:hover { color: var(--store-primary-dark); }
.feature__author a { color: var(--store-primary-dark); font-weight: 700; }
.feature__desc { display: grid; gap: 10px; max-width: 580px; font-size: 16px; line-height: 1.9; }
.feature__buy { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 8px; }
.feature__body > .price { font-size: 26px; }
.act--line { width: 46px; height: 46px; border: 1px solid var(--line); box-shadow: none; }

/* وصل حديثًا: شريطٌ أفقيّ بسهمين ذهبيّين مربّعين */
.row-nav { display: flex; align-items: center; gap: 8px; }
.row-nav .section-link { margin-inline-end: 10px; }
.row-arrow { width: 40px; height: 40px; display: grid; place-items: center; background: var(--store-primary-dark); color: #fff; border-radius: var(--radius-sm); transition: background-color .2s; }
.row-arrow:hover { background: var(--store-accent); }
.row-arrow[disabled] { background: var(--line); color: #555; cursor: default; }
.book-grid--rail { scrollbar-width: none; scroll-behavior: smooth; }
.book-grid--rail::-webkit-scrollbar { display: none; }

/* اختيار الصيغة في صفحة الكتاب */
.formats-box { display: grid; gap: 8px; }
.formats-label { font-size: 14px; font-weight: 700; color: var(--heading); }
.formats { display: flex; flex-wrap: wrap; gap: 10px; }
.format-opt { display: grid; grid-template-columns: auto auto; align-items: center; column-gap: 10px; padding: 9px 16px 9px 18px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; line-height: 1.35; transition: border-color .2s; }
.format-opt .type-dot { grid-row: span 2; }
.format-opt__name { color: var(--heading); font-weight: 700; font-size: 15px; }
.format-opt__price { font-size: 13.5px; }
.format-opt:hover { border-color: var(--store-primary); }
.format-opt[aria-current] { border-color: var(--store-primary-dark); box-shadow: inset 0 0 0 1px var(--store-primary-dark); }

/* صفحة التصنيف: التصفيات المختارة وتبديل الشبكة والقائمة */
.toolbar__end { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.view-switch { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.view-switch button { width: 40px; height: 38px; display: grid; place-items: center; color: var(--store-text); }
.view-switch button + button { border-inline-start: 1px solid var(--line); }
.view-switch button[aria-pressed="true"] { background: var(--store-primary-dark); color: #fff; }
.active-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: -12px 0 26px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px 5px 12px; border: 1px solid var(--store-primary-dark); color: var(--heading); font-size: 14px; border-radius: var(--radius-sm); background: #fff; }
.chip .icon { width: 15px; height: 15px; color: var(--store-primary-dark); }
.chip:hover { background: var(--store-primary-dark); color: #fff; }
.chip:hover .icon { color: #fff; }
.active-filters:not(:has(.chip)) { display: none; }
.chips-clear { font-size: 14px; font-weight: 700; color: var(--store-primary-dark); text-decoration: underline; text-underline-offset: 4px; }
.book-grid.is-list { grid-template-columns: minmax(0, 1fr); gap: 18px; }
.book-grid.is-list .book-card { flex-direction: row; gap: 24px; align-items: stretch; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.book-grid.is-list .book-card__media { flex: none; width: 170px; padding: 18px 26px; }
.book-grid.is-list .book-card__body { padding-top: 6px; gap: 6px; }
.book-grid.is-list .book-card__title { font-size: 18px; }
.book-grid.is-list .book-card__foot { justify-content: flex-start; gap: 24px; }
.book-grid.is-list .book-card__actions { bottom: 8px; gap: 6px; }
@media (min-width: 1025px) {
  .filters { position: sticky; top: calc(var(--header-h) + 20px); }
}

/* أعمال المؤلّف: شريطٌ أفقيّ يتّسع لسبعة كتبٍ بلا صفٍّ ناقص */
.works-rail { --per-row: 4.4; }
@media (max-width: 1024px) {
  .feature { grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 36px; }
  .feature-band { padding-block: 50px; }
  .works-rail { --per-row: 3.3; }
}
@media (max-width: 760px) {
  .feature-band { padding-block: 34px 40px; }
  .feature-band__ghost { top: 30px; transform: none; font-size: 64px; }
  .feature { grid-template-columns: 1fr; gap: 22px; }
  .feature__media { width: min(260px, 72%); margin-inline: auto; padding: 26px 13%; }
  .feature__body > .price { font-size: 22px; }
  .feature__buy .btn { flex: 1; }
  .row-nav .row-arrow { display: none; }
  .row-nav .section-link { margin: 0; }
  .book-grid--two-rows > :nth-child(n+7) { display: none; }
  .book-grid.is-list .book-card { gap: 14px; }
  .book-grid.is-list .book-card__media { width: 112px; padding: 12px 14px; }
  .book-grid.is-list .book-card__title { font-size: 15px; }
  .active-filters { margin-top: -8px; }
  .formats { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 8px; }
  .format-opt { padding: 8px 8px; column-gap: 7px; }
  .format-opt__name { font-size: 14px; }
  .format-opt__price { font-size: 12.5px; white-space: nowrap; }
}

/* الجهاز اللوحيّ: رسمة السلايدر فوق نصّه، وتصنيفاتٌ في صفٍّ واحد، وبانر العرض صورته فوق نصّه */
@media (min-width: 761px) and (max-width: 1024px) {
  .slide, .slide__body { min-height: 0; }
  .slide__img { position: static; height: 300px; object-position: left bottom; }
  .slide__body { padding-block: 30px 56px; }
  .slide__text { margin-inline-start: 0; max-width: 600px; gap: 14px; }
  .hero__arrow { top: 150px; }
  .cat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
  .cat-card { gap: 12px; }
  .cat-card__box { padding: 22px 10px 14px; gap: 10px; }
  .cat-card .ghost { font-size: 44px; top: 12px; }
  .cat-card__name { font-size: 14.5px; padding: 11px 6px; }
  .review-wall > :nth-child(9) { display: none; }
  .offer__banner { min-height: 0; }
  .offer__img { position: static; height: 260px; }
  .offer__text { max-width: none; padding: 26px 28px 30px; }
}

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