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

:root {
  /* ألوان الهويّة — قيم تجريبيّة يستبدلها الناشر */
  --store-primary: #96B416;
  --store-primary-dark: #5E730B;
  --store-accent: #F69946;
  --store-bg: #FFFFFF;
  --store-text: #222222;

  /* مشتقّة من الهويّة: أسطح هادئة */
  --tint-primary: color-mix(in srgb, var(--store-primary) 12%, var(--store-bg));
  --tint-accent: color-mix(in srgb, var(--store-accent) 14%, var(--store-bg));
  --tint-soft: color-mix(in srgb, var(--store-primary) 5%, var(--store-bg));

  /* محايدة ثابتة */
  --white: #FFFFFF;
  --gray-50: #F7F8F5;
  --gray-100: #F0F1EC;
  --gray-200: #E4E6DF;
  --gray-300: #D1D4CB;
  --gray-500: #62665D;
  --sale: #C62828;
  --star: #F2A900;

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

  --font: "Tajawal", system-ui, sans-serif;
  --container: 1320px;
  --gutter: 16px;
  --radius: 14px;
  --radius-sm: 10px;
  --pill: 999px;
  --shadow: 0 10px 28px rgba(40, 50, 20, .10);
  --ease: cubic-bezier(.2, .7, .3, 1);
}
body[data-corners="sharp"] { --radius: 2px; --radius-sm: 2px; --pill: 3px; }

/* ---------- أساسيّات ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 15.5px; 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-dark); outline-offset: 2px; }
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: 44px; }

/* ==========================================================
   العناوين: شارة برتقاليّة صغيرة فوق عنوان كبير
   ========================================================== */
.eyebrow { display: inline-block; background: var(--store-accent); color: var(--store-text); font-size: 12.5px; font-weight: 800; padding: 3px 12px; border-radius: var(--pill); margin-bottom: 8px; }
.heading { font-size: 28px; font-weight: 800; line-height: 1.25; text-wrap: balance; }
.heading mark { background: none; color: var(--store-primary-dark); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 24px; margin-bottom: 26px; flex-wrap: wrap; }
.section-head--center { flex-direction: column; align-items: center; text-align: center; }
.section-head--center .tabs { justify-content: center; }
.link-more { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-size: 14.5px; color: var(--store-text); }
.link-more:hover { color: var(--store-primary-dark); }
.link-more .icon { width: 16px; height: 16px; }

/* ==========================================================
   الأزرار
   ========================================================== */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; min-height: 48px; padding: 0 1.8em; border-radius: var(--pill); font-weight: 800; font-size: 15px; line-height: 1; 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-text); }
.btn--primary:hover { background: var(--store-primary-dark); color: var(--white); }
.btn--dark { background: var(--store-text); color: var(--white); }
.btn--dark:hover { background: var(--store-primary); color: var(--store-text); }
.btn--outline { border-color: var(--gray-300); color: var(--store-text); background: var(--white); }
.btn--outline:hover { border-color: var(--store-primary); }
.btn--light { background: var(--tint-primary); color: var(--store-text); }
.btn--light:hover { background: var(--store-primary); }
.btn--sm { min-height: 38px; padding: 0 1.1em; font-size: 14px; }
.btn--lg { min-height: 54px; padding: 0 2.2em; font-size: 16px; }
.btn--block { width: 100%; }
.btn[disabled] { background: var(--gray-200); color: var(--gray-500); cursor: not-allowed; border-color: transparent; }
.btn .icon { width: 18px; height: 18px; }

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

/* ==========================================================
   الرأس
   ========================================================== */
.topbar { background: var(--store-primary); color: var(--store-text); font-size: 13.5px; font-weight: 700; }
.topbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 38px; }
.topbar__list { display: flex; gap: 20px; }
.topbar__list a, .topbar__list span { display: inline-flex; align-items: center; gap: 6px; }
.topbar__list .icon { width: 15px; height: 15px; }

/* الرأس مثبّتٌ أعلى الشاشة؛ الشريط العلويّ فوقه يمرّ */
.header { position: sticky; top: 0; z-index: 50; background: var(--store-bg); }
#reviews { scroll-margin-top: 166px; }
@media (max-width: 991px) { #reviews { scroll-margin-top: 140px; } }
.header__main { display: flex; align-items: center; gap: 28px; padding-block: 22px; }
.brand { display: inline-flex; align-items: center; gap: 10px; flex: none; }
.brand__logo { width: 50px; height: 50px; object-fit: contain; }
.brand__name { font-size: 25px; font-weight: 800; }
.search { flex: 1; display: flex; align-items: center; height: 50px; border: 1px solid var(--gray-300); border-radius: var(--pill); background: var(--white); padding-inline-start: 6px; overflow: hidden; }
.search:focus-within { border-color: var(--store-primary); }
.search__select { border: 0; background: var(--gray-50); border-radius: var(--pill); padding: 0 14px; height: 38px; font-size: 14px; font-weight: 700; outline: 0; cursor: pointer; max-width: 160px; }
.search__input { flex: 1; min-width: 0; border: 0; outline: 0; padding: 0 16px; background: transparent; }
.search__input::placeholder { color: var(--gray-500); }
.search__btn { width: 44px; height: 38px; margin-inline-end: 6px; border-radius: var(--pill); display: grid; place-items: center; background: var(--store-primary); color: var(--store-text); flex: none; }
.search__btn:hover { background: var(--store-primary-dark); color: var(--white); }
.search__btn .icon { width: 20px; height: 20px; stroke-width: 2.2; }
.header__tools { display: flex; align-items: center; gap: 8px; flex: none; }
.tool { display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: var(--pill); font-size: 14px; font-weight: 700; }
.tool:hover { background: var(--gray-50); }
.tool__icon { position: relative; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--gray-50); }
.tool__icon .icon { width: 20px; height: 20px; }
.tool__count { position: absolute; top: -3px; inset-inline-end: -3px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; background: var(--store-accent); color: var(--store-text); font-size: 11px; font-weight: 800; line-height: 19px; text-align: center; border: 2px solid var(--store-bg); }
.tool__text small { display: block; font-size: 12px; color: var(--gray-500); font-weight: 500; line-height: 1.2; }
.menu-toggle { display: none; }

.navbar { border-block: 1px solid var(--gray-200); }
.navbar__inner { display: flex; align-items: stretch; gap: 26px; min-height: 54px; }
.departments { position: relative; width: 270px; flex: none; }
.departments__btn { width: 100%; height: 100%; min-height: 54px; display: flex; align-items: center; gap: 10px; padding: 0 18px; background: var(--store-primary); color: var(--store-text); font-weight: 800; border-radius: var(--radius-sm) var(--radius-sm) 0 0; }
.departments__btn .icon { width: 20px; height: 20px; }
.departments__btn .chev { margin-inline-start: auto; width: 16px; height: 16px; transition: transform .2s var(--ease); }
.departments__menu { position: absolute; inset-inline: 0; top: 100%; z-index: 40; background: var(--white); border: 1px solid var(--gray-200); border-top: 0; border-radius: 0 0 var(--radius-sm) var(--radius-sm); padding: 6px 0; opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .18s var(--ease), transform .18s var(--ease), visibility .18s; box-shadow: var(--shadow); }
.departments.is-open .departments__menu { opacity: 1; visibility: visible; transform: none; }
.departments.is-open .chev { transform: rotate(180deg); }
.departments__menu a { display: flex; align-items: center; gap: 12px; padding: 9px 18px; font-size: 14.5px; font-weight: 500; }
.departments__menu a:hover { background: var(--tint-soft); color: var(--store-primary-dark); font-weight: 700; }
.departments__menu .dot { width: 30px; height: 30px; border-radius: 50%; background: var(--tint-primary); display: grid; place-items: center; flex: none; }
.departments__menu .dot .icon { width: 16px; height: 16px; }
.departments__menu .count { margin-inline-start: auto; font-size: 12.5px; color: var(--gray-500); }
.navlinks { display: flex; align-items: center; gap: 2px; flex: 1; }
.navlinks a { padding: 7px 14px; border-radius: var(--pill); font-weight: 700; font-size: 15px; }
.navlinks a:hover, .navlinks a.is-active { background: var(--tint-primary); color: var(--store-primary-dark); }
.navbar__phone { display: flex; align-items: center; gap: 8px; font-weight: 800; white-space: nowrap; }
.navbar__phone .icon { width: 20px; height: 20px; color: var(--store-primary-dark); }

/* ==========================================================
   الدرج الجانبيّ
   ========================================================== */
.drawer { position: fixed; inset: 0; z-index: 100; visibility: hidden; overflow: hidden; }
.drawer__overlay { position: absolute; inset: 0; background: rgba(20, 24, 10, .5); 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(--white); 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: 16px; background: var(--tint-primary); }
.drawer__head .brand__logo { width: 40px; height: 40px; }
.drawer__head .brand__name { font-size: 20px; }
.drawer__close { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--white); }
.drawer__title { padding: 18px 16px 6px; font-size: 13px; font-weight: 800; color: var(--gray-500); }
.drawer__list a { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--gray-100); font-weight: 700; }
.drawer__list a:hover { background: var(--tint-soft); }
.drawer__list .icon { width: 16px; height: 16px; color: var(--gray-500); }
.drawer__foot { margin-top: auto; padding: 16px; display: grid; gap: 12px; background: var(--gray-50); font-size: 14.5px; }
.drawer__foot a { display: flex; align-items: center; gap: 8px; }
.drawer__foot .icon { width: 17px; height: 17px; color: var(--store-primary-dark); }
body.is-locked { overflow: hidden; }

/* ==========================================================
   بطاقة الكتاب
   ========================================================== */
.book-grid { display: grid; grid-template-columns: repeat(var(--per-row, 5), minmax(0, 1fr)); gap: 18px; }
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); border-radius: var(--radius); padding: 10px 10px 14px; transition: box-shadow .2s var(--ease); }
.book-card:hover { box-shadow: var(--shadow); }
.book-card__media { position: relative; display: block; background: var(--gray-50); border-radius: var(--radius-sm); padding: 18px 22px; }
.cover { position: relative; display: block; aspect-ratio: 2 / 3; overflow: hidden; border-radius: 4px; background: var(--gray-100); }
.cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s var(--ease); }
.book-card .cover { box-shadow: 0 10px 20px rgba(30, 40, 10, .18); }
.book-card:hover .cover img { transform: scale(1.04); }
.book-card__body { display: flex; flex-direction: column; gap: 3px; padding: 12px 4px 0; flex: 1; }
.book-card__author { font-size: 13px; color: var(--gray-500); }
.book-card__author:hover { color: var(--store-primary-dark); }
.book-card__title { font-size: 15.5px; 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 { color: var(--store-primary-dark); }
.book-card__desc { display: none; }
.book-card__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 4px; }
.book-card__buy { display: flex; align-items: center; gap: 6px; }

.type-dot { position: absolute; top: 8px; inset-inline-end: 8px; z-index: 2; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: var(--white); box-shadow: 0 2px 6px rgba(0, 0, 0, .22); }
.type-dot .icon { width: 15px; height: 15px; 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: 10px; inset-inline-start: 10px; z-index: 2; padding: 3px 10px; border-radius: var(--pill); font-size: 12px; font-weight: 800; line-height: 1.5; }
.badge--sale { background: var(--sale); color: var(--white); }
.badge--new { background: var(--store-accent); color: var(--store-text); }
.soldout { position: absolute; inset-inline: 10px; bottom: 10px; z-index: 2; background: rgba(255, 255, 255, .94); color: var(--store-text); text-align: center; font-weight: 800; font-size: 13.5px; padding: 6px 0; border-radius: var(--pill); }
.is-soldout .cover img { filter: grayscale(.9); opacity: .7; }

.price { display: flex; flex-direction: column; line-height: 1.25; }
.price__now { font-size: 17px; font-weight: 800; white-space: nowrap; }
.price__old { font-size: 12.5px; color: var(--gray-500); text-decoration: line-through; white-space: nowrap; }
.price--sale .price__now { color: var(--sale); }


/* المفضّلة والنظرة السريعة تطفوان فوق الغلاف ولا تحجزان مكانًا */
.card-tools { position: absolute; bottom: 10px; inset-inline-start: 10px; z-index: 3; display: flex; flex-direction: column; gap: 6px; opacity: 0; transform: translateY(4px); transition: opacity .2s var(--ease), transform .2s var(--ease); }
.wish-btn, .quick-btn { width: 36px; height: 36px; 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); }
.wish-btn:hover, .quick-btn:hover { background: var(--store-primary); }
.wish-btn .icon, .quick-btn .icon { width: 17px; height: 17px; }
.book-card:hover .card-tools, .book-card:focus-within .card-tools { opacity: 1; transform: none; }
@media (hover: none) { .card-tools { opacity: 1; transform: none; } }
[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); }
body[data-card-style="framed"] .book-card:hover { border-color: var(--store-primary); }
body[data-card-style="minimal"] .book-card { padding: 0; }
body[data-card-style="minimal"] .book-card:hover { box-shadow: none; }
body[data-card-style="minimal"] .book-card__media { background: transparent; padding: 0; }

/* البطاقة الأفقيّة */
.book-row { display: flex; gap: 14px; padding: 12px; border-radius: var(--radius); background: var(--white); border: 1px solid var(--gray-200); }
.book-row:hover { border-color: var(--store-primary); }
.book-row .cover { width: 76px; 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: 2px; min-width: 0; flex: 1; }
.book-row .book-card__title { min-height: 0; font-size: 15px; }
.book-row__foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.book-row .btn-cart { width: 36px; height: 36px; }

/* ==========================================================
   التقييم والآراء
   ========================================================== */
.rating { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--gray-500); }
.stars { display: inline-flex; gap: 1px; color: var(--gray-300); }
.stars .icon { width: 14px; height: 14px; }
.stars .is-on { color: var(--star); }
.stars--lg .icon { width: 20px; height: 20px; }
.review-card { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; gap: 12px; }
.review-card__text { font-size: 15px; line-height: 1.85; }
.review-card__who { display: flex; align-items: center; gap: 12px; margin-top: auto; }
.avatar { width: 46px; height: 46px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--tint-primary); color: var(--store-primary-dark); 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: 42px; height: 42px; padding: 0 6px; display: inline-grid; place-items: center; border-radius: 50%; font-weight: 800; background: var(--gray-50); }
.pagination a:hover { background: var(--tint-primary); }
.pagination .is-current { background: var(--store-primary); }
.pagination .is-gap { background: 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: 48px; border: 1px solid var(--gray-300); border-radius: var(--pill); padding: 0 18px; background: var(--white); outline: 0; }
.textarea { border-radius: var(--radius); padding: 12px 18px; min-height: 120px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--store-primary); }
.qty { display: inline-flex; align-items: center; height: 50px; border: 1px solid var(--gray-300); border-radius: var(--pill); }
.qty button { width: 42px; height: 100%; display: grid; place-items: center; }
.qty button:hover { color: var(--store-primary-dark); }
.qty .icon { width: 16px; height: 16px; }
.qty input { width: 38px; border: 0; outline: 0; text-align: center; 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; }

/* ==========================================================
   التبويبات والدوّارات
   ========================================================== */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tab { padding: 7px 18px; border-radius: var(--pill); border: 1px solid var(--gray-200); font-weight: 700; font-size: 14.5px; background: var(--white); }
.tab:hover { border-color: var(--store-primary); }
.tab:is(.is-active, [aria-selected="true"]) { background: var(--store-primary); border-color: var(--store-primary); font-weight: 800; }
.tab-panel[hidden] { display: none; }
.scroller__track { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - (var(--per-row, 5) - 1) * 18px) / var(--per-row, 5)); gap: 18px; 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: 6px; }
.scroller-nav button { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--gray-50); }
.scroller-nav button:hover { background: var(--store-primary); }
.scroller-nav button:disabled { opacity: .4; cursor: default; background: var(--gray-50); }
.scroller-nav .icon { width: 18px; height: 18px; }

/* ==========================================================
   بطاقة التصنيف وأنواع الكتب
   ========================================================== */
.cat-row { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; }
.cat-tile { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 16px 10px 18px; border-radius: var(--radius); background: var(--tint-primary); transition: transform .2s var(--ease); }
.cat-tile:nth-child(even) { background: var(--tint-accent); }
.cat-tile:hover { transform: translateY(-4px); }
.cat-tile img { width: 76%; aspect-ratio: 1; object-fit: contain; margin-bottom: 4px; }
.cat-tile__name { font-weight: 800; font-size: 15px; }
.cat-tile__count { font-size: 13px; color: var(--gray-500); }
.type-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.type-tile { display: flex; align-items: center; gap: 14px; padding: 18px; border: 1px solid var(--gray-200); border-radius: var(--radius); transition: border-color .2s; }
.type-tile:hover { border-color: var(--store-primary); }
.type-tile .type-dot { position: static; width: 56px; height: 56px; box-shadow: none; flex: none; }
.type-tile .type-dot .icon { width: 26px; height: 26px; }
.type-tile strong { display: block; font-size: 16px; font-weight: 800; }
.type-tile div > span { font-size: 13.5px; color: var(--gray-500); }

/* ==========================================================
   الشريط الجانبيّ: بانر عموديّ، وعرض اليوم، والثقة
   ========================================================== */
.side-banner { position: relative; display: block; border-radius: var(--radius); overflow: hidden; background: var(--tint-accent); }
.side-banner img { width: 100%; }
.deal { justify-content: center; border: 2px solid var(--store-primary); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 10px; background: var(--white); }
.deal__head { display: flex; align-items: center; justify-content: space-between; }
.deal__title { font-size: 18px; font-weight: 800; }
.deal .cover { width: 72%; margin: 4px auto 6px; box-shadow: 0 10px 20px rgba(30, 40, 10, .2); }
.deal__name { text-align: center; font-weight: 800; }
.deal .price { flex-direction: row; justify-content: center; align-items: baseline; gap: 8px; }
.deal .price__now { font-size: 22px; }

/* ==========================================================
   بطاقة المقالة
   ========================================================== */
.posts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }

/* ==========================================================
   النشرة والتذييل
   ========================================================== */
.newsletter { background: var(--tint-primary); border-radius: var(--radius); }
.newsletter__inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: center; padding: 30px 34px; }
.newsletter__title { font-size: 24px; font-weight: 800; }
.newsletter__text { color: var(--gray-500); }
.newsletter__offer { display: inline-block; margin-top: 8px; padding: 3px 12px; border-radius: var(--pill); background: var(--white); color: var(--store-primary-dark); font-size: 13.5px; font-weight: 800; }
.newsletter__form { display: flex; background: var(--white); border-radius: var(--pill); padding: 5px; border: 1px solid var(--gray-200); }
.newsletter__form input { flex: 1; min-width: 0; border: 0; outline: 0; padding: 0 16px; background: transparent; }
.newsletter__form input::placeholder { color: var(--gray-500); }

.footer { margin-top: 44px; border-top: 1px solid var(--gray-200); }
.footer__main { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 36px; padding-block: 48px 36px; }
.footer .brand { margin-bottom: 14px; }
.footer__about p { color: var(--gray-500); font-size: 14.5px; margin-bottom: 16px; max-width: 340px; }
.footer h4 { font-size: 16.5px; font-weight: 800; margin-bottom: 14px; }
.footer__links li + li { margin-top: 9px; }
.footer__links a { color: var(--gray-500); }
.footer__links a:hover { color: var(--store-primary-dark); }
.footer__contact li { display: flex; gap: 10px; align-items: flex-start; }
.footer__contact li + li { margin-top: 12px; }
.footer__contact .icon { width: 19px; height: 19px; color: var(--store-primary-dark); margin-top: 3px; }
.footer__contact strong { display: block; }
.footer__contact span { color: var(--gray-500); font-size: 14px; }
.socials { display: flex; gap: 6px; }
.socials a { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--gray-50); }
.socials a:hover { background: var(--store-primary); }
.socials .icon { width: 17px; height: 17px; }
.footer__bottom { background: var(--gray-50); }
.footer__bottom-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; min-height: 60px; padding-block: 12px; font-size: 14px; color: var(--gray-500); }
.pay-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.pay-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--pill); padding: 4px 12px; font-size: 12.5px; font-weight: 700; color: var(--store-text); }
.pay-chip .icon { width: 16px; height: 16px; color: var(--store-primary-dark); }

/* ==========================================================
   صفحة المكوّنات (للمراجعة فقط)
   ========================================================== */
.kit-options { position: relative; z-index: 51; background: #1C2210; 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: 999px; 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-text); border-color: var(--store-primary); font-weight: 800; }
.kit-hero { background: var(--tint-soft); border-bottom: 1px solid var(--gray-200); padding-block: 32px; }
.kit-hero h1 { font-size: 28px; font-weight: 800; }
.kit-hero p { color: var(--gray-500); max-width: 720px; }
.kit-block { padding-block: 36px; 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: 18px; }
.kit-label::before { content: ""; width: 10px; height: 10px; border-radius: 50%; 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: 18px; }
.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-sm); overflow: hidden; font-size: 12.5px; }
.swatch__color { height: 60px; }
.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; }

/* ==========================================================
   العروض: 1440 ← 768 ← 390
   ========================================================== */
@media (max-width: 1199px) {
  .header__main { gap: 18px; }
  .tool__text { display: none; }
  .departments { width: 230px; }
  .navbar__phone { display: none; }
  .book-grid { --per-row: 4 !important; }
  .cat-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer__main { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 991px) {
  .topbar .hide-md { display: none; }
  .header__main { flex-wrap: wrap; gap: 12px 6px; padding-block: 14px; }
  .menu-toggle { display: grid; order: 0; }
  .brand { order: 1; margin-inline-end: auto; }
  .brand__logo { width: 42px; height: 42px; }
  .brand__name { font-size: 21px; }
  .header__tools { order: 2; gap: 2px; }
  .tool { padding: 4px; }
  .search { order: 3; flex-basis: 100%; height: 46px; }
  .search__select { display: none; }
  .navbar { display: none; }
  .book-grid { --per-row: 3 !important; }
  .type-row { grid-template-columns: 1fr 1fr; }
  .newsletter__inner { grid-template-columns: minmax(0, 1fr); }
  .kit-cols { grid-template-columns: 1fr 1fr; }
  .scroller__track { --per-row: 3 !important; }
}
@media (max-width: 767px) {
  .section { padding-block: 32px; }
  .heading { font-size: 22px; }
  .topbar__inner { justify-content: center; }
  .topbar__list { gap: 14px; }
  .tool__icon { width: 36px; height: 36px; }
  .header__tools .hide-sm { display: none; }
  .book-grid { --per-row: 2 !important; gap: 10px; }
  .book-card { padding: 6px 6px 10px; }
  .book-card__media { padding: 12px 14px; }
  .book-card__title { font-size: 14.5px; }
  .price__now { font-size: 15.5px; }
  .cat-row { grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: 36%; overflow-x: auto; scrollbar-width: none; gap: 10px; }
  .cat-row::-webkit-scrollbar { display: none; }
  .type-row { grid-template-columns: 1fr 1fr; gap: 10px; }
  .type-tile { flex-direction: column; text-align: center; padding: 14px 8px; gap: 8px; }
  .type-tile .type-dot { width: 46px; height: 46px; }
  .type-tile div > span { display: none; }
  .posts { grid-template-columns: 1fr; }
  .newsletter__inner { padding: 22px 18px; }
  .newsletter__form .btn { padding: 0 1.2em; }
  .newsletter__title { font-size: 20px; }
  .footer__main { grid-template-columns: 1fr 1fr; gap: 28px 18px; padding-block: 36px 28px; }
  .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: 10px; grid-auto-columns: calc((100% - 10px) / 2); }
  .kit-cols { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ==========================================================
   الرئيسيّة
   ========================================================== */
@media (min-width: 1200px) {
  .departments--pinned .departments__menu { opacity: 1; visibility: visible; transform: none; box-shadow: none; }
  .departments--pinned .departments__btn .chev { display: none; }
  .departments--pinned .departments__btn { cursor: default; }
  .header.is-past-hero .departments--pinned:not(.is-open) .departments__menu { opacity: 0; visibility: hidden; transform: translateY(6px); }
  .header.is-past-hero .departments--pinned .departments__btn .chev { display: block; }
  .header.is-past-hero .departments--pinned .departments__btn { cursor: pointer; }
  .hero__inner { padding-inline-start: 296px; }
}
.hero { padding-top: 20px; }
.slider { position: relative; min-height: 470px; border-radius: var(--radius); overflow: hidden; background: var(--tint-soft); }
.slide { position: absolute; inset: 0; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: center; gap: 20px; padding: 40px 56px; opacity: 0; visibility: hidden; transition: opacity .6s var(--ease), visibility .6s; }
.slide.is-active { opacity: 1; visibility: visible; }
.slide__title { font-size: 48px; font-weight: 800; line-height: 1.15; margin-bottom: 12px; text-wrap: balance; }
.slide__title mark { background: none; color: var(--store-primary-dark); }
.slide__text { font-size: 17px; color: var(--gray-500); max-width: 440px; margin-bottom: 22px; }
.slide__price { display: flex; align-items: baseline; gap: 8px; margin-bottom: 22px; }
.slide__price small { font-weight: 700; color: var(--gray-500); }
.slide__price strong { font-size: 30px; font-weight: 800; }
.slide__media { position: relative; display: grid; place-items: center; height: 100%; }
.slide__media::before { content: ""; position: absolute; width: 330px; height: 330px; border-radius: 50%; background: var(--tint-primary); }
.slide__media img { position: relative; z-index: 1; height: 340px; width: auto; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 6px; box-shadow: 0 20px 40px rgba(30, 40, 10, .25); }
.slide.is-active .slide__media img { animation: slideIn .7s var(--ease) both; }
@keyframes slideIn { from { transform: translateY(18px); opacity: 0; } to { transform: none; opacity: 1; } }
.slide__badge { position: absolute; z-index: 2; top: 6%; inset-inline-end: 3%; background: var(--store-accent); box-shadow: 0 8px 18px rgba(0, 0, 0, .12); width: 110px; height: 110px; border-radius: 50%; display: grid; place-content: center; text-align: center; font-weight: 800; line-height: 1.15; font-size: 14px; color: var(--store-text); }
.slide__badge strong:empty { display: none; }
.slide__badge strong { display: block; font-size: 24px; }
.slider__dots { position: absolute; bottom: 18px; inset-inline: 0; display: flex; justify-content: center; gap: 8px; z-index: 3; }
.slider__dot { width: 10px; height: 10px; border-radius: 5px; background: var(--gray-300); transition: width .25s var(--ease), background .25s; }
.slider__dot.is-active { width: 28px; background: var(--store-primary); }
.slider__arrow { position: absolute; top: 50%; z-index: 3; width: 42px; height: 42px; margin-top: -21px; border-radius: 50%; background: var(--white); display: grid; place-items: center; box-shadow: var(--shadow); opacity: 0; transition: opacity .2s; }
.slider:hover .slider__arrow, .slider__arrow:focus-visible { opacity: 1; }
.slider__arrow--prev { inset-inline-start: 14px; }
.slider__arrow--next { inset-inline-end: 14px; }
.slider__arrow .icon { width: 20px; height: 20px; }

/* تخطيط بعمود جانبيّ */
.with-aside { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 26px; align-items: stretch; }
.aside-col { display: grid; gap: 18px; grid-template-rows: auto minmax(0, 1fr); align-content: start; }
.main-col { display: grid; gap: 40px; min-width: 0; }
.with-aside .book-grid { --per-row: 4 !important; }
.banner-wide { position: relative; display: block; border-radius: var(--radius); overflow: hidden; background: var(--tint-primary); }
.banner-wide img { width: 100%; }
.promo-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.promo { display: flex; align-items: center; gap: 18px; padding: 24px; border-radius: var(--radius); background: var(--tint-primary); min-height: 180px; overflow: hidden; }
.promo:nth-child(2) { background: var(--tint-accent); }
.promo__body { flex: 1; min-width: 0; }
.promo__kicker { font-size: 13px; font-weight: 800; color: var(--gray-500); }
.promo__title { font-size: 22px; font-weight: 800; line-height: 1.3; margin: 4px 0 12px; }
.promo__covers { display: flex; flex: none; }
.promo__covers img { width: 70px; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 4px; box-shadow: 0 8px 16px rgba(0, 0, 0, .2); }
.promo__covers img + img { margin-inline-start: -22px; transform: translateY(10px); }
.scroller--authors .scroller__track { --per-row: 6; }
.author-card { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; }
.author-card img { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; border: 4px solid var(--white); box-shadow: 0 0 0 2px var(--gray-200); margin-bottom: 8px; transition: box-shadow .2s; }
.author-card:hover img { box-shadow: 0 0 0 3px var(--store-primary); }
.author-card__name { font-weight: 800; }
.author-card__count { font-size: 13px; color: var(--gray-500); }

/* ==========================================================
   رأس الصفحات الداخليّة
   ========================================================== */
.page-hero { background: var(--tint-soft); border-bottom: 1px solid var(--gray-200); padding-block: 26px 30px; }
.breadcrumb ol { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14px; color: var(--gray-500); margin-bottom: 10px; }
.breadcrumb li { display: inline-flex; align-items: center; gap: 8px; }
.breadcrumb li + li::before { content: "‹"; color: var(--gray-300); }
.breadcrumb a:hover { color: var(--store-primary-dark); }
.breadcrumb [aria-current] { color: var(--store-text); font-weight: 700; }
.page-hero__title { font-size: 34px; font-weight: 800; line-height: 1.2; }
.page-hero__title small { font-size: 15px; font-weight: 500; color: var(--gray-500); margin-inline-start: 8px; }
.page-hero__row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: var(--pill); background: var(--white); border: 1px solid var(--gray-200); font-size: 14px; font-weight: 700; }
.chip:hover { border-color: var(--store-primary); }
.chip.is-active { background: var(--store-primary); border-color: var(--store-primary); }
.chip button { width: 18px; height: 18px; display: grid; place-items: center; border-radius: 50%; }
.chip button:hover { background: var(--gray-100); }
.chip .icon { width: 12px; height: 12px; stroke-width: 2.6; }

/* ==========================================================
   صفحة التصنيف
   ========================================================== */
.shop-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 28px; align-items: start; padding-block: 30px 56px; }
.filter-block { border: 1px solid var(--gray-200); border-radius: var(--radius); padding: 18px; }
.filter-block + .filter-block { margin-top: 14px; }
.filter-block h3 { font-size: 16.5px; font-weight: 800; margin-bottom: 12px; }
.filter-list li + li { margin-top: 8px; }
.filter-list a { display: flex; justify-content: space-between; font-size: 15px; }
.filter-list a:hover { color: var(--store-primary-dark); }
.filter-list a.is-active { font-weight: 800; color: var(--store-primary-dark); }
.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: 6px; 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-text); 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: 42px; 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; }
}
@media (max-width: 991px) {
  .drawer--filters .drawer__panel { padding: 0 16px 16px; }
  .drawer--filters .drawer__head { margin-inline: -16px; margin-bottom: 16px; }
  .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; background: var(--gray-50); border-radius: var(--pill); padding: 8px 8px 8px 18px; padding-inline-start: 20px; margin-bottom: 18px; }
.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: 8px; }
.toolbar .select { min-height: 40px; width: auto; padding: 0 14px; font-size: 14px; }
.view-toggle { display: flex; gap: 4px; }
.view-toggle button { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: var(--gray-500); }
.view-toggle button[aria-pressed="true"] { background: var(--store-primary); color: var(--store-text); }
.view-toggle .icon { width: 19px; height: 19px; }
.filters-btn { display: none; }
.active-filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.active-filters__clear { font-weight: 800; font-size: 14px; color: var(--store-primary-dark); }
.shop-grid { --per-row: 4 !important; margin-bottom: 32px; }
.shop-grid.is-list { grid-template-columns: 1fr; }
.shop-grid.is-list .book-card { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 0 22px; border: 1px solid var(--gray-200); }
.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: 14.5px; }
.shop-grid.is-list .book-card__title { font-size: 19px; min-height: 0; }
.shop-grid.is-list .book-card__foot { max-width: 380px; }

/* ==========================================================
   صفحة الكتاب
   ========================================================== */
.product { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) 320px; gap: 34px; align-items: start; padding-block: 20px 44px; }
.product__gallery { position: sticky; top: 166px; align-self: start; display: grid; gap: 12px; }
.product__stage { position: relative; background: var(--tint-primary); padding: 40px; border-radius: var(--radius); overflow: hidden; display: grid; place-items: center; }
.product__stage::before { content: ""; position: absolute; width: 70%; aspect-ratio: 1; border-radius: 50%; background: var(--white); opacity: .6; }
.product__stage .cover { position: relative; width: 100%; max-width: 300px; box-shadow: 0 20px 40px rgba(30, 40, 10, .25); }
.product__stage .badge { top: 16px; inset-inline-start: 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: 4px; }
.product__author a { color: var(--store-primary-dark); font-weight: 800; }
.product__title { font-size: 34px; font-weight: 800; line-height: 1.25; margin-bottom: 12px; text-wrap: balance; }
.product__meta { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 18px; padding-bottom: 18px; border-bottom: 1px solid var(--gray-200); margin-bottom: 18px; 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; background: var(--gray-50); padding: 3px 12px; border-radius: var(--pill); }
.meta-chip .icon { width: 17px; height: 17px; color: var(--store-primary-dark); }
.product__lead { font-size: 16.5px; line-height: 1.85; margin-bottom: 22px; }
.spec-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 24px; }
.spec-list div { display: flex; flex-direction: column; padding: 10px 14px; background: var(--gray-50); border-radius: var(--radius-sm); }
.spec-list dt { font-size: 12.5px; color: var(--gray-500); }
.spec-list dd { margin: 0; font-weight: 800; }
.formats h3 { font-size: 15.5px; font-weight: 800; margin-bottom: 10px; }
.formats__list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.format { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 2px solid var(--gray-200); border-radius: var(--radius); min-width: 0; }
.format:hover { border-color: var(--store-primary); }
.format.is-current { border-color: var(--store-primary); background: var(--tint-soft); }
.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: 166px; border: 1px solid var(--gray-200); border-radius: var(--radius); padding: 22px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; background: var(--white); }
.buybox .price { flex-direction: row; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.buybox .price__now { font-size: 30px; }
.buybox .price__old { font-size: 15px; }
.save-note { font-size: 13.5px; font-weight: 800; color: var(--sale); }
.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: #2E7D32; }
.stock--low::before { background: #E07B00; }
.stock--out::before { background: var(--sale); }
.buybox__row { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; }
.buybox__row .btn { min-width: 0; padding-inline: .9em; }
.buybox .qty button { width: 36px; }
.buybox .qty input { width: 34px; }
.buybox__perks { display: grid; gap: 12px; padding-top: 14px; border-top: 1px solid var(--gray-200); font-size: 13.5px; }
.buybox__perks li { display: flex; gap: 10px; }
.buybox__perks .icon { width: 34px; height: 34px; padding: 7px; border-radius: 50%; background: var(--tint-accent); flex: none; }
.buybox__perks strong { display: block; font-size: 14.5px; }
.buybox__perks span { color: var(--gray-500); }
.buybox__links { display: flex; justify-content: center; gap: 18px; font-size: 14px; }
.buybox__links button { display: inline-flex; align-items: center; gap: 6px; color: var(--gray-500); }
.buybox__links button:hover { color: var(--store-text); }
.buybox__links .icon { width: 17px; height: 17px; }
.details { padding-block: 10px 44px; }
.details .tabs { justify-content: center; margin-bottom: 26px; }
.prose { max-width: 820px; margin-inline: auto; font-size: 16.5px; line-height: 1.95; }
.prose p + p { margin-top: 14px; }
.prose h3 { font-size: 20px; font-weight: 800; margin: 22px 0 8px; }
.spec-table { width: 100%; max-width: 820px; margin-inline: auto; border-collapse: separate; border-spacing: 0; font-size: 15px; border: 1px solid var(--gray-200); border-radius: var(--radius); overflow: hidden; }
.spec-table th, .spec-table td { padding: 12px 18px; text-align: start; }
.spec-table tr + tr th, .spec-table tr + tr td { border-top: 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: 330px minmax(0, 1fr); gap: 26px; align-items: start; max-width: 1100px; margin-inline: auto; }
.rating-box { background: var(--tint-primary); border-radius: var(--radius); padding: 22px; display: grid; gap: 10px; }
.rating-box__score { font-size: 54px; font-weight: 800; line-height: 1; }
.rating-bars { display: grid; gap: 6px; font-size: 13.5px; }
.rating-bars__row { display: grid; grid-template-columns: 52px 1fr 30px; gap: 10px; align-items: center; }
.rating-bars__track { height: 7px; background: var(--white); border-radius: 4px; overflow: hidden; }
.rating-bars__fill { display: block; height: 100%; background: var(--store-primary-dark); border-radius: 4px; }
.reviews-list { display: grid; gap: 14px; }
.review-form { border: 1px solid var(--gray-200); border-radius: var(--radius); padding: 20px; 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-primary-dark); border-radius: 4px; }
.author-box { display: grid; grid-template-columns: 110px minmax(0, 1fr) auto; gap: 22px; align-items: center; background: var(--tint-accent); border-radius: var(--radius); padding: 24px; }
.author-box img { width: 110px; height: 110px; border-radius: 50%; object-fit: cover; border: 4px solid var(--white); }
.author-box h2 { font-size: 21px; font-weight: 800; margin-bottom: 4px; }
.author-box p { color: var(--gray-500); }
.author-box .eyebrow { margin-bottom: 4px; color: var(--store-text); }
.sticky-buy { display: none; }

.sample-player { display: flex; align-items: center; gap: 14px; margin-top: 16px; padding: 12px 16px; border: 1px solid var(--gray-200); border-radius: var(--pill); background: var(--white); }
.sample-player__btn { width: 46px; height: 46px; flex: none; border-radius: 50%; background: var(--store-primary); color: var(--store-text); 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; margin-bottom: 4px; }
.wave { display: flex; align-items: center; gap: 2px; height: 26px; }
.wave span { flex: 1; min-width: 2px; background: var(--gray-300); border-radius: 2px; }
.wave span.is-played { background: var(--store-primary-dark); }
.sample-player__time { font-size: 12.5px; color: var(--gray-500); direction: ltr; font-variant-numeric: tabular-nums; }
.chapters { max-width: 820px; margin-inline: auto; border: 1px solid var(--gray-200); border-radius: var(--radius); overflow: hidden; }
.chapters li { display: flex; align-items: center; gap: 14px; padding: 12px 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(--tint-primary); font-weight: 800; font-size: 13px; border-radius: 50%; }
.chapters__title { flex: 1; min-width: 0; font-weight: 700; }
.chapters__free { font-size: 12px; font-weight: 800; background: var(--store-accent); padding: 2px 10px; border-radius: var(--pill); }
.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: 20px; }
.edu-fact { display: flex; align-items: center; gap: 10px; padding: 12px; background: var(--tint-primary); 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: 50%; }
.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: 18px; }
.safety-note { display: flex; gap: 10px; padding: 12px 14px; background: var(--tint-accent); border-radius: var(--radius); font-size: 14px; margin-bottom: 22px; }
.safety-note .icon { width: 20px; height: 20px; flex: none; margin-top: 2px; }

/* المؤلّف */
.author-hero__inner { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 32px; align-items: center; }
.author-hero__photo img { width: 170px; height: 170px; border-radius: 50%; object-fit: cover; border: 6px solid var(--white); box-shadow: 0 0 0 3px var(--store-primary); }
.author-hero__bio { font-size: 16.5px; color: var(--gray-500); max-width: 720px; margin: 10px 0 16px; }
.author-stats { display: flex; flex-wrap: wrap; gap: 8px; }
.author-stat { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: var(--pill); background: var(--white); border: 1px solid var(--gray-200); font-size: 14px; }
.author-stat strong { font-weight: 800; }
.author-stat > .icon { width: 17px; height: 17px; color: var(--store-primary-dark); }

/* السلّة */
.cart-steps { display: flex; gap: 10px; margin-bottom: 22px; }
.cart-steps li { flex: 1; display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: var(--pill); background: var(--gray-50); font-weight: 800; font-size: 14.5px; color: var(--gray-500); }
.cart-steps__num { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--white); font-size: 13px; }
.cart-steps .is-current { background: var(--tint-primary); color: var(--store-text); }
.cart-steps .is-current .cart-steps__num { background: var(--store-primary); }
.cart-layout { display: grid; grid-template-columns: minmax(0, 1fr) 370px; gap: 28px; align-items: start; padding-block: 30px 56px; }
.cart-table { width: 100%; border-collapse: separate; border-spacing: 0; }
.cart-table thead th { background: var(--gray-50); text-align: start; font-size: 13.5px; font-weight: 800; padding: 12px 14px; white-space: nowrap; color: var(--gray-500); }
.cart-table thead th:first-child { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.cart-table thead th:last-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.cart-table td { padding: 16px 14px; border-bottom: 1px solid var(--gray-200); vertical-align: middle; }
.cart-item__product { display: flex; align-items: center; gap: 14px; }
.cart-item__product .cover { width: 72px; 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: 15.5px; 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 10px; border-radius: var(--pill); 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: 42px; }
.cart-item .qty button { width: 32px; }
.cart-item .qty input { width: 30px; }
.qty-fixed { font-size: 13px; color: var(--gray-500); white-space: nowrap; }
.remove-btn { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: var(--gray-500); background: var(--gray-50); }
.remove-btn:hover { background: #FDECEC; color: var(--sale); }
.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: 20px; }
.coupon { display: flex; flex: 0 1 440px; border: 1px solid var(--gray-300); border-radius: var(--pill); overflow: hidden; padding: 4px; background: var(--white); }
.coupon input { flex: 1; min-width: 0; border: 0; outline: 0; padding: 0 14px; min-height: 42px; }
.coupon .btn { min-height: 42px; }
.cart-actions__links { display: flex; gap: 18px; 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: 166px; background: var(--gray-50); border-radius: var(--radius); padding: 22px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.summary h2 { font-size: 20px; font-weight: 800; }
.ship-progress { background: var(--white); border-radius: var(--radius-sm); 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-dark); }
.ship-bar { height: 7px; background: var(--gray-100); border-radius: 4px; overflow: hidden; }
.ship-bar span { display: block; height: 100%; background: var(--store-primary); }
.summary__rows { display: grid; gap: 10px; font-size: 15px; }
.summary__row { display: flex; justify-content: space-between; gap: 10px; }
.summary__row span:last-child { font-weight: 800; white-space: nowrap; }
.summary__row--discount span:last-child { color: var(--sale); }
.summary__row--muted span:last-child { font-weight: 500; color: var(--gray-500); font-size: 13.5px; }
.applied-coupon { display: inline-flex; align-items: center; gap: 4px; margin-inline-start: 8px; padding: 1px 4px 1px 10px; border: 1px dashed var(--gray-300); border-radius: var(--pill); font-size: 12.5px; font-weight: 800; background: var(--white); direction: ltr; }
.applied-coupon button { width: 18px; height: 18px; display: grid; place-items: center; border-radius: 50%; }
.applied-coupon .icon { width: 12px; height: 12px; stroke-width: 2.6; }
.summary__total { display: flex; justify-content: space-between; align-items: baseline; padding-top: 14px; border-top: 1px solid var(--gray-200); }
.summary__total span { font-weight: 800; }
.summary__total strong { font-size: 28px; font-weight: 800; }
.summary__note { display: flex; gap: 8px; font-size: 13.5px; color: var(--gray-500); }
.summary__note .icon { width: 18px; height: 18px; flex: none; margin-top: 2px; color: var(--store-primary-dark); }
.cart-empty { text-align: center; padding: 60px 20px; }
.cart-empty__icon { width: 110px; height: 110px; display: grid; place-items: center; margin: 0 auto 20px; background: var(--tint-primary); border-radius: 50%; }
.cart-empty__icon .icon { width: 50px; height: 50px; stroke-width: 1.4; }
.cart-empty h2 { font-size: 24px; font-weight: 800; margin-bottom: 8px; }
.cart-empty p { color: var(--gray-500); margin-bottom: 20px; }

/* غير موجودة */
.notfound { padding-block: 30px; }
.notfound__inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: center; background: var(--tint-soft); border-radius: var(--radius); padding: 50px; }
.notfound__art { position: relative; display: grid; place-items: center; min-height: 300px; }
.notfound__art::before { content: ""; position: absolute; width: 280px; height: 280px; border-radius: 50%; background: var(--tint-primary); }
.notfound__code { position: relative; font-size: 140px; font-weight: 800; line-height: 1; direction: ltr; color: var(--store-text); }
.notfound__code span { color: var(--store-primary-dark); }
.notfound__leaf { position: absolute; bottom: 30px; width: 70px; height: 70px; color: var(--store-primary-dark); }
.notfound h1 { font-size: 34px; font-weight: 800; line-height: 1.3; margin-bottom: 10px; }
.notfound__text { font-size: 16.5px; color: var(--gray-500); margin-bottom: 20px; max-width: 460px; }
.notfound .search { max-width: 500px; margin-bottom: 16px; }
.notfound__actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }

/* ==========================================================
   عروض الصفحات الداخليّة
   ========================================================== */
@media (max-width: 1199px) {
  .slide__title { font-size: 38px; }
  .slide__media img { height: 280px; }
  .slide__media::before { width: 270px; height: 270px; }
  .with-aside { grid-template-columns: 250px minmax(0, 1fr); gap: 20px; }
  .with-aside .book-grid { --per-row: 4 !important; gap: 12px; }
  .scroller--authors .scroller__track { --per-row: 5; }
  .shop-layout { grid-template-columns: 240px minmax(0, 1fr); gap: 22px; }
  .shop-grid { --per-row: 3 !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) 320px; }
}
@media (max-width: 991px) {
  .slider { min-height: 420px; }
  .slide { padding: 30px 36px; }
  .with-aside { grid-template-columns: minmax(0, 1fr); }
  .aside-col { position: static; grid-template-columns: 1fr 1fr; order: 2; align-items: stretch; }
  .aside-col .side-banner img { height: 100%; object-fit: cover; }
  .with-aside .book-grid { --per-row: 4 !important; }
  .scroller--authors .scroller__track { --per-row: 4; }
  .page-hero__title { font-size: 28px; }
  .shop-layout { grid-template-columns: minmax(0, 1fr); }
  .filters-btn { display: inline-flex; }
  .product { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .product__gallery { grid-row: auto; }
  .product__gallery { position: relative; top: 0; }
  .product__stage .cover { max-width: 240px; }
  .buybox { grid-column: auto; }
  .reviews-layout { grid-template-columns: minmax(0, 1fr); }
  .cart-layout { grid-template-columns: minmax(0, 1fr); }
  .summary { position: static; }
  .notfound__inner { grid-template-columns: minmax(0, 1fr); text-align: center; padding: 32px 20px; gap: 10px; }
  .notfound__text, .notfound .search { margin-inline: auto; }
  .notfound__actions, .notfound .chips { justify-content: center; }
}
@media (max-width: 767px) {
  .hero { padding-top: 12px; }
  .slider { min-height: 540px; }
  .slide { grid-template-columns: 1fr; grid-template-rows: auto 1fr; padding: 22px 20px 44px; text-align: center; gap: 6px; }
  .slide__media { order: -1; height: 240px; }
  .slide__media::before { width: 210px; height: 210px; }
  .slide__badge { width: 76px; height: 76px; font-size: 11px; inset-inline-end: 6%; }
  .slide__badge strong { font-size: 17px; }
  .slide__media img { height: 220px; }
  .slide__title { font-size: 27px; }
  .slide__text { font-size: 15px; margin: 0 auto 14px; }
  .slide__price { justify-content: center; margin-bottom: 14px; }
  .slider__arrow { display: none; }
  .aside-col { grid-template-columns: minmax(0, 1fr); }
  .aside-col .side-banner { display: none; }
  .with-aside .book-grid { --per-row: 2 !important; gap: 10px; }
  .promo-pair { grid-template-columns: minmax(0, 1fr); }
  .promo__title { font-size: 19px; }
  .scroller--authors .scroller__track { --per-row: 3; grid-auto-columns: calc((100% - 20px) / 3); }
  .author-card img { width: 86px; height: 86px; }
  .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 { border-radius: var(--radius); padding: 10px; }
  .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: 25px; }
  .product__stage { padding: 26px; }
  .product__stage .cover { max-width: 190px; }
  .spec-list { grid-template-columns: 1fr 1fr; }
  .formats__list { grid-template-columns: minmax(0, 1fr); }
  .format__text { display: flex; justify-content: space-between; align-items: baseline; flex: 1; gap: 8px; }
  .spec-table th { width: 42%; }
  .author-box { grid-template-columns: 72px minmax(0, 1fr); padding: 18px; gap: 14px; }
  .author-box img { width: 72px; height: 72px; }
  .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: 10px; position: fixed; inset-inline: 0; bottom: 0; z-index: 60; background: var(--white); border-top: 1px solid var(--gray-200); padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); box-shadow: 0 -6px 18px rgba(0, 0, 0, .08); }
  .sticky-buy .price__now { font-size: 18px; }
  .sticky-buy .btn { flex: 1; min-height: 44px; }
  .sticky-buy .btn--outline { flex: none; }
  body.has-sticky-buy { padding-bottom: 70px; }
  .author-hero__inner { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; }
  .author-hero__photo img { width: 130px; height: 130px; }
  .author-stats { justify-content: center; }
  .cart-steps li { padding: 8px; font-size: 12.5px; gap: 6px; }
  .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: 72px minmax(0, 1fr) auto; grid-template-areas: "cov info rm" "cov qty total"; column-gap: 14px; row-gap: 10px; padding: 14px 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 { padding: 0 1.1em; }
  .cart-actions__links { justify-content: space-between; }
  .notfound__code { font-size: 96px; }
  .notfound__art { min-height: 220px; }
  .notfound__art::before { width: 200px; height: 200px; }
  .notfound h1 { font-size: 25px; }
}
.section--soft { background: var(--gray-50); }

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

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

/* عدّاد «عرض اليوم» */
.deal .countdown { display: flex; justify-content: center; gap: 6px; margin-top: 12px; }
.countdown__cell { min-width: 52px; text-align: center; background: var(--tint-primary); border-radius: var(--radius-sm); padding: 6px 0 4px; }
.countdown__num { display: block; font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.2; }
.countdown__unit { display: block; font-size: 11.5px; color: var(--gray-500); }

/* الباقات */
.promo__save { color: var(--store-primary-dark); }
.promo .price { margin-bottom: 4px; }
.promo__btn { margin-top: 10px; }
/* أزرار السلّة في الهاتف: لا تقلّ مساحة اللمس عن 40 بكسل */
@media (max-width: 767px) { .book-row .btn-cart { width: 40px; height: 40px; } .promo__btn { min-height: 40px; } }
.promo__covers img { height: auto; }

/* المدوّنة */
.post { display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius); overflow: hidden; }
.post__media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; 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; top: 12px; inset-inline-start: 12px; width: 52px; text-align: center; background: var(--white); border-radius: var(--radius-sm); padding: 4px 0; line-height: 1.15; font-size: 12px; font-weight: 700; color: var(--gray-500); }
.post__date strong { display: block; font-size: 19px; color: var(--store-text); }
.post__body { padding: 16px 18px 20px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.post__title { font-size: 17px; font-weight: 800; line-height: 1.4; }
.post__title a:hover { color: var(--store-primary-dark); }
.post__excerpt { color: var(--gray-500); font-size: 14.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.post .link-more { margin-top: auto; padding-top: 6px; }
.blog-grid { row-gap: 22px; }
.blog-pager { margin-top: 28px; }
.post-page__title { max-width: 900px; line-height: 1.35; }
.post-page__meta { display: flex; align-items: center; gap: 6px; margin-top: 8px; color: var(--gray-500); font-size: 14px; }
.post-page__meta .icon { width: 16px; height: 16px; }
.post-page__wrap { max-width: 860px; padding-block: 28px 20px; }
.post-page__hero { margin: 0; overflow: hidden; border-radius: var(--radius); background: var(--gray-100); }
.post-page__hero img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.post-page__body { padding-top: 26px; font-size: 18px; line-height: 1.95; }
.post-page__body p + p { margin-top: 16px; }

/* الأسئلة الشائعة */
.faq-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 32px; align-items: start; }
.faq-head__text { color: var(--gray-500); margin-top: 6px; font-size: 14.5px; }
.faq-list { display: grid; gap: 10px; }
.faq-item { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius); }
.faq-item[open] { border-color: var(--store-primary); }
.faq-item summary { position: relative; list-style: none; cursor: pointer; padding: 16px 18px; padding-inline-end: 54px; font-weight: 800; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: ""; position: absolute; inset-inline-end: 16px; top: 50%; width: 26px; height: 26px; margin-top: -13px; border-radius: 50%;
  background: var(--tint-primary) linear-gradient(var(--store-primary-dark), var(--store-primary-dark)) center / 11px 2px no-repeat;
}
.faq-item:not([open]) summary::after {
  background-image: linear-gradient(var(--store-primary-dark), var(--store-primary-dark)), linear-gradient(var(--store-primary-dark), var(--store-primary-dark));
  background-size: 11px 2px, 2px 11px; background-position: center; background-repeat: no-repeat;
}
.faq-item__answer { padding: 0 18px 16px; color: var(--gray-500); }

/* اشترِ أكثر ووفّر */
.qty-deal { display: inline-flex; align-items: center; gap: 8px; width: fit-content; padding: 6px 12px; border-radius: var(--radius-sm); background: var(--tint-primary); color: var(--store-primary-dark); font-size: 14px; font-weight: 800; }
.qty-deal .icon { width: 16px; height: 16px; }

@media (max-width: 900px) { .faq-wrap { grid-template-columns: 1fr; gap: 6px; } }
@media (max-width: 600px) { .post-page__body { font-size: 16px; } }

/* ==========================================================
   الإصدار الثاني: شريط الثقة، ونصّ البانرات، والأشرطة الملوّنة، وقائمة «الأعلى تقييمًا»
   ========================================================== */
.trust-section { padding-top: 16px; }
.trust-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--gray-200); border-radius: var(--radius); background: var(--white); }
.trust-strip li { display: flex; align-items: center; gap: 12px; padding: 14px 18px; min-width: 0; }
.trust-strip li + li { border-inline-start: 1px solid var(--gray-200); }
.trust-strip__icon { width: 42px; height: 42px; flex: none; border-radius: 50%; background: var(--tint-accent); display: grid; place-items: center; }
.trust-strip__icon .icon { width: 21px; height: 21px; }
.trust-strip strong { display: block; font-size: 14.5px; font-weight: 800; }
.trust-strip span { font-size: 13px; color: var(--gray-500); }

.banner-copy { position: absolute; z-index: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.banner-copy__title { font-size: 26px; font-weight: 800; line-height: 1.2; color: var(--store-text); text-wrap: balance; }
.banner-copy__title mark { background: none; color: var(--store-primary-dark); }
.banner-copy__text { font-size: 15px; color: var(--store-text); }
.banner-copy__btn { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; padding: 8px 16px; border-radius: var(--pill); background: var(--store-text); color: var(--white); font-size: 14px; font-weight: 800; }
.banner-copy__btn .icon { width: 15px; height: 15px; }
.side-banner .banner-copy { inset: 26px 24px auto; }
.banner-wide .banner-copy { inset-block: 0; inset-inline-start: 6%; justify-content: center; max-width: 48%; }
.banner-wide .banner-copy__title { font-size: 34px; }
.banner-wide .banner-copy__text { font-size: 17px; }

.band { background: var(--tint-soft); }
.band--green { background: var(--tint-soft); }
.band--warm { background: color-mix(in srgb, var(--store-accent) 7%, var(--store-bg)); }
.band .book-card, .band .book-row { background: var(--white); }
.band .scroller-nav button { background: var(--white); }
.band .scroller-nav button:hover { background: var(--store-primary); }
.section-head__tools { display: flex; align-items: center; gap: 12px 16px; flex-wrap: wrap; }

.book-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.book-list .book-row { align-items: stretch; }
.book-list .rating { font-size: 12.5px; color: var(--gray-500); }
.book-list .book-row__foot { padding-top: 6px; }

@media (max-width: 1199px) {
  .trust-strip li { padding: 12px 12px; gap: 10px; }
  .trust-strip span { display: none; }
  .banner-wide .banner-copy__title { font-size: 27px; }
  .book-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  .trust-section { padding-top: 12px; }
  .trust-strip { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; border-radius: var(--radius-sm); }
  .trust-strip::-webkit-scrollbar { display: none; }
  .trust-strip li { flex: 0 0 auto; scroll-snap-align: start; padding: 10px 14px; }
  .trust-strip__icon { width: 34px; height: 34px; }
  .trust-strip__icon .icon { width: 17px; height: 17px; }
  .trust-strip strong { font-size: 13.5px; white-space: nowrap; }
  .banner-wide { display: grid; }
  .banner-wide img { height: 170px; object-fit: cover; object-position: 12% 50%; }
  .banner-wide .banner-copy { position: static; max-width: none; padding: 16px 18px 18px; background: var(--tint-primary); }
  .banner-wide .banner-copy__title { font-size: 22px; }
  .banner-wide .banner-copy__text { font-size: 15px; }
  .book-list { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .book-list .book-row:nth-child(n+5) { display: none; }
  .section-head__tools .scroller-nav { display: none; }
  .wish-btn, .quick-btn { width: 34px; height: 34px; }
}

.wide-wrap { padding-bottom: 44px; }
.works-nav { justify-content: flex-end; margin: -12px 0 12px; }
@media (max-width: 991px) {
  .posts { gap: 14px; }
  .promo { flex-direction: column; align-items: stretch; gap: 14px; padding: 18px; }
  .promo__covers { order: -1; justify-content: center; padding-bottom: 8px; }
}
@media (max-width: 767px) {
  .wide-wrap { padding-bottom: 32px; }
  .deal .cover { width: 46%; }
  .promo { flex-direction: column; align-items: stretch; gap: 14px; padding: 18px; }
  .promo__covers { order: -1; justify-content: center; padding-bottom: 8px; }
}

/* معرض صفحة الكتاب: الغلاف والغلاف الخلفيّ؛ يختفي شريط الصور إن لم يكن للكتاب غلافٌ خلفيّ */
.gallery-thumbs { display: flex; gap: 10px; justify-content: center; }
.gallery-thumbs:not(:has([data-slot="book.cover_back"])) { display: none; }
.gallery-thumb { width: 62px; padding: 4px; border-radius: var(--radius-sm); border: 2px solid var(--gray-200); background: var(--white); }
.gallery-thumb[aria-pressed="true"] { border-color: var(--store-primary); }
.gallery-thumb img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 3px; }
/* اختيار الصيغة: يختفي إن لم يكن للعنوان غير صيغةٍ واحدة */
[data-slot="book.formats"]:not(:has([data-repeat="format"] ~ [data-preview-copy])) { display: none; }

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

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