/* ==========================================================
   قالب «قافلة» — منصّة ناشر
   طابع صناعيّ صارم: أشرطة داكنة، وأصفر للإشارة، وعناوين ثقيلة،
   وزوايا شبه حادّة. ألوان الهويّة متغيّرات يختارها الناشر.
   ========================================================== */

:root {
  /* ألوان الهويّة — قيم تجريبيّة يستبدلها الناشر */
  --store-primary: #F3C612;
  --store-primary-dark: #D9AE00;
  --store-accent: #1B1B1B;
  --store-bg: #FFFFFF;
  --store-text: #1B1B1B;

  /* محايدة ثابتة */
  --white: #FFFFFF;
  --gray-50: #F7F7F7;
  --gray-100: #EFEFEF;
  --gray-200: #E2E2E2;
  --gray-300: #CFCFCF;
  --gray-500: #5F6670;          /* تباينه 5.1 على ‎#F7F7F7 */
  --on-dark: rgba(255, 255, 255, .92);
  --on-dark-muted: rgba(255, 255, 255, .72);
  --line-dark: rgba(255, 255, 255, .14);
  --sale: #C62828;
  --star: #F2A900;

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

  --font: "Tajawal", system-ui, sans-serif;
  --container: 1280px;
  --gutter: 16px;
  --radius: 3px;
  --radius-lg: 6px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .10);
  --ease: cubic-bezier(.2, .7, .3, 1);
}
body[data-corners="rounded"] { --radius: 10px; --radius-lg: 16px; }

/* ---------- أساسيّات ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 100px; }
body { margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.65; 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; }
ul, ol { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4, p { margin: 0; }
.icon { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon--fill { fill: currentColor; stroke: none; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--store-primary); outline-offset: 2px; }
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: 72px; }
.section--tight { padding-block: 44px; }
.section--dark { background: var(--store-accent); color: var(--on-dark); }
.section--soft { background: var(--gray-50); }

/* ==========================================================
   العناوين: سطر صغير بخطّ أفقيّ، ثمّ عنوان ثقيل بكلمة مظلَّلة
   ========================================================== */
.eyebrow { display: inline-flex; align-items: center; gap: 14px; font-size: 14px; font-weight: 700; letter-spacing: .02em; margin-bottom: 12px; }
.eyebrow::after { content: ""; width: 72px; height: 2px; background: currentColor; }
.section--dark .eyebrow { color: var(--on-dark); }
.heading { font-size: 40px; font-weight: 800; line-height: 1.2; text-wrap: balance; }
.hero__title mark, .section--dark .heading mark { background: none; color: var(--store-primary); padding: 0; }
.heading mark { background: var(--store-primary); color: var(--store-accent); padding: 0 .12em; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 36px; flex-wrap: wrap; }
.section-head__lead { max-width: 460px; color: var(--gray-500); font-size: 15.5px; }
.section--dark .section-head__lead { color: var(--on-dark-muted); }
.section-head--center { flex-direction: column; align-items: center; text-align: center; }
.section-head--center .eyebrow::before { content: ""; width: 72px; height: 2px; background: currentColor; }

/* ==========================================================
   الأزرار
   ========================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  min-height: 52px; padding: 0 2em; border-radius: var(--radius);
  font-weight: 800; font-size: 15.5px; line-height: 1; letter-spacing: .01em;
  border: 2px solid transparent; white-space: nowrap;
  transition: background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.btn--primary { background: var(--store-primary); color: var(--store-accent); }
.btn--primary:hover { background: var(--store-primary-dark); }
.btn--dark { background: var(--store-accent); color: var(--white); }
.btn--dark:hover { background: var(--store-primary); color: var(--store-accent); }
.btn--outline { border-color: var(--store-accent); color: var(--store-accent); }
.btn--outline:hover { background: var(--store-accent); color: var(--white); }
.section--dark .btn--outline, .hero .btn--outline { border-color: var(--on-dark); color: var(--on-dark); }
.section--dark .btn--outline:hover, .hero .btn--outline:hover { background: var(--white); color: var(--store-accent); }
.btn--sm { min-height: 40px; padding: 0 1.2em; font-size: 14px; }
.btn--block { width: 100%; }
.btn[disabled] { background: var(--gray-200); color: #4A5058; border-color: transparent; cursor: not-allowed; }
.btn .icon { width: 18px; height: 18px; }

.btn-square { width: 44px; height: 44px; border-radius: var(--radius); display: inline-grid; place-items: center; background: var(--store-accent); color: var(--white); transition: background .2s var(--ease), color .2s var(--ease); flex: none; }
.btn-square:hover { background: var(--store-primary); color: var(--store-accent); }
.btn-square .icon { width: 19px; height: 19px; }
.btn-square[disabled] { background: var(--gray-200); color: var(--gray-500); cursor: not-allowed; }

.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-size: 14.5px; border-bottom: 2px solid var(--store-primary); padding-bottom: 2px; }
.link-arrow .icon { width: 16px; height: 16px; transition: transform .2s var(--ease); }
.link-arrow:hover .icon { transform: translateX(-4px); }

/* ==========================================================
   الشريط العلويّ والرأس
   ========================================================== */
.topbar { background: var(--store-accent); color: var(--on-dark-muted); font-size: 13.5px; border-bottom: 1px solid var(--line-dark); }
.topbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 44px; }
.topbar__list { display: flex; align-items: center; gap: 22px; }
.topbar__list a { display: inline-flex; align-items: center; gap: 7px; }
.topbar__list a:hover { color: var(--white); }
.topbar__list .icon { width: 16px; height: 16px; color: var(--store-primary); }
.socials { display: flex; gap: 6px; }
.socials a { width: 32px; height: 32px; display: grid; place-items: center; border-radius: var(--radius); }
.socials a:hover { background: var(--store-primary); color: var(--store-accent); }
.socials .icon { width: 16px; height: 16px; }

.header { background: var(--store-accent); color: var(--on-dark); position: sticky; top: 0; z-index: 50; }
.header__inner { display: flex; align-items: center; gap: 28px; min-height: 88px; }
.brand { display: inline-flex; align-items: center; gap: 12px; flex: none; }
.brand__logo { width: 48px; height: 48px; object-fit: contain; border-radius: var(--radius); }
.brand__name { font-size: 24px; font-weight: 800; color: var(--white); }
.nav { display: flex; align-items: center; gap: 4px; margin-inline: auto; }
.nav a { position: relative; display: block; padding: 0 14px; line-height: 88px; font-weight: 700; font-size: 15.5px; color: var(--on-dark); }
.nav a::after { content: ""; position: absolute; inset-inline: 14px; bottom: 24px; height: 2px; background: var(--store-primary); transform: scaleX(0); transition: transform .2s var(--ease); }
.nav a:hover::after, .nav a.is-active::after { transform: scaleX(1); }
.nav a.is-active { color: var(--store-primary); }
.header__tools { display: flex; align-items: center; gap: 6px; flex: none; }
.tool-btn { position: relative; width: 44px; height: 44px; display: grid; place-items: center; border-radius: var(--radius); color: var(--on-dark); }
.tool-btn:hover { background: rgba(255, 255, 255, .08); }
.tool-btn .icon { width: 22px; height: 22px; }
.tool-btn__count { position: absolute; top: 2px; inset-inline-end: 0; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; background: var(--store-primary); color: var(--store-accent); font-size: 11px; font-weight: 800; line-height: 19px; text-align: center; }
.cart-link { display: inline-flex; align-items: center; gap: 6px; }
.cart-link__total { font-weight: 800; font-size: 14.5px; white-space: nowrap; }
.header .btn { min-height: 48px; }
.menu-toggle { display: none; }

/* شريط البحث المنسدل تحت الرأس */
.searchbar { background: var(--store-accent); border-top: 1px solid var(--line-dark); }
.searchbar[hidden] { display: none; }
.searchbar__inner { display: flex; gap: 10px; padding-block: 16px; }
.searchbar input { flex: 1; min-width: 0; height: 52px; border: 0; border-radius: var(--radius); padding: 0 18px; background: var(--white); color: var(--store-text); outline: 0; }

/* ==========================================================
   الدرج الجانبيّ في الهاتف
   ========================================================== */
.drawer { position: fixed; inset: 0; z-index: 100; visibility: hidden; overflow: hidden; }
.drawer__overlay { position: absolute; inset: 0; background: rgba(0, 0, 0, .55); opacity: 0; transition: opacity .25s var(--ease); }
.drawer__panel { position: absolute; top: 0; bottom: 0; inset-inline-start: 0; width: min(340px, 88vw); background: var(--store-accent); color: var(--on-dark); transform: translateX(100%); transition: transform .28s var(--ease); display: flex; flex-direction: column; overflow-y: auto; }
.drawer.is-open { visibility: visible; }
.drawer.is-open .drawer__overlay { opacity: 1; }
.drawer.is-open .drawer__panel { transform: none; }
.drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 18px 16px; border-bottom: 1px solid var(--line-dark); }
.drawer__head .brand__logo { width: 40px; height: 40px; }
.drawer__head .brand__name { font-size: 20px; }
.drawer__close { width: 42px; height: 42px; display: grid; place-items: center; border-radius: var(--radius); color: var(--on-dark); }
.drawer__close:hover { background: rgba(255, 255, 255, .08); }
.drawer__title { padding: 18px 16px 6px; font-size: 13px; font-weight: 800; color: var(--store-primary); }
.drawer__list a { display: flex; align-items: center; justify-content: space-between; padding: 13px 16px; border-bottom: 1px solid var(--line-dark); font-weight: 700; }
.drawer__list a:hover { background: rgba(255, 255, 255, .05); }
.drawer__list .icon { width: 16px; height: 16px; color: var(--on-dark-muted); }
.drawer__foot { margin-top: auto; padding: 16px; display: grid; gap: 12px; font-size: 14.5px; border-top: 1px solid var(--line-dark); }
.drawer__foot a { display: flex; align-items: center; gap: 8px; }
.drawer__foot .icon { width: 17px; height: 17px; color: var(--store-primary); }
body.is-locked { overflow: hidden; }

/* ==========================================================
   الشريط المتحرّك
   ========================================================== */
.marquee { background: var(--store-primary); color: var(--store-accent); overflow: hidden; border-block: 1px solid var(--store-primary-dark); }
.marquee__track { display: flex; width: max-content; animation: marquee 38s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__group { display: flex; align-items: center; gap: 40px; padding-inline-end: 40px; min-height: 64px; }
.marquee__item { display: inline-flex; align-items: center; gap: 12px; font-size: 18px; font-weight: 800; white-space: nowrap; }
.marquee__item .icon { width: 22px; height: 22px; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(50%); } }

/* ==========================================================
   شريط الثقة
   ========================================================== */
.trust { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--gray-200); }
.trust__item { display: flex; align-items: center; gap: 14px; padding: 22px; }
.trust__item + .trust__item { border-inline-start: 1px solid var(--gray-200); }
.trust__icon { width: 50px; height: 50px; flex: none; border-radius: var(--radius); display: grid; place-items: center; background: var(--store-accent); color: var(--store-primary); }
.trust__icon .icon { width: 24px; height: 24px; }
.trust__title { font-weight: 800; font-size: 15.5px; }
.trust__text { font-size: 13.5px; color: var(--gray-500); }

/* ==========================================================
   بطاقة الكتاب
   ========================================================== */
.book-grid { display: grid; grid-template-columns: repeat(var(--per-row, 4), minmax(0, 1fr)); gap: 28px 24px; }
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; }

.book-card { position: relative; display: flex; flex-direction: column; background: var(--white); }
.book-card__media { position: relative; display: block; background: var(--gray-50); padding: 26px 26px 0; border-radius: var(--radius); overflow: hidden; }
.book-card__media::after { content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 4px; background: var(--store-primary); transform: scaleX(0); transform-origin: right; transition: transform .3s var(--ease); }
.book-card:hover .book-card__media::after { transform: scaleX(1); }
.cover { position: relative; aspect-ratio: 2 / 3; overflow: hidden; border-radius: 2px; background: var(--gray-100); }
.cover img { width: 100%; height: 100%; object-fit: cover; }
.book-card .cover { box-shadow: 0 14px 26px rgba(0, 0, 0, .22); transform: translateY(10px); transition: transform .3s var(--ease); }
.book-card:hover .cover { transform: translateY(0); }
.book-card__body { display: flex; flex-direction: column; gap: 4px; padding-top: 16px; flex: 1; }
.book-card__author { font-size: 13.5px; font-weight: 700; color: var(--gray-500); }
.book-card__author:hover { color: var(--store-text); text-decoration: underline; }
.book-card__title { font-size: 17px; font-weight: 800; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.book-card__title a:hover { text-decoration: underline; text-decoration-color: var(--store-primary); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.book-card__desc { display: none; }
.book-card__meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.book-card__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 4px; }

.type-dot { position: absolute; top: 10px; inset-inline-end: 10px; z-index: 2; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: var(--white); box-shadow: 0 2px 6px rgba(0, 0, 0, .25); }
.type-dot .icon { width: 16px; height: 16px; stroke-width: 2; }
.type-dot--paper { background: var(--type-paper); }
.type-dot--ebook { background: var(--type-ebook); }
.type-dot--audio { background: var(--type-audio); }
.type-dot--edu { background: var(--type-edu); }

.badge { position: absolute; top: 12px; inset-inline-start: 12px; z-index: 2; padding: 4px 10px; border-radius: var(--radius); font-size: 12.5px; font-weight: 800; line-height: 1.4; }
.badge--sale { background: var(--sale); color: var(--white); }
.badge--new { background: var(--store-accent); color: var(--store-primary); }
.soldout { position: absolute; inset-inline: 0; bottom: 18px; z-index: 2; background: var(--store-accent); color: var(--white); text-align: center; font-weight: 800; font-size: 14px; padding: 8px 0; }
.is-soldout .cover img { filter: grayscale(.9); opacity: .7; }

.price { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; line-height: 1.2; }
.price__now { font-size: 19px; font-weight: 800; white-space: nowrap; }
.price__old { font-size: 13.5px; color: var(--gray-500); text-decoration: line-through; white-space: nowrap; }
.price--sale .price__now { color: var(--sale); }

[data-action="wishlist"][aria-pressed="true"] { color: var(--sale); }
[data-action="wishlist"][aria-pressed="true"] .icon { fill: currentColor; }

/* أشكال البطاقة */
body[data-card-style="framed"] .book-card { border: 1px solid var(--gray-200); border-radius: var(--radius); padding: 12px; }
body[data-card-style="framed"] .book-card:hover { border-color: var(--store-accent); }
body[data-card-style="minimal"] .book-card__media { background: transparent; padding: 0; }
body[data-card-style="minimal"] .book-card__media::after { display: none; }
body[data-card-style="minimal"] .book-card .cover { transform: none; }

/* البطاقة الأفقيّة */
.book-row { display: flex; gap: 16px; padding: 16px; background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius); transition: border-color .2s; }
.book-row:hover { border-color: var(--store-accent); }
.book-row .cover { width: 84px; flex: none; }
.book-row .type-dot { width: 22px; height: 22px; top: 4px; inset-inline-end: 4px; }
.book-row .type-dot .icon { width: 12px; height: 12px; }
.book-row__body { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.book-row .book-card__title { min-height: 0; font-size: 15.5px; }
.book-row__foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.book-row .btn-square { width: 40px; height: 40px; }
.book-row .price__now { font-size: 17px; }

/* ==========================================================
   التقييم والآراء
   ========================================================== */
.rating { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--gray-500); }
.stars { display: inline-flex; gap: 1px; color: var(--gray-300); }
.stars .icon { width: 15px; height: 15px; }
.stars .is-on { color: var(--star); }
.stars--lg .icon { width: 20px; height: 20px; }

.review-card { position: relative; background: var(--white); color: var(--store-text); border-radius: var(--radius); padding: 30px 28px 26px; display: flex; flex-direction: column; gap: 16px; }
.review-card__quote { position: absolute; top: 22px; inset-inline-end: 24px; width: 46px; height: 46px; color: var(--store-primary); }
.review-card__text { font-size: 16px; line-height: 1.85; }
.review-card__who { display: flex; align-items: center; gap: 12px; margin-top: auto; padding-top: 16px; border-top: 1px solid var(--gray-200); }
.avatar { width: 48px; height: 48px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--store-accent); color: var(--store-primary); font-weight: 800; font-size: 18px; }
.review-card__name { font-weight: 800; }
.review-card__role { font-size: 13px; color: var(--gray-500); }

/* ==========================================================
   ترقيم الصفحات والحقول
   ========================================================== */
.pagination { display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; }
.pagination a, .pagination span { min-width: 46px; height: 46px; padding: 0 8px; display: inline-grid; place-items: center; border: 1px solid var(--gray-200); border-radius: var(--radius); font-weight: 800; }
.pagination a:hover { border-color: var(--store-accent); }
.pagination .is-current { background: var(--store-accent); border-color: var(--store-accent); color: var(--store-primary); }
.pagination .is-gap { border-color: transparent; color: var(--gray-500); }
.pagination .is-disabled { color: var(--gray-300); pointer-events: none; }
.pagination .icon { width: 18px; height: 18px; }

.field { display: grid; gap: 6px; }
.field label { font-size: 14px; font-weight: 800; }
.input, .select, .textarea { width: 100%; min-height: 50px; border: 1px solid var(--gray-300); border-radius: var(--radius); padding: 0 16px; background: var(--white); outline: 0; transition: border-color .2s; }
.textarea { padding: 12px 16px; min-height: 120px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--store-accent); box-shadow: inset 0 -2px 0 var(--store-primary); }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--gray-300); border-radius: var(--radius); height: 52px; }
.qty button { width: 42px; height: 100%; display: grid; place-items: center; }
.qty button:hover { background: var(--gray-50); }
.qty button .icon { width: 16px; height: 16px; }
.qty input { width: 40px; border: 0; text-align: center; outline: 0; font-weight: 800; background: transparent; -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* ==========================================================
   بطاقة التصنيف (على مثال بطاقة الخدمة)
   ========================================================== */
.cat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.cat-card { display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius); overflow: hidden; transition: border-color .2s var(--ease), transform .2s var(--ease); }
.cat-card:hover { border-color: var(--store-accent); transform: translateY(-4px); }
.cat-card__media { position: relative; aspect-ratio: 4 / 3; background: var(--store-accent); display: grid; place-items: center; overflow: hidden; }
.cat-card__media img { width: 70%; aspect-ratio: 1; object-fit: contain; transition: transform .35s var(--ease); }
.cat-card:hover .cat-card__media img { transform: scale(1.05); }
.cat-card__count { position: absolute; bottom: 0; inset-inline-start: 0; background: var(--store-primary); color: var(--store-accent); font-size: 13px; font-weight: 800; padding: 6px 14px; }
.cat-card__body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.cat-card__name { font-size: 20px; font-weight: 800; }
.cat-card__text { font-size: 14.5px; color: var(--gray-500); }
.cat-card .link-arrow { margin-top: auto; align-self: flex-start; }

/* ==========================================================
   خطوات الطلب
   ========================================================== */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; counter-reset: step; }
.step { position: relative; padding: 32px 28px; border: 1px solid var(--line-dark); border-radius: var(--radius); }
.step__num { font-size: 64px; font-weight: 800; line-height: 1; color: transparent; -webkit-text-stroke: 1.5px var(--store-primary); margin-bottom: 18px; font-variant-numeric: tabular-nums; }
.step__icon { position: absolute; top: 32px; inset-inline-end: 28px; width: 54px; height: 54px; border-radius: var(--radius); background: var(--store-primary); color: var(--store-accent); display: grid; place-items: center; }
.step__icon .icon { width: 26px; height: 26px; }
.step__title { font-size: 21px; font-weight: 800; color: var(--white); margin-bottom: 8px; }
.step__text { color: var(--on-dark-muted); font-size: 15px; }

/* ==========================================================
   العدّادات
   ========================================================== */
.stats { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 0; }
.stats:empty { display: none; }
.stat { padding: 8px 24px; }
.stat + .stat { border-inline-start: 1px solid var(--gray-200); }
.stat__num { font-size: 52px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat__label { font-size: 15px; color: var(--gray-500); font-weight: 700; }

/* شبكة آراء القرّاء في الرئيسيّة */
.posts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }

/* ==========================================================
   التبويبات والدوّارات
   ========================================================== */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tab { padding: 10px 20px; border: 1px solid var(--gray-200); border-radius: var(--radius); font-weight: 800; font-size: 15px; background: var(--white); }
.tab:hover { border-color: var(--store-accent); }
.tab:is(.is-active, [aria-selected="true"]) { background: var(--store-accent); border-color: var(--store-accent); color: var(--store-primary); }
.tab-panel[hidden] { display: none; }
.scroller__track { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - (var(--per-row, 4) - 1) * 24px) / var(--per-row, 4)); gap: 24px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; scroll-behavior: smooth; }
.scroller__track::-webkit-scrollbar { display: none; }
.scroller__track > * { scroll-snap-align: start; }
.scroller__track.book-grid { grid-template-columns: none; }
.scroller-nav { display: flex; gap: 8px; }
.scroller-nav button { width: 48px; height: 48px; border-radius: var(--radius); border: 1px solid var(--gray-300); display: grid; place-items: center; }
.scroller-nav button:hover { background: var(--store-accent); border-color: var(--store-accent); color: var(--store-primary); }
.scroller-nav button:disabled { opacity: .35; cursor: default; background: transparent; color: inherit; border-color: var(--gray-300); }
.scroller-nav .icon { width: 20px; height: 20px; }

/* ==========================================================
   النشرة والتذييل
   ========================================================== */
.newsletter { background: var(--store-primary); color: var(--store-accent); }
.newsletter__inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: center; padding-block: 48px; }
.newsletter__title { font-size: 32px; font-weight: 800; line-height: 1.25; }
.newsletter__text { font-size: 15.5px; margin-top: 6px; }
.newsletter__form { display: flex; gap: 0; background: var(--white); border-radius: var(--radius); padding: 6px; }
.newsletter__form input { flex: 1; min-width: 0; border: 0; outline: 0; padding: 0 14px; background: transparent; }
.newsletter__form input::placeholder { color: var(--gray-500); }

.footer { background: var(--store-accent); color: var(--on-dark-muted); }
.footer__main { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: 40px; padding-block: 64px 48px; }
.footer .brand { margin-bottom: 18px; }
.footer__about p { font-size: 15px; margin-bottom: 20px; max-width: 340px; }
.footer h4 { color: var(--white); font-size: 18px; font-weight: 800; margin-bottom: 18px; display: flex; align-items: center; gap: 10px; }
.footer h4::before { content: ""; width: 18px; height: 3px; background: var(--store-primary); }
.footer__links li + li { margin-top: 10px; }
.footer__links a:hover { color: var(--white); text-decoration: underline; text-decoration-color: var(--store-primary); text-underline-offset: 4px; }
.footer__contact li { display: flex; gap: 10px; align-items: flex-start; }
.footer__contact li + li { margin-top: 14px; }
.footer__contact .icon { width: 19px; height: 19px; color: var(--store-primary); margin-top: 3px; }
.footer__contact strong { display: block; color: var(--white); font-size: 15px; }
.footer .socials a { background: rgba(255, 255, 255, .06); width: 38px; height: 38px; }
.footer__bottom { border-top: 1px solid var(--line-dark); }
.footer__bottom-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; min-height: 64px; padding-block: 14px; font-size: 14px; }
.pay-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.pay-chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line-dark); border-radius: var(--radius); padding: 5px 10px; font-size: 12.5px; font-weight: 700; color: var(--on-dark); }
.pay-chip .icon { width: 16px; height: 16px; color: var(--store-primary); }

/* ==========================================================
   صفحة المكوّنات (للمراجعة فقط)
   ========================================================== */
.kit-options { position: relative; z-index: 60; background: #000; color: var(--white); font-size: 13.5px; }
.kit-options__inner { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; min-height: 50px; padding-block: 8px; }
.kit-options__group { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.kit-options button { padding: 4px 12px; border-radius: 3px; border: 1px solid rgba(255, 255, 255, .35); color: var(--white); font-size: 13px; }
.kit-options button[aria-pressed="true"] { background: var(--store-primary); color: var(--store-accent); border-color: var(--store-primary); font-weight: 800; }
.kit-hero { background: var(--gray-50); border-bottom: 1px solid var(--gray-200); padding-block: 36px; }
.kit-hero h1 { font-size: 30px; font-weight: 800; }
.kit-hero p { color: var(--gray-500); max-width: 720px; }
.kit-block { padding-block: 40px; border-bottom: 1px dashed var(--gray-300); }
.kit-label { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 800; color: var(--gray-500); margin-bottom: 20px; }
.kit-label::before { content: ""; width: 10px; height: 10px; background: var(--store-primary); }
.kit-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.kit-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.kit-swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.swatch { border: 1px solid var(--gray-200); border-radius: var(--radius); overflow: hidden; font-size: 12.5px; }
.swatch__color { height: 64px; }
.swatch__meta { padding: 8px 10px; }
.swatch__meta code { display: block; font-family: ui-monospace, monospace; font-size: 11.5px; color: var(--gray-500); direction: ltr; text-align: right; }
.kit-dark { background: var(--store-accent); padding: 28px; border-radius: var(--radius); }

/* ==========================================================
   العروض: 1440 ← 768 ← 390
   ========================================================== */
@media (max-width: 1199px) {
  .nav a { padding: 0 9px; font-size: 14.5px; }
  .header__inner { gap: 16px; }
  .header .btn { display: none; }
  .book-grid { --per-row: 3 !important; }
  .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .trust { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .trust__item:nth-child(3) { border-inline-start: 0; }
  .trust__item:nth-child(n+3) { border-top: 1px solid var(--gray-200); }
  .footer__main { grid-template-columns: 1fr 1fr; }
  .heading { font-size: 34px; }
}
@media (max-width: 991px) {
  .section { padding-block: 56px; }
  .nav, .cart-link__total { display: none; }
  .menu-toggle { display: grid; }
  .header__inner { min-height: 72px; gap: 8px; }
  .brand { margin-inline-end: auto; }
  .topbar .hide-md { display: none; }
  .steps, .posts { grid-template-columns: 1fr; max-width: 560px; margin-inline: auto; }
  .stat__num { font-size: 40px; }
  .newsletter__inner { grid-template-columns: 1fr; }
  .kit-cols { grid-template-columns: 1fr 1fr; }
  .scroller__track { --per-row: 3 !important; }
}
@media (max-width: 767px) {
  .section { padding-block: 44px; }
  .heading { font-size: 27px; }
  .section-head { margin-bottom: 24px; }
  .topbar__inner { justify-content: center; }
  .topbar .socials { display: none; }
  .brand__logo { width: 40px; height: 40px; }
  .brand__name { font-size: 20px; }
  .tool-btn { width: 40px; height: 40px; }
  .book-grid { --per-row: 2 !important; gap: 24px 14px; }
  .book-card__media { padding: 16px 16px 0; }
  .book-card__title { font-size: 15px; }
  .price__now { font-size: 16.5px; }
  .book-card .btn-square { width: 38px; height: 38px; }
  .cat-grid { grid-template-columns: 1fr 1fr; gap: 14px; }
  .cat-card__body { padding: 14px; }
  .cat-card__name { font-size: 17px; }
  .cat-card__text { display: none; }
  .trust { grid-template-columns: 1fr 1fr; }
  .trust__item { flex-direction: column; text-align: center; gap: 8px; padding: 16px 10px; }
  .trust__text { display: none; }
  .stats { grid-auto-flow: row; grid-template-columns: 1fr; }
  .stat + .stat { border-inline-start: 0; border-top: 1px solid var(--gray-200); }
  .stat { padding: 14px 0; text-align: center; }
  .marquee__item { font-size: 16px; }
  .marquee__group { min-height: 54px; gap: 28px; padding-inline-end: 28px; }
  .newsletter__title { font-size: 25px; }
  .newsletter__form { flex-direction: column; gap: 6px; }
  .newsletter__form input { min-height: 46px; }
  .footer__main { grid-template-columns: 1fr 1fr; gap: 32px 20px; padding-block: 44px 32px; }
  .footer__about, .footer__contact-col { grid-column: 1 / -1; }
  .footer__bottom-inner { justify-content: center; text-align: center; }
  .scroller__track { --per-row: 2 !important; gap: 14px; grid-auto-columns: calc((100% - 14px) / 2); }
  .kit-cols { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ==========================================================
   الرئيسيّة
   ========================================================== */
.hero { background: var(--store-accent); color: var(--on-dark); position: relative; overflow: hidden; }
.slider { position: relative; min-height: 600px; }
.slide { position: absolute; inset: 0; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: center; gap: 40px; opacity: 0; visibility: hidden; transition: opacity .6s var(--ease), visibility .6s; }
.slide.is-active { opacity: 1; visibility: visible; position: relative; }
.slide__body { padding-block: 72px; }
.hero .eyebrow { color: var(--on-dark); font-size: 15px; }
.hero__title { font-size: 58px; font-weight: 800; line-height: 1.12; color: var(--white); margin-bottom: 18px; text-wrap: balance; }
.hero__text { font-size: 18px; color: var(--on-dark-muted); max-width: 500px; margin-bottom: 30px; }
.hero__actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero__price { display: inline-flex; align-items: baseline; gap: 8px; margin-bottom: 26px; padding: 8px 16px; border-inline-start: 4px solid var(--store-primary); background: rgba(255, 255, 255, .06); }
.hero__price small { color: var(--on-dark-muted); font-size: 14px; font-weight: 700; }
.hero__price strong { color: var(--white); font-size: 26px; font-weight: 800; }
.hero__media { position: relative; height: 100%; min-height: 520px; }
.hero__block { position: absolute; inset-inline-start: 6%; top: 12%; width: 46%; height: 70%; background: var(--store-primary); }
.hero__cover { position: absolute; width: 44%; aspect-ratio: 2 / 3; object-fit: cover; box-shadow: 0 24px 48px rgba(0, 0, 0, .5); border-radius: 2px; }
.hero__cover--main { inset-inline-start: 22%; top: 18%; z-index: 2; }
.hero__cover--back { inset-inline-start: 52%; top: 8%; width: 34%; opacity: .85; }
.slide.is-active .hero__cover--main { animation: heroIn .8s var(--ease) both; }
@keyframes heroIn { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.slider__nav { position: absolute; bottom: 36px; inset-inline-start: var(--gutter); display: flex; align-items: center; gap: 14px; z-index: 5; }
.slider__dots { display: flex; gap: 8px; }
.slider__dot { width: 34px; height: 4px; background: var(--line-dark); transition: background .25s; }
.slider__dot.is-active { background: var(--store-primary); }
.slider__arrow { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--line-dark); border-radius: var(--radius); color: var(--white); }
.slider__arrow:hover { background: var(--store-primary); border-color: var(--store-primary); color: var(--store-accent); }
.slider__arrow .icon { width: 20px; height: 20px; }

/* عن الدار */
.about { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; align-items: center; }
.about__media { position: relative; padding-bottom: 40px; padding-inline-end: 40px; }
.about__media img { width: 100%; aspect-ratio: 5 / 6; object-fit: cover; border-radius: var(--radius); }
.about__call { position: absolute; bottom: 0; inset-inline-end: 0; background: var(--store-primary); color: var(--store-accent); padding: 22px 26px; display: flex; align-items: center; gap: 14px; border-radius: var(--radius); max-width: 300px; }
.about__call .icon { width: 34px; height: 34px; flex: none; }
.about__call small { display: block; font-weight: 700; font-size: 14px; }
.about__call strong { font-size: 22px; font-weight: 800; direction: ltr; display: inline-block; }
.about__text { font-size: 16.5px; color: var(--gray-500); margin: 18px 0 22px; }
.about__points { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 20px; margin-bottom: 30px; }
.about__points li { display: flex; gap: 10px; font-weight: 700; }
.about__points .icon { width: 22px; height: 22px; color: var(--store-accent); background: var(--store-primary); border-radius: var(--radius); padding: 3px; stroke-width: 2.6; }

/* البانر العريض */
.banner-wide { display: block; border-radius: var(--radius); overflow: hidden; }
.banner-wide img { width: 100%; height: auto; }

/* المؤلّفون */
.author-card { display: block; }
.author-card__media { position: relative; overflow: hidden; border-radius: var(--radius); }
.author-card__media img { width: 100%; aspect-ratio: 1; object-fit: cover; filter: grayscale(1); transition: filter .3s var(--ease), transform .4s var(--ease); }
.author-card:hover .author-card__media img { filter: none; transform: scale(1.04); }
.author-card__count { position: absolute; bottom: 0; inset-inline-start: 0; background: var(--store-primary); color: var(--store-accent); font-size: 13px; font-weight: 800; padding: 6px 12px; }
.author-card__name { display: block; font-size: 17px; font-weight: 800; margin-top: 12px; }
.author-card__role { font-size: 13.5px; color: var(--gray-500); }
.scroller--authors .scroller__track { --per-row: 5; }

@media (max-width: 1199px) {
  .hero__title { font-size: 46px; }
  .about { gap: 40px; }
  .scroller--authors .scroller__track { --per-row: 4; }
}
@media (max-width: 991px) {
  .slider { min-height: 0; }
  .slide { grid-template-columns: 1fr; gap: 0; }
  .slide__body { padding-block: 48px 8px; }
  .hero__media { min-height: 380px; }
  .hero__cover--main { width: 36%; inset-inline-start: 30%; top: 10%; }
  .hero__cover--back { width: 28%; top: 4%; inset-inline-start: 58%; }
  .hero__block { width: 40%; inset-inline-start: 14%; top: 6%; height: 76%; }
  .slider__nav { position: static; padding: 0 0 32px; }
  .about { grid-template-columns: 1fr; }
  .about__media { max-width: 520px; }
  .scroller--authors .scroller__track { --per-row: 3; }
}
@media (max-width: 767px) {
  .hero__title { font-size: 33px; }
  .hero__text { font-size: 16px; margin-bottom: 22px; }
  .hero__actions .btn { flex: 1; padding: 0 1em; }
  .hero__media { min-height: 300px; }
  .about__points { grid-template-columns: 1fr; }
  .about__call { padding: 16px 18px; }
  .about__call strong { font-size: 19px; }
  .scroller--authors .scroller__track { --per-row: 2; grid-auto-columns: calc((100% - 14px) / 2); }
}

/* ==========================================================
   رأس الصفحات الداخليّة: شريط داكن بعنوان ضخم ومسار تصفّح
   ========================================================== */
.page-hero { background: var(--store-accent); color: var(--on-dark); padding-block: 44px 48px; position: relative; overflow: hidden; }
.page-hero::after { content: ""; position: absolute; inset-inline-start: 0; bottom: 0; width: 220px; height: 6px; background: var(--store-primary); }
.breadcrumb ol { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14px; color: var(--on-dark-muted); margin-bottom: 14px; }
.breadcrumb li { display: inline-flex; align-items: center; gap: 8px; }
.breadcrumb li + li::before { content: "/"; color: var(--store-primary); }
.breadcrumb a:hover { color: var(--white); }
.breadcrumb [aria-current] { color: var(--store-primary); font-weight: 700; }
.page-hero__title { font-size: 46px; font-weight: 800; line-height: 1.15; color: var(--white); }
.page-hero__title small { font-size: 16px; font-weight: 500; color: var(--on-dark-muted); margin-inline-start: 10px; }
.page-hero__row { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border: 1px solid var(--gray-200); border-radius: var(--radius); font-size: 14px; font-weight: 700; background: var(--white); }
.chip:hover { border-color: var(--store-accent); }
.chip.is-active { background: var(--store-primary); border-color: var(--store-primary); color: var(--store-accent); }
.page-hero .chip { background: transparent; border-color: var(--line-dark); color: var(--on-dark); }
.page-hero .chip:hover { border-color: var(--store-primary); }
.page-hero .chip.is-active { background: var(--store-primary); border-color: var(--store-primary); color: var(--store-accent); }
.chip button { width: 18px; height: 18px; display: grid; place-items: center; }
.chip .icon { width: 12px; height: 12px; stroke-width: 2.6; }

/* ==========================================================
   صفحة التصنيف
   ========================================================== */
.shop-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 36px; align-items: start; padding-block: 44px 72px; }
.filter-block { border: 1px solid var(--gray-200); border-radius: var(--radius); padding: 20px; }
.filter-block + .filter-block { margin-top: 16px; }
.filter-block h3 { font-size: 17px; font-weight: 800; margin-bottom: 14px; display: flex; align-items: center; gap: 10px; }
.filter-block h3::before { content: ""; width: 14px; height: 3px; background: var(--store-primary); }
.filter-list li + li { margin-top: 9px; }
.filter-list a { display: flex; justify-content: space-between; font-size: 15px; }
.filter-list a:hover { text-decoration: underline; }
.filter-list a.is-active { font-weight: 800; }
.filter-list .count { color: var(--gray-500); font-size: 13px; }
.check { display: flex; align-items: center; gap: 10px; font-size: 15px; cursor: pointer; }
.check input { appearance: none; -webkit-appearance: none; width: 20px; height: 20px; margin: 0; flex: none; border: 2px solid var(--gray-300); border-radius: 2px; display: grid; place-items: center; background: var(--white); cursor: pointer; }
.check input:checked { background: var(--store-primary); border-color: var(--store-primary); }
.check input:checked::after { content: ""; width: 10px; height: 6px; border: 2.5px solid var(--store-accent); border-top: 0; border-inline-end: 0; transform: translateY(-1px) rotate(-45deg) scaleX(-1); }
.check .count { margin-inline-start: auto; color: var(--gray-500); font-size: 13px; }
.check .type-dot { position: static; width: 22px; height: 22px; box-shadow: none; }
.check .type-dot .icon { width: 12px; height: 12px; }
.price-range { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center; margin-bottom: 12px; }
.price-range .input { min-height: 44px; padding: 0 10px; text-align: center; }
.price-range span { color: var(--gray-500); font-size: 13px; }
.filters-actions { display: none; }
@media (min-width: 992px) {
  .drawer--filters { position: static; visibility: visible; overflow: visible; z-index: auto; }
  .drawer--filters .drawer__overlay, .drawer--filters .drawer__head { display: none; }
  .drawer--filters .drawer__panel { position: static; width: auto; transform: none; overflow: visible; background: transparent; color: inherit; }
}
@media (max-width: 991px) {
  .drawer--filters .drawer__panel { background: var(--white); color: var(--store-text); padding: 0 16px 16px; }
  .drawer--filters .drawer__head { margin-inline: -16px; margin-bottom: 16px; background: var(--store-accent); color: var(--white); }
  .drawer--filters .drawer__head h2 { font-size: 18px; font-weight: 800; }
  .filters-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; position: sticky; bottom: 0; background: var(--white); padding-top: 14px; margin-top: auto; }
}
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-bottom: 2px solid var(--store-accent); padding-bottom: 14px; margin-bottom: 24px; }
.toolbar__count { font-size: 14.5px; color: var(--gray-500); }
.toolbar__count strong { color: var(--store-text); }
.toolbar__tools { display: flex; align-items: center; gap: 10px; }
.toolbar .select { min-height: 44px; width: auto; padding: 0 12px; font-size: 14.5px; }
.view-toggle { display: flex; gap: 4px; }
.view-toggle button { width: 44px; height: 44px; border: 1px solid var(--gray-200); border-radius: var(--radius); display: grid; place-items: center; color: var(--gray-500); }
.view-toggle button[aria-pressed="true"] { background: var(--store-accent); border-color: var(--store-accent); color: var(--store-primary); }
.view-toggle .icon { width: 20px; height: 20px; }
.filters-btn { display: none; }
.active-filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 22px; }
.active-filters__clear { font-weight: 800; font-size: 14px; border-bottom: 2px solid var(--store-primary); }
.shop-grid { --per-row: 3 !important; margin-bottom: 40px; }
.shop-grid.is-list { grid-template-columns: 1fr; gap: 0 !important; }
.shop-grid.is-list .book-card { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 0 26px; padding-block: 22px; border-bottom: 1px solid var(--gray-200); }
.shop-grid.is-list .book-card__media { padding: 16px 16px 0; }
.shop-grid.is-list .book-card__desc { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; color: var(--gray-500); font-size: 15px; }
.shop-grid.is-list .book-card__title { font-size: 20px; min-height: 0; }
.shop-grid.is-list .book-card__foot { max-width: 360px; }

/* ==========================================================
   صفحة الكتاب
   ========================================================== */
.product { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) 320px; gap: 40px; align-items: start; padding-block: 48px; }
.product__stage { position: sticky; top: 108px; background: var(--gray-50); padding: 44px 40px 0; border-radius: var(--radius); overflow: hidden; }
.product__stage::before { content: ""; position: absolute; inset-inline-start: 0; top: 0; width: 46%; height: 70%; background: var(--store-primary); }
.product__stage .cover { position: relative; max-width: 320px; margin-inline: auto; box-shadow: 0 24px 44px rgba(0, 0, 0, .3); transform: translateY(12px); }
.product__stage .badge { top: 16px; inset-inline-start: auto; inset-inline-end: 16px; }
.product__stage .type-dot { width: 40px; height: 40px; }
.product__stage .type-dot .icon { width: 20px; height: 20px; }
.product__author { font-size: 15px; color: var(--gray-500); margin-bottom: 6px; }
.product__author a { color: var(--store-text); font-weight: 800; border-bottom: 2px solid var(--store-primary); }
.product__title { font-size: 38px; font-weight: 800; line-height: 1.2; margin-bottom: 14px; text-wrap: balance; }
.product__meta { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 20px; padding-bottom: 20px; border-bottom: 1px solid var(--gray-200); margin-bottom: 20px; font-size: 14.5px; }
.type-label { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; }
.type-label .type-dot { position: static; width: 26px; height: 26px; box-shadow: none; }
.type-label .type-dot .icon { width: 13px; height: 13px; }
.meta-chip { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; }
.meta-chip .icon { width: 18px; height: 18px; color: var(--gray-500); }
.product__lead { font-size: 17px; line-height: 1.85; margin-bottom: 24px; }
.spec-list { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid var(--gray-200); border-radius: var(--radius); margin-bottom: 26px; }
.spec-list div { display: flex; flex-direction: column; padding: 12px 16px; border-bottom: 1px solid var(--gray-200); }
.spec-list div:nth-child(odd) { border-inline-end: 1px solid var(--gray-200); }
.spec-list div:nth-last-child(-n+2) { border-bottom: 0; }
.spec-list dt { font-size: 13px; color: var(--gray-500); }
.spec-list dd { margin: 0; font-weight: 800; font-size: 15px; }
.formats h3 { font-size: 16px; font-weight: 800; margin-bottom: 12px; }
.formats__list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.format { display: flex; align-items: center; gap: 10px; padding: 12px; border: 2px solid var(--gray-200); border-radius: var(--radius); min-width: 0; }
.format:hover { border-color: var(--store-accent); }
.format.is-current { border-color: var(--store-primary); background: var(--gray-50); }
.format .type-dot { position: static; width: 30px; height: 30px; box-shadow: none; flex: none; }
.format .type-dot .icon { width: 15px; height: 15px; }
.format__text strong { display: block; font-size: 14px; }
.format__text span { font-size: 13px; color: var(--gray-500); }

.buybox { position: sticky; top: 108px; background: var(--store-accent); color: var(--on-dark); border-radius: var(--radius); padding: 26px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.buybox .price__now { font-size: 34px; color: var(--white); }
.buybox .price--sale .price__now { color: var(--store-primary); }
.buybox .price__old { color: var(--on-dark-muted); font-size: 16px; }
.save-note { font-size: 14px; font-weight: 800; color: var(--store-primary); }
.stock { display: flex; align-items: center; gap: 8px; font-size: 14.5px; font-weight: 700; }
.stock::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: #4CAF50; }
.stock--low::before { background: #FF9800; }
.stock--out::before { background: #EF5350; }
.buybox__row { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; }
.buybox .qty { border-color: var(--line-dark); background: rgba(255, 255, 255, .06); color: var(--white); }
.buybox .qty button:hover { background: rgba(255, 255, 255, .08); }
.buybox .qty button { width: 36px; }
.buybox .qty input { width: 34px; }
.buybox__row .btn { min-width: 0; padding-inline: .8em; }
.buybox .btn--outline { border-color: var(--on-dark); color: var(--on-dark); }
.buybox .btn--outline:hover { background: var(--white); color: var(--store-accent); }
.buybox .btn--dark { background: var(--white); color: var(--store-accent); }
.buybox .btn--dark:hover { background: var(--store-primary); }
.buybox__perks { display: grid; gap: 12px; padding-top: 16px; border-top: 1px solid var(--line-dark); font-size: 13.5px; }
.buybox__perks li { display: flex; gap: 10px; }
.buybox__perks .icon { width: 20px; height: 20px; color: var(--store-primary); margin-top: 2px; }
.buybox__perks strong { display: block; color: var(--white); font-size: 14.5px; }
.buybox__links { display: flex; justify-content: center; gap: 20px; font-size: 14px; }
.buybox__links button { display: inline-flex; align-items: center; gap: 6px; color: var(--on-dark-muted); }
.buybox__links button:hover { color: var(--white); }
.buybox__links .icon { width: 17px; height: 17px; }

.details { padding-block: 16px 56px; }
.details .tabs { border-bottom: 2px solid var(--store-accent); padding-bottom: 0; gap: 0; margin-bottom: 30px; }
.details .tab { border: 0; border-radius: 0; padding: 14px 24px; background: transparent; }
.details .tab.is-active { background: var(--store-accent); color: var(--store-primary); }
.prose { max-width: 820px; font-size: 17px; line-height: 1.95; }
.prose p + p { margin-top: 14px; }
.prose h3 { font-size: 21px; font-weight: 800; margin: 24px 0 8px; }
.spec-table { width: 100%; max-width: 820px; border-collapse: collapse; font-size: 15.5px; }
.spec-table th, .spec-table td { padding: 13px 18px; text-align: start; border: 1px solid var(--gray-200); }
.spec-table th { width: 34%; background: var(--gray-50); color: var(--gray-500); font-weight: 700; }
.spec-table td { font-weight: 800; }
.reviews-layout { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 32px; align-items: start; }
.rating-box { background: var(--store-accent); color: var(--on-dark); border-radius: var(--radius); padding: 26px; display: grid; gap: 14px; }
.rating-box__score { font-size: 60px; font-weight: 800; line-height: 1; color: var(--white); }
.rating-bars { display: grid; gap: 7px; font-size: 13.5px; }
.rating-bars__row { display: grid; grid-template-columns: 52px 1fr 30px; gap: 10px; align-items: center; }
.rating-bars__track { height: 6px; background: var(--line-dark); overflow: hidden; }
.rating-bars__fill { display: block; height: 100%; background: var(--store-primary); }
.reviews-list { display: grid; gap: 16px; }
.reviews-list .review-card { border: 1px solid var(--gray-200); }
.review-form { border: 1px solid var(--gray-200); border-radius: var(--radius); padding: 22px; display: grid; gap: 12px; }
.review-form h3 { font-size: 17px; font-weight: 800; }
.star-input { display: flex; gap: 4px; flex-direction: row-reverse; justify-content: flex-end; }
.star-input input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.star-input label { cursor: pointer; color: var(--gray-300); }
.star-input label .icon { width: 28px; height: 28px; }
.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-accent); }
.author-box { display: grid; grid-template-columns: 140px minmax(0, 1fr) auto; gap: 26px; align-items: center; border: 1px solid var(--gray-200); border-inline-start: 6px solid var(--store-primary); border-radius: var(--radius); padding: 24px; }
.author-box img { width: 140px; height: 140px; object-fit: cover; border-radius: var(--radius); filter: grayscale(1); }
.author-box h2 { font-size: 22px; font-weight: 800; margin-bottom: 6px; }
.author-box p { color: var(--gray-500); }
.sticky-buy { display: none; }

/* الكتاب الصوتيّ */
.sample-player { position: relative; display: flex; align-items: center; gap: 14px; margin-top: 30px; padding: 14px 16px; background: var(--store-accent); color: var(--on-dark); border-radius: var(--radius); }
.sample-player__btn { width: 48px; height: 48px; flex: none; border-radius: var(--radius); background: var(--store-primary); color: var(--store-accent); display: grid; place-items: center; }
.sample-player__btn .icon { width: 20px; height: 20px; }
.sample-player__btn .i-pause { display: none; }
.sample-player__btn[aria-pressed="true"] .i-play { display: none; }
.sample-player__btn[aria-pressed="true"] .i-pause { display: block; }
.sample-player__body { flex: 1; min-width: 0; }
.sample-player__label { font-size: 13px; font-weight: 800; color: var(--white); margin-bottom: 4px; }
.wave { display: flex; align-items: center; gap: 2px; height: 26px; }
.wave span { flex: 1; min-width: 2px; background: var(--line-dark); }
.wave span.is-played { background: var(--store-primary); }
.sample-player__time { font-size: 12.5px; color: var(--on-dark-muted); direction: ltr; font-variant-numeric: tabular-nums; }
.chapters { max-width: 820px; border: 1px solid var(--gray-200); border-radius: var(--radius); }
.chapters li { display: flex; align-items: center; gap: 14px; padding: 13px 18px; }
.chapters li + li { border-top: 1px solid var(--gray-200); }
.chapters__num { width: 32px; height: 32px; flex: none; display: grid; place-items: center; background: var(--store-accent); color: var(--store-primary); font-weight: 800; font-size: 13px; border-radius: var(--radius); }
.chapters__title { flex: 1; min-width: 0; font-weight: 700; }
.chapters__free { font-size: 12px; font-weight: 800; background: var(--store-primary); color: var(--store-accent); padding: 2px 8px; border-radius: var(--radius); }
.chapters__lock { width: 16px; height: 16px; color: var(--gray-500); }
.chapters__time { color: var(--gray-500); font-size: 14px; font-variant-numeric: tabular-nums; }

/* الوسيلة التعليميّة */
.edu-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 22px; }
.edu-fact { display: flex; align-items: center; gap: 10px; padding: 12px; border: 1px solid var(--gray-200); border-radius: var(--radius); min-width: 0; }
.edu-fact__icon { width: 38px; height: 38px; flex: none; display: grid; place-items: center; background: var(--type-edu); color: var(--white); border-radius: var(--radius); }
.edu-fact__icon .icon { width: 20px; height: 20px; }
.edu-fact small { display: block; font-size: 12.5px; color: var(--gray-500); }
.edu-fact strong { font-size: 15px; font-weight: 800; white-space: nowrap; }
.skills { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.safety-note { display: flex; gap: 10px; padding: 12px 14px; background: #FFF6D6; color: #5C4600; border-inline-start: 4px solid var(--store-primary); font-size: 14px; margin-bottom: 24px; }
.safety-note .icon { width: 20px; height: 20px; flex: none; margin-top: 2px; }

/* ==========================================================
   صفحة المؤلّف
   ========================================================== */
.author-hero__inner { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 40px; align-items: center; }
.author-hero__photo { position: relative; }
.author-hero__photo::before { content: ""; position: absolute; inset: 14px -14px -14px 14px; background: var(--store-primary); }
.author-hero__photo img { position: relative; width: 220px; height: 220px; object-fit: cover; border-radius: var(--radius); }
.author-hero__bio { font-size: 17px; color: var(--on-dark-muted); max-width: 720px; margin: 12px 0 18px; }
.author-stats { display: flex; flex-wrap: wrap; gap: 10px; }
.author-stat { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border: 1px solid var(--line-dark); border-radius: var(--radius); font-size: 14.5px; color: var(--on-dark); }
.author-stat strong { color: var(--store-primary); font-weight: 800; }
.author-stat > .icon { width: 17px; height: 17px; color: var(--store-primary); }

/* ==========================================================
   السلّة
   ========================================================== */
.cart-steps { display: flex; gap: 0; margin-bottom: 30px; counter-reset: cs; }
.cart-steps li { flex: 1; display: flex; align-items: center; gap: 10px; padding: 14px 16px; border: 1px solid var(--gray-200); font-weight: 800; font-size: 15px; color: var(--gray-500); }
.cart-steps li + li { border-inline-start: 0; }
.cart-steps__num { font-size: 22px; font-weight: 800; color: transparent; -webkit-text-stroke: 1.2px var(--gray-500); }
.cart-steps .is-current { background: var(--store-accent); border-color: var(--store-accent); color: var(--white); }
.cart-steps .is-current .cart-steps__num { -webkit-text-stroke-color: var(--store-primary); }
.cart-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 32px; align-items: start; padding-block: 44px 72px; }
.cart-table { width: 100%; border-collapse: collapse; }
.cart-table thead th { background: var(--store-accent); color: var(--white); text-align: start; font-size: 14px; font-weight: 800; padding: 13px 14px; white-space: nowrap; }
.cart-table td { padding: 18px 14px; border-bottom: 1px solid var(--gray-200); vertical-align: middle; }
.cart-item__product { display: flex; align-items: center; gap: 16px; }
.cart-item__product .cover { width: 74px; flex: none; }
.cart-item__product .type-dot { width: 22px; height: 22px; top: 4px; inset-inline-end: 4px; }
.cart-item__product .type-dot .icon { width: 12px; height: 12px; }
.cart-item__title { font-weight: 800; font-size: 16px; line-height: 1.4; }
.cart-item__author { font-size: 13.5px; color: var(--gray-500); }
.cart-item__type { display: inline-block; margin-top: 4px; font-size: 12px; font-weight: 800; padding: 2px 8px; border-radius: var(--radius); color: var(--white); }
.cart-item__type--paper { background: #A9503A; }
.cart-item__type--ebook { background: var(--type-ebook); }
.cart-item__type--audio { background: #7C4F95; }
.cart-item__type--edu { background: #2D6B4F; }
.cart-item__total { font-weight: 800; font-size: 16.5px; white-space: nowrap; }
.cart-item .qty { height: 44px; }
.cart-item .qty button { width: 34px; }
.cart-item .qty input { width: 32px; }
.qty-fixed { font-size: 13px; color: var(--gray-500); white-space: nowrap; }
.remove-btn { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--gray-200); border-radius: var(--radius); color: var(--gray-500); }
.remove-btn:hover { background: var(--sale); border-color: var(--sale); color: var(--white); }
.remove-btn .icon { width: 18px; height: 18px; }
.cart-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 22px; }
.coupon { display: flex; flex: 0 1 440px; border: 1px solid var(--gray-300); border-radius: var(--radius); overflow: hidden; }
.coupon input { flex: 1; min-width: 0; border: 0; outline: 0; padding: 0 16px; min-height: 50px; }
.coupon .btn { border-radius: 0; }
.cart-actions__links { display: flex; gap: 20px; font-size: 14.5px; font-weight: 800; }
.cart-actions__links a, .cart-actions__links button { display: inline-flex; align-items: center; gap: 6px; }
.cart-actions__links .icon { width: 17px; height: 17px; }
.link-danger { color: var(--sale); }
.summary { position: sticky; top: 108px; background: var(--store-accent); color: var(--on-dark); border-radius: var(--radius); padding: 26px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.summary h2 { font-size: 21px; font-weight: 800; color: var(--white); }
.ship-progress { border: 1px solid var(--line-dark); padding: 12px 14px; font-size: 14px; }
.ship-progress p { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.ship-progress .icon { width: 18px; height: 18px; color: var(--store-primary); }
.ship-progress strong { color: var(--store-primary); }
.ship-bar { height: 6px; background: var(--line-dark); }
.ship-bar span { display: block; height: 100%; background: var(--store-primary); }
.summary__rows { display: grid; gap: 11px; font-size: 15px; }
.summary__row { display: flex; justify-content: space-between; gap: 10px; }
.summary__row span:last-child { font-weight: 800; color: var(--white); white-space: nowrap; }
.summary__row--discount span:last-child { color: var(--store-primary); }
.summary__row--muted span:last-child { font-weight: 500; color: var(--on-dark-muted); font-size: 13.5px; }
.applied-coupon { display: inline-flex; align-items: center; gap: 4px; margin-inline-start: 8px; padding: 1px 4px 1px 8px; border: 1px dashed var(--store-primary); font-size: 12.5px; font-weight: 800; color: var(--store-primary); direction: ltr; }
.applied-coupon button { width: 18px; height: 18px; display: grid; place-items: center; color: var(--on-dark); }
.applied-coupon .icon { width: 12px; height: 12px; stroke-width: 2.6; }
.summary__total { display: flex; justify-content: space-between; align-items: baseline; padding-top: 16px; border-top: 1px solid var(--line-dark); }
.summary__total span { font-weight: 800; color: var(--white); }
.summary__total strong { font-size: 30px; font-weight: 800; color: var(--store-primary); }
.summary__note { display: flex; gap: 8px; font-size: 13.5px; color: var(--on-dark-muted); }
.summary__note .icon { width: 18px; height: 18px; flex: none; margin-top: 2px; color: var(--store-primary); }
.cart-empty { text-align: center; padding: 70px 20px; }
.cart-empty__icon { width: 110px; height: 110px; display: grid; place-items: center; margin: 0 auto 20px; background: var(--store-accent); color: var(--store-primary); border-radius: var(--radius); }
.cart-empty__icon .icon { width: 50px; height: 50px; stroke-width: 1.4; }
.cart-empty h2 { font-size: 26px; font-weight: 800; margin-bottom: 8px; }
.cart-empty p { color: var(--gray-500); margin-bottom: 22px; }

/* ==========================================================
   صفحة غير موجودة
   ========================================================== */
.notfound { background: var(--store-accent); color: var(--on-dark); }
.notfound__inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: center; padding-block: 72px; }
.notfound__code { font-size: 200px; font-weight: 800; line-height: .9; color: transparent; -webkit-text-stroke: 3px var(--store-primary); direction: ltr; text-align: center; }
.notfound__road { height: 10px; margin-top: 24px; background: repeating-linear-gradient(90deg, var(--store-primary) 0 44px, transparent 44px 70px); }
.notfound h1 { font-size: 42px; font-weight: 800; line-height: 1.2; color: var(--white); margin-bottom: 14px; }
.notfound__text { font-size: 17px; color: var(--on-dark-muted); margin-bottom: 24px; max-width: 480px; }
.notfound .searchbar__inner { padding: 0; margin-bottom: 18px; max-width: 520px; }
.notfound__actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }
.notfound .chip { background: transparent; border-color: var(--line-dark); color: var(--on-dark); }
.notfound .chip:hover { border-color: var(--store-primary); }

/* ==========================================================
   عروض الصفحات الداخليّة
   ========================================================== */
@media (max-width: 1199px) {
  .shop-layout { grid-template-columns: 240px minmax(0, 1fr); gap: 24px; }
  .shop-grid { --per-row: 2 !important; }
  .product { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); }
  .buybox { grid-column: 2; position: static; }
  .product__gallery { grid-row: span 2; }
  .cart-layout { grid-template-columns: minmax(0, 1fr) 330px; }
}
@media (max-width: 991px) {
  .page-hero { padding-block: 32px 36px; }
  .page-hero__title { font-size: 34px; }
  .shop-layout { grid-template-columns: minmax(0, 1fr); padding-top: 28px; }
  .filters-btn { display: inline-flex; }
  .shop-grid { --per-row: 3 !important; }
  .product { grid-template-columns: minmax(0, 1fr); gap: 28px; padding-top: 28px; }
  .product__gallery { grid-row: auto; }
  .product__stage { position: relative; top: 0; }
  .product__stage .cover { max-width: 240px; }
  .buybox { grid-column: auto; }
  .reviews-layout { grid-template-columns: 1fr; }
  .author-hero__inner { grid-template-columns: 160px minmax(0, 1fr); gap: 28px; }
  .author-hero__photo img { width: 160px; height: 160px; }
  .cart-layout { grid-template-columns: minmax(0, 1fr); }
  .summary { position: static; }
  .notfound__inner { grid-template-columns: minmax(0, 1fr); text-align: center; gap: 28px; }
  .notfound__code { font-size: 140px; }
  .notfound__text, .notfound .searchbar__inner { margin-inline: auto; }
  .notfound__actions, .notfound .chips { justify-content: center; }
}
@media (max-width: 767px) {
  .page-hero__title { font-size: 28px; }
  .page-hero .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; max-width: 100%; }
  .page-hero .chips::-webkit-scrollbar { display: none; }
  .chip { white-space: nowrap; }
  .shop-grid { --per-row: 2 !important; }
  .toolbar__count { width: 100%; order: 3; font-size: 13.5px; }
  .toolbar__tools { width: 100%; }
  .toolbar .select { flex: 1; min-width: 0; }
  .view-toggle { display: none; }
  .product__title { font-size: 27px; }
  .product__stage { padding: 30px 24px 0; }
  .product__stage .cover { max-width: 190px; }
  .spec-list { grid-template-columns: 1fr; }
  .spec-list div:nth-child(odd) { border-inline-end: 0; }
  .spec-list div:nth-last-child(2) { border-bottom: 1px solid var(--gray-200); }
  .formats__list { grid-template-columns: 1fr; }
  .format__text { display: flex; justify-content: space-between; align-items: baseline; flex: 1; gap: 8px; }
  .details .tab { padding: 12px 14px; font-size: 14px; }
  .spec-table th { width: 42%; }
  .author-box { grid-template-columns: 80px minmax(0, 1fr); padding: 18px; gap: 16px; }
  .author-box img { width: 80px; height: 80px; }
  .author-box .btn { grid-column: 1 / -1; }
  .edu-facts { grid-template-columns: 1fr 1fr; }
  .edu-fact:last-child { grid-column: 1 / -1; }
  .sticky-buy { display: flex; align-items: center; gap: 12px; position: fixed; inset-inline: 0; bottom: 0; z-index: 60; background: var(--store-accent); padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); }
  .sticky-buy .price__now { color: var(--white); font-size: 18px; }
  .sticky-buy .price--sale .price__now { color: var(--store-primary); }
  .sticky-buy .price__old { color: var(--on-dark-muted); }
  .sticky-buy .btn { flex: 1; min-height: 46px; }
  .sticky-buy .btn--outline { flex: none; border-color: var(--on-dark); color: var(--on-dark); }
  body.has-sticky-buy { padding-bottom: 70px; }
  .author-hero__inner { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .author-hero__photo img { width: 140px; height: 140px; }
  .author-stats { justify-content: center; }
  .cart-steps li { padding: 10px; font-size: 13px; gap: 6px; }
  .cart-steps__num { font-size: 18px; }
  .cart-table thead, .cart-table td.col-price { display: none; }
  .cart-table, .cart-table tbody { display: block; }
  .cart-table tr.cart-item { display: grid; grid-template-columns: 74px minmax(0, 1fr) auto; grid-template-areas: "cov info rm" "cov qty total"; column-gap: 14px; row-gap: 10px; padding: 16px 0; border-bottom: 1px solid var(--gray-200); }
  .cart-table td { padding: 0; border: 0; }
  .cart-table td.col-product, .cart-item__product { display: contents; }
  .cart-item__product .cover { grid-area: cov; }
  .cart-item__info { grid-area: info; }
  .cart-table td.col-qty { grid-area: qty; align-self: end; }
  .cart-table td.col-total { grid-area: total; align-self: end; text-align: end; }
  .cart-table td.col-remove { grid-area: rm; }
  .cart-actions { flex-direction: column; align-items: stretch; }
  .coupon { flex-basis: auto; width: 100%; }
  .coupon .btn, .searchbar__inner .btn { padding: 0 1.1em; }
  .searchbar__inner { min-width: 0; }
  .cart-actions__links { justify-content: space-between; }
  .notfound__code { font-size: 110px; }
  .notfound h1 { font-size: 28px; }
}
.breadcrumb--light ol { color: var(--gray-500); margin-bottom: 0; }
.breadcrumb--light a:hover { color: var(--store-text); }
.breadcrumb--light [aria-current] { color: var(--store-text); }

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

/* ==== ميزات المنصّة (الملحق 8) ==== */
/* باقات الكتب والمقالات: قواعد القالب كما سُلِّم، مع تعديل الأغلفة لتكون هي bundle.items */
.bundles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; align-items: stretch; }
.bundle { display: flex; flex-direction: column; border: 1px solid var(--gray-200); border-radius: var(--radius); background: var(--white); padding: 30px 28px; transition: border-color .2s; }
.bundle:hover { border-color: var(--store-accent); }
.bundle:nth-child(2) { background: var(--store-accent); color: var(--on-dark); border-color: var(--store-accent); }
.bundle__name { font-size: 22px; font-weight: 800; }
.bundle__covers { display: flex; margin: 18px 0; }
.bundle__covers img { width: 64px; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 2px; box-shadow: 0 6px 14px rgba(0, 0, 0, .25); border: 2px solid var(--white); }
.bundle__covers img + img { margin-inline-start: -18px; }
.bundle__price { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; padding-bottom: 18px; border-bottom: 1px solid var(--gray-200); margin-bottom: 18px; }
.bundle:nth-child(2) .bundle__price { border-color: var(--line-dark); }
.bundle__price strong { font-size: 40px; font-weight: 800; line-height: 1; }
.bundle__price s { color: var(--gray-500); font-size: 15px; }
.bundle:nth-child(2) .bundle__price s { color: var(--on-dark-muted); }
.bundle__save { font-size: 13px; font-weight: 800; color: var(--sale); }
.bundle:nth-child(2) .bundle__save { color: var(--store-primary); }
.bundle .btn { margin-top: auto; }
.posts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.post { display: flex; flex-direction: column; }
.post__media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; border-radius: var(--radius); background: var(--gray-100); }
.post__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--ease); }
.post:hover .post__media img { transform: scale(1.04); }
.post__date { position: absolute; bottom: 0; inset-inline-start: 0; background: var(--store-primary); color: var(--store-accent); padding: 8px 14px; font-size: 13px; font-weight: 800; }
.post__body { padding-top: 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.post__title { font-size: 19px; font-weight: 800; line-height: 1.4; }
.post__title a:hover { text-decoration: underline; text-decoration-color: var(--store-primary); text-underline-offset: 4px; }
.post__excerpt { color: var(--gray-500); font-size: 15px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.post .link-arrow { margin-top: 6px; align-self: flex-start; }
.bundle__covers img { width: 84px; height: auto; }
.bundle__covers img + img { margin-inline-start: -22px; }
.bundle .btn { margin-top: auto; }
.bundle__price { margin-bottom: 22px; }
.blog-section { padding-block: 56px 72px; }
.blog-section .posts { row-gap: 40px; }
.blog-related { padding-block: 56px 72px; background: var(--gray-50); }
.post-crumbs { padding-top: 28px; }
.post-page { padding-top: 12px; }
.post-figure, .post-media { border-radius: var(--radius); }
.post-back, .post-date { color: var(--gray-500); }
.bundle:nth-child(2) .btn--dark { background: var(--store-primary); color: var(--store-accent); }
.post-page-title { font-size: clamp(28px, 3.4vw, 42px); }
.post-header .post-date { font-weight: 700; }
@media (max-width: 991px) { .bundles, .posts { grid-template-columns: 1fr; max-width: 560px; margin-inline: auto; } }

/* الأسئلة الشائعة */
.faq-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 40px; align-items: start; }
.faq-grid .section-head { margin-bottom: 0; }
.faq-list { border-top: 1px solid var(--gray-200); }
.faq-item { border-bottom: 1px solid var(--gray-200); }
.faq-q { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 0; cursor: pointer; font-size: 18px; font-weight: 800; list-style: none; }
.faq-q::-webkit-details-marker { display: none; }
.faq-q .icon { flex: none; width: 30px; height: 30px; padding: 6px; border-radius: var(--radius); background: var(--store-primary); color: var(--store-accent); stroke-width: 2.4; }
.faq-q .icon use { transform-origin: 12px 12px; transition: transform .25s var(--ease); }
.faq-item[open] .faq-q .icon use { transform: rotate(45deg); }
.faq-a { padding: 0 0 20px; color: var(--gray-500); font-size: 15.5px; line-height: 1.85; max-width: 640px; }
@media (max-width: 991px) { .faq-grid { grid-template-columns: 1fr; gap: 20px; } }
/* صفحة المقال */
.post-page { padding: 8px 0 24px; }
.post-article { max-width: 760px; margin-inline: auto; }
.post-header { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin-bottom: 20px; }
.post-back { font-size: .88rem; font-weight: 700; color: var(--store-text); text-decoration: none; }
.post-back::before { content: "→ "; }
.post-page-title { margin: 0; font-size: clamp(1.5rem, 3.2vw, 2.2rem); line-height: 1.4; font-weight: 800; color: var(--store-text); }
.post-figure { margin: 0 0 24px; border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 9; background: var(--line); }
.post-figure img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-content { font-size: 1.02rem; line-height: 2; color: var(--store-text); }
.post-content p { margin: 0 0 1.1em; }

/* تبويبات صفّ الكتب (القاعدة 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; }

/* ==========================================================
   الإصدار الثاني: أدوات البطاقة، والعروض، والأكثر طلبًا، والبانر المقسوم
   ========================================================== */
/* أدوات البطاقة: المفضّلة والنظرة السريعة تطفوان فوق الغلاف ولا تحجزان مكانًا */
.card-tools { position: absolute; bottom: 14px; inset-inline-start: 14px; z-index: 3; display: flex; flex-direction: column; gap: 8px; opacity: 0; transform: translateY(6px); transition: opacity .2s var(--ease), transform .2s var(--ease); }
.book-card:hover .card-tools, .book-card:focus-within .card-tools { opacity: 1; transform: none; }
@media (hover: none) { .card-tools { opacity: 1; transform: none; } }
.tool-dot { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--white); color: var(--store-text); box-shadow: 0 2px 8px rgba(0, 0, 0, .14); transition: background .2s var(--ease), color .2s var(--ease); }
.tool-dot:hover { background: var(--store-accent); color: var(--store-primary); }
.tool-dot .icon { width: 18px; height: 18px; }
.tool-dot--lg { width: 52px; height: 52px; border-radius: var(--radius); box-shadow: none; border: 2px solid var(--line-dark); background: transparent; color: var(--on-dark); }
.card-tools .wish-btn { position: static; opacity: 1; transform: none; }
.rating__count { font-size: 12.5px; color: var(--gray-500); font-weight: 700; }
.book-card__meta { flex-wrap: wrap; row-gap: 2px; }
.book-card__author { min-width: 0; }

/* شريطٌ بلون الهويّة (عرض الأسبوع) */
.section--signal { background: var(--store-primary); color: var(--store-accent); }
.deal-zone__grid { display: flex; gap: 28px; align-items: stretch; }
.deal { flex: 1.45 1 0; min-width: 0; background: var(--store-accent); color: var(--on-dark); border-radius: var(--radius); padding: 32px; display: flex; flex-direction: column; gap: 22px; }
.deal__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.deal__kicker { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 800; color: var(--store-primary); }
.deal__kicker .icon { width: 18px; height: 18px; fill: currentColor; stroke: none; }
.deal__heading { font-size: 34px; font-weight: 800; color: var(--white); line-height: 1.2; order: -1; }
.deal [data-slot="section.items"] { flex: 1; display: flex; align-items: center; }
.deal-book { flex: 1; display: grid; grid-template-columns: minmax(0, 250px) minmax(0, 1fr); gap: 32px; align-items: center; }
.deal-book__media { position: relative; }
.deal-book__media .cover { box-shadow: 0 22px 40px rgba(0, 0, 0, .55); outline: 6px solid var(--store-primary); outline-offset: 0; }
.deal-book__body { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.deal-book .book-card__author { color: var(--on-dark-muted); }
.deal-book__title { font-size: 30px; font-weight: 800; line-height: 1.25; color: var(--white); }
.deal-book .rating, .deal-book .rating__count { color: var(--on-dark-muted); }
.deal-book__desc { color: var(--on-dark-muted); font-size: 15.5px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.deal-book .price__now { font-size: 30px; color: var(--store-primary); }
.deal-book .price__old { color: var(--on-dark-muted); font-size: 16px; }
.deal-book__actions { display: flex; gap: 10px; margin-top: 6px; }
.countdown { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.countdown[hidden] { display: none; }
.countdown__label { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 800; color: var(--on-dark-muted); margin-inline-end: 4px; }
.countdown__label .icon { width: 17px; height: 17px; color: var(--store-primary); }
.countdown__unit { min-width: 58px; padding: 7px 6px 5px; border: 1px solid var(--line-dark); border-top: 3px solid var(--store-primary); border-radius: var(--radius); text-align: center; line-height: 1.1; }
.countdown__unit b { display: block; font-size: 24px; font-weight: 800; color: var(--white); font-variant-numeric: tabular-nums; }
.countdown__unit small { font-size: 12px; font-weight: 700; color: var(--on-dark-muted); }

/* الأكثر طلبًا: قائمةٌ مرقّمة مدمجة */
.top-list { flex: 1 1 0; min-width: 0; background: var(--white); color: var(--store-text); border-radius: var(--radius); padding: 26px 26px 14px; display: flex; flex-direction: column; }
.top-list__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 14px; border-bottom: 3px solid var(--store-accent); }
.top-list__heading { font-size: 24px; font-weight: 800; }
.top-list__items { display: flex; flex-direction: column; flex: 1; justify-content: space-between; }
.book-row--ranked { border: 0; border-bottom: 1px solid var(--gray-200); border-radius: 0; padding: 12px 0; align-items: center; gap: 14px; }
.book-row--ranked:last-child { border-bottom: 0; }
.book-row--ranked:hover { border-color: var(--gray-200); }
.book-row--ranked .cover { width: 62px; }
.book-row--ranked .type-dot { width: 20px; height: 20px; top: 3px; inset-inline-end: 3px; }
.book-row__rank { flex: none; width: 46px; font-size: 34px; font-weight: 800; line-height: 1; color: transparent; -webkit-text-stroke: 1.5px var(--store-accent); font-variant-numeric: tabular-nums; }
.book-row--ranked .book-card__title { font-size: 15.5px; -webkit-line-clamp: 1; }
.book-row--ranked .book-card__author { font-size: 13px; }
.book-row--ranked .rating { font-size: 12px; }
.book-row--ranked .stars .icon { width: 13px; height: 13px; }
.book-row--ranked .book-row__foot { margin-top: 4px; }

/* البانر المقسوم: الصورة في خانتها والنصّ بجانبها لا فوقها */
.banner-zone { padding-bottom: 72px; }
.banner-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: stretch; background: var(--store-accent); color: var(--on-dark); border-radius: var(--radius); overflow: hidden; }
.banner-split__media { display: block; background: var(--store-primary); }
.banner-split__media img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 800 / 520; }
.banner-split__body { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 12px; padding: 40px 48px; border-inline-start: 6px solid var(--store-primary); }
.banner-split__kicker { font-size: 15px; font-weight: 800; color: var(--store-primary); }
.banner-split__title { font-size: 38px; font-weight: 800; line-height: 1.2; color: var(--white); text-wrap: balance; }
.banner-split__text { font-size: 17px; color: var(--on-dark-muted); max-width: 440px; }
.banner-split .btn { margin-top: 10px; }
.banner-split:hover .btn--primary { background: var(--store-primary-dark); }

/* المؤلّفون على شريطٍ داكن */
.authors-band .author-card__name { color: var(--white); }
.authors-band .author-card__role { color: var(--on-dark-muted); }
.authors-band .scroller-nav button { border-color: var(--line-dark); color: var(--on-dark); }
.authors-band .scroller-nav button:hover { background: var(--store-primary); border-color: var(--store-primary); color: var(--store-accent); }
.authors-band .scroller-nav button:disabled { background: transparent; color: var(--on-dark); border-color: var(--line-dark); }

/* بطاقة المساعدة بجانب الأسئلة الشائعة */
.faq-aside { display: flex; flex-direction: column; gap: 28px; }
.faq-help { position: relative; background: var(--store-accent); color: var(--on-dark); border-radius: var(--radius); padding: 28px; border-bottom: 5px solid var(--store-primary); }
.faq-help__icon { width: 52px; height: 52px; display: grid; place-items: center; background: var(--store-primary); color: var(--store-accent); border-radius: var(--radius); margin-bottom: 16px; }
.faq-help__icon .icon { width: 26px; height: 26px; }
.faq-help__title { font-size: 21px; font-weight: 800; color: var(--white); }
.faq-help__text { color: var(--on-dark-muted); font-size: 15px; margin: 6px 0 18px; }
.faq-help__links { display: flex; gap: 8px; flex-wrap: wrap; }
.faq-help .btn--outline { border-color: var(--on-dark); color: var(--on-dark); }
.faq-help .btn--outline:hover { background: var(--white); color: var(--store-accent); }

/* النشرة: سطر القسيمة الترحيبيّة */
.newsletter__offer { display: inline-flex; align-items: center; gap: 8px; margin-top: 10px; padding: 4px 12px; background: var(--store-accent); color: var(--store-primary); font-weight: 800; font-size: 14px; border-radius: var(--radius); }
.newsletter__offer:empty { display: none; }

/* صور التصنيفات مشاهد تملأ خانتها */
.cat-card__media img { width: 100%; height: 100%; aspect-ratio: auto; object-fit: cover; }
.section--after-trust { padding-top: 28px; }

/* معرض صفحة الكتاب: الغلاف الأماميّ والخلفيّ */
.product__thumbs { display: flex; gap: 10px; margin-top: 12px; }
.product__thumbs button { width: 64px; padding: 4px; border: 2px solid var(--gray-200); border-radius: var(--radius); background: var(--white); }
.product__thumbs button[aria-current="true"] { border-color: var(--store-accent); box-shadow: inset 0 -3px 0 var(--store-primary); }
.product__thumbs img { aspect-ratio: 2 / 3; object-fit: cover; width: 100%; }
.product__thumbs:not(:has([data-slot="book.cover_back"])) { display: none; }

.chips__children { display: contents; }

/* شاهدتَه مؤخّرًا */
.recent-section { padding-top: 0; }
.recent-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 1fr); gap: 16px; overflow-x: auto; scrollbar-width: none; }
.recent-row::-webkit-scrollbar { display: none; }
.recent-row .book-row { align-items: center; }
.recent-row .book-row .cover { width: 64px; }
[data-slot="recent.items"]:empty, .recent-section:has([data-slot="recent.items"]:empty) { display: none; }

/* أعمال المؤلّف في دوّار أفقيّ فلا يبقى صفٌّ ناقص */
.works-scroller .scroller__track { --per-row: 4; }

/* ---------- العروض الوسطى والهاتف ---------- */
@media (max-width: 1199px) {
  .deal-zone__grid { flex-direction: column; }
  .top-list__items { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 28px; }
  .book-row--ranked:nth-last-child(2) { border-bottom: 0; }
  .deal-book { grid-template-columns: minmax(0, 200px) minmax(0, 1fr); gap: 24px; }
  .deal-book__title { font-size: 26px; }
  .banner-split__title { font-size: 30px; }
  .banner-split__body { padding: 32px; }
}
@media (min-width: 768px) and (max-width: 991px) {
  .steps, .posts, .bundles { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: none; gap: 16px; }
  .step { padding: 22px 18px; }
  .step__num { font-size: 44px; }
  .step__icon { width: 42px; height: 42px; top: 22px; inset-inline-end: 18px; }
  .bundle { padding: 22px 18px; }
  .bundle__price strong { font-size: 28px; }
  .bundle__covers img { width: 64px; }
  .review-card { padding: 24px 20px 20px; }
  .post__title { font-size: 17px; }
  .about { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 32px; }
  .about__media { max-width: none; padding-inline-end: 20px; }
  .about__points { grid-template-columns: 1fr; }
}
@media (max-width: 767px) {
  .top-list__items { display: flex; }
  .book-row--ranked:nth-last-child(2) { border-bottom: 1px solid var(--gray-200); }
}
@media (max-width: 991px) {
  .deal { padding: 26px; }
  .works-scroller .scroller__track { --per-row: 3; }
}
@media (max-width: 767px) {
  /* صفوفٌ تُسحب أفقيًّا بدل أكوامٍ طويلة */
  .trust-section.section--tight { padding-block: 16px; }
  .trust, .cat-grid, .bundles, .posts, .steps { display: grid; grid-auto-flow: column; grid-template-columns: none; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; max-width: none; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); scroll-padding-inline: var(--gutter); }
  .trust::-webkit-scrollbar, .cat-grid::-webkit-scrollbar, .bundles::-webkit-scrollbar, .posts::-webkit-scrollbar, .steps::-webkit-scrollbar { display: none; }
  .trust > *, .cat-grid > *, .bundles > *, .posts > *, .steps > * { scroll-snap-align: start; }
  .trust { grid-auto-columns: 62%; border: 0; gap: 10px; }
  .trust__item, .trust__item + .trust__item { border: 1px solid var(--gray-200); flex-direction: row; text-align: start; padding: 12px; gap: 10px; }
  .trust__item:nth-child(n+3) { border-top: 1px solid var(--gray-200); }
  .trust__icon { width: 40px; height: 40px; }
  .trust__title { font-size: 14px; }
  .cat-grid { grid-auto-columns: 42%; gap: 12px; }
  .cat-card__body { padding: 10px 12px 12px; gap: 4px; }
  .cat-card__count { font-size: 12px; padding: 4px 10px; }
  .bundles { grid-auto-columns: 82%; gap: 14px; }
  .bundle { padding: 22px 20px; }
  .bundle__price strong { font-size: 30px; }
  .posts { grid-auto-columns: 84%; gap: 14px; }
  .blog-section .posts { grid-auto-flow: row; grid-template-columns: 1fr; overflow: visible; margin-inline: 0; padding-inline: 0; }
  .steps { grid-auto-columns: 80%; gap: 12px; }
  .step { padding: 20px 18px; }
  .step__num { font-size: 42px; margin-bottom: 10px; }
  .step__icon { top: 20px; inset-inline-end: 18px; width: 44px; height: 44px; }
  .step__title { font-size: 18px; }
  .section-head .tabs { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; scrollbar-width: none; }
  .section-head .tabs .tab { white-space: nowrap; }
  .hero__media { min-height: 215px; }
  .section-head__lead { display: none; }
  .slide__body { padding-block: 32px 4px; }
  .hero__text { margin-bottom: 18px; }
  .hero__price { margin-bottom: 18px; }
  .about__media img { aspect-ratio: 4 / 3; }
  .about__media { padding-inline-end: 0; padding-bottom: 28px; }
  .about__call { inset-inline-end: 12px; }
  .deal { padding: 20px 16px; gap: 16px; }
  .deal__heading { font-size: 26px; }
  .deal-book { grid-template-columns: 112px minmax(0, 1fr); gap: 16px; align-items: start; }
  .deal-book__title { font-size: 20px; }
  .deal-book__desc { display: none; }
  .book-card__meta { flex-direction: column; align-items: flex-start; }
  .book-card__foot { padding-top: 0; }
  .book-card .btn-square { width: 40px; height: 40px; }
  .deal-book .price__now { font-size: 22px; }
  .deal-book__actions { width: 100%; }
  .deal-book__actions .btn { flex: 1; min-width: 0; padding: 0 .8em; min-height: 46px; font-size: 14px; }
  .tool-dot--lg { width: 46px; height: 46px; }
  .countdown { gap: 5px; }
  .countdown__label { width: 100%; }
  .countdown__unit { min-width: 0; flex: 1; padding: 5px 2px 4px; }
  .countdown__unit b { font-size: 18px; }
  .countdown__unit small { font-size: 11px; }
  .top-list { padding: 18px 16px 6px; }
  .book-row__rank { width: 34px; font-size: 26px; }
  .banner-split { grid-template-columns: 1fr; }
  .banner-split__body { padding: 22px 20px 26px; border-inline-start: 0; border-top: 5px solid var(--store-primary); }
  .banner-split__title { font-size: 24px; }
  .banner-split__text { font-size: 15px; }
  .banner-zone { padding-bottom: 44px; }
  .faq-help { padding: 22px; }
  .works-scroller .scroller__track { --per-row: 2; }
}

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